2022年cisco命令详解 .pdf
《2022年cisco命令详解 .pdf》由会员分享,可在线阅读,更多相关《2022年cisco命令详解 .pdf(5页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、cisco 命令详解1.交换机支持的命令:交换机基本状态:switch:;ROM 状态,hostname ;用户模式hostname#;特权模式hostname(config)#;全局配置模式hostname(config-if)#;接口状态交换机口令设置:switchenable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口
2、令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xx switch#exit ;返回命令交换机 VLAN设置:switch#vlan database ;进入 VLAN 设置switch(vlan)#vlan 2 ;建 VLAN 2 switch(vlan)#no vlan 2 ;删 vlan 2 switch(config)#int f0/1 ;进
3、入端口 1 switch(config-if)#switchport access vlan 2 ;当前端口加入 vlan 2 switch(config-if)#switchport mode trunk ;设置为干线switch(config-if)#switchport trunk allowed vlan 1,2;设置允许的 vlan switch(config-if)#switchport trunk encap dot1q ;设置 vlan 中继switch(config)#vtp domain ;设置发 vtp 域名switch(config)#vtp password ;设置发
4、 vtp 密码switch(config)#vtp mode server ;设置发 vtp 模式switch(config)#vtp mode client ;设置发 vtp 模式交换机设置 IP 地址:switch(config)#interface vlan 1 ;进入 vlan 1 switch(config-if)#ip address ;设置 IP 地址switch(config)#ip default-gateway ;设置默认网关名师资料总结-精品资料欢迎下载-名师精心整理-第 1 页,共 5 页 -switch#dir flash:;查看闪存交换机显示命令:switch#wr
5、ite ;保存配置信息switch#show vtp ;查看 vtp 配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看 vlan 配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息2.路由器支持的命令:路由器显示命令:router#show run ;显示配置信息router#show interface ;显示接口信息router#show ip route ;显示路由信息router#show cdp nei ;显示邻居信息router#reload ;重新起动路由
6、器口令设置:routerenable ;进入特权模式router#config terminal ;进入全局配置模式router(config)#hostname ;设置交换机的主机名router(config)#enable secret xxx ;设置特权加密口令router(config)#enable password xxb ;设置特权非密口令router(config)#line console 0 ;进入控制台口router(config-line)#line vty 0 4 ;进入虚拟终端router(config-line)#login ;要求口令验证router(confi
7、g-line)#password xx ;设置登录口令xx router(config)#(Ctrl+z);返回特权模式router#exit ;返回命令路由器配置:router(config)#int s0/0 ;进入 Serail接口router(config-if)#no shutdown ;激活当前接口router(config-if)#clock rate 64000 ;设置同步时钟router(config-if)#ip address ;设置 IP 地址router(config-if)#ip address second ;设置第二个 IP router(config-if)#
8、int f0/0.1 ;进入子接口router(config-subif.1)#ip address ;设置子接口 IP router(config-subif.1)#encapsulation dot1q ;绑定 vlan 中继协议router(config)#config-register 0 x2142 ;跳过配置文件router(config)#config-register 0 x2102 ;正常使用配置文件router#reload ;重新引导名师资料总结-精品资料欢迎下载-名师精心整理-第 2 页,共 5 页 -路由器文件操作:router#copy running-config
9、 startup-config ;保存配置router#copy running-config tftp ;保存配置到 tftp router#copy startup-config tftp ;开机配置存到 tftp router#copy tftp flash:;下传文件到 flash router#copy tftp startup-config;下载配置文件ROM 状态:Ctrl+Break ;进入 ROM 监控状态rommonconfreg 0 x2142 ;跳过配置文件rommonconfreg 0 x2102 ;恢复配置文件rommonreset;重新引导rommoncopy x
10、modem:flash:;从 console 传输文件rommonIP_ADDRESS=10.65.1.2 ;设置路由器 IP rommonIP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommonTFTP_SERVER=10.65.1.1 ;指定 TFTP服务器IP rommonTFTP_FILE=c2600.bin ;指定下载的文件rommontftpdnld ;从 tftp下载rommondir flash:;查看闪存内容rommonboot ;引导 IOS 静态路由:router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.
11、2 ;静态路由举例router(config)#ip route 0.0.0.0 0.0.0.0 1.1.1.2 ;默认路由举例动态路由:router(config)#ip routing ;启动路由转发router(config)#router rip ;启动 RIP路由协议。router(config-router)#network ;设置发布路由router(config-router)#negihbor ;点对点帧中继用。帧中继命令:router(config)#frame-relay switching ;使能帧中继交换router(config-s0)#encapsulation
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 2022年cisco命令详解 2022 cisco 命令 详解
限制150内