温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

cisco交换机命令总结汇集

发布时间:2020-06-24 12:18:58 来源:网络 阅读:3125 作者:itnihao 栏目:移动开发

 cisco交换机命令总结汇集

来自   itnihao整理收集

  1. 1.在基于IOS的交换机上设置主机名/系统名: 
  2.      switch(config)# hostname hostname 
  3. 在基于CLI的交换机上设置主机名/系统名: 
  4.      switch(enable) set system name name-string 
  5. 2.在基于IOS的交换机上设置登录口令: 
  6.      switch(config)# enable password level 1 password 
  7. 在基于CLI的交换机上设置登录口令: 
  8.      switch(enable) set password 
  9.      switch(enable) set enalbepass 
  10. 3.在基于IOS的交换机上设置远程访问: 
  11.      switch(config)# interface vlan 1 
  12.      switch(config-if)# ip address ip-address netmask 
  13.      switch(config-if)# ip default-gateway ip-address 
  14. 在基于CLI的交换机上设置远程访问: 
  15.      switch(enable) set interface sc0 ip-address netmask broadcast-address 
  16.      switch(enable) set interface sc0 vlan 
  17.      switch(enable) set ip route default gateway 
  18. 4.在基于IOS的交换机上启用和浏览CDP信息: 
  19.      switch(config-if)# cdp enable 
  20.      switch(config-if)# no cdp enable 
  21. 为了查看Cisco邻接设备的CDP通告信息: 
  22.      switch# show cdp interface [type modle/port] 
  23.      switch# show cdp neighbors [type module/port] [detail] 
  24. 在基于CLI的交换机上启用和浏览CDP信息: 
  25.      switch(enable) set cdp {enable|disable} module/port 
  26. 为了查看Cisco邻接设备的CDP通告信息: 
  27.      switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 
  28. 5.基于IOS的交换机的端口描述: 
  29.      switch(config-if)# description description-string 
  30. 基于CLI的交换机的端口描述: 
  31.      switch(enable)set port name module/number description-string 
  32. 6.在基于IOS的交换机上设置端口速度: 
  33.      switch(config-if)# speed{10|100|auto} 
  34. 在基于CLI的交换机上设置端口速度: 
  35.      switch(enable) set port speed moudle/number {10|100|auto} 
  36.      switch(enable) set port speed moudle/number {4|16|auto} 
  37. 7.在基于IOS的交换机上设置以太网的链路模式: 
  38.      switch(config-if)# duplex {auto|full|half} 
  39. 在基于CLI的交换机上设置以太网的链路模式: 
  40.      switch(enable) set port duplex module/number {full|half} 
  41. 8.在基于IOS的交换机上配置静态VLAN: 
  42.      switch# vlan database 
  43.      switch(vlan)# vlan vlan-num name vla 
  44.      switch(vlan)# exit 
  45.      switch# configure teriminal 
  46.      switch(config)# interface interface module/number 
  47.      switch(config-if)# switchport mode access 
  48.      switch(config-if)# switchport access vlan vlan-num 
  49.      switch(config-if)# end 
  50. 在基于CLI的交换机上配置静态VLAN: 
  51.      switch(enable) set vlan vlan-num [name name] 
  52.      switch(enable) set vlan vlan-num mod-num/port-list 
  53. 9. 在基于IOS的交换机上配置VLAN中继线: 
  54.      switch(config)# interface interface mod/port 
  55.      switch(config-if)# switchport mode trunk 
  56.      switch(config-if)# switchport trunk encapsulation {isl|dotlq} 
  57.      switch(config-if)# switchport trunk allowed vlan remove vlan-list 
  58.      switch(config-if)# switchport trunk allowed vlan add vlan-list 
  59. 在基于CLI的交换机上配置VLAN中继线: 
  60.      switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] 
  61. Vlan-range [isl|dotlq|dotl0|lane|negotiate] 
  62. 10.在基于IOS的交换机上配置VTP管理域: 
  63.      switch# vlan database 
  64.      switch(vlan)# vtp domain domain-name 
  65. 在基于CLI的交换机上配置VTP管理域: 
  66.      switch(enable) set vtp [domain domain-name] 
  67.     11.在基于IOS的交换机上配置VTP 模式: 
  68.      switch# vlan database 
  69.      switch(vlan)# vtp domain domain-name 
  70.      switch(vlan)# vtp {sever|cilent|transparent} 
  71.      switch(vlan)# vtp password password 
  72. 在基于CLI的交换机上配置VTP 模式: 
  73.      switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 
  74. 12. 在基于IOS的交换机上配置VTP版本: 
  75.      switch# vlan database 
  76.      switch(vlan)# vtp v2-mode 
  77. 在基于CLI的交换机上配置VTP版本: 
  78.      switch(enable) set vtp v2 enable 
  79. 13. 在基于IOS的交换机上启动VTP剪裁: 
  80.      switch# vlan database 
  81.      switch(vlan)# vtp pruning 
  82. 在基于CL I 的交换机上启动VTP剪裁: 
  83.      switch(enable) set vtp pruning enable 
  84. 14.在基于IOS的交换机上配置以太信道: 
  85.      switch(config-if)# port group group-number [distribution {source|destination}] 
  86. 在基于CLI的交换机上配置以太信道: 
  87.      switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 
  88. 15.在基于IOS的交换机上调整根路径成本: 
  89.      switch(config-if)# spanning-tree [vlan vlan-list] cost cost 
  90. 在基于CLI的交换机上调整根路径成本: 
  91.      switch(enable) set spantree portcost moudle/port cost 
  92.      switch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 
  93. 16.在基于IOS的交换机上调整端口ID: 
  94.      switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 
  95. 在基于CLI的交换机上调整端口ID: 
  96.      switch(enable) set spantree portpri {mldule/port}priority 
  97.      switch(enable) set spantree portvlanpri {module/port}priority [vlans] 
  98. 17. 在基于IOS的交换机上修改STP时钟: 
  99.      switch(config)# spanning-tree [vlan vlan-list] hello-time seconds 
  100.      switch(config)# spanning-tree [vlan vlan-list] forward-time seconds 
  101.      switch(config)# spanning-tree [vlan vlan-list] max-age seconds 
  102. 在基于CLI的交换机上修改STP时钟: 
  103.      switch(enable) set spantree hello interval[vlan] 
  104.      switch(enable) set spantree fwddelay delay [vlan] 
  105.      switch(enable) set spantree maxage agingtiame[vlan] 
  106. 18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征: 
  107.      switch(config-if)#spanning-tree portfast 
  108. 在基于CLI的交换机端口上启用或禁用Port Fast 特征: 
  109.      switch(enable) set spantree portfast {module/port}{enable|disable} 
  110. 19. 在基于IOS的交换机端口上启用或禁用UplinkFast 特征: 
  111.      switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 
  112. 在基于CLI的交换机端口上启用或禁用UplinkFast 特征: 
  113.      switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on] 
  114. 20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令: switch(config)# cluster enable cluster-name cv 
  115.    21. 为了从一条中继链路上删除VLAN,可使用下列命令: 
  116.      switch(enable) clear trunk module/port vlan-range 
  117. 22. 用show vtp domain 显示管理域的VTP参数. 
  118. 23. 用show vtp statistics显示管理域的VTP参数. 
  119. 24. 在Catalyst交换机上定义TrBRF的命令如下: 
  120.      switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}] 
  121. 25. 在Catalyst交换机上定义TrCRF的命令如下: 
  122.      switch (enable) set vlan vlan-num [name name] type trcrf 
  123. {ring hex-ring-num|decring decimal-ring-num} parent vlan-num 
  124. 26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口: 
  125.      switch(enable) set vlan vlan-num mod-num/port-num 
  126. 27. 命令show spantree显示一个交换机端口的STP状态. 
  127. 28. 配置一个ELAN的LES和BUS,可以使用下列命令: 
  128.      ATM (config)# interface atm number.subint multioint 
  129.      ATM(config-subif)# lane serber-bus ethernet elan-name 
  130. 29. 配置LECS: 
  131.      ATM(config)# lane database database-name 
  132.      ATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address 
  133.      ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address 
  134.      ATM(lane-config-databade)# name … 
  135. 30. 创建完数据库后,必须在主接口上启动LECS.命令如下: 
  136.      ATM(config)# interface atm number 
  137.      ATM(config-if)# lane config database database-name 
  138.      ATM(config-if)# lane config auto-config-atm-address 
  139. 31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: 
  140.      ATM(config)# interface atm number.subint multipoint 
  141.      ATM(config)# lane client ethernet vlan-num elan-num 
  142. 32. 用show lane server 显示LES的状态. 
  143. 33. 用show lane bus显示bus的状态. 
  144. 34. 用show lane database显示LECS数据库可内容. 
  145. 35. 用show lane client显示LEC的状态. 
  146. 36. 用show module显示已安装的模块列表. 
  147. 37. 用物理接口建立与VLAN的连接: 
  148.      router# configure terminal 
  149.      router(config)# interface media module/port 
  150.      router(config-if)# description description-string 
  151.      router(config-if)# ip address ip-addr subnet-mask 
  152.      router(config-if)# no shutdown 
  153. 38. 用中继链路来建立与VLAN的连接: 
  154.      router(config)# interface module/port.subinterface 
  155.      router(config-ig)# encapsulation[isl|dotlq] vlan-number 
  156.      router(config-if)# ip address ip-address subnet-mask 
  157. 39. 用LANE 来建立与VLAN的连接: 
  158.      router(config)# interface atm module/port 
  159.      router(config-if)# no ip address 
  160.      router(config-if)# atm pvc 1 0 5 qsaal 
  161.      router(config-if)# atm pvc 2 0 16 ilni 
  162.      router(config-if)# interface atm module/port.subinterface multipoint 
  163.      router(config-if)# ip address ip-address subnet-mask 
  164.      router(config-if)# lane client ethernet elan-num 
  165.      router(config-if)# interface atm module/port.subinterface multipoint 
  166.      router(config-if)# ip address ip-address subnet-name 
  167.      router(config-if)# lane client ethernet elan-name 
  168.      router(config-if)# … 
  169. 40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行: 
  170.      router(config)# ip routing 
  171.      router(config)# router ip-routing-protocol 
  172.      router(config-router)# network ip-network-number 
  173.      router(config-router)# network ip-network-number 
  174.     41. 配置默认路由: 
  175.      switch(enable) set ip route default gateway 
  176. 42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令: 
  177.      router(config)# interface interface number 
  178.      router(config-if)# mls rp vlan-id vlan-id-num 
  179. 43. 在路由处理器启用MLSP: 
  180.      router(config)# mls rp ip 
  181. 44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: 
  182.      router(config)# interface interface number 
  183.      router(config-if)# mls rp vtp-domain domain-name 
  184. 45. 查看指定的VTP域的信息: 
  185.      router# show mls rp vtp-domain vtp domain name 
  186. 46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令: 
  187.      router(config-if)#mls rp management-interface 
  188. 47. 要检验MLS-RP的配置情况: 
  189.      router# show mls rp 
  190. 48. 检验特定接口上的MLS配置: 
  191.      router# show mls rp interface interface number 
  192. 49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表: 
  193.      set mls flow [destination|destination-source|full] 
  194. 50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令: 
  195.      router(config)# mls rp ip input-acl 
  196. 51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令: 
  197.      switch(enable) set mls enable 
  198. 52. 若想改变老化时间的值,可在特权模式下输入以下命令: 
  199.      switch(enable) set mls agingtime agingtime 
  200. 53. 设置快速老化: 
  201.      switch(enable) set mls agingtime fast fastagingtime pkt_threshold 
  202. 54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定: 
  203.      switch(enable) show mls include 
  204. 55. 显示MLS高速缓存记录: 
  205.      switch(enable) show mls entry 
  206. 56. 用命令show in arp显示ARP高速缓存区的内容。 
  207. 57. 要把路由器配置为HSRP备份组的成员,可以在接口配置模式下使用下面的命令: 
  208.      router(config-if)# standby group-number ip ip-address 
  209. 58. 为了使一个路由器重新恢复转发路由器的角色,在接口配置模式下: 
  210.      router(config-if)# standy group-number preempt 
  211. 59. 访问时间和保持时间参数是可配置的: 
  212.      router(config-if)# standy group-number timers hellotime holdtime 
  213.    60. 配置HSRP跟踪: 
  214.      router(config-if)# standy group-number track type-number interface-priority 
  215. 61. 要显示HSRP路由器的状态: 
  216.      router# show standby type-number group brief 
  217. 62. 用命令show ip igmp确定当选的查询器。 
  218. 63. 启动IP组播路由选择: 
  219.      router(config)# ip muticast-routing 
  220. 64. 启动接口上的PIM: 
  221.      dalllasr1>(config-if)# ip pim {dense-mode|sparse-mode|sparse-dense-mode} 
  222. 65. 启动稀疏-稠密模式下的PIM: 
  223.      router# ip multicast-routing 
  224.      router# interface type number 
  225.      router# ip pim sparse-dense-mode 
  226. 66. 核实PIM的配置: 
  227.      dallasr1># show ip pim interface[type number] [count] 
  228. 67. 显示PIM邻居: 
  229.      dallasr1># show ip neighbor type number 
  230. 68. 为了配置RP的地址,命令如下: 
  231.      dallasr1># ip pim rp-address ip-address [group-access-list-number][override] 
  232. 69. 选择一个默认的RP: 
  233.      dallasr1># ip pim rp-address 
  234. 通告RP和它所服务的组范围: 
  235.      dallasr1># ip pim send-rp-announce type number scope ttl group-list access-list-number 
  236. 为管理范围组通告RP的地址: 
  237.      dallasr1># ip pim send-rp-announce ethernet0 scope 16 group-list1 
  238.      dallasr1># access-list 1 permit 266.0.0.0 0.255.255.255 
  239. 设定一个RP映像代理: 
  240.      dallasr1># ip pim send-rp-discovery scope ttl 
  241. 核实组到RP的映像: 
  242.      dallasr1># show ip pim rp mapping 
  243.      dallasr1># show ip pim rp [group-name|group-address] [mapping] 
  244. 70. 在路由器接口上用命令ip multicast ttl-threshold ttl-value设定TTL阀值: 
  245.      dallasr1>(config-if)# ip multicast ttl-threshold ttl-value 
  246.    71. 用show ip pim neighbor显示PIM邻居表。 
  247. 72. 显示组播通信路由表中的各条记录: 
  248.      dallasr1>show ip mroute [group-name|group-address][scoure][summary][count][active kbps] 
  249. 73. 要记录一个路由器接受和发送的全部IP组播包: 
  250.      dallasr1> #debug ip mpacket [detail] [access-list][group] 
  251. 74. 要在CISCO路由器上配置CGMP: 
  252.      dallasr1>(config-if)# ip cgmp 
  253. 75.配置一个组播路由器,使之加入某一个特定的组播组: 
  254.      dallasr1>(config-if)# ip igmp join-group group-address 
  255. 76. 关闭 CGMP: 
  256.      dallasr1>(config-if)# no ip cgmp 
  257. 77. 启动交换机上的CGMP: 
  258.      dallasr1>(enable) set cgmp enable 
  259. 78. 核实Catalyst交换机上CGMP的配置情况: 
  260. catalystla1>(enable) show config 
  261.      set prompt catalystla1> 
  262.      set interface sc0 192.168.1.1 255.255.255.0 
  263.      set cgmp enable 
  264. 79. CGMP离开的设置: 
  265. Dallas_SW(enable) set cgmp leave 
  266. 80. 在Cisco设备上修改控制端口密码: 
  267.      R1(config)# line console 0 
  268.      R1(config-line)# login 
  269.      R1(config-line)# password Lisbon 
  270.      R1(config)# enable password Lilbao 
  271.      R1(config)# login local 
  272.      R1(config)# username student password cisco 
  273. 81. 在Cisco设备上设置控制台及vty端口的会话超时: 
  274.      R1(config)# line console 0 
  275.      R1(config-line)# exec-timeout 5 10 
  276.      R1(config)# line vty 0 4 
  277.      R1(config-line)# exec-timeout 5 2 
  278. 82. 在Cisco设备上设定特权级: 
  279.      R1(config)# privilege configure level 3 username 
  280.      R1(config)# privilege configure level 3 copy run start 
  281.      R1(config)# privilege configure level 3 ping 
  282.      R1(config)# privilege configure level 3 show run 
  283.      R1(config)# enable secret level 3 cisco 
  284. 83. 使用命令privilege 可定义在该特权级下使用的命令: 
  285.      router(config)# privilege mode level level command 
  286. 84. 设定用户特权级: 
  287.      router(config)# enable secret level 3 dallas 
  288.      router(config)# enable secret san-fran 
  289.      router(config)# username student password cisco 
  290. 85. 标志设置与显示: 
  291.      R1(config)# banner motd ‘unauthorized access will be prosecuted!’ 
  292.     86. 设置vty访问: 
  293.      R1(config)# access-list 1 permit 192.168.2.5 
  294.      R1(config)# line vty 0 4 
  295.      R1(config)# access-class 1 in 
  296. 87. 配置HTTP访问: 
  297. Router3(config)# access-list 1 permit 192.168.10.7 
  298. Router3(config)# ip http sever 
  299. Router3(config)# ip http access-class 1 
  300. Router3(config)# ip http authentication local 
  301. Router3(config)# username student password cisco 
  302. 88. 要启用HTTP访问,请键入以下命令: 
  303.      switch(config)# ip http sever 
  304. 89. 在基于set命令的交换机上用setCL1启动和核实端口安全: 
  305.      switch(enable) set port security mod_num/port_num…enable mac address 
  306.      switch(enable) show port mod_num/port_num 
  307. 在基于CiscoIOS命令的交换机上启动和核实端口安全: 
  308.      switch(config-if)# port secure [mac-mac-count maximum-MAC-count] 
  309.      switch# show mac-address-table security [type module/port] 
  310. 90. 用命令access-list在标准通信量过滤表中创建一条记录: 
  311.      Router(config)# access-list access-list-number {permit|deny} source-address [source-address] 
  312. 91. 用命令access-list在扩展通信量过滤表中创建一条记录: 
  313.      Router(config)# access-list access-list-number {permit|deny{protocol|protocol-keyword}}{source source-wildcard|any}{destination destination-wildcard|any}[protocol-specific options][log] 
  314. 92. 对于带内路由更新,配置路由更新的最基本的命令格式是: 
  315.      R1(config-router)#distribute-list access-list-number|name in [type number] 
  316. 93. 对于带外路由更新,配置路由更新的最基本的命令格式是: 
  317.      R1(config-router)#distribute-list access-list-number|name out [interface-name] routing-process| autonomous-system-number 
  318. 94. set snmp命令选项: 
  319.      set snmp community {read-only|ready-write|read-write-all}[community_string] 
  320. 95. set snmp trap 命令格式如下: 
  321.      set snmp trap {enable|disable} 
  322. [all|moudle|classis|bridge|repeater| auth|vtp|ippermit|vmps|config|entity|stpx] 
  323.      set snmp trap rvcr_addr rcvr_community 
  324. 96. 启用SNMP chassis 陷阱: 
  325.      Console>(enable) set snmp trap enable chassis 
  326. 97. 启用所有SNMP chassis 陷阱: 
  327.      Console>(enable) set snmp trap enable 
  328. 98. 禁用SNMP chassis 陷阱: 
  329.      Console>(enable) set snmp trap disable chassis 
  330. 99. 给SNMP陷阱接收表加一条记录: 
  331.      Console>(enable) set snmp trap 192.122.173.42 public 
  332. 100. show snmp 输出结果。 
  333. 101. 命令set snmp rmon enable 的输出结果。 
  334. 102. 显示SPAN信息: 
  335. Consile> show span 
  336.      switch> 用户模式  
  337. 1:进入特权模式 enable  
  338.      switch> enable //进入特权模式  
  339.      switch# //当前在特权模式中 
  340.   
  341. 2:进入全局配置模式 configure terminal  
  342.      switch> enable //进入特权模式  
  343.      switch#configure terminal //进入全局模式  
  344.      switch(conf)# //当前全局模式  
  345. 3:交换机命名 hostname aptech3950 //以aptech3950为例  
  346.      switch> enable //进入特权模式  
  347.      switch#configure terminal //进入全局模式  
  348.      switch(conf)#hostname aptch-2950 //红色为主机名  
  349.      aptech3950(conf)# //当前全局模式  
  350. 4:配置使能口令 enable password cisco 以cisco为例  
  351.      switch> enable //进入特权模式  
  352.      switch#configure terminal //进入全局模式  
  353.      aptech3950(conf)# enable password cisco //红色部分为密码  
  354. 5:配置使能密码 enable secret ciscolab 密码以cicso01为例 
  355.      switch> enable //进入特权模式  
  356.      switch#configure terminal //进入全局模式  
  357.      aptech3950(conf)# enable secret ciscol01 //红色部分为加密密码  
  358. 6:设置交换机IP 地址  
  359.      switch> enable //进入特权模式  
  360.      switch#configure terminal //进入全局模式  
  361.      aptech3950(conf)# interface vlan 1 //进入vlan1  
  362.      aptech3950(conf-if)#ip address 192.168.1.1 255.255.255.0 //配置交换机端口ip和子网掩码  
  363.      aptech3950(conf-if)#no shut //开启vlan1  
  364.      aptech3950(conf-if)#exit  
  365.      aptech3950(conf)#ip default-gateway 192.168.254 //设置网关地址  
  366. 7:进入交换机某一端口,以7端口为例;  
  367.      switch> enable //进入特权模式  
  368.      switch#configure terminal //进入全局模式  
  369.      aptech3950(conf)# interface fastehernet 0/7 //进入第7口 
  370.      aptech3950(conf-if)# 
  371. 8:查看命令 show  
  372.      switch> enable //进入特权模式  
  373.      switch# show version //察看系统版本信息  
  374.      show interface vlan 1 //查看交换机有关vlan1的配置信息  
  375.      show running-configure //查看交换机当前的配置信息  
  376.      show interface fastethernet 0/1 //察看交换机1接口具体配置和统计信息  
  377.      show mac-address-table //查看mac地址表  
  378.      show mac-address-table aging-time //查看mac地址表自动老化时间  
  379. 9:交换机恢复出厂默认恢复命令  
  380.      switch> enable //进入特权模式  
  381.      switch# erase startup-configure //出厂默认恢复命令 s 
  382. witch# reload //从新启动  
  383. 10:双工模式设置  
  384.      switch> enable //进入特权模式  
  385.      switch#configure terminal //进入全局模式  
  386.      switch(conf)# interface fastehernet 0/7  //以7口为例  
  387.      Switch(conf)# duplex full/half/auto //有half:半双工,full:全双工,auto:自动  
  388. 11:cdp相关命令  
  389.      switch> enable  
  390.      switch# show cdp 设备的cdp全局配置信息  
  391.      show cdp interface fastethernet 0/17 查看17端口的cdp配置信息  
  392.      show cdp traffic 查看有关cdp包的统计信息  
  393.      show cdp nerghbors 列出与设备相连的cisco设备  
  394. 12:csico2950的密码恢复  
  395. 拔下交换机电源线。  
  396. 用手按着交换机的MODE键,插上电源线  
  397. 在switch:后执行flash_ini命令:switch: flash_ini  
  398. 查看flash中的文件: switch: dir flash: 
  399. 把“config.text”文件改名为“config.old”: switch: rename flash: config.text flash: config.old  
  400. 执行boot:  
  401.      switch: boot 交换机进入是否进入配置的对话,执行no :  
  402. 进入特权模式察看flash里的文件: show flash : 
  403. 把“config.old”文件改名为 “config.text”: switch: rename flash: config.old flash: config.text  
  404. 把“config.text”拷入系统的“running-configure”: copy flash: config.text system : running-configure  
  405. 把配置模式重新设置密码存盘,密码恢复成功。  
  406. 13:交换机telnet远程登录设置:  
  407.      switch>en  
  408.      switch#configure terminal  
  409.      switch(conf)#hostname aptech-2950  
  410.      aptech3950(conf)#enable password cisco 以cisco为特权模式密码  
  411.      aptech3950(conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口  
  412.      aptech3950(conf-if)#ip address 192.168.1.1 255.255.255.0  
  413.      aptech3950(conf-if)#no shut  
  414.      aptech3950(conf-if)#exit aptech3950(conf)line vty 0 4  设置0-4 个用户可以telnet远程登陆  
  415.      aptech3950(conf-line)#login  
  416.      aptech3950(conf-line)#password edge 以edge为远程登录的用户密码  
  417. 主机设置: 
  418. ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段  
  419. netmask 255.255.255.0 gate-way 192.168.1.1 网关地址是交换机端口地址  
  420. 运行:  
  421. telnet 192.168.1.1 进入telnet远程登录界面  
  422. password : edge  
  423.      aptech3950>en  
  424. password: cisco  
  425.     aptech#  
  426. 14:交换机配置的重新载入和保存  
  427. 设置完成交换机的配置后:  
  428.      aptech3950(conf)#reload 是否保存(y/n) y: 保存设置信息 n:不保存设置信息 
  429. 路由器命令  
  430.      router> 用户模式  
  431. 1:进入特权模式  
  432. enable router > enable  
  433.      router #  
  434. 2:进入全局配置模式 configure terminal  
  435.      router > enable  
  436.      router #configure terminal  
  437.      router (conf)#  
  438. 3:交换机命名 hostname routera 以routerA为例  
  439.      router > enable  
  440.      router #configure terminal  
  441.      router(conf)#hostname routerA 
  442.      routera (conf)#  
  443. 4:配置使能口令 enable password cisco 以cisco为例  
  444.      router > enable  
  445.      router #configure terminal  
  446.      router(conf)#hostname routerA  
  447.      routerA (conf)# enable password cisco  
  448. 5:配置使能密码 enable secret ciscolab 以cicsolab为例  
  449.      router > enable  
  450.      router #configure terminal  
  451.      router(conf)#hostname routerA  
  452.      routerA (conf)# enable secret ciscolab 
  453.   
  454. 6:进入路由器某一端口 interface fastehernet 0/17 以17端口为例  
  455.      router > enable  
  456.      router #configure terminal  
  457.      router(conf)#hostname routerA  
  458.      routerA (conf)# interface fastehernet 0/17  
  459.      routerA (conf-if)# 
  460. 进入路由器的某一子端口  
  461. interface fastethernet 0/17.1 以17端口的1子端口为例  
  462.      router > enable  
  463.      router #configure terminal  
  464.      router(conf)#hostname routerA  
  465.      routerA (conf)# interface fastehernet 0/17.1  
  466. 7:设置端口ip地址信息  
  467.      router > enable  
  468.      router #configure terminal  
  469.      router(conf)#hostname routerA  
  470.      routerA(conf)# interface fastehernet 0/17 以17端口为例  
  471.      routerA (conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码  
  472.      routerA (conf-if)#no shut 是配置处于运行中  
  473.      routerA (conf-if)#exit  
  474. 8:查看命令 show  
  475.      router > enable  
  476.      router # show version 察看系统中的所有版本信息 
  477.      show interface vlan 1 查看交换机有关ip 协议的配置信息  
  478.      show running-configure 查看交换机当前起作用的配置信息  
  479.      show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息  
  480.      show mac-address-table 查看mac地址表  
  481.      show mac-address-table aging-time 查看mac地址表自动老化时间  
  482.      show controllers serial + 编号 查看串口类型 show ip router 查看路由器的路由表  
  483. 9:cdp相关命令  
  484.      router > enable  
  485.      router # show cdp 查看设备的cdp全局配置信息  
  486.      show cdp interface fastethernet 0/17 查看17端口的cdp配置信息  
  487.      show cdp traffic 查看有关cdp包的统计信息  
  488.      show cdp nerghbors 列出与设备相连的cisco设备  
  489. 10:csico2600的密码恢复  
  490. 重新启动路由器, 
  491. 在启动过程中按下win+break键,使路由器进入rom monitor  
  492. 在提示符下输入命令修改配置寄存器的值,remmon1>confreg 0x2142 , 
  493. 然后重新启动路由器  remmon2>reset  
  494. 重新启动路由器后进入setup模式, 
  495. 选择“no”,退回到exec模式,此时路由器原有的配置仍然保存在startup-config中, 
  496. 为使路由器恢复密码后配置不变 
  497. 把startup-config中配置保存到running-config中: router>enable router#copy startup-config running-config 
  498. 然后重新设置enable密码: router#configure terminal router(conf)#enable password cisco 
  499. 并把配置寄存器改回0x2102:  router(conf)#config-register 0x2102  
  500. 保存当前配置到startup-config: router #copy running-config startup-config router 
  501. 重新启动路由器: #reload  
  502.   
  503. 11:路由器telnet远程登录设置:  
  504.      router>en  
  505.      router #configure terminal  
  506.      router (conf)#hostname routerA  
  507.      routerA (conf)#enable password cisco 以cisco为特权模式密码  
  508.      routerA (conf)#interface fastethernet 0/1 以17端口为telnet远程登录端口  
  509.      routerA (conf-if)#ip address 192.168.1.1 255.255.255.0  
  510.      routerA (conf-if)#no shut  
  511.      routerA (conf-if)#exit 
  512.      routerA (conf)line vty 0 4 设置0-4 个用户可以telnet远程登陆  
  513.      routerA (conf-line)#login  
  514.      routerA (conf-line)#password edge 以edge为远程登录的用户密码  
  515. 主机设置: 
  516.  ip 192.168.1.2 主机的ip必须和交换机端口的地址在同一网络段  
  517. netmask 255.255.255.0 gate-way 192.168.1.1 网关地址是交换机端口地址  
  518. 运行:  
  519. telnet 192.168.1.1 进入telnet远程登录界面  
  520. password : edge  
  521.      routera>en  
  522. password: cisco  
  523.      routera#  
  524. 12:配置路由器的标识 banner $……………$  
  525. 在全局配置的模式下利用“banner”命令可以配置路由器的提示信息,所有连接到路由器的终端都会收到。  
  526.      router>en 
  527.      router #configure terminal  
  528.      router (conf)#hostname routerA  
  529.      routerA(conf)#banner motd $This is aptech company’ router ! Please don’t change the configuration without permission!$  
  530. 13:配置接口标识 description ………  
  531. 接口标识用于区分路由器的各个接口。  
  532.      router>en  
  533.      router #configure terminal  
  534.      router (conf)#hostname routerA  
  535.      routerA(conf)#interface fastethernet 0/1 以0/1 接口为例  
  536.      routerA(conf-if)# description this is a fast Ethernet port used to connecting the company’s intranet!  

更多内容,见附件

附件:http://down.51cto.com/data/2360994
向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI