思科交换机基本配置命令大全

合集下载

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

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

序号/类别基于ios的交换机命令基于CLI的交换机命令1.设置主机名/系统名switch(config)# hostname "hostname" switch(enable) set system name name-string2.设置登录口令switch(config)# enable password level 1 password switch(enable) set password switch(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 port speed 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)set trunk 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 [domain domain-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-range mode{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-priority port-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 portfast switch(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 {ring hex-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,可以使用下列命令: A TM (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-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-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配置到一个不同的A TM子接口上.命令如下: A TM(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***ce module/port.subinte***ce router(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接: router(config)# inte***ce atm module/portrouter(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***ceinte***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 fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

思科交换机命令大全

思科交换机命令大全

思科交换机常用命令大全1.1 用户模式与特权模式用户模式:可以使用一些基本的查询命令特权模式:可以对交换机进行相关的配置进入特权模式命令:Switch>enable退出特权模式命令:Switch#exit启用命令查询:?时间设置:Switch#clock set 时间(自选参数,参数必须符合交换机要求)显示信息命令:Switch#show 可选参数注意:可以用TAB键补齐命令,自选参数为用户自定义参数,可选参数为交换机设定参数查看交换机配置: Switch#show running-config保存交换机配置:Switch#copy running-config startup-configSwitch#wr查看端口信息:Switch#show interface查看MAC地址表:Switch#show mac-address-table查看交换机CPU的状态信息:Switch#show processes1.2 全局配置模式进入全局配置模式:Switch#configure terminal主机名修改:Switch(config)#hostname 主机名(自选参数)特权模式进入密码: Switch(config)#enable secret 密码(自选参数)取消特权模式密码:Switch(config)#no enable secret取消主机名设置: Switch(config)#no hostname退出配置模式: Switch(config)#exit需要特别注意的是在配置模式中无法使用show命令,如果要使用的话show前必须加do和空格,例如:do show *指定根交换机命令:Switch(config)#spanning-tree vlan 自选参数(VLAN号)root primary例如: Switch(config)#spanning-tree vlan 1 root primary需要注意的是:设置根交换机是基于VLAN的关闭生成树协议命令:Switch(config)#no spanning-tree vlan 自选参数(VLAN 号)例如: Switch(config)#no spanning-tree vlan 11.3 接口配置模式进入接口配置模式:Switch(config)#interface 端口名称(可选参数)启用端口:Switch(config-if)#no shutdown停用端口:Switch(config-if)#shutdown进入同种类型多端口配置:Switch(config)# interface range fastethernet 0/1-5进入不同类型多端口配置:Switch(config)#interface range fastethernet 0/1-5,gigabitethernet 0/1-2退出接口配置模式:Switch(config-if)#exit1.4 二层端口的配置端口速率: Switch(config-if)#speed 可选参数双工模式: Switch(config-if)#duplex 可选参数禁用链路协商:Switch(config-if)#no negotiation auto 启用链路协商:Switch(config-if)#negotiation auto1.5 VLAN的配置新建VLAN:Switch(config)#vlan 自选参数(VLAN号)Switch(config-vlan)#name自选参数(VLAN名)例如:Switch(config)#vlan 1Switch(config-vlan)#name lab1Switch(config-vlan)#exit删除VLAN: Switch#vlan databaseSwitch(vlan)#no vlan 自选参数(vlan号)例如:Switch#vlan databaseSwitch(vlan)#no vlan 2将一个接口加入VLAN:Switch(config)#interface 可选参数(接口号)Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 自选参数(VLAN号)Switch(config-if)#no shutdownSwitch(config-if)#exit例如:Switch(config)#interface f0/1Switch(config-if)#switchport mode accessSwitch(config-if)#switchport access vlan 1Switch(config-if)#no shutdownSwitch(config-if)#exit将一个接口退出VLAN:Switch(config)#interface 可选参数(接口号)Switch(config-if)#no switchport access vlan 自选参数(VLAN号)例如:Switch(config)#interface f0/1Switch(config-if)#no switchport access vlan 2修改一个接口为端口汇聚模式Switch(config)#interface 可选参数(接口号)Switch(config-if)#switchport mode trunkVLAN的验证命令:Switch#show vlan 显示VLAN列表Switch#show interface switchport 查看具体接口的VLAN成员资格信息1.6 VTP的配置VTP Domain Name(VTP域名)Switch#configure terminalSwitch(config)#vtp domain 自选参数例如: Switch(config)#vtp domain Lab_NetworkVTP mode(VTP模式)Switch(config)#vtp mode 可选参数(Server|Client| Transparent)例如: Switch(config)#vtp mode ServerVTP Pruning(VTP修剪)Switch(config)#vtp pruning注意:有的交换机不支持VTP修剪命令查看VTP的配置命令:Switch#show vtp status显示交换机运行的VTP模式,配置修订号和交换机所属的VTP域Switch#show vtp counters显示VTP消息相关的统计数据1.7 远程登录交换机设置配置管理VLAN:Switch(conf)#interface vlan 1Switch(config-if)#ip address x.x.x.x 255.255.255.0Switch(config-if)#no shutdown注意:IP地址必须与远程连接交换机的PC机地址在同一网段在交换机上指定默认网关:Switch(config)#ip default-gateway x.x.x.x注意:指定的默认网关仅当前交换机有效。

思科交换机配置命令

思科交换机配置命令

Cmd1. switch配置命令(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号" 全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAMwrite 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息+ # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port- channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN 号或旧的来进行修改。

思科交换机基本配置命令

思科交换机基本配置命令

思科交换机基本配置命令Switch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2 创建VLAN2Switch(config-vlan)#exiSwitch(config)#vlan 3 创建VLAN3Switch(config-vlan)#exiSwitch(config)#vlan 4 创建VLAN4Switch(config-vlan)#exitSwitch(config)#int fa0/1 将我们的fa0/1添加到VLAN2中Switch(config-if)#sw mo acSwitch(config-if)#sw ac vlan 2Switch(config-if)#exitSwitch(config)#int fa0/2 将我们的FA0/2添加到VLAN3中Switch(config-if)#sw mo acSwitch(config-if)#sw ac vlan 3Switch(config-if)#exitSwitch(config)#int fa0/3 将我们的FA0/3添加到VLAN4中Switch(config-if)#sw mo acSwitch(config-if)#sw ac vlan 4Switch(config-if)#exitSwitch(config)#int vlan 2 给我们的VLAN2添加一个IP地址,用于不同网段之间互相访问Switch(config-if)#ip add 192.168.1.1 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 3 给我们的VLAN3添加一个IP地址Switch(config-if)#ip add 192.168.2.1 255.255.255.0Switch(config-if)#exitSwitch(config)#int vlan 4给我们的VLAN4添加一个IP地址Switch(config-if)#ip add 192.168.3.1 255.255.255.0Switch(config-if)#no shutSwitch(config-if)#exit以下几行是用给给我们不同的VLAN内的主机自动分配我们的IP地址。

思科交换机路由基本配置命令

思科交换机路由基本配置命令

思科交换机路由基本配置命令常用命令1.配置接口:interface {interface_type} {interface_number}2.配置IP地址:ip address {IP_address} {subnet_mask}3.配置默认网关:ip default-gateway {default_gateway_IP}4.开启接口:no shutdown5.配置路由协议:router {routing_protocol}6.配置路由器ID:router-id {router_ID}7.配置路由信息:network {network_address} {subnet_mask}8.配置静态路由:ip route {destination_network} {subnet_mask}{next-hop_IP}9.配置动态路由:router {routing_protocol} {network_address}10.保存配置:copy running-config startup-config注意:上述命令仅作为参考,具体配置应根据实际环境和设备型号进行调整。

下面是一些基本的 Cisco 交换机路由配置命令:1.配置 hostname: hostname <name>2.配置 IP 地址: interface <interface> 后进入接口模式,再输入 ipaddress <ip address> <subnet mask>3.配置默认路由: ip route 0.0.0.0 0.0.0.0 <next hop IP>4.启用路由协议: router <protocol> (例如: router rip)5.配置路由连接: network <network address> (例如: network192.168.1.0)6.查看路由表: show ip routeCisco 交换机路由配置步骤1.进入配置模式:configure terminal2.配置 IP 地址和子网掩码:interface [interface-name] ; ip address[ip-address] [subnet-mask]3.配置默认路由:ip route 0.0.0.0 0.0.0.0 [next-hop-IP-address]4.启用路由协议:router [protocol-name] (如:router ospf)5.配置路由协议参数: [protocol-name] [process-id] (如:ospf 1)6.配置路由连接:network [network-address] [wildcard-mask] area[area-id] (如:network 192.168.1.0 0.0.0.255 area 0)7.保存配置:copy running-config startup-config8.退出配置模式:exit。

思科交换机路由器命令大全

思科交换机路由器命令大全

思科交换机路由器命令大全思科交换机和路由器命令大全本文档为思科交换机和路由器命令的最新最全范本,供参考使用。

以下是详细的命令列表,包括每个命令的说明和用法。

一、接口配置命令1、ip address:设置接口的IP地质示例:ip address 192.168.1.1 255.255.255:02、no shutdown:启用接口示例:no shutdown3、duplex:设置接口的双工模式示例:duplex auto4、speed:设置接口的速度示例:speed 1005、exit:退出接口配置模式示例:exit二、VLAN命令1、vlan database:进入VLAN数据库模式示例:vlan database2、vlan id name:创建VLAN并设置名称示例:vlan 10 name VLAN-103、vlan id:删除VLAN示例:no vlan 104、show vlan:显示VLAN信息示例:show vlan5、exit:退出VLAN数据库模式示例:exit三、路由命令1、ip route:设置静态路由示例:ip route 192.168.2:0 255.255.255:0 192.168.1.22、router rip:启用RIP路由协议示例:router rip3、network:将网络添加到RIP路由表中示例:network 10:0:0:04、redistribute:将静态路由或其他路由协议添加到RIP路由表中示例:redistribute static5、exit:退出路由配置模式示例:exit四、ACL命令1、access-list:创建标准或扩展ACL示例:access-list 10 permit 192.168.1:0 0:0:0.2552、ip access-group:应用ACL到接口示例:ip access-group 10 in3、show access-lists:显示ACL信息示例:show access-lists4、exit:退出ACL配置模式示例:exit五、SNMP命令1、snmp-server community:设置SNMP团体字符串示例:snmp-server community public RO2、snmp-server enable traps:启用SNMP陷阱示例:snmp-server enable traps3、snmp-server host:配置SNMP陷阱接收主机示例:snmp-server host 192.168.1.1004、exit:退出SNMP配置模式示例:exit六、SSH命令1、ip ssh version:设置SSH协议版本示例:ip ssh version 22、crypto key generate rsa:RSA密钥对示例:crypto key generate rsa3、username:创建新的本地用户示例:username admin privilege 15 password password1234、exit:退出SSH配置模式示例:exit七、其他命令1、show running-config:显示当前配置示例:show running-config2、copy running-config startup-config:将当前配置保存到启动配置中示例:copy running-config startup-config3、reload:重新启动设备示例:reload4、exit:退出CLI命令行模式示例:exit本文档涉及附件:1、无附件本文所涉及的法律名词及注释:1、ACL(Access Control List):访问控制列表,用于控制网络流量的进出。

思科命令大全(完整版)

思科命令大全(完整版)

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI:switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问IOS:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string7.设置端口速度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}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS:switch(config)# interface interface 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 CLI:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道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} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority CLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS: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 CLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocolsoff|on] 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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 {ring hex-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)# interface 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-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface 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)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface 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)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface 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-interface47. 要检验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 agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录: switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

2024版年度思科网络交换机配置命令详细总结归纳

2024版年度思科网络交换机配置命令详细总结归纳

•交换机基本配置•VLAN配置与管理•生成树协议(STP)配置与优化•端口聚合(EtherChannel)配置与应用目•交换机安全性设置与加固•交换机性能监控与故障排除录01交换机基本配置1 2 3通过控制台端口登录远程登录配置访问控制列表(ACL)交换机登录与访问控制交换机主机名与域名设置主机名配置域名设置系统提示信息配置交换机端口配置与启用端口速率和双工模式配置端口安全配置A B C D端口VLAN分配端口镜像配置在完成交换机的各项配置后,及时保存配置信息,防止因意外断电或其他原因导致配置丢失。

配置保存在需要重启交换机时,可以通过命令行或Web 界面进行重启操作,确保交换机正常启动并加载最新的配置信息。

交换机重启在交换机出现问题时,可以加载之前保存的配置文件,实现配置回滚,快速恢复网络正常运行。

配置回滚查看交换机的系统日志,了解交换机的运行状况和故障信息,为故障排除提供依据。

系统日志查看交换机保存与重启02VLAN配置与管理创建VLAN及分配端口VLAN间路由配置01020304VLAN间通信及访问控制列表(ACL)应用VLAN安全性设置010*******03生成树协议(STP)配置与优化STP基本原理及作用消除环路链路备份自动恢复STP配置命令详解启用STP设置STP模式配置STP优先级配置STP端口状态STP优化策略及实施方法启用PortFast调整STP定时器配置BPDU Guard配置Root Guard逐步排查根据故障现象和网络拓扑结构,逐步排查可能导致STP 故障的原因,如物理链路故障、交换机配置错误等。

查看STP 状态使用命令`show spanning-tree vlan vlan-id`查看指定VLAN 的STP 状态,包括根交换机、根端口、指定端口等信息。

检查端口状态使用命令`show interfaces interface-type interface-number switchport`查看交换机端口的STP 状态及相关配置。

思科交换机配置命令大全

思科交换机配置命令大全

交换机配置1、基本配置:Switch >enable /进入特权模式Switch#conf t /进入全局配置模式Switch (conf-if)#duplex full/half/auto /有full , half, auto 三个可选switch# erase startup-configure / 恢复出场配置switch# reload / 重启交换机远程登录和con口还有接口配置和路由器配置命令一样,不再下面总结。

2配置VLAN和TRUNKSwitch(config)# vlan xxx /创建一个VLANSwitch(config-vlan)# name xxx /给VLAN命名或Switch# vlan database /进入保存VLAN配置的配置文件Switch(vlan)# vlan 20 name test20 /创建VLAN并给它命名Switch(config-if)# switchport mode access /配置端口模式是accessSwitch(config-if)# switchport access vlan xxx / 把接口划入一个VLAN Switch(config-if)#switchport trunk encapsulation {isl | dot1q | negotiate} /配置trunk封装ISL 或 802.1Q 或自动协商Switch(config-if)#switchport mode {dynamic {auto | desirable} | trunk} /配置二层trunk模式。

Switch(config-if)#switchport trunk allowed vlan {add | all | except | remove} vlan-list可选) / 配置trunk允许的VLAN3查看命令switch#show version /察看系统中的所有版本信息switch#show interface vlan xxx /查看交换机有关ip 协议的配置信息switch#show running-configure /查看交换机当前起作用的配置信息switch#show interface fastethernet xxx /察看交换机xxx接口具体配置和统计信息switch#show mac-address-table /查看mac 地址表switch#show mac-address-table aging-time / 查看mac 地址表自动老化时间4 cdp 相关命令switch#show cdp / 查看设备的cdp 全局配置信息switch#show cdp interface fastethernet xxx /查看xxx 端口的cdp 配置信息switch#show cdp traffic / 查看有关cdp 包的统计信息switch#show cdp nerghbors / 列出与设备相连的cisco 设备VTP配置switch# vlan databaseswitch(vlan)# vtp domain xxx / 配置VTP名字Switch(vlan)#vtp server / 配置VTP模式为serverSwitch(vlan)#vtp client / 配置VTP模式为clientSwitch(vlan)#vtp password xxx / 配置VTP密码switch(vlan)# vtp pruning / 开启VTP剪裁switch#show vtp domain /显示管理域的VTP 参数还有没总结的,我会抓紧时间完善。

思科交换机基本配置命令

思科交换机基本配置命令

