思科交换机命令大全 + Cisco IOS 基本命令

合集下载

思科交换机配置命令

思科交换机配置命令

思科交换机配置命令思科交换机配置命令大全美国思科公司,凭借它的IOS,Cisco公司在多协议路由器市场上处于绝对领先的地位。

目前,在Internet中,有近80%的路由器来自Cisco。

下面给大家介绍思科交换机配置命令大全,一起来了解一下吧! 思科交换机配置命令大全一、基本配置命令switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#c onfigure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以 aptech2950 为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以 cisco 为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以 cicsolab 为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网 vlan 1 interface vlan 1switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口 ip 和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以 17 端口为例switch> enableswitch#c onfigure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关 ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机 1 接口具体配置和统计信息show mac-address-table 查看 mac 地址表show mac-address-table aging-time 查看 mac 地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以 17 端口为例aptech2950(conf-if)#duplex full/half/auto 有 full , half, auto 三个可选项11:cdp 相关命令switch> enableswitch# show cdp 查看设备的 cdp 全局配置信息show cdp interface fastethernet 0/17 查看 17 端口的 cdp 配置信息show cdp traffic 查看有关 cdp 包的统计信息show cdp nerghbors 列出与设备相连的 cisco 设备12:csico2950 的密码恢复拔下交换机电源线。

Cisco 交换机命令大全

Cisco 交换机命令大全
思科交换机的命令大全
1.查 ARP 缓存 show ip arp 2.查路由表 show ip route 3.查看接口状态 show interface gi1/0/1 4.查看配置信息 show run 5.查看当前时间 show clock 6.看软件版本 show version 7.查看路由协议 show ip protocol 8.打开 rip 调试命令 debug ip rip 9.监测 ppp 链接状态和协商过程 debug ppp packet 10. 查看 ospf 邻居表 show ip ospf nei 11.链路状态表 show ip ospf database 12.查 ospf 配置 show ip ospf 13.查 ospf 接口状态 show ip ospf interface 14.查一条 LSA 通告信息 show ip ospf database network 15.查看网络汇总 show ip ospf database summary 16.列出所有路由通告 LSA show ip ospf database router 17.ASBR 汇总 LSA 通告 show ip ospf database asbr-summary 18.查看 AS 外部 LSA 通告 show ip ospf database extemal 19.查 NSSA 外部 LSA 通告信息 show ip ospf database nssa-extemal 20.查看 ospf 数据包信息 show ip ospf packet 21.清空路由表 clear ip roite *
Байду номын сангаас

思科路由器命令大全(完整版)

思科路由器命令大全(完整版)

思科交换机路由器命令大全交换机命令:switch> 用户模式1:进入特权模式 enableswitch> enableswitch#2:进入全局配置模式 configure terminalswitch> enableswitch#configure terminalswitch(conf)#3:交换机命名 hostname aptech2950 以aptech2950为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令 enable password cisco 以cisco为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码 enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolabaptech2950(conf)#no ip domain-lookup -----设置禁用IP地址解析特性aptech2950(conf)#logging synchronous -----设置启用消息同步特性aptech2950(conf)#interface range fastethernet0/1-20aptech2950(conf-if-range)#spanning-tree portfast -----设置快速端口aptech2950(conf)#interface range fastethernet 0/23-24aptech2950(conf-if-range)#swichport mode trunk -----设置主干道端口aptech2950(conf)#spanning-treeuplingkfast ---设置阻塞启用迅速(只可以在访问层启用)6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口 interface fastehernet 0/17 以17端口为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令 showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#configure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

Cisco指导:IOS命令大全

Cisco指导:IOS命令大全

