思科交换机和路由器配置命令简写与完整对照.xls_第1页
思科交换机和路由器配置命令简写与完整对照.xls_第2页
思科交换机和路由器配置命令简写与完整对照.xls_第3页
思科交换机和路由器配置命令简写与完整对照.xls_第4页
思科交换机和路由器配置命令简写与完整对照.xls_第5页
已阅读5页,还剩3页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

思思科科交交换换机机配配置置命命令令 简简写写命命令令完完整整命命令令 1 用户模式 用户模式 switch switch 2 特权模式 特权模式 switch enswitch enable switch switch 3 全局配置模式全局配置模式 switch conf tswitch config terminal switch config switch config 4 接口配置模式接口配置模式 switch config in f0 1switch config interface f0 1 switch config if switch config if 5 line模式 line模式 switch config lin c 0switch config line console 0 switch config line switch config line 6 更改交换机主机名更改交换机主机名 switch config ho benetswitch config hostname benet benet config benet config 7 配置进入特权模式的明文口令配置进入特权模式的明文口令 switch config en pass 123switch config enable password 123 8 删除进入特权模式的明文口令删除进入特权模式的明文口令 switch config no ena passswitch config no enable password 9 配置进入特权模式的加密口令配置进入特权模式的加密口令 switch config en se 456switch config enable secret 456 10 删除进入特权模式的加密口令删除进入特权模式的加密口令 switch config no ena seswitch config no enable secret 11 查看交换机配置查看交换机配置 switch sh runswitch show running config 12 配置console口令配置console口令 switch config lin cons 0 switch config line console 0 switch config line pass 123switch config line password 123 switch config line logiswitch config line login 13 配置交换机IP地址配置交换机IP地址 switch config in vl 1switch config interface vlan 1 switch config if ip ad 192 168 0 2 255 255 255 0switch config if ip address 192 168 0 2 255 255 255 0 switch config if no shswitch config if no shutdown 14 删除交换机接口IP地址删除交换机接口IP地址 switch config if no ip adswitch config if no ip address 15 配置交换机默认网关配置交换机默认网关 switch config ip default g 192 168 0 1switch config ip default gateway 192 168 0 1 16 查看交换机的MAC地址表查看交换机的MAC地址表 switch sh mac aswitch show mac address table 17 查看思科交换机相邻设备的详细信息查看思科交换机相邻设备的详细信息 switch sh cdp nei deswitch show cdp neighbors detail 18 保存交换机配置保存交换机配置 1 switch cop run st1 switch copy running config startup config 2 switch wr2 switch write 19 恢复交换机出厂配置恢复交换机出厂配置 switch er stswitch erase startup config switch reloswitch reload 20 创建VLAN创建VLAN switch vl daswitch vlan database switch vlan vl 30switch vlan vlan 30 switch vlan exitswitch vlan exit 21 VLAN重命名VLAN重命名 switch vlan vl 20 n benetswitch vlan vlan 20 name benet VLAN 20 modified VLAN 20 modified Name benet Name benet 22 删除VLAN删除VLAN switch vlan n vl 20switch vlan no vlan 20 Deleting VLAN 2 Deleting VLAN 2 switch vlan eswitch vlan exit 简简写写命命令令完完整整命命令令 23 将端口加入到VLAN将端口加入到VLAN switch config in f0 2switch config interface f0 2 switch config if sw a v 30switch config if switchport access vlan 30 24 验证VLAN配置信息验证VLAN配置信息 switch sh vlan bswitch show vlan brief switch sh vlan sswitch show vlan switch 25 删除VLAN中的端口删除VLAN中的端口 1 switch config if no sw a v 31 switch config if no switchport access vlan 3 switch config if end switch config if end 2 switch config if def interface f0 22 switch config if default interface f0 2 Building configuration Building configuration Interface FastEthernet0 2 set to default configuration Interface FastEthernet0 2 set to default configuration switch config end switch config end 26 同时将多个端口加入VLAN并验证同时将多个端口加入VLAN并验证 switch config in r f0 3 10switch config interface range f0 3 10 switch config if range sw a v 3switch config if range switchport access vlan 3 switch config endswitch config end switch sh vlan sswitch show vlan switch 27 配置VLAN TRUHK配置VLAN TRUHK switch config in f0 15switch config interface f0 15 switch config if sw m tswitch config if switchport mode trunk 28 从TRUNK中添加某个VLAN从TRUNK中添加某个VLAN switch config in f0 15switch config interface f0 15 switch config if sw t a v ad 3switch config if switchport trunk allowed vlan add 3 switch config if endswitch config if end 29 从TRUNK中删除某个VLAN从TRUNK中删除某个VLAN switch config in f0 15switch config interface f0 15 switch config if sw t a v r 3switch config if switchport trunk allowed vlan remove 3 switch config if endswitch config if end 30 验证接口模式 检查中断端口允许的VLAN列表 验证接口模式 检查中断端口允许的VLAN列表 switch sh int f0 15 switchp switch show interface f0 15 switchport 31 查看用过的命令查看用过的命令 switch sh hiswitch show history 思思科科路路由由器器配配置置命命令令 简简写写命命令令完完整整命命令令 1 用户模式 用户模式 Router Router 2 特权模式 特权模式 Router enRouter enable Router Router 3 全局配置模式全局配置模式 Router conf tRouter config terminal Router config Router config 4 接口配置模式接口配置模式 Router config in f1 0Router config interface f1 0 Router config if Router config if 5 子接口配置模式子接口配置模式 Router config in f1 0 1Router config interface f1 0 1 Router config subif Router config subif 6 line模式 line模式 Router config lin c 0Router config line console 0 Router config line Router config line 7 路由模式路由模式 Router config router rip rip是一种路由协议 Router config router rip rip是一种路由协议 Router config router Router config router 8 静态路由的配置静态路由的配置 Router en Router enable Router conf t Router config terminal Router config in f0 0 Router config interface f0 0 Router config if ip ad 192 168 2 2 255 255 255 0 Router config if ip address 192 168 2 2 255 255 255 0 Router config if no shRouter config if no shutdown Router config if e Router config if exit Router config ip route 目标网段 目标网段掩码 下一跳入口IP地址Router config ip route 目标网段 目标网段掩码 下一跳入口IP地址 9 默认路由的配置默认路由的配置 Router config ip route 0 0 0 0 0 0 0 0 下一跳入口IP地址Router config ip route 0 0 0 0 0 0 0 0 下一跳入口IP地址 10 查看路由表查看路由表 benet sh ip robenet show ip route 11 更改路由器主机名更改路由器主机名 Router config ho zscRouter config hostname zsc zsc config zsc config 12 查看接口状态查看接口状态 Router sh int f0 0Router show interfaces f0 0 13 查看路由器当前时间查看路由器当前时间 Router sh cloRouter show clock 14 配置路由器接口IP地址配置路由器接口IP地址 Router config in f1 0 有些写成e0 1 e0 Router config interface f1 0 有些写成e0 1 e0 Router config if ip ad 10 20 30 40 255 0 0 0Router config if ip address 10 20 30 40 255 0 0 0 Router config if no shRouter config if no shutdown 15 配置控制台密码配置控制台密码 Router config lin c 0Router config line console 0 Router config line pas 123Router config line password 123 Router config line logiRouter config line login 16 配置特权模式密码配置特权模式密码 Router config ena p 123Router config enable password 123 17 配置加密保存的密码配置加密保存的密码 Router config ena s 321Router config enable secret 321 简简写写命命令令完完整整命命令令 18 对所有密码加密对所有密码加密 Router config ser pasRouter config service password encryption 19 配置接口标识配置接口标识 Router config if des this is zsc Router config if description this is zsc 20 配置路由器banner提示信息配置路由器banner提示信息 Router config ban m this is a main router Router config banner motd this is a main router 21 配置超时配置超时 Router config lin c 0Router config line console 0 Router config line exec t 0 0Router config line exec timeout 0 0 22 显示同步显示同步 Router config lin c 0Router config line console 0 Router config line logg sRouter config line logging synchronous 23 禁用DNS禁用DNS Router config no ip domain loRouter config no ip domain lookup 24 查看路由器版本信息查看路由器版本信息 Router sh veRouter show version 25 配置路由器和交换机间的单臂路由配置路由器和交换机间的单臂路由 Router config in f0 0 1 进入子接口模式 Router config in f0 0 1 进入子接口模式 Router config subif en d 20 封装802 1Q协议 Router config subif encapsulation dot1Q 20 封装802 1Q协议 Router config subif ip ad 192 168 3 1 255 255 255 0Router config subif ip address 192 168 3 1 255 255 255 0 Router config subif no shRouter config subif no shutdown 26 配置RIP V1动态路由协议 配置RIP V1动态路由协议 Router config router rRouter config router rip Router config router net 10 1 1 0Router config router network 10 1 1 0 Router config router net 192 168 1 0Router config router network 192 168 1 0 27 删除RIP V1动态路由协议 删除RIP V1动态路由协议 Router config no router rRouter config no router rip 28 配置RIP V2动态路由协议 配置RIP V2动态路由协议 Router config router rRouter config router rip Router config router ve 2Router config router version 2 Router config router no auRouter config router no auto summary Router config router net 10 1 1 0Router config router network 10 1 1 0 Router config router net 192 168 1 0Router config router network 192 168 1 0 29 查看路由表查看路由表 Router sh ip roRouter show ip route 30 查看路由协议配置查看路由协议配置 Router sh ip proRouter show ip protocol 31 打开RIP协议调试命令打开RIP协议调试命令 Router deb ip riRouter debug ip rip 32 查看交换机或路由器中的flash信息查看交换机或路由器中的flash信息 Router sh flaRouter show flash 33 设置VTY 虚拟终端接口 密码设置VTY 虚拟终端接口 密码 Router config lin v 0 1Router config line vty 0 1 Router config line logiRouter config line login Router config line pas 123Router config line password 123 34 下载路由器中的IOS Router copy flash flash文件名 tftp 35 上传IOS到路由器 Router copy tftp ios文件名 flash 36 下载路由器中的配置文件 Router copy nvram 文件名 tftp 37 上传配置文件到路由器 Router copy tftp startup config cfg nvram 宣告启用RIP的接 口的主网络号 宣告启用RIP的接 口的主网络号 宣告启用RIP的接 口的主网络号 宣告启用RIP的接 口的主网络号 使用Telnet管理Cisco设备 1 设置路由器上的管理接口IP地址和电脑IP地址 使二者处于同网段 2 设置VTY 虚拟终端线接口 密码 Router config line vty 0 1 Router config line login Router config line passwor 123 3 设置enable密码 Router config enable password 456 4 运行CISCO TFTP SERVER软件 设置IOS文件存储位置 5 运行CMD命令 telnet 192 168 1 1 23 23是端口号 6 输入VTY密码进入用户模式 7 输入enable密码进入特权模式 8 查看flash中IOS文件相关信息 Router show flash 9 下载IOS文件 或上传IOS 下载配置文件 上传配置文件等 Router copy flash flash文件名 tftp 下载路由中的IOS Router copy tftp ios文件名 flash 上传IOS到路由器 Router copy nvram 文件名 tftp 下载配置文件 Router copy tftp startup config cfg nvram 上传配置文件 2950交换机密码恢复 一 保留相关配置文件 只需要清除密码 原理 因为密码保存在config text中 所以可以使交换机在启动时绕过config text配置 然后重新配置密码 即可 步骤 1 拔掉交换机电源线 2 用手按住交换机的mode键 并插上电源线 3 当交换机出现system software flash init等信息界面时松开mode键 4 在switch 后执行flash init命令 switch flash init 5 查看flash中的文件 switch dir flash 6 把config text文件改名为config old文件 switch rename flash config text flash config old 7 执行boot命令 启动交换机 switch boot 8 进入特权模式查看flash文件 switch dir flash 9 把config old文件改名为config text文件 switch rename flash config old flash config text 10 把config text复制为系统的running config switch copy flash config text running config 11 进入相应配置模式重新设置密码并储存 至此密码恢复完成 二 清除密码 同时交换机的配置文件也丢失 1 拔下交换机的电源线 2 用手按住交换机的MODE按键上 插上电源线 3 看到控制台

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论