1、基于CLI的交换机的端口描述:switch(enable)set port name module/number description-string 6.在基于IOS的交换机上设置端口速度:switch(config-if)# speed10|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
2、)# duplex auto|full|half 在基于CLI的交换机上设置以太网的链路模式:switch(enable) set port duplex module/number full|half 8.在基于IOS的交换机上配置静态VLAN:switch# vlan database switch(vlan)# vlan vlan-num name vla switch(vlan)# exit switch# configure teriminal switch(config)# interface interface module/number switch(config-if)# s
3、witchport mode access switch(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)# sw
4、itchport mode trunk switch(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
5、 Vlan-range isl|dotlq|dotl0|lane|negotiate 10.在基于IOS的交换机上配置VTP管理域:switch(vlan)# vtp domain domain-name 在基于CLI的交换机上配置VTP管理域:switch(enable) set vtp domain domain-name 11.在基于IOS的交换机上配置VTP 模式:switch(vlan)# vtp sever|cilent|transparent switch(vlan)# vtp password password 在基于CLI的交换机上配置VTP 模式:switch(enable
6、) set vtp domain domain-name mode sever|cilent|transparent password password 12. 在基于IOS的交换机上配置VTP版本:switch(vlan)# vtp v2-mode 在基于CLI的交换机上配置VTP版本:switch(enable) set vtp v2 enable 13. 在基于IOS的交换机上启动VTP剪裁:switch(vlan)# vtp pruning 在基于CL I 的交换机上启动VTP剪裁:switch(enable) set vtp pruning enable 14.在基于IOS的交换机上
7、配置以太信道:switch(config-if)# port group group-number distribution source|destination 在基于CLI的交换机上配置以太信道:switch(enable) set port channel moudle/port-range modeon|off|desirable|auto 15.在基于IOS的交换机上调整根路径成本:switch(config-if)# spanning-tree vlan vlan-list cost cost 在基于CLI的交换机上调整根路径成本:switch(enable) set spantr
8、ee portcost moudle/port cost switch(enable) set spantree portvlancost moudle/port cost costvlan-list 16.在基于IOS的交换机上调整端口ID:switch(config-if)# spanning-treevlan vlan-listport-priority port-priority 在基于CLI的交换机上调整端口ID:switch(enable) set spantree portpri mldule/portpriority switch(enable) set spantree po
9、rtvlanpri module/portpriority 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 hel
10、lo intervalvlan switch(enable) set spantree fwddelay delay vlan switch(enable) set spantree maxage agingtiamevlan 18. 在基于IOS的交换机端口上启用或禁用Port Fast 特征:switch(config-if)#spanning-tree portfast 在基于CLI的交换机端口上启用或禁用Port Fast 特征:switch(enable) set spantree portfast module/portenable|disable 19. 在基于IOS的交换机端口
11、上启用或禁用UplinkFast 特征:switch(config)# spanning-tree uplinkfast max-update-rate pkts-per-second 在基于CLI的交换机端口上启用或禁用UplinkFast 特征:switch(enable) set spantree uplinkfast enable|disablerate update-rate all-protocols off|on华为交换机、路由器命令集 交换机命令Quidwaydis cur ;显示当前配置Quidwaydisplay current-configuration ;Quidway
12、display interfaces ;显示接口信息Quidwaydisplay vlan all ;显示路由信息Quidwaydisplay version ;显示版本信息Quidwaysuper password ;修改特权用户密码Quidwaysysname ;交换机命名Quidwayinterface ethernet 0/1 ;进入接口视图Quidwayinterface vlan x ;Quidway-Vlan-interfacexip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址Quidwayip route-static 0.0.0.0
13、0.0.0.0 10.65.1.2 ;静态路由网关Quidwayrip ;三层交换支持Quidwaylocal-user ftpQuidwayuser-interface vty 0 4 ;进入虚拟终端S3026-ui-vty0-4authentication-mode password ;设置口令模式S3026-ui-vty0-4set authentication-mode password simple 222 ;设置口令S3026-ui-vty0-4user privilege level 3 ;用户级别进入端口模式Quidwayint e0/1 ;Quidway-Ethernet0/
14、1duplex half|full|auto ;配置端口工作状态Quidway-Ethernet0/1speed 10|100|auto ;配置端口工作速率Quidway-Ethernet0/1flow-control ;配置端口流控Quidway-Ethernet0/1mdi across|auto|normal ;配置端口平接扭接Quidway-Ethernet0/1port link-type trunk|access|hybrid ;设置端口工作模式Quidway-Ethernet0/1port access vlan 3 ;当前端口加入到VLANQuidway-Ethernet0/2
15、port trunk permit vlan ID|All ;设trunk允许的VLANQuidway-Ethernet0/3port trunk pvid vlan 3 ;设置trunk端口的PVIDQuidway-Ethernet0/1undo shutdown ;激活端口Quidway-Ethernet0/1shutdown ;关闭端口Quidway-Ethernet0/1quit ;返回Quidwayvlan 3 ;创建VLANQuidway-vlan3port ethernet 0/1 ;在VLAN中增加端口Quidway-vlan3port e0/1 ;简写方式Quidway-vl
16、an3port ethernet 0/1 to ethernet 0/4 ;Quidway-vlan3port e0/1 to e0/4 ;Quidwaymonitor-port ;指定镜像端口Quidwayport mirror ;指定被镜像端口Quidwayport mirror int_list observing-port int_type int_num ;指定镜像和被镜像Quidwaydescription string ;指定VLAN描述字符Quidwaydescription ;删除VLAN描述字符Quidwaydisplay vlan vlan_id ;查看VLAN设置Qui
17、dwaystp enable|disable ;设置生成树,默认关闭Quidwaystp priority 4096 ;设置交换机的优先级Quidwaystp root primary|secondary ;设置为根或根的备份Quidway-Ethernet0/1stp cost 200 ;设置交换机端口的花费Quidwaylink-aggregation e0/1 to e0/4 ingress|both ;端口的聚合Quidwayundo link-aggregation e0/1|all ; 始端口为通道号SwitchA-vlanxisolate-user-vlan enable ;设置
18、主vlanSwitchAisolate-user-vlan secondary ;设置主vlan包括的子vlanQuidway-Ethernet0/2port hybrid pvid vlan 设置vlan的pvidQuidway-Ethernet0/2port hybrid pvid ;删除vlan的pvidQuidway-Ethernet0/2port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。所以设置PVID为所属vlan id, 设置可以互通的vlan为unta
19、gged.路由器命令Quidwaydisplay ip route ;Quidwaysysname aabbcc ;更改主机名Quidwaysuper passwrod 123456 ;Quidwayinterface serial0 ;进入接口Quidway-serial0ip address ;配置端口IP地址Quidway-serial0undo shutdown ;Quidwaylink-protocol hdlc ;绑定hdlc协议Quidwayuser-interface vty 0 4Quidway-ui-vty0-4authentication-mode passwordQui
20、dway-ui-vty0-4set authentication-mode password simple 222Quidway-ui-vty0-4user privilege level 3Quidway-ui-vty0-4quitQuidwaydebugging hdlc all serial0 ;显示所有信息Quidwaydebugging hdlc event serial0 ;调试事件信息Quidwaydebugging hdlc packet serial0 ;显示包的信息静态路由:Quidwayip route-static interface number|nexthopval
21、uereject|blackhole例如:Quidwayip route-static 129.1.0.0 16 10.0.0.2Quidwayip route-static 129.1.0.0 255.255.0.0 10.0.0.2Quidwayip route-static 129.1.0.0 16 Serial 2Quidwayip route-static 0.0.0.0 0.0.0.0 10.0.0.2动态路由:设置动态路由Quidwayrip work ;设置工作允许Quidwayrip input ;设置入口允许Quidwayrip output ;设置出口允许Quidway-
22、ripnetwork 1.0.0.0 ;设置交换路由网络Quidway-ripnetwork all ;设置与所有网络交换Quidway-rippeer ip-address ;Quidway-ripsummary ;路由聚合Quidwayrip version 1 ;设置工作在版本1Quidwayrip version 2 multicast ;设版本2,多播方式Quidway-Ethernet0rip split-horizon ;水平分隔Quidwayrouter id A.B.C.D ;配置路由器的IDQuidwayospf enable ;启动OSPF协议Quidway-ospfim
23、port-route direct ;引入直联路由Quidway-Serial0ospf enable area ;配置OSPF区域标准访问列表命令格式如下:acl match-order config|auto ;默认前者顺序匹配。rule normal|specialpermit|deny source source-addr source-wildcard|any例:Quidwayacl 10Quidway-acl-10rule normal permit source 10.0.0.0 0.0.0.255Quidway-acl-10rule normal deny source any扩展访问控制列表配置命令配置TCP/UDP协议的扩展访问列表:rule normal|specialpermit|denytcp|udpsource |anydestination |anyoperate配置ICMP协议的扩展访问列表:rule normal|specialpermit|denyicmp source |anydestination |anyicmp-code logging扩展访问控制列表操作符的含义equal portnumber
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1