0.0.0.0 255.255.255.255 通配符命令;作用与any命令相同access-class 将标准的IP访问列表应用到VTY线路access-list 创建-个过滤网络的测试列表any 指定任何主机或任何网络;作用与0.0.0.0 255.255.255.255命令相同Backspace 删除一个字符Bandwidth 设置--个串行接口止的带宽Banner 为登录到本路由器上的用户创建--个标志区cdp enable 打开-个特定接口的CDPcdp holdtime 修改CDP分组的保持时间cdp run 打开路由器上的CDPcdp timer 修改CDP更新定时器clear counters 清除某一接口上的统计信息、clear line 清除通过Telnet连接到路由器的连接clear mac-address-table 清除该交换机动态创建的过滤表clock rate 提供在串行DCE接口上的时钟config memory 复制startup-config到running-configconfig network 复制保存在TFTP主机上的配置到running-configconfig terminal 进人全局配置模式并修改running-configconfig-register 告诉路由器如何启动以及如何修改配置寄存器的设置copy flash tftp 将文件从闪存复制到TFTP主机copy run start copy running-config startup-config的快捷方式,将配置复制到NVRAM中copy run tftp 将running-config文件复制到TFTP主机Copy tftp flash 将文件从TFTP主机复制到闪存Copy tftp run 将配置从TFTP主机复制为running-config文件Ctrl+A 移动光标到本行的开始位置Ctrl+D 删除一个字符Ctrl+E 移动光标到本行的末尾Ctrl+F 光标向前移动一个字符Ctrl+R 重新显示一行Ctrl+Shitf+6 then X 当telnet到多个路由器时返回到原路由器Ctrl+U 删除一行Ctrl+W 删除一个字CTRL+Z 结束配置模式并返回EXEC(执行状态)debug dialer 显示呼叫建立和结束的过程debug frame-relay lmi 显示在路由器和帧中继交换机之间的lmi交换信息debug ip igrp events 提供在网络中运行的IGRP路由选择信息的概要debug ip igrp transactions 显示来自相邻路由器要求更新的请求消息和由路由器发到相邻路由器的广播消息debug ip rip 发送控制台消息显示有关在路由器接口上收发RIP数据包的信息debug ipx 显示通过路由器的RIP和SAP信息debug isdn q921 显示第层进程debug isdn q931 显示第三层进程delete nvram 删除1900交换机-NVRAM的内容delete vip 删除交换机的VTP配置description 在接口上设置---个描述dialer idle-timeout number 告诉BRI线路如果没有发现触发DDR的流量什么时候断开dialer list number protocol 为DDR链路指定触发DDR的流量protocol permit/deny dialer load-threshold number设置描述什么时候在ISDN链路上启闭第二个BRI的参数inbound/outbound/either Dialer map protocol address代替拨号串用于作ISDN网络中提供更好的安全性name hostname numberdialer string 设置用于拨叫BRl接口的电话号码disable 从特权模式返回用户模式disconnect 从原路由器断开同远楞路由豁的连接dupler 设置一个接口的双工enable 进入特权模式enable password 设置不加密的启朋口令enable password level 1 设置用户模式口令enable password level 15 设置启用模式口令enable secret 设置加密的启用秘密口令如果设置则取代启用口令在接口上设置帧类型encapsulation frame-relay 修改帧中继串行链路上的封装类型encapsulation frame-relay 将封装类型设置为因特网工程任务组(IETF,Internet Enginering Task Force)类型。

(完整word版)思科交换机配置命令大全

(完整word版)思科交换机配置命令大全

(完整word版)思科交换机配置命令大全思科交换机配置命令大全switch> 用户模式1:进入特权模式enableswitch> enableswitch#2:进入全局配置模式configure terminalswitch> enableswitch#configure terminalswitch(conf)#3:交换机命名hostname aptech2950 以aptech2950为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令enable password cisco 以cisco为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码enable secret ciscolab 以cicsolab为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolab6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口interface fastehernet 0/17 以17端口为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#c onfigure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

CISCO思科交换机3650G配置命令大全

CISCO思科交换机3650G配置命令大全

CISCO思科交换机3650G配置命令⼤全CISCO思科交换机3650G配置命令⼤全1.在基于IOS的交换机上设置主机名/系统名: switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名: switch(enable) set system name name-string 2.在基于IOS的交换机上设置登录⼝令:switch(config)# enable password level 1 password 在基于CLI的交换机上设置登录⼝令: switch(enable) set password switch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问: switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmask switch(config-if)# ip default-gateway ip-address 在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway 4.在基于IOS的交换机上启⽤和浏览CDP信息: switch(config-if)# cdp enable switch(config-if)# no cdp enable为了查看Cisco邻接设备的CDP通告信息:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail] 在基于CLI的交换机上启⽤和浏览CDP信息:switch(enable) set cdp {enable|disable} module/port 为了查看Cisco邻接设备的CDP通告信息:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 5.基于IOS的交换机的端⼝描述:switch(config-if)# description description-string 基于CLI的交换机的端⼝描述:switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端⼝速度: switch(config-if)# speed{10|100|auto} 在基于CLI的交换机上设置端⼝速度: switch(enable) set port speed moudle/number {10|100|auto} switch(enable) set port speed moudle/number {4|16|auto} 7.在基于IOS的交换机上设置以太⽹的链路模式: switch(config-if)# duplex {auto|full|half} 在基于CLI的交换机上设置以太⽹的链路模式:switch(enable) set port duplex module/number {full|half} 8.在基于IOS的交换机上配置静态VLAN: switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/number switch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-num switch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list 9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface mod/port switch(config-if)# switchport mode trunkswitch(config-if)# switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-list switch(config-if)# switchport trunk allowed vlan add vlan-list 在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate] 10.在基于IOS的交换机上配置VTP管理域: switch# vlan database switch(vlan)# vtp domain domain-name 在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name] 11.在基于IOS的交换机上配置VTP 模式: switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent} switch(vlan)# vtp password password 在基于CLI的交换机上配置VTP 模式: switch(enable) set vtp [domain domain-name] [mode{ sever|cilent|transparent }][password password] 12. 在基于IOS的交换机上配置VTP版本: switch# vlan database switch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本: switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁: switch# vlan database switch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁: switch(enable) set vtp pruning enable 14.在基于IOS的交换机上配置以太信道:switch(config-if)# port group group-number [distribution {source|destination}] 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range mode{on|off|desirable|auto} 15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree [vlan vlan-list] cost cost 在基于CLI的交换机上调整根路径成本:switch(enable) set spantree portcost moudle/port costswitch(enable) set spantree portvlancost moudle/port [cost cost][vlan-list] 16.在基于IOS的交换机上调整端⼝ID:switch(config-if)# spanning-tree[vlan vlan-list]port-priority port-priority 在基于CLI的交换机上调整端⼝ID:switch(enable) set spantree portpri {mldule/port}priorityswitch(enable) set spantree portvlanpri {module/port}priority [vlans] 17. 在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)# spanning-tree [vlan vlan-list] forward-time seconds ` switch(config)# spanning-tree [vlan vlan-list] max-age seconds 在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan] switch(enable) set spantree fwddelay delay [vlan] switch(enable) set spantree maxage agingtiame[vlan] 18. 在基于IOS的交换机端⼝上启⽤或禁⽤Port Fast 特征: switch(config-if)#spanning-tree portfast在基于CLI的交换机端⼝上启⽤或禁⽤Port Fast 特征:switch(enable) set spantree portfast {module/port}{enable|disable} 19. 在基于IOS的交换机端⼝上启⽤或禁⽤UplinkFast 特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second] 在基于CLI的交换机端⼝上启⽤或禁⽤UplinkFast 特征:switch(enable) set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成⼀个集群的命令交换机,⾸先要给管理接⼝分配⼀个IP地址,然后使⽤下列命令: switch(config)# cluster enable cluster-name 21. 为了从⼀条中继链路上删除VLAN,可使⽤下列命令: switch(enable) clear trunk module/port vlan-range 22. ⽤show vtp domain 显⽰管理域的VTP参数. 23. ⽤show vtp statistics显⽰管理域的VTP参数. 24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp {ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ring hex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端⼝.对于以太⽹交换,可以采⽤如下命令给VLAN分配端⼝:switch(enable) set vlan vlan-num mod-num/port-num 27. 命令show spantree显⽰⼀个交换机端⼝的STP状态.28. 配置⼀个ELAN的LES和BUS,可以使⽤下列命令:ATM (config)# interface atm number.subint multioint ATM(config-subif)# lane serber-bus ethernet elan-name 29. 配置LECS:ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-address les1-nsap-address ATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-address ATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接⼝上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-name ATM(config-if)# lane config auto-config-atm-address 31. 将每个LEC配置到⼀个不同的ATM⼦接⼝上.命令如下: ATM(config)# interface atm number.subint multipoint ATM(config)# lane client ethernet vlan-num elan-num 32. ⽤show lane server 显⽰LES的状态. 33. ⽤show lane bus显⽰bus的状态.34. ⽤show lane database显⽰LECS数据库可内容. 35. ⽤show lane client显⽰LEC的状态. 36. ⽤show module显⽰已安装的模块列表. 37. ⽤物理接⼝建⽴与VLAN的连接: router# configure terminalrouter(config)# interface media module/portrouter(config-if)# description description-string router(config-if)# ip address ip-addr subnet-mask router(config-if)# no shutdown 38. ⽤中继链路来建⽴与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-number router(config-if)# ip address ip-address subnet-mask 39. ⽤LANE 来建⽴与VLAN的连接:router(config)# interface atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaal router(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-mask router(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-name router(config-if)# lane client ethernet elan-name router(config-if)# …40. 为了在路由处理器上进⾏动态路由配置,可以⽤下列IOS命令来进⾏: router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-number router(config-router)# network ip-network-number 41. 配置默认路由:switch(enable) set ip route default gateway42. 为⼀个路由处理器分配VLANID,可在接⼝模式下使⽤下列命令: router(config)# interface interface number router(config-if)# mls rp vlan-id vlan-id-num 43. 在路由处理器启⽤MLSP: router(config)# mls rp ip44. 为了把⼀个外置的路由处理器接⼝和交换机安置在同⼀个VTP域中: router(config)# interface interface number44. 为了把⼀个外置的路由处理器接⼝和交换机安置在同⼀个VTP域中: router(config)# interface interface numberrouter(config-if)# mls rp vtp-domain domain-name 45. 查看指定的VTP域的信息:router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接⼝,可以在接⼝模式下输⼊下列命令: router(config-if)#mls rp management-interface 47. 要检验MLS-RP的配置情况: router# show mls rp48. 检验特定接⼝上的MLS配置:router# show mls rp interface interface number49. 为了在MLS-SE上设置流掩码⽽⼜不想在任⼀个路由处理器接⼝上设置访问列表: set mls flow [destination|destination-source|full]50. 为使MLS和输⼊访问列表可以兼容,可以在全局模式下使⽤下列命令: router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输⼊下列命令: switch(enable) set mls enable52. 若想改变⽼化时间的值,可在特权模式下输⼊以下命令: switch(enable) set mls agingtime agingtime 53. 设置快速⽼化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显⽰交换机引⽤列表中的内容再确定: switch(enable) show mls include 55. 显⽰MLS⾼速缓存记录: switch(enable) show mls entry56. ⽤命令show in arp显⽰ARP⾼速缓存区的内容。

思科路由器命令大全(完整版)

思科路由器命令大全(完整版)

思科交换机路由器命令大全交换机命令:switch> 用户模式1:进入特权模式enableswitch> enableswitch#2:进入全局配置模式configure terminalswitch> enableswitch#configure terminalswitch(conf)#3:交换机命名hostname aptech2950 以aptech2950为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch-2950aptech2950(conf)#4:配置使能口令enable password cisco 以cisco为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable password cisco5:配置使能密码enable secret ciscolab 以cicsolab为例--设置禁用IP地址解析特性,设置启用消息同步特性switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# enable secret ciscolabaptech2950(conf)#no ip domain-lookup -----设置禁用IP 地址解析特性aptech2950(conf)#logging synchronous -----设置启用消息同步特性aptech2950(conf)#interface range fastethernet0/1-20aptech2950(conf-if-range)#spanning-tree portfast -----设置快速端口aptech2950(conf)#interface range fastethernet 0/23-24aptech2950(conf-if-range)#swichport mode trunk -----设置主干道端口aptech2950(conf)#spanning-tree uplingkfast ---设置阻塞启用迅速(只可以在访问层启用)6:设置虚拟局域网vlan 1 interface vlan 1switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface vlan 1aptech2950(conf-if)#ip address 192.168.1.1 255.255.255.0 配置交换机端口ip和子网掩码aptech2950(conf-if)#no shut 是配置处于运行中aptech2950(conf-if)#exitaptech2950(conf)#ip default-gateway 192.168.254 设置网关地址7:进入交换机某一端口interface fastehernet 0/17 以17端口为例switch> enableswitch#configure terminalswitch(conf)#hostname aptch2950aptech2950(conf)# interface fastehernet 0/17aptech2950(conf-if)#8:查看命令showswitch> enableswitch# show version 察看系统中的所有版本信息show interface vlan 1 查看交换机有关ip 协议的配置信息show running-configure 查看交换机当前起作用的配置信息show interface fastethernet 0/1 察看交换机1接口具体配置和统计信息show mac-address-table 查看mac地址表show mac-address-table aging-time 查看mac地址表自动老化时间9:交换机恢复出厂默认恢复命令switch> enableswitch# erase startup-configureswitch# reload10:双工模式设置switch> enableswitch#configure terminalswitch2950(conf)#hostname aptch-2950aptech2950(conf)# interface fastehernet 0/17 以17端口为例aptech2950(conf-if)#duplex full/half/auto 有full , half, auto 三个可选项11:cdp相关命令switch> enableswitch# show cdp 查看设备的cdp全局配置信息show cdp interface fastethernet 0/17 查看17端口的cdp配置信息show cdp traffic 查看有关cdp包的统计信息show cdp nerghbors 列出与设备相连的cisco设备12:csico2950的密码恢复拔下交换机电源线。

思科交换机命令大全+CiscoIOS基本命令

思科交换机命令大全+CiscoIOS基本命令

思科交换机命令大全+CiscoIOS基本命令思科交换机命令大全(一)序号/类别基于ios的交换机命令基于CLI的交换机命令1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) setsystem name name-string2.设置登录口令switch(config)# enable password level 1 password switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问switch(config)# inte***ce vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-addressswitch(enable) set inte***ce sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息switch(config-if)# cdp enableswitch(config-if)# no cdp enable switch(enable) set cdp {enable|disable}module/port5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string 7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set portspeed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto} 8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half9.配置静态VLAN switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#inte***ce inte***ce module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线switch(config)# inte***ce inte***ce mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq} switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)settrunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域switch# vlan databaseswitch(vlan)# vtp domain domain-name switch(enable) set vtp [domain domain-name]12.配置VTP 模式switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password switch(enable) set vtp [domaindomain-name] [mode{ sever|cilent|transparent }][password password]13.配置VTP版本switch# vlan databaseswitch(vlan)# vtp v2-mode switch(enable) set vtp v2 enable 14.启动VTP剪裁switch# vlan databaseswitch(vlan)# vtp pruning switch(enable) set vtp pruning enable15.配置以太信道switch(config-if)# port group group-number [distribution {source|destination}] switch(enable) set port channel moudle/port-rangemode{on|off|desirable|auto}16.调整根路径成本switch(config-if)#spanning-tree [vlan vlan-list] cost cost switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口ID switch(config-if)#spanning-tree[vlan vlan-list]port-priorityport-priority switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征switch(config-if)#spanning-tree portfastswitch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征switch(config)#spanning-tree uplinkfast[max-update-rate pkts-per-second] switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp{ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ringhex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# inte***ce atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS: ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-addressles1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-addressles2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)#inte***ce atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: ATM(config)#inte***ce atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.--------------------------------------------------------------------------------37. 用物理接口建立与VLAN的连接: router# configure terminalrouter(config)# inte***ce media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接: router(config)# inte***cemodule/port.subinte***cerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP 域中:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-inte***ce47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp inte***ce inte***ce number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtimepkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

思科交换机命令大全(一)序号/类别基于ios的交换机命令基于CLI的交换机命令1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) setsystem name name-string2.设置登录口令switch(config)# enable password level 1 password switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问switch(config)# inte***ce vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address switch(enable) set inte***ce sc0 ip-address netmask broadcast-addressswitch(enable) set inte***ce sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息switch(config-if)# cdp enableswitch(config-if)# no cdp enable switch(enable) set cdp {enable|disable}module/port5.查看Cisco邻接设备的CDP通告switch# show cdp inte***ce [type modle/port] switch# show cdp neighbors [type module/port] [detail] switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail]6.端口描述switch(config-if)#description escription-string switch(enable)set port name module/number description-string7.设置端口速度switch(config-if)# speed{10|100|auto} switch(enable) set portspeed moudle/number {10|100|auto}switch(enable) set port speed moudle/number {4|16|auto}8.设置以太网的链路模式switch(config-if)# duplex {auto|full|half} switch(enable) set port duplex module/number {full|half9.配置静态VLAN switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#inte***ce inte***ce module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线switch(config)# inte***ce inte***ce mod/portswitch(config-if)# switchport mode trunkswitch(config-if)#switchport trunk encapsulation {isl|dotlq}switch(config-if)# switchport trunk allowed vlan remove vlan-listswitch(config-if)# switchport trunk allowed vlan add vlan-list switch(enable)settrunk module/port [on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域switch# vlan databaseswitch(vlan)# vtp domain domain-name switch(enable) set vtp [domain domain-name]12.配置VTP 模式switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password password switch(enable) set vtp [domaindomain-name] [mode{ sever|cilent|transparent }][password password]13.配置VTP版本switch# vlan databaseswitch(vlan)# vtp v2-mode switch(enable) set vtp v2 enable14.启动VTP剪裁switch# vlan databaseswitch(vlan)# vtp pruning switch(enable) set vtp pruning enable15.配置以太信道switch(config-if)# port group group-number [distribution {source|destination}] switch(enable) set port channel moudle/port-rangemode{on|off|desirable|auto}16.调整根路径成本switch(config-if)#spanning-tree [vlan vlan-list] cost cost switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口ID switch(config-if)#spanning-tree[vlan vlan-list]port-priorityport-priority switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟switch(config)# spanning-tree [vlan vlan-list] hello-time secondsswitch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age seconds switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征switch(config-if)#spanning-tree portfastswitch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征switch(config)#spanning-tree uplinkfast[max-update-rate pkts-per-second] switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocols off|on]20. 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个IP地址,然后使用下列命令:switch(config)# cluster enable cluster-name21. 为了从一条中继链路上删除VLAN,可使用下列命令:switch(enable) clear trunk module/port vlan-range22. 用show vtp domain 显示管理域的VTP参数.23. 用show vtp statistics显示管理域的VTP参数.24. 在Catalyst交换机上定义TrBRF的命令如下:switch(enable) set vlan vlan-name [name name] type trbrf bridge bridge-num[stp{ieee|ibm}]25. 在Catalyst交换机上定义TrCRF的命令如下:switch (enable) set vlan vlan-num [name name] type trcrf {ringhex-ring-num|decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) set vlan vlan-num mod-num/port-num27. 命令show spantree显示一个交换机端口的STP状态.28. 配置一个ELAN的LES和BUS,可以使用下列命令: ATM (config)# inte***ce atm number.subint multiointATM(config-subif)# lane serber-bus ethernet elan-name29. 配置LECS: ATM(config)# lane database database-nameATM(lane-config-databade)# name elan1-name server-atm-addressles1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-addressles2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)#inte***ce atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下: ATM(config)#inte***ce atm number.subint multipointATM(config)# lane client ethernet vlan-num elan-num32. 用show lane server 显示LES的状态.33. 用show lane bus显示bus的状态.34. 用show lane database显示LECS数据库可内容.35. 用show lane client显示LEC的状态.36. 用show module显示已安装的模块列表.--------------------------------------------------------------------------------37. 用物理接口建立与VLAN的连接: router# configure terminalrouter(config)# inte***ce media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接: router(config)# inte***cemodule/port.subinte***cerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce atm module/port router(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# inte***ce atm module/port.subinte***ce multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernet elan-namerouter(config-if)# ...40. 为了在路由处理器上进行动态路由配置,可以用下列IOS命令来进行:router(config)# ip routingrouter(config)# router ip-routing-protocolrouter(config-router)# network ip-network-numberrouter(config-router)# network ip-network-number41. 配置默认路由: switch(enable) set ip route default gateway42. 为一个路由处理器分配VLANID,可在接口模式下使用下列命令:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# inte***ce inte***ce numberrouter(config-if)# mls rp vtp-domain domain-name45. 查看指定的VTP域的信息: router# show mls rp vtp-domain vtp domain name46. 要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mls rp management-inte***ce47. 要检验MLS-RP的配置情况:router# show mls rp48. 检验特定接口上的MLS配置:router# show mls rp inte***ce inte***ce number49. 为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination|destination-source|full]50. 为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mls rp ip input-acl51. 当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52. 若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mls agingtime agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtimepkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

相关文档
最新文档