思科交换机基本配置命令思科交换机基本配置命令大全CISCO交换机有什么基本配置命令呢?下面yjbys店铺为大家分享最新思科交换机配置命令大全,希望对大家学习思科认证有所帮助!CISCO交换机基本配置:Console端口连接用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname csico ;设置交换机的主机名switch(config)#enable secret csico1 ;设置特权加密口令switch(config)#enable password csico8 ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;虚拟终端允许登录switch(config-line)#password csico6 ;设置虚拟终端登录口令csico6switch#exit ;返回命令交换机VLAN创建,删除,端口属性的设置,配置trunk端口,将某端口加入vlan中,配置VTP:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#vlan 3 name vlan3 ;建VLAN 3并命名为vlan3switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(config)#speed ? 查看speed命令的子命令switch(config)#speed 100 设置该端口速率为100mb/s(10/auto)switch(config)#duplex ? 查看duplex的子命令switch(config)#duplex full 设置该端口为全双工(auto/half)switch(config)#description TO_PC1 这是该端口描述为TO_PC1 switch(config-if)#switchport access vlan 2 ;当前端口加入vlan 2switch(config-if)#switchport mode trunk ;设置为trunk模式(access模式)switch(config-if)#switchport trunk allowed vlan 1,2 ;设置允许的vlanswitch(config-if)#switchport trunk encap dot1q ;设置vlan 中继switch(config)#vtp domain vtpserver ;设置vtp域名相同switch(config)#vtp password ;设置发vtp密码switch(config)#vtp server ;设置vtp服务器模式switch(config)#vtp client ;设置vtp客户机模式交换机设置IP地址,默认网关,域名,域名服务器,配置和查看MAC地址表:switch(config)#interface vlan 1 ;进入vlan 1switch(config-if)#ip address 192.168.1.1 255.255.255.0 ;设置IP地址switch(config)#ip default-gateway 192.168.1.6 ;设置默认网关switch(config)#ip domain-name 设置域名switch(config)#ip name-server 192.168.1.18 设置域名服务器switch(config)#mac-address-table? 查看mac-address-table 的子命令switch(config)#mac-address-table aging-time 100 设置超时时间为100msswitch(config)#mac-address-table permanent 0000.0c01.bbcc f0/3 加入永久地址在f0/3端口switch(config)#mac-address-table restricted static 0000.0c02.bbcc f0/6 f0/7 加入静态地址目标端口f0/6源端口f0/7 switch(config)#endswitch#show mac-address-table 查看整个MAC地址表switch#clear mac-address-table restricted static 清除限制性静态地址交换机显示命令:switch#write ;保存配置信息switch#show vtp ;查看vtp配置信息switch#show run ;查看当前配置信息switch#show vlan ;查看vlan配置信息switch#show interface ;查看端口信息switch#show int f0/0 ;查看指定端口信息switch#show int f0/0 status;查看指定端口状态switch#dir flash: ;查看闪存(1)模式转换命令用户模式----特权模式,使用命令"enable"特权模式----全局配置模式,使用命令"config t"全局配置模式----接口模式,使用命令"interface+接口类型+接口号"全局配置模式----线控模式,使用命令"line+接口类型+接口号"注:用户模式:查看初始化的信息.特权模式:查看所有信息、调试、保存配置信息全局模式:配置所有信息、针对整个路由器或交换机的所有接口接口模式:针对某一个接口的配置线控模式:对路由器进行控制的.接口配置(2)配置命令show running config 显示所有的配置show versin 显示版本号和寄存器值shut down 关闭接口no shutdown 打开接口ip add +ip地址配置IP地址secondary+IP地址为接口配置第二个IP地址show interface+接口类型+接口号查看接口管理性show controllers interface 查看接口是否有DCE电缆show history 查看历史记录show terminal 查看终端记录大小hostname+主机名配置路由器或交换机的标识config memory 修改保存在NVRAM中的启动配置exec timeout 0 0 设置控制台会话超时为0service password-encryptin 手工加密所有密码enable password +密码配置明文密码ena sec +密码配置密文密码line vty 0 4/15 进入telnet接口password +密码配置telnet密码line aux 0 进入AUX接口password +密码配置密码line con 0 进入CON接口password +密码配置密码bandwidth+数字配置带宽no ip address 删除已配置的IP地址show startup config 查看NVRAM中的配置信息copy run-config atartup config 保存信息到NVRAM write 保存信息到NVRAMerase startup-config 清除NVRAM中的配置信息show ip interface brief 查看接口的谪要信息banner motd # +信息 + # 配置路由器或交换机的描素信息description+信息配置接口听描素信息vlan database 进入VLAN数据库模式vlan +vlan号+ 名称创建VLANswitchport access vlan +vlan号为VLAN为配接口interface vlan +vlan号进入VLAN接口模式ip add +ip地址为VLAN配置管理IP地址vtp+service/tracsparent/client 配置SW的VTP工作模式vtp +domain+域名配置SW的VTP域名vtp +password +密码配置SW的密码switchport mode trunk 启用中继no vlan +vlan号删除VLANshow spamming-tree vlan +vlan号查看VLA怕生成树议2. 路由器配置命令ip route+非直连网段+子网掩码+下一跳地址配置静态/默认路由show ip route 查看路由表show protocols 显示出所有的被动路由协议和接口上哪些协议被设置show ip protocols 显示了被配置在路由器上的路由选择协议,同时给出了在路由选择协议中使用的定时器等信息router rip 激活RIP协议network +直连网段发布直连网段interface lookback 0 激活逻辑接口passive-interface +接口类型+接口号配置接口为被动模式debug ip +协议动态查看路由更新信息undebug all 关闭所有DEBUG信息router eigrp +as号激活EIGRP路由协议network +网段+子网掩码发布直连网段show ip eigrp neighbors 查看邻居表show ip eigrp topology 查看拓扑表show ip eigrp traffic 查看发送包数量router ospf +process-ID 激活OSPF协议network+直连网段+area+区域号发布直连网段show ip ospf 显示OSPF的进程号和ROUTER-IDencapsulation+封装格式更改封装格式no ip admain-lookup 关闭路由器的域名查找ip routing 在三层交换机上启用路由功能show user 查看SW的在线用户clear line +线路号清除线路3. 三层交换机配置命令配置一组二层端口configure terminal 进入配置状态nterface range {port-range} 进入组配置状态配置三层端口configure terminal 进入配置状态interface {{fastethernet | gigabitethernet} interface-id} | {vlan vlan-id} | {port-channel port-channel-number} 进入端口配置状态no switchport 把物理端口变成三层口ip address ip_address subnet_mask 配置IP地址和掩码no shutdown 激活端口例:Switch(config)# interface gigabitethernet0/2Switch(config-if)# no switchportSwitch(config-if)# ip address 192.20.135.21 255.255.255.0Switch(config-if)# no shutdown配置VLANconfigure terminal 进入配置状态vlan vlan-id 输入一个VLAN号, 然后进入vlan配态,可以输入一个新的VLAN号或旧的来进行修改。

思科交换机基本配置命令

思科交换机基本配置命令

思科交换机基本配置命令思科交换机相关配置⼀、基础操作进⼊交换机界⾯为⼀般⽤户模式 switch>输⼊命令 enable进⼊特权⽤户模式 switch#输⼊命令config terminal进⼊全局配置模式 switch(config)#输⼊命令int xxx可进⼊端⼝或者vlan的全局配置⼦模式switch(config-if)#特权⽤户模式可输⼊show命令查看相关设置,命令后输⼊?可查询帮助可⽤no 命令撤销已经设置的配置⼆、Telnet远程登录设置1.交换机配置IP地址进⼊vlan 1 //int vlan 1启⽤ //no shutdown设置ip地址 ///ip address ip地址⼦⽹掩码2.设置交换机⽤户名和密码useename xxxpassword/secret xxx设置enable密码enable password xxx3.设置访问数量line vty 0 x(x是数量,最⼩为1)password xxxlogin也可以直接调⽤上⾯设置的本地⽤户名密码line vty 0 xlogin local4.console⼝的密码设置也相似line console 0login local三、SSH远程登录1.基础设置与Telnet类似2.设置访问数量line vty 0 x3.选择ssh⽅式transport input ssh4.更改hostnamehostname xxx5.设置域名ip domain-name 6.设置rsa加密密钥crypto key generate rsa[512]:在360-2048中选择即可7.PC端登录命令ssh -l username ip地址四、交换机中划分vlan1.创建vlanvlan x(数字)可以使⽤name命令改名2.进⼊端⼝,分配vlanint f0/1switchport access vlan x3.交换机之间相连需要在连接端⼝做trunk进⼊连接端⼝int f0/24创建trunkswitchport mode trunk五、核⼼交换机中划分vlan1.创建vlanvlan x1vlan x2…2.vlan 中设置⽹关,vlan下的pc终端也要设置相同⽹关int vlan xip address xxx xxx3.三层交换机与交换机相连端⼝做trunk封装dot1q协议switchport trunk encapsulation dot1q创建trunkswitchport mode trunk4.如有需要,可以开启路由功能ip routing六、本地端⼝镜像1.设置源端⼝monitor session 1 source int f0/12.设置⽬的端⼝monitor session 1 destination f0/2七、远程端⼝镜像1.设置远程专⽤vlanvlan 100开启远程端⼝镜像功能remote-span2.被监视交换机中设置源端⼝monitor session 1 source int f0/1设置⽬的端⼝monitor session 1 destination remote vlan 100 reflector-port f0/1 3.另⼀台监视交换机同上,创建vlan,开启远程镜像设置源端⼝monitor session 2 source remote vlan 100设置⽬的端⼝monitor session 2 destination int f0/3⼋、PVST配置,负载均衡1.打开pvst功能spanning-tree mode pvst2.进⼊交换机全局配置模式配置主根spainning-tree vlan x1 priority 4096配置次根spanning- tree vlan x2 priority 81923.进⼊另⼀个交换机配置主根spainning-tree vlan x2 priority 4096配置次根spanning- tree vlan x1 priority 81923.进⼊另⼀个交换机九、链路聚合lacp1.进⼊需要配置的端⼝int range f0/21-242.选择lacp协议channel-protocol lacp2.开启channel-group 1 mode active3.如果链路聚合需要做trunk,可以执⾏以下操作int port- channel 1switchport mode trunk。

思科交换机基本命令(全)

思科交换机基本命令(全)

思科模拟器命令:设置交换机名字为yzhSwitch> 进入超级终端控制台Switch>enable 进入交换机特权模式Switch#Switch#configure terminal 进入交换机全局配置模式Switch(configure)#hostname yzh 改变名字为XXXyzh(configure)# 显示改名成功yzh(configure)#exit 退回上级操作模式,即返回特权模式yzh#yzh#exit 返回到用户模式yzh>参看交换机有关信息yzh#yzh#configure terminal 进入交换机全局配置模式yzh#show version 查看交换机的版本信息yzh#show vlan 查看交换机的VLAN信息,默认情况下所有借口均属于VLAN yzh#show running-config 查看交换机当前生效的配置信息配置交换机接口f0/2yzh>yzh>enableyzh#yzh#configure terminal 进入交换机配置模式yzh(config)#interface fastEthernet 0/2 进入交换机接口fa0/2yzh(config-if)# 进入接口配置模式yzh(config-if)#speed 100 设置接口F0/2速率为100Myzh(config-if)#duplex half 配置接口的双工模式是半双工yzh(config-if)#no shutdown 开启接口,使得处于工作状态,等待转发数据。

yzh(config-if)#exit 输入exit返回全局模式yzh(config)#exit 返回特权模式yzh# 位于特权模式yzh#show interfaces fastEthernet 0/2 查看刚才对接口f0/2配置情况设置交换机Enable特权密码为adminyzh> 进入超级终端控制台yzh>enable 进入交换机特权模式yzh#configure terminal 进入交换机配置模式yzh(config)#enable secret admin 设置Enable密码为admin注:验证密码自己思考。

思科交换机命令大全共16页文档

思科交换机命令大全共16页文档

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI:switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问IOS:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail] CLI:switch(enable) show cdp neighbors[module/port][vlan|duplex|capabilities|detail]6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string 7.设置端口速度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}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS:switch(config)# interface interface 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 CLI:switch(enable)set trunk module/port[on|off|desirable|auto|nonegotiate]Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道IOS:switch(config-if)# port group group-number [distribution{source|destination}] CLI:switch(enable) set port channel moudle/port-rangemode{on|off|desirable|auto}16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [costcost][vlan-list]17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priorityport-priorityCLI:switch(enable)set spantree portpri {mldule/port}priority switch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS:switch(config)# spanning-tree [vlan vlan-list] hello-time seconds switch(config)#spanning-tree [vlan vlan-list] forward-time secondsswitch(config)#spanning-tree [vlan vlan-list] max-age secondsCLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable} 20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-ratepkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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 {ring hex-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)# interface 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)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface 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)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(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)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface 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-interface47. 要检验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 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高速缓存区的内容。

(整理)思科交换机配置命令

(整理)思科交换机配置命令
switch(config)#interface f0/2
switch(config-if)#sw a v 30
switch(config-if)#switchport access vlan 30
24
验证VLAN配置信息
验证VLAN配置信息
switch#sh vlan b
switch#show vlan brief
switch(config)#ip default-gateway 192.168.0.1
16
查看交换机的MAC地址表
查看交换机的MAC地址表
switch#sh mac-a
switch#show mac-address-table
17
查看思科交换机相邻设备的详细信息
查看思科交换机相邻设备的详细信息
switch#sh cdp nei de
benet(config)#
7
配置进入特权模式的明文口令
配置进入特权模式的明文口令
switch(config)#en pass 123
switch(config)#enable password 123
8
删除进入特权模式的明文口令
删除进入特权模式的明文口令
switch(config)#no ena pass
30
验证接口模式(检查中断端口允许的VLAN列表)
验证接口模式(检查中断端口允许的VLAN列表)
switch#sh int f0/15 switchp
switch#show interface f0/15 switchport
31
查看用过的命令
查看用过的命令
switch#sh hi
switch#show history

CISCO交换机配置命令大全

CISCO交换机配置命令大全

CISCO交换机配置命令大全1.在基于IOS的交换机上设置主机名/系统名:switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broadcast-addressswitch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(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-string6.在基于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/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list9. 在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface 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在基于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 databaseswitch(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 databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13. 在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于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 secondsswitch(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-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{ring hex-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)# interface 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-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name …30. 创建完数据库后,必须在主接口上启动LECS.命令如下:ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface 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)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface multipoint router(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)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP:router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface 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-interface47. 要检验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 agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_threshold54. 确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55. 显示MLS高速缓存记录:switch(enable) show mls entry56. 用命令show in arp显示ARP高速缓存区的内容。

思科路由器交换机配置命令大全

思科路由器交换机配置命令大全

思科路由器交换机配置命令大全1. 交换机支持的命令:交换机基本状态:switch: ;ROM状态,路由器是rommon> hostname> ;用户模式hostname# ;特权模式hostname(config)# ;全局配置模式hostname(config-if)# ;接口状态交换机口令设置:switch>enable ;进入特权模式switch#config terminal ;进入全局配置模式switch(config)#hostname ;设置交换机的主机名switch(config)#enable secret xxx ;设置特权加密口令switch(config)#enable password xxa ;设置特权非密口令switch(config)#line console 0 ;进入控制台口switch(config-line)#line vty 0 4 ;进入虚拟终端switch(config-line)#login ;允许登录switch(config-line)#password xx ;设置登录口令xxswitch#exit ;返回命令交换机VLAN设置:switch#vlan database ;进入VLAN设置switch(vlan)#vlan 2 ;建VLAN 2switch(vlan)#no vlan 2 ;删vlan 2switch(config)#int f0/1 ;进入端口1switch(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 ;设置发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 ;设置默认网关switch#dir flash: ;查看闪存交换机显示命令:switch#write ;保存配置信息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 ;重新起动路由器口令设置:router>enable ;进入特权模式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(config-line)#password xx ;设置登录口令xxrouter(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 ;设置第二个IProuter(config-if)#int f0/0.1 ;进入子接口router(config-subif.1)#ip address ;设置子接口IProuter(config-subif.1)#encapsulation dot1q ;绑定vlan中继协议router(config)#config-register 0x2142 ;跳过配置文件router(config)#config-register 0x2102 ;正常使用配置文件router#reload ;重新引导路由器文件操作:router#copy running-config startup-config ;保存配置router#copy running-config tftp ;保存配置到tftprouter#copy startup-config tftp ;开机配置存到tftprouter#copy tftp flash: ;下传文件到flashrouter#copy tftp startup-config;下载配置文件ROM状态:Ctrl+Break ;进入ROM监控状态rommon>confreg 0x2142 ;跳过配置文件rommon>confreg 0x2102 ;恢复配置文件rommon>reset;重新引导rommon>copy xmodem: flash: ;从console传输文件rommon>IP_ADDRESS=10.65.1.2 ;设置路由器IPrommon>IP_SUBNET_MASK=255.255.0.0 ;设置路由器掩码rommon>TFTP_SERVER=10.65.1.1 ;指定TFTP服务器IP rommon>TFTP_FILE=c2600.bin ;指定下载的文件rommon>tftpdnld ;从tftp下载rommon>dir flash: ;查看闪存内容rommon>boot ;引导IOS静态路由:ip route ;命令格式router(config)#ip route 2.0.0.0 255.0.0.0 1.1.1.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路由协议。

思科路由器交换机基本配置命令

思科路由器交换机基本配置命令

1、交换机安全设置S1>enable ;进入特权模式S1#config terminal ;进入全局配置模式S1(config)#hostname <hostname> ;设置交换机的主机名S1(config)#enable secret xxx ;设置特权加密口令为xxxS1(config)#enable password xxx ;设置特权非密口令为xxxS1(config)#line console 0 ;进控制台口(Rs232)初始化S1(config-line)#line vty 0 4 ;进入虚拟终端S1(config-line)#login ;允许登录S1(config-line)#password xxx ;设置登录口令xxxS1h#exit ;返回命令MAC和端口绑定S1(config)#interface fa0/1S1(config-if)#switchport mode accessS1(config-if)#switchport port-securityS1(config-if)#switchport port-security mac-address <主机的mac地址> S1(config-if)#switchport port-security maximum 1S1(config-if)#switchport port-security violation shutdown用户模式:无法改变相关设备的配置,只能查看十分有限的信息命令提示符是:switch>特权模式:可以使用所有的命令,可以查看更为详细的信息命令;是进入其它配置模式的前提命令提示符:switch#全局配置模式:在这里所做的改变会影响整个设备的全局性能;从全局配置模式下可以进入很多特定的配置模式;命令提示符:switch(config)#2、复制操作:S1#copy running-config startup-config ;复制当前的配置到NVRAM S1#copy running-config tftp ;将当前的配置复制到tftp服务器上S1#copy startup-config tftp 复制启动配置文件到tftp服务器上S1#copy tftp flash: ;特权模式下升级IOSS1r#copy tftp startup-config ;下载配置文件到nvram3、交换机vlan配置VLAN(虚拟局域网)配置S1(config)#interface fa0/1S1(config-if)#switchport trunk encapsulation dot1q 接口封装S1(config-if)#switchport mode trunk 将接口转为trunk模式S1(config)#vtp domain syh 创建VTP域S1(config)#vlan 10 创建VLANS1(config-vlan)#name ay1 为VLAN取名S1(config)#interface fa0/1S1(config-if)#switchport mode accessS1(config-if)#switchporti access vlan 10 将端口加入到相应VLAN S1(config)#vtp mode server 配置VTP的模式S1(config)#vtp mode clientS1#show vlan 查看vlan不同VLAN通信S1(config)#ip routing 开启三层交换机的路由功能S1(config)#interface vlan 10S1(config-if)#ip address 192.168.10.1 为VLAN配置IP地址,即各VLAN的网关默认时CISCO交换机不传播VLAN信息,必须配置VTP域。

思科交换机配置命令

思科交换机配置命令

一、基本配置switch>enable //进入特权模式switch#config terminal //进入全局配置模式switch(config)#hostname //设置交换机的主机名switch(config)#enable secret xxx //设置进入特权MD5加密口令switch(config)#enable password xxa //设置进入特权明文加密口令switch(config)#line console 0 //进入控制台口switch(config-line)#line vty 0 4 //设置进入虚拟终端的连接数目0~4 5个switch(config-line)#login //允许登录switch(config-line)#password xx //设置登录到普通用户口令xxswitch#exit //返回命令二、交换机vlan的配置switch#vlan database //进入VLAN设置switch(vlan)#vlan 2 //建VLAN 2switch(vlan)#no vlan 2 //删vlan 2Switch(config)# interface range fastethernet 0/1-5 //进入同种类型多端口配置三、端口操作switch(config)#int f0/1 //进入端口1switch(config-if)#switchport access vlan 2 // 将端口1当前端口加入vlan 2 switch(config-if)#switchport mode trunk //将f0/1设置为中继干线switch(config-if)#switchport trunk allowed vlan 1,2 //设置允许通过中继的vlanswitch(config-if)#switchport trunk encap dot1q //设置vlan 中继执行的协议VLAN的端口聚合叫TRUNK,用来在不同的交换机之间进行连接,以保证在跨越多个交换机上建立的同一个VLAN的成员能够相互通讯。

思科命令大全(完整版)

思科命令大全(完整版)

思科交换机命令大全1.设置主机名/系统名IOS:switch(config)# hostname "hostname"CLI:switch(enable) set system name name-string2.设置登录口令IOS:switch(config)# enable password level 1 passwordCLI:switch(enable) set passwordswitch(enable) set enalbepass3.设置远程访问IOS:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-addressCLI:switch(enable) set interface sc0 ip-address netmask broadcast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.启用和浏览CDP信息IOS:switch(config-if)# cdp enableswitch(config-if)# no cdp enableCLI:switch(enable) set cdp {enable|disable} module/port5.查看Cisco邻接设备的CDP通告IOS:switch# show cdp interface [type modle/port]switch# show cdp neighbors [type module/port] [detail]CLI:switch(enable) show cdp neighbors[module/port] [vlan|duplex|capabilities|detail] 6.端口描述 IOS:switch(config-if)#description escription-stringCLI:switch(enable)set port name module/number description-string7.设置端口速度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}8.设置以太网的链路模式IOS:switch(config-if)# duplex {auto|full|half}CLI:switch(enable) set port duplex module/number {full|half}9.配置静态VLANIOS:switch# vlan databaseswitch(vlan)# vlan vlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)#interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport access vlan vlan-numswitch(config-if)# endCLI:switch(enable) set vlan vlan-num [name name]switch(enable) set vlan vlan-num mod-num/port-list10.配置VLAN中继线IOS:switch(config)# interface interface 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 CLI:switch(enable)set trunk module/port [on|off|desirable|auto|nonegotiate] Vlan-range [isl|dotlq|dotl0|lane|negotiate]11.配置VTP管理域IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameCLI:switch(enable) set vtp [domain domain-name]12.配置VTP 模式IOS:switch# vlan databaseswitch(vlan)# vtp domain domain-nameswitch(vlan)# vtp {sever|cilent|transparent}switch(vlan)# vtp password passwordCLI:switch(enable) set vtp [domain domain-name][mode{ sever|cilent|transparent }][password password]13.配置VTP版本IOS:switch# vlan databaseswitch(vlan)# vtp v2-modeCLI:switch(enable) set vtp v2 enable14.启动VTP剪裁IOS:switch# vlan databaseswitch(vlan)# vtp pruningCLI:switch(enable) set vtp pruning enable15.配置以太信道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} 16.调整根路径成本IOS:switch(config-if)#spanning-tree [vlan vlan-list] cost costCLI:switch(enable)set spantree portcost moudle/port costswitch(enable)set spantree portvlancost moudle/port [cost cost][vlan-list] 17.调整端口IDIOS:switch(config-if)#spanning-tree[vlan vlan-list]port-priority port-priority CLI:switch(enable)set spantree portpri {mldule/port}priorityswitch(enable)set spantree portvlanpri {module/port}priority [vlans]18.修改STP时钟IOS: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 CLI:switch(enable) set spantree hello interval[vlan]switch(enable) set spantree fwddelay delay [vlan]switch(enable) set spantree maxage agingtiame[vlan]19.启用或禁用Port Fast 特征IOS:switch(config-if)#spanning-tree portfastCLI:switch(enable)set spantree portfast {module/port}{enable|disable}20.启用或禁用UplinkFast 特征IOS:switch(config)#spanning-tree uplinkfast [max-update-rate pkts-per-second]CLI:switch(enable)set spantree uplinkfast {enable|disable}[rate update-rate] [all-protocolsoff|on] 为了将交换机配置成一个集群的命令交换机,首先要给管理接口分配一个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 {ring hex-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)# interface 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-address les1-nsap-addressATM(lane-config-databade)# name elan2-name server-atm-address les2-nsap-addressATM(lane-config-databade)# name ...30. 创建完数据库后,必须在主接口上启动LECS.命令如下: ATM(config)# interface atm numberATM(config-if)# lane config database database-nameATM(config-if)# lane config auto-config-atm-address31. 将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface 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)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38. 用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl|dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39. 用LANE 来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atm pvc 1 0 5 qsaalrouter(config-if)# atm pvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernet elan-numrouter(config-if)# interface atm module/port.subinterface 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)# interface interface numberrouter(config-if)# mls rp vlan-id vlan-id-num43. 在路由处理器启用MLSP: router(config)# mls rp ip44. 为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中:router(config)# interface interface 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-interface47. 要检验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 agingtime53. 设置快速老化:switch(enable) set mls agingtime fast fastagingtime pkt_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)。

思科交换机基本配置命令大全一1.switch(config)# hostname hostname在基于CLI的交换机上设置主机名/系统名:switch(enable) set system name name-string2.在基于IOS的交换机上设置登录口令:switch(config)# enable password level 1 password在基于CLI的交换机上设置登录口令:switch(enable) set passwordswitch(enable) set enalbepass3.在基于IOS的交换机上设置远程访问:switch(config)# interface vlan 1switch(config-if)# ip address ip-address netmaskswitch(config-if)# ip default-gateway ip-address在基于CLI的交换机上设置远程访问:switch(enable) set interface sc0 ip-address netmask broa dc ast-address switch(enable) set interface sc0 vlanswitch(enable) set ip route default gateway4.在基于IOS的交换机上启用和浏览CDP信息:switch(config-if)# cdp enableswitch(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-string6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed{10100auto}在基于CLI的交换机上设置端口速度:switch(enable) set port speed moudle/number {10100auto}switch(enable) set port speed moudle/number {416auto}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)#vlanvlan-num name vlaswitch(vlan)# exitswitch# configure teriminalswitch(config)# interface interface module/numberswitch(config-if)# switchport mode accessswitch(config-if)# switchport accessvlanvlan-numswitch(config-if)# end在基于CLI的交换机上配置静态VLAN:switch(enable) setvlanvlan-num [name name]switch(enable) setvlanvlan-num mod-num/port-list9.在基于IOS的交换机上配置VLAN中继线:switch(config)# interface interface 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在基于CLI的交换机上配置VLAN中继线:switch(enable) set trunk module/port [on off desirable auto nonegotiate] Vlan-range [isl dotlq dotl0lane negotiate]10.在基于IOS的交换机上配置VTP管理域:switch# vlan databaseswitch(vlan)# vtp domain domain-name在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp [domain domain-name]思科交换机基本配置命令大全二(2010-02-11 06:48:40)转载标签:分类:网络ccna交换机命令教育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 databaseswitch(vlan)# vtp v2-mode在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable13.在基于IOS的交换机上启动VTP剪裁:switch# vlan databaseswitch(vlan)# vtp pruning在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable14.在基于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 [vlanvlan-list] cost cost在基于CLI的交换机上调整根路径成本:switch(enable) set spantreeportcostmoudle/port costswitch(enable) set spantreeportvlancostmoudle/port [cost cost][vlan-list]16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-tree[vlanvlan-list]port-priority port-priority在基于CLI的交换机上调整端口ID:switch(enable) set spantreeportpri {mldule/port}priorityswitch(enable) set spantreeportvlanpri {module/port}priority [vlans]17.在基于IOS的交换机上修改STP时钟:switch(config)# spanning-tree [vlanvlan-list] hello-time secondsswitch(config)# spanning-tree [vlanvlan-list] forward-time secondsswitch(config)# spanning-tree [vlanvlan-list] max-age seconds在基于CLI的交换机上修改STP时钟:switch(enable) set spantree hello interval[vlan]switch(enable) set spantreefwddelay delay [vlan]switch(enable) set spantreemaxageagingtiame[vlan]18.在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantreeportfast {module/port}{enable disable}19.在基于IOS的交换机端口上启用或禁用UplinkFast特征:switch(config)# spanning-tree uplinkfast [max-update-rate pkts-per-second]在基于CLI的交换机端口上启用或禁用UplinkFast特征:switch(enable) set spantreeuplinkfast {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) setvlanvlan-name [name name] type trbrf bridge bridge-num[stp {ieee ibm}] 25.在Catalyst交换机上定义TrCRF的命令如下:switch (enable) setvlanvlan-num [name name] type trcrf{ring hex-ring-num decring decimal-ring-num} parent vlan-num26. 在创建好TrBRF VLAN之后,就可以给它分配交换机端口.对于以太网交换,可以采用如下命令给VLAN分配端口:switch(enable) setvlanvlan-num mod-num/port-num27.命令show spantree显示一个交换机端口的STP状态.28.配置一个ELAN的LES和BUS,可以使用下列命令:ATM (config)# interface atmnumber.subintmultiointATM(config-subif)# lane serber-bus ethernetelan-name29.配置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-nameATM(config-if)# lane config auto-config-atm-address思科交换机基本配置命令大全三(2010-02-11 06:50:16)转载标签:分类:网络ccna交换机命令教育31.将每个LEC配置到一个不同的ATM子接口上.命令如下:ATM(config)# interface atmnumber.subint multipointATM(config)# lane client ethernetvlan-numelan-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)# interface media module/portrouter(config-if)# description description-stringrouter(config-if)# ip address ip-addr subnet-maskrouter(config-if)# no shutdown38.用中继链路来建立与VLAN的连接:router(config)# interface module/port.subinterfacerouter(config-ig)# encapsulation[isl dotlq] vlan-numberrouter(config-if)# ip address ip-address subnet-mask39.用LANE来建立与VLAN的连接:router(config)# interface atm module/portrouter(config-if)# no ip addressrouter(config-if)# atmpvc 1 0 5 qsaalrouter(config-if)# atmpvc 2 0 16 ilnirouter(config-if)# interface atm module/port.subinterface multipoint router(config-if)# ip address ip-address subnet-maskrouter(config-if)# lane client ethernetelan-numrouter(config-if)# interface atm module/port.subinterface multipointrouter(config-if)# ip address ip-address subnet-namerouter(config-if)# lane client ethernetelan-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)# interface interface numberrouter(config-if)# mlsrpvlan-id vlan-id-num43.在路由处理器启用MLSP:router(config)# mlsrpip44.为了把一个外置的路由处理器接口和交换机安置在同一个VTP域中: router(config)# interface interface numberrouter(config-if)# mlsrpvtp-domain domain-name45.查看指定的VTP域的信息:router# show mlsrpvtp-domain vtp domain name46.要确定RSM或路由器上的管理接口,可以在接口模式下输入下列命令:router(config-if)#mlsrp management-interface47.要检验MLS-RP的配置情况:router# show mlsrp48.检验特定接口上的MLS配置:router# show mlsrp interface interface number49.为了在MLS-SE上设置流掩码而又不想在任一个路由处理器接口上设置访问列表:set mls flow [destination destination-source full]50.为使MLS和输入访问列表可以兼容,可以在全局模式下使用下列命令:router(config)# mlsrpip input-acl51.当某个交换机的第3层交换失效时,可在交换机的特权模式下输入下列命令:switch(enable) set mls enable52.若想改变老化时间的值,可在特权模式下输入以下命令:switch(enable) set mlsagingtimeagingtime53.设置快速老化:switch(enable) set mlsagingtime fast fastagingtimepkt_threshold54.确定那些MLS-RP和MLS-SE参与了MLS,可先显示交换机引用列表中的内容再确定:switch(enable) show mls include55.显示MLS高速缓存记录:switch(enable) show mls entry56.用命令show in arp显示ARP高速缓存区的内容。

相关文档
最新文档