H3C路由器交换机配置命令大全1

合集下载

华三华为交换机-路由器配置常用命令

华三华为交换机-路由器配置常用命令

H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器配置命令大全1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机配置命令大全

H3C交换机配置命令大全

H3C交换机配置命令大全H3C交换机1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、 port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、 ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、 ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机配置命令大全

H3C交换机配置命令大全

H3C交换机配置命令大全1、system-view进入系统视图模式2、sysname为设备命名3、displaycurrent-configuration当前配置情况4、language-modeChinese|English中英文切换5、interfaceEthernet1/0/1进入以太网端口视图6、portlink-typeAccess|Trunk|Hybrid设置端口访问模式7、undoshutdown打开以太网端口8、shutdown关闭以太网端口9、quit退出当前视图模式10、vlan10创建VLAN10并进入VLAN10的视图模式11、portaccessvlan10在端口模式下将当前端口加入到vlan10中12、portE1/0/2toE1/0/5在VLAN模式下将指定端口加入到当前vlan中13、porttrunkpermitvlanall允许所有的vlan通过H3C路由器1、system-view进入系统视图模式2、sysnameR1为设备命名为R13、displayiprouting-table显示当前路由表4、language-modeChinese|English中英文切换5、interfaceEthernet0/0进入以太网端口视图7、undoshutdown打开以太网端口8、shutdown关闭以太网端口配置默认的路H3CS3100SwitchH3CS3600SwitchH3CMSR20-20Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-modeChinese|English中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>resetsave;<H3C>reboot;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机常用配置命令大全

H3C交换机常用配置命令大全

一.用户配置: <H3C>system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuserbigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin[H3C]undo localuserbigheap 删除Web网管用户[H3C]user-interface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值 [H3C]user-interface vty 0 只支持0和1[H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-vty]undo idle-timeout 恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态二.系统IP配置:[H3C]vlan 20[H3C]management-vlan 20[H3C]interface vlan-interface 20 创建并进入管理VLAN [H3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234)[H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息<H3C>debugging ip 开启IP调试功能<H3C>undo debugging ip三.DHCP客户端配置:[H3C-Vlan-interface20]ip address dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undo ip address dhcp-alloc 取消[H3C]display dhcp 显示DHCP客户信息<H3C>debugging dhcp-alloc 开启DHCP调试功能<H3C>undo debugging dhcp-alloc四.端口配置:[H3C]interface Ethernet0/3 [H3C-Ethernet0/3]shutdown[H3C-Ethernet0/3]speed 100 速率,可为10,100,1000和auto(缺省)[H3C-Ethernet0/3]duplex full 双工,可为half,full和auto(缺省) 光口和汇聚后不能配置[H3C-Ethernet0/3]flow-control 开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression 20 设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响[H3C-Ethernet0/3]loopback internal 内环测试[H3C-Ethernet0/3]loopback external 外环测试,需插接自环头,必须为全双工或者自协商模式[H3C-Ethernet0/3]port link-type trunk 设置链路的类型为trunk,可为access(缺省),trunk [H3C-Ethernet0/3]port trunk pvidvlan 20 设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)[H3C-Ethernet0/3]port access vlan 20 将当前access端口加入指定的VLAN [H3C-Ethernet0/3]port trunk permit vlan all 允许所有的VLAN通过当前的trunk端口,可多次使用该命令[H3C-Ethernet0/3]mdi auto 设置以太端口为自动监测,normal(缺省)为直通线,across为交叉线[H3C]link-aggregation Ethernet 0/1 to Ethernet 0/4 将1-4口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚 [H3C]undo link-aggregation Ethernet 0/1 删除该汇聚组[H3C]link-aggregation mode egress 配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 ingress,egress和both,缺省为both[H3C]monitor-port Ethernet 0/2 将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变[H3C]mirroring-port Ethernet 0/3 to Ethernet 0/4 both 将端口3和4设置为被镜像端口,both 为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound表示仅监控发送的报文 [H3C]display mirror[H3C]display interface Ethernet 0/3<H3C>reset counters 清除所有端口的统计信息[H3C]display link-aggregation Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况五.VLAN配置:[H3C]vlan 2[H3C]undo vlan all 删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除[H3C-vlan2]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolate enable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolate uplink-port vlan 2 设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置[H3C]display vlan all 显示所有VLAN的详细信息S1550E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属于多个user-group,不属于同一个user-group的端口不能互相通信,最多支持50个user-group[H3C]user-group 20 创建user-group 20,默认只存在user-group 1[H3C-UserGroup20]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN20中,初始时都属于user-group 1中[H3C]display user-group 20 显示user-group 20的相关信息六.集群配置:S2100只能作为成员交换机加入集群中,加入后系统名改为"集群名_成员编号.原系统名"的格式.即插即用功能通过两个功能实现: 集群管理协议MAC组播地址协商和管理VLAN协商 [H3C]cluster enable 启用群集功能,缺省为启用[H3C]cluster 进入群集视图[H3C-cluster]administrator-address H-H-H name switch H-H-H为命令交换机的MAC,加入switch集群[switch_1.H3C-cluster]undo administrator-address 退出集群[H3C]display cluster 显示集群信息[H3C]management-vlan 2 集群报文只能在管理VLAN中转发,同一集群需在同一个管理VLAN中,需在建立集群之前指定管理VLAN<H3C>debugging cluster七.QoS配置:QoS配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速[H3C-Ethernet0/3]priority 7 设置端口优先级为7,默认为0[H3C]priority-trust cos 设置交换机信任报文的优先级方式为cos(802.1p优先级,缺省值),还可以设为dscp方式(dscp优先级方式)[H3C]queue-scheduler hq-wrr 2 4 6 8 设置队列调度算法为HQ-WRR(默认为WRR),权重为2,4,6,8[H3C-Ethernet0/3]line-rate inbound 29 将端口进口速率限制为2Mbps,取1-28时,速率为rate*8*1024/125,即64,128,192...1.792M;29-127时,速率为(rate-27)*1024,即2M,3M,4M...100M,千兆时可继续往下取,128-240时,速率为(rate-115)*8*1024,即104M,112M,120M...1000M [H3C]display queue-scheduler 显示队列调度模式及参数 [H3C]display priority-trust 显示优先级信任模式八.系统管理:[H3C]mac-address blackhole H-H-H vlan 1 在VLAN1中添加黑洞MAC[H3C]mac-address static H-H-H interface Ethernet 0/1 vlan 1 在VLAN1中添加端口一的一个mac[H3C]mac-address timer aging 500 设置MAC地址表的老化时间为500s[H3C]display mac-address [H3C]display arp[H3C]mac-address port-binding H-H-H interface Ethernet 0/1 vlan 1 配置端口邦定[H3C]display mac-address port-binding [H3C]display saved-configuration [H3C]display current-c onfiguration <H3C>save[H3C]restore default 恢复交换机出厂默认配置,恢复后需重启才能生效[H3C]display version <H3C>reboot[H3C]display device [H3C]sysnamebigheap[H3C]info-center enable 启用系统日志功能,缺省情况下启用[H3C]info-center loghostip 192.168.0.3 向指定日志主机(只能为UNIX或LINUX,不能为Windows)输出信息,需先开启日志功能,缺省关闭[H3C]info-center loghost level 8 设置系统日志级别为8,默认为5.级别说明:1.emergencies 2.alerts 3.critical 4.errors 5.warnings 6.notifications rmational 8.debuggin g<H3C>terminal debugging 启用控制台对调试信息的显示,缺省控制台为禁用<H3C>terminal logging 启用控制台对日志信息的显示,缺省控制台为启用<H3C>terminal trapping 启用控制台对告警信息的显示,缺省控制台为启用[H3C]display info-center 显示系统日志的配置和缓冲区记录的信息[H3C]display logbuffer 显示日志缓冲区最近记录的指定数目的日志信息[H3C]display trapbuffer 显示告警缓冲区最近记录的指定数目的日志信息<H3C>reset logbuffer 清除日志缓冲区的信息 <H3C>reset trapbuffer 清除告警缓冲区的信息九.网络协议配置:NDP即是邻居发现协议,S1550E只能开启或关闭NDP,无法配置,默认有效保留时间为180s,NDP报文发送的间隔60s[H3C]ndp enable 缺省情况下是开启的[H3C-Ethernet0/3]ndp enable 缺省情况下开启 [H3C]display ndp 显示NDP配置信息[H3C]display ndp interface Ethernet 0/1 显示指定端口NDP发现的邻居信息 <H3C>debugging ndp interface Ethernet 0/1HABP协议即Huawei Authentication Bypass Protocol,华为鉴权旁路协议,是用来解决当交换机上同时配置了802.1x和HGMPv1/v2时,未经授权和认证的端口上将过滤HGMP报文,从而使管理设备无法管理下挂的交换机的问题。

华三(H3C)交换机命令大全

华三(H3C)交换机命令大全

H3C【内部】交换机命令集用户视图<H3C>-------------------------------------------------------------------------------------------systen-view系统视图-------------------------------------------------------------------------------------------[H3C]?[H3C]super password 修改super密码[H3C]sysname 交换机命名[H3C]interface ethernet 0/1 进入接口视图[H3C]quit 退出系统视图[H3C]info-center console channel console 信息输出设置[H3C]monitor-port ethernet 0/1 配置端口镜像配置端口-------------------------------------------------------------------------------------------[H3C-Ethernet0/1]duplex {half|full|auto} 配置端口双工工作状态[H3C-Ethernet0/1]speed {10|100|auto} 配置端口工作速率[H3C-Ethernet0/1]flow-control 配置端口流控(防止拥塞丢包)[H3C-Ethernet0/1]mdi {across|auto|normal} 配置端口MDI/MDIX状态[H3C-Ethernet0/1]shutdown/undo shutdown 关闭/打开接口VLAN基本配置-------------------------------------------------------------------------------------------[H3C]vlan 3 创建/删除一个VLAN/进入VLAN配置视图[H3C]undo vlan 3[H3C-vlan3]port ethernet0/1 to ethernet0/4 给VLAN增加/删除以太网接口[H3C-Ethernet0/2]port access vlan 3 将端口加入到指定VLAN[H3C-Ethernet0/2]port link-type {trunk|access|hybrid} 设置端口工作模式[H3C-Ethernet0/2]port trunk permit vlan {ID|All} 设置trunk端口允许通过的VLAN[H3C-Ethernet0/2]port trunk pvid vlan 3 设置trunk端口的PVID-------------------------------------------------------------------------------------------交换机端口的3种工作模式:Access模式:不支持802.1q帧的传送Hybird模式:允许多个vlan的报文发送时不打标签Trunk 模式:只允许缺省vlan的报文发送时不打标签若trunk端口上收到了非802.1q帧时,交换机会给该帧加上802.1q的标志字段,该标志字段中的VLAN ID即该端口的PVID,使用port trunk pvid vlan vlan-id 配置端口的PVID配置端口聚合-------------------------------------------------------------------------------------------端口聚合,也称为端口汇聚或端口干路,是将多个端口聚合在一起,实现对出/入流量在各成员端口间进行分担的一种技术,解决上行链路的瓶颈问题,完成所有接入端口流量总和的传输。

H3C路由器配置命令表

H3C路由器配置命令表

H3C路由器配置命令表H3C路由器配置命令表1·路由器基本配置命令1·1 接口配置命令●interface <interface_name>: 进入接口配置模式●ip address <ip_address> <subnet_mask>: 设置接口IP地质和子网掩码●description <description>: 给接口添加描述信息1·2 路由配置命令●ip route <destination_network> <subnet_mask> <next_hop>: 配置路由●ip default-gateway <default-gateway_address>: 配置默认网关●ip routing: 开启路由功能1·3 主机名与域名配置命令●hostname <hostname>: 设置路由器主机名●domn-name <domn_name>: 设置路由器域名●enable password <password>: 设置访问特权模式的密码●line vty 0 4、进入VTY线路配置模式●login: 启用登录验证●password <password>: 设置VTP登录密码●exit: 退出线路配置模式2·协议配置命令2·1 静态路由配置命令●ip route-static <destination_network><subnet_mask> <next_hop>: 配置静态路由2·2 动态路由配置命令●router rip: 进入RIP路由配置模式●network <network_address>: 配置本地网络●router ospf <process_id>: 进入OSPF路由配置模式●network <network_address> <subnet_mask> area <area_id>: 配置本地网络●router bgp <AS_number>: 进入BGP路由配置模式●network <network_address> mask<subnet_mask>: 配置本地网络●neighbor <neighbor_address> remote-as<AS_number>: 配置BGP邻居3·安全配置命令3·1 访问控制列表(ACL)配置命令●access-list <acl_number> {permit ---●deny} <protocol> <source_ip> <destination_ip>: 配置ACL规则●interface <interface_name>●inbound----outbound ip access-group<acl_number>: 将ACL应用于接口的进或出方向3·2 密码和认证配置命令●enable secret <password>: 设置特权模式密码●username <username> password <password>: 创建本地用户名和密码4·网络地质转换(NAT)配置命令4·1 静态NAT配置命令●interface <inside_interface>●nat static <inside_local_ip><outside_global_ip>4·2 动态NAT配置命令●interface <inside_interface>●nat dynamic <outside_interface>5·本地管理配置命令5·1 SSH配置命令●rsa local-key-pr create: RSA密钥对●ssh server enable: 启用SSH服务器●ssh user <username> authentication-type password: 设置SSH用户身份验证方式为密码●user-interface vty 0 4、进入VTY用户界面配置模式●authentication-mode aaa: 设置认证模式为AAA●protocol inbound ssh: 允许SSH访问5·2 SNMP配置命令●snmp-agent sys-info version <version>: 设置SNMP版本●snmp-agent community read <community_name>: 配置SNMP读社区字符串附件:本文档不涉及附件。

H3C路由器交换机配置命令大全1

H3C路由器交换机配置命令大全1

China‎w eal ‎B usin‎e ss M‎a chin‎e ry C‎o., L‎t d.A‎l l Ri‎g hts ‎R eser‎v e目‎录1.‎连接设备‎31.‎1. 从C‎O NSOL‎E连接 3‎1.2.‎远程TE‎L NET连‎接 62‎.基本信‎息配置 6‎2.1.‎配置机器‎名、TEL‎N ET、密‎码 62‎.2. 配‎置SNMP‎网管串 6‎3. 冗‎余及系统高‎可用性配置‎73.‎1. 同步‎S UPER‎V ISOR‎ENGI‎N E配置‎73.2‎.查看S‎U PERV‎I SOR ‎E NGIN‎E冗余 9‎3.3.‎向冗余S‎U PERV‎I SOR ‎E NGIN‎E拷贝IO‎S文件 1‎14. ‎端口设置‎114.‎1. 基本‎设置 11‎4.2.‎配置三层‎端口 12‎5. 配‎置二层端口‎135‎.1. 配‎置TRUN‎K: 13‎6. 配‎置HSRP‎156‎.1. 配‎置二层普通‎交换接口‎156.‎2. 清除‎二层接口配‎置 16‎7. 配置‎V LAN ‎168.‎动态路由‎协议--O‎S PF配置‎188‎.1. 启‎用OSPF‎动态路由协‎议 18‎8.2. ‎定义参与O‎S PF的子‎网 18‎8.3. ‎O SPF区‎域间的路由‎信息汇总‎198.‎4. 配置‎密码验证‎198.‎5. 设置‎产生缺省路‎由 19‎9. 交换‎机维护 2‎09.1‎.交换机‎I OS保存‎和升级 2‎09.2‎.交换机‎密码恢复‎211‎.连接设‎备1.1‎.从co‎n sole‎连接第一‎次对600‎0交换机进‎行配置,必‎须从con‎s ole进‎入。

首‎先先将机器‎上架,按要‎求接好电源‎,然后用随‎机附带的C‎o nsol‎e线和转接‎头将交换机‎的cons‎o le口与‎P C的串口‎相联,如下‎:‎C om口设‎置如下:‎· 960‎0 bau‎d·‎8 dat‎a bit‎s·‎N o pa‎r ity ‎· 2 ‎s top ‎b its‎检查电源无‎误后,开电‎,可能会出‎现类似下面‎的显示,按‎黑粗体字回‎答:S‎y stem‎Boot‎s trap‎, Ver‎s ion ‎6.1(2‎)Cop‎y righ‎t (c)‎1994‎-2000‎by c‎i sco ‎S yste‎m s, I‎n c.c‎6k_su‎p2 pr‎o cess‎o r wi‎t h 13‎1072 ‎K byte‎s of ‎m ain ‎m emor‎yro‎m mon ‎1 > b‎o ot s‎l ot0:‎c6sup‎22-js‎v-mz.‎121-5‎c.EX.‎b in‎S elf ‎d ecom‎p ress‎i ng t‎h e im‎a ge :‎####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎### ##‎#####‎####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎### ##‎#####‎####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎### ##‎#####‎####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎#####‎### ##‎#####‎[OK]‎‎‎‎‎ R‎e stri‎c ted ‎R ight‎s Leg‎e nd‎U se, ‎d upli‎c atio‎n, or‎disc‎l osur‎e by ‎t he G‎o vern‎m ent ‎i ssu‎b ject‎to r‎e stri‎c tion‎s as ‎s et f‎o rth ‎i n su‎b para‎g raph‎(c) ‎o f th‎e Com‎m erci‎a l Co‎m pute‎r Sof‎t ware‎- Re‎s tric‎t edR‎i ghts‎clau‎s e at‎FAR ‎s ec. ‎52.22‎7-19 ‎a nd s‎u bpar‎a grap‎h(c)‎(1) ‎(ii) ‎o f th‎e Rig‎h ts i‎n Tec‎h nica‎l Dat‎a and‎Comp‎u ter‎S oftw‎a re c‎l ause‎at D‎F ARS ‎s ec. ‎252.2‎27-70‎13.‎‎‎c isco‎Syst‎e ms, ‎I nc.‎‎‎170 W‎e st T‎a sman‎Driv‎e‎‎ San‎Jose‎, Cal‎i forn‎i a 95‎134-1‎706‎C isco‎Inte‎r netw‎o rk O‎p erat‎i ng S‎y stem‎Soft‎w are ‎IOS ‎(tm) ‎M SFC2‎Soft‎w are ‎(C6MS‎F C2-B‎O OT-M‎), Ve‎r sion‎12.1‎(3a)E‎4, EA‎R LYD‎E PLOY‎M ENT ‎RELE‎A SE S‎O FTWA‎R E (f‎c1)C‎o pyri‎g ht (‎c) 19‎86-20‎00 by‎cisc‎o Sys‎t ems,‎Inc.‎Comp‎i led ‎S at 1‎4-Oct‎-00 0‎5:33 ‎b y ea‎a rmas‎Imag‎e tex‎t-bas‎e: 0x‎30008‎980, ‎d ata-‎b ase:‎0x30‎3B600‎0ci‎s co C‎a t6k-‎M SFC2‎(R70‎00) p‎r oces‎s or w‎i th 1‎14688‎K/163‎84K b‎y tes ‎o f me‎m ory.‎Proc‎e ssor‎boar‎d ID ‎S AD04‎430J9‎KR70‎00 CP‎U at ‎300Mh‎z, Im‎p leme‎n tati‎o n 39‎, Rev‎2.1,‎256K‎B L2,‎1024‎K B L3‎Cach‎eLas‎t res‎e t fr‎o m po‎w er-o‎nX.2‎5 sof‎t ware‎, Ver‎s ion ‎3.0.0‎.509‎K byt‎e s of‎non-‎v olat‎i le c‎o nfig‎u rati‎o n me‎m ory.‎1638‎4K by‎t es o‎f Fla‎s h in‎t erna‎l SIM‎M (Se‎c tor ‎s ize ‎512K)‎.Pr‎e ss R‎E TURN‎to g‎e t st‎a rted‎!---‎Syst‎e m Co‎n figu‎r atio‎n Dia‎l og -‎--Wo‎u ld y‎o u li‎k e to‎ente‎r the‎init‎i al d‎i alog‎? [ye‎s]: n‎o回答:‎N O,进入‎手工配置,‎在rout‎e r>下,‎输入ena‎b le回‎车,进入全‎局模式‎1.2.‎远程te‎l net连‎接当完成‎交换机配置‎,并起给交‎换机配置了‎管理地址,‎就可以直接‎采用远程t‎e lnet‎登陆进入交‎换机了,但‎是必须先配‎置line‎vty的‎密码和en‎a ble密‎码才能允许‎远程登陆。

H3C的路由器配置命令详解

H3C的路由器配置命令详解

H3C的路由器配置命令详解H3C路由器配置命令详解一、概述本文档旨在介绍H3C路由器配置命令的详细使用方法。

通过本文可以了解到H3C路由器配置命令的各种功能和参数,并能够根据具体需求进行相应配置。

二、H3C路由器配置命令1:基本配置命令1.1 系统配置命令a) sysname 命令:设置设备名称b) ipv6 enable 命令:开启IPv6支持c) banner motd 命令:设置登录提示信息d) password simple 命令:设置用户简单密码1.2 接口配置命令a) interface 命令:进入接口配置模式b) ip address 命令:设置接口IP地址c) description 命令:设置接口描述信息d) shutdown 命令:关闭接口2:路由配置命令2.1 静态路由配置命令a) ip route-static 命令:配置静态路由b) preference 命令:设置路由优先级c) nexthop 命令:设置下一跳地址2.2 动态路由配置命令a) ospf area 命令:配置OSPF区域b) ospf network 命令:配置OSPF网络类型c) bgp as-number 命令:配置BGP自治系统号d) rip version 命令:配置RIP协议版本号3:安全配置命令3.1 访问控制列表(ACL)配置命令a) acl number 命令:创建ACL列表b) rule 命令:配置ACL规则c) acl apply 命令:将ACL应用到接口3.2 密码配置命令a) local-user 命令:创建本地用户b) password cipher 命令:设置用户密码4:其他配置命令4.1 网络地址转换(NAT)配置命令a) nat enable 命令:开启NAT功能b) nat server 命令:配置NAT服务器地址映射c) nat outbound 命令:配置NAT出口地址池4.2 服务质量(QoS)配置命令a) qos car 命令:配置流量控制b) qos queue 命令:配置队列策略c) qos dscp 命令:配置DSCP值5:保存配置命令save 命令:保存当前配置到设备三、附件本文档的附件包括相关的配置示例和命令使用示例。

H3C路由器交换机配置命令

H3C路由器交换机配置命令

H3C路由器交换机配置命令H3C路由器交换机配置命令大全H3C路由器交换机怎么配置?配置命令有哪些?下面一起来看看最新H3C路由器交换机配置命令详解吧!交换机命令[Quidway]super password ;修改特权用户密码[Quidway]sysname ;交换机命名[Quidway]interface ethernet 0/1 ;进入接口视图[Quidway]interface vlan x ;进入接口视图[Quidway-Vlan-interfacex]ip address 10.65.1.1 255.255.0.0 ;配置VLAN的IP地址[Quidway]ip route-static 0.0.0.0 0.0.0.0 10.65.1.2 ;静态路由=网关[Quidway]user-interface vty 0 4 ;进入虚拟终端[S3026-ui-vty0-4]authentication-mode password ;设置口令模式[S3026-ui-vty0-4]set authentication-mode password simple 222 ;设置口令[S3026-ui-vty0-4]user privilege level 3 ;用户级别[Quidway-Ethernet0/1]duplex {half|full|auto} ;配置端口工作状态[Quidway-Ethernet0/1]speed {10|100|auto} ;配置端口工作速率[Quidway-Ethernet0/1]flow-control ;配置端口流控[Quidway-Ethernet0/1]mdi {across|auto|normal} ;配置端口平接扭接[Quidway-Ethernet0/1]port link-type {trunk|access|hybrid} ;设置端口工作模式[Quidway-Ethernet0/1]undo shutdown ;激活端口[Quidway-Ethernet0/2]quit ;退出系统视图[Quidway]vlan 3 ;创建VLAN[Quidway-vlan3]port ethernet 0/1 to ethernet 0/4 ;在VLAN中增加端口[Quidway-Ethernet0/2]port access vlan 3 ;当前端口加入到VLAN[Quidway-Ethernet0/2]port trunk permit vlan {ID|All} ;设trunk允许的VLAN[Quidway-Ethernet0/2]port trunk pvid vlan 3 ;设置trunk端口的PVID[Quidway]monitor-port ;指定镜像端口[Quidway]port mirror ;指定被镜像端口[Quidway]port mirror int_list observing-port int_type int_num ;指定镜像和被镜像[Quidway]description string ;指定VLAN描述字符[Quidway]description ;删除VLAN描述字符[Quidway]display vlan [vlan_id] ;查看VLAN设置[Quidway]stp {enable|disable} ;设置生成树,默认关闭[Quidway]stp priority 4096 ;设置交换机的优先级[Quidway]stp root {primary|secondary} ;设置为根或根的备份[Quidway-Ethernet0/1]stp cost 200 ;设置交换机端口的花费[SwitchA-vlanx]isolate-user-vlan enable ;设置主vlan[SwitchA]Isolate-user-vlan secondary ;设置主vlan 包括的'子vlan[Quidway-Ethernet0/2]port hybrid pvid vlan ;设置vlan的pvid[Quidway-Ethernet0/2]port hybrid pvid ;删除vlan的pvid[Quidway-Ethernet0/2]port hybrid vlan vlan_id_list untagged ;设置无标识的vlan如果包的vlan id与PVId一致,则去掉vlan信息. 默认PVID=1。

H3C交换机常用配置命令大全

H3C交换机常用配置命令大全

一.用户配置:<H3C>system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin[H3C]undo localuser bigheap 删除Web网管用户[H3C]user-interface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值[H3C]user-interface vty 0 只支持0和1[H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-vty]undo idle-timeout 恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态二.系统IP配置:[H3C]vlan 20[H3C]management-vlan 20[H3C]interface vlan-interface 20 创建并进入管理VLAN[H3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLA N接口静态IP地址(缺省为192.168.0.234)[H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息<H3C>debugging ip 开启IP调试功能<H3C>undo debugging ip三.DHCP客户端配置:[H3C-Vlan-interface20]ip address dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undo ip address dhcp-alloc 取消[H3C]display dhcp 显示DHCP客户信息<H3C>debugging dhcp-alloc 开启DHCP调试功能<H3C>undo debugging dhcp-alloc四.端口配置:[H3C]interface Ethernet0/3[H3C-Ethernet0/3]shutdown[H3C-Ethernet0/3]speed 100 速率,可为10,100,1000和auto(缺省)[H3C-Ethernet0/3]duplex full 双工,可为half,full和auto(缺省) 光口和汇聚后不能配置[H3C-Ethernet0/3]flow-control 开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression 20 设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响[H3C-Ethernet0/3]loopback internal 内环测试[H3C-Ethernet0/3]loopback external 外环测试,需插接自环头,必须为全双工或者自协商模式[H3C-Ethernet0/3]port link-type trunk 设置链路的类型为trunk,可为access (缺省),trunk[H3C-Ethernet0/3]port trunk pvid vlan 20 设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)[H3C-Ethernet0/3]port access vlan 20 将当前access端口加入指定的VLAN [H3C-Ethernet0/3]port trunk permit vlan all 允许所有的VLAN通过当前的tr unk端口,可多次使用该命令[H3C-Ethernet0/3]mdi auto 设置以太端口为自动监测,normal(缺省)为直通线,a cross为交叉线[H3C]link-aggregation Ethernet 0/1 to Ethernet 0/4 将1-4口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚[H3C]undo link-aggregation Ethernet 0/1 删除该汇聚组[H3C]link-aggregation mode egress 配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 in gress,egress和both,缺省为both[H3C]monitor-port Ethernet 0/2 将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变[H3C]mirroring-port Ethernet 0/3 to Ethernet 0/4 both 将端口3和4设置为被镜像端口,both为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound 表示仅监控发送的报文[H3C]display mirror[H3C]display interface Ethernet 0/3<H3C>reset counters 清除所有端口的统计信息[H3C]display link-aggregation Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况五.VLAN配置:[H3C]vlan 2[H3C]undo vlan all 删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除[H3C-vlan2]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolate enable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolate uplink-port vlan 2 设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置[H3C]display vlan all 显示所有VLAN的详细信息S1550E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属于多个user-group,不属于同一个user-group的端口不能互相通信,最多支持50个user-group [H3C]user-group 20 创建user-group 20,默认只存在user-group 1[H3C-UserGroup20]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN20中,初始时都属于user-group 1中[H3C]display user-group 20 显示user-group 20的相关信息六.集群配置:S2100只能作为成员交换机加入集群中,加入后系统名改为"集群名_成员编号.原系统名"的格式.即插即用功能通过两个功能实现: 集群管理协议MAC组播地址协商和管理VLAN协商[H3C]cluster enable 启用群集功能,缺省为启用[H3C]cluster 进入群集视图[H3C-cluster]administrator-address H-H-H name switch H-H-H为命令交换机的MAC,加入switch集群[switch_1.H3C-cluster]undo administrator-address 退出集群[H3C]display cluster 显示集群信息[H3C]management-vlan 2 集群报文只能在管理VLAN中转发,同一集群需在同一个管理VLAN中,需在建立集群之前指定管理VLAN<H3C>debugging cluster七.QoS配置:QoS配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速[H3C-Ethernet0/3]priority 7 设置端口优先级为7,默认为0[H3C]priority-trust cos 设置交换机信任报文的优先级方式为cos(802.1p优先级,缺省值),还可以设为dscp方式(dscp优先级方式)[H3C]queue-scheduler hq-wrr 2 4 6 8 设置队列调度算法为HQ-WRR(默认为WR R),权重为2,4,6,8[H3C-Ethernet0/3]line-rate inbound 29 将端口进口速率限制为2Mbps,取1-28时,速率为rate*8*1024/125,即64,128,192...1.792M;29-127时,速率为(rate-27)*1024,即2M,3M,4M...100M,千兆时可继续往下取,128-240时,速率为(rate-115)*8*1024,即104M, 112M,120M...1000M[H3C]display queue-scheduler 显示队列调度模式及参数[H3C]display priority-trust 显示优先级信任模式八.系统管理:[H3C]mac-address blackhole H-H-H vlan 1 在VLAN1中添加黑洞MAC[H3C]mac-address static H-H-H interface Ethernet 0/1 vlan 1 在VLAN1中添加端口一的一个mac[H3C]mac-address timer aging 500 设置MAC地址表的老化时间为500s[H3C]display mac-address[H3C]display arp[H3C]mac-address port-binding H-H-H interface Ethernet 0/1 vlan 1 配置端口邦定[H3C]display mac-address port-binding[H3C]display saved-configuration[H3C]display current-configuration<H3C>save[H3C]restore default 恢复交换机出厂默认配置,恢复后需重启才能生效[H3C]display version<H3C>reboot[H3C]display device[H3C]sysname bigheap[H3C]info-center enable 启用系统日志功能,缺省情况下启用[H3C]info-center loghost ip 192.168.0.3 向指定日志主机(只能为UNIX或LIN UX,不能为Windows)输出信息,需先开启日志功能,缺省关闭[H3C]info-center loghost level 8 设置系统日志级别为8,默认为5.级别说明: 1.emergencies 2.alerts 3.critical 4.errors 5.warnings 6.notifications rma tional 8.debugging<H3C>terminal debugging 启用控制台对调试信息的显示,缺省控制台为禁用<H3C>terminal logging 启用控制台对日志信息的显示,缺省控制台为启用<H3C>terminal trapping 启用控制台对告警信息的显示,缺省控制台为启用[H3C]display info-center 显示系统日志的配置和缓冲区记录的信息[H3C]display logbuffer 显示日志缓冲区最近记录的指定数目的日志信息[H3C]display trapbuffer 显示告警缓冲区最近记录的指定数目的日志信息<H3C>reset logbuffer 清除日志缓冲区的信息<H3C>reset trapbuffer 清除告警缓冲区的信息九.网络协议配置:NDP即是邻居发现协议,S1550E只能开启或关闭NDP,无法配置,默认有效保留时间为180 s,NDP报文发送的间隔60s[H3C]ndp enable 缺省情况下是开启的[H3C-Ethernet0/3]ndp enable 缺省情况下开启[H3C]display ndp 显示NDP配置信息[H3C]display ndp interface Ethernet 0/1 显示指定端口NDP发现的邻居信息<H3C>debugging ndp interface Ethernet 0/1HABP协议即Huawei Authentication Bypass Protocol,华为鉴权旁路协议,是用来解决当交换机上同时配置了802.1x和HGMPv1/v2时,未经授权和认证的端口上将过滤HGMP报文,从而使管理设备无法管理下挂的交换机的问题。

H3C交换机配置命令大全

H3C交换机配置命令大全

H3C交换机配置命令大全2009-09-02 10:12H3C 华为交换机配置基本命令H3C交换机################################################1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器##################################################################### #################1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router##################################################################### #####################1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机常用配置命令集合

H3C交换机常用配置命令集合

H3C交换机常用配置命令集合1-.用户配置:<H3C>system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,ad m [H3C]undo localuser bigheap 删除Web网管用户[H3C]user-interface aux 0 只支持o[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值[H3C]user-interface vty 0 [H3C-vty]idle-timeout 2 50 [H3C-vty]undo idle-timeout 只支持0和1设置超时为2分50秒,若为0则表示不超时,默认为5分钟恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态l二系统IP配置:[H3C]vlan 20[H3C]management-vlan 20 将新建的VLAN设置成管理V LAN[H3C]interface vlan-interface 20 创建并进入管理VLAN[H3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20] i p address 192 .168 .1. 2255. 255. 255. 0配置管理V LAN接口静态I [H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息<H3C>debugging ip 开启IP调试功能<H3C>undo debugging ipl三.DHCP客户端配置:[H3C-Vlan-inter于ace20]ip address dhcp-alloc[H3C-Vlan-interface20]undo ip address dhcp-alloc 管理VLAN接口通过DH C P方式获取IP地址取消[H3C]display dhcp 显示D HC P客户信息<H3C>debugging dhcp-alloc<H3C>undo debugging dhcp-allocl四.端口配置:开启DH C P调试功能[H3C]inter于ace Ethernet0/3[H3C-Ethernet0/3]shutdown[H3C-Ethernet0/3]speed 100 [H3C-Ethernet0/3]duplex full [H3C-Ethernet0/3]flow-control 速率,可为10,100,1000和auto(缺省)双工,可为half,full和auto(缺省)光口和汇聚后不能配置开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression 20 设置抑制广播百分比为20%,可取5,10,20,100 [H3C-Ethernet0/3]loopback internal 内环测试[H3C-Ethernet0/3]loopback external 外环测试,需插接自环头,必须为全双工或者自协商模式[H3C-Ethernet0/3]port link-type trunk 设置链路的类型为trunk,可为access(缺省),trunl [H3C壬thernet0/3]port trunk pvid vlan 20 设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)[H3C-Ethernet0/3]port access vlan 20 将当前access端口加入指定的VLAN[H3C-Ethernet0/3]port trunk permit vlan all 允许所有的VLAN通过当前的trunk端口,可多[H3C-Ethernet0/3]mdi auto 设置以太端口为自动监测,normal(缺省)为直通线,across为交叉线[H3C]link-aggregation Ethernet 0/1 to Ethernet 0/4 将1-4口加入汇聚组,1为主端口,两[H3C]undo link-aggregation Ethernet 0/1 删除该汇聚组[H3C]link-aggregation mode egress [H3C]monitor-port Ethernet 0/2配置端口汇聚模式为根据目的M AC地址进行负荷分担,可选将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先[H3C]mirroring-port Ethernet 0/3 to Ethernet 0/4 both[H3C]display mirror[H3C]display interface Ethernet 0/3<H3C>reset counters 清除所有端口的统计信息将端口3和4设置为被镜像端口,[H3C]display link-aggregation Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况l五.VLAN配置:[H3C]vlan 2[H3C]undo vlan all 删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除[H3C-vlan2]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN2中,此命令只能)[H3C-vlan2]port-isolate enable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolate uplink-port vlan 2 设置4为VLAN2的隔离上行端口,用千车[H3C]display vlan all 显示所有VLAN的详细信息S1SS0E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属千多个user-group,才[H3C]user-group 20 创建user-group20, 默认只存在user-group 1[H3C-UserGroup20]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN20中,初[H3C]display user-group 20 显示user-group20的相关信息l六集群配置:S2100只能作为成员交换机加入集群中,加入后系统名改为“集群名_成员编号.原系统名”的格式即插即用功能通过两个功能实现:集群管理协议MAC组播地址协商和管理VLAN协商[H3C]cluster enable 启用群集功能,缺省为启用[H3C]cluster 进入群集视图[H3C-cluster]administrator-address H-H-H name switch [switch_l.H3C-cluster]undo administrator-address[H3C]display cluster 显示集群信息H-H-H为命令交换机的MA C,加入,退出集群[H3C]management-vlan 2<H3C>debugging cluster集群报文只能在管理VLAN中转发,同一集群需在同一个管理VLAN中,需在l也QoS配置:Qo S配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速[H3C-Ethernet0/3]priority 7 设置端口优先级为7,默认为0[H3C]priority-trust cos 设置交换机信任报文的优先级方式为cos(802.lp优先级,缺省值),还可[H3C]queue-scheduler hq-wrr 2 4 6 8 设置队列调度算法为HQ-WRR(默认为WRR),权重为2,4, [H3C-Ethernet0/3]line-rate inbound 29 将端口进口速率限制为2M bps,取1-28时,速率为rat [H3C]display queue-scheduler 显示队列调度模式及参数[H3C]display priority-trust 显示优先级信任模式l八系统管理:[H3C]mac-address blackhole H-H-H vlan 1 在VLAN1中添加黑洞MAC[H3C]mac-address static H-H-H interface Ethernet 0/1 vlan 1 在VLANl中添加端口一![H3C]mac-address timer aging 500[H3C]display mac-address[H3C]display arp设置MAC地址表的老化时间为500s[H3C]mac-address port-binding H-H-H interface Ethernet 0/1 vlan 1[H3C]display mac-address port-binding[H3C]display saved-configuration[H3C]display current-configuration<H3C>save[H3C]restore default [H3C]display version<H3C>reboot[H3C]display device[H3C]sysname bigheap [H3C]info-center enable 恢复交换机出厂默认配置,恢复后需重启才能生效启用系统日志功能,缺省情况下启用配置端口邦定[H3C]info-center loghost ip 192.168.0.3 向指定日志主机(只能为UNIX或LINUX,不能为W i n [H3C]info-center loghost level 8 设置系统日志级别为8,默认为5.级别说明:1.emergenci e <H3C>terminal debugging 启用控制台对调试信息的显示,缺省控制台为禁用<H3C>terminal logging<H3C>terminal trapping [H3C]display info-center [H3C]display logbuffer [H3C]display trapbuffer <H3C>reset logbuffer<H3C>reset trapbuffer启用控制台对日志信息的显示,缺省控制台为启用启用控制台对告警信息的显示,缺省控制台为启用显示系统日志的配置和缓冲区记录的信息显示日志缓冲区最近记录的指定数目的日志信息显示告警缓冲区最近记录的指定数目的日志信息消除日志缓冲区的信息清除告警缓冲区的信息l九.网络协议配置:NDP即是邻居发现协议,SlSSOE只能开启或关闭NDP,无法配置,默认有效保留时间为180s,NDP报文发送的间隔60s[H3C]ndp enable 缺省情况下是开启的[H3C-Ethernet0/3]ndp enable 缺省情况下开启[H3C]d isplay ndp 显示NDP配置信息显示指定端口NDP发现的邻居信息[H3C]displa y ndp interface Ethernet 0/1<H3C>debugging ndp interface Ethernet 0/1HABP协议即Huawei Authenticatio n Bypass Protocol , 华为鉴权旁路协议,是用来解决当交换机上同时配置了802.lx和HGMPv1/v2时,未经授权和认证的端口上将过滤HGMP报文,从而使管理设备无法管理下挂的交换机的问题。

H3C路由器常用基本配置命令

H3C路由器常用基本配置命令

H3C路由器常用基本配置命令H3C 路由器常用基本配置命令如下:1、系统配置1.1 主机名配置在进入配置模式后,使用 `sysname <主机名>` 命令来配置设备的主机名。

主机名用于标识设备。

示例:```[Router] sysname Router-1```1.2 基本配置保存在进行配置之后,使用 `save` 命令将基本配置保存到设备的NVRAM 中。

这样可以在设备重启后,加载该配置。

示例:```[Router] save```2、接口配置2.1 Ethernet 接口配置在进入接口配置模式后,使用 `interface Ethernet <接口号>` 命令来配置 Ethernet 接口。

可以配置接口的描述、IP 地质、子网掩码等。

示例:```[Router-Ethernet0/0/1] description LAN interface[Router-Ethernet0/0/1] ip address 192.168:0.1255.255.255:0```2.2 VLAN 接口配置在进入接口配置模式后,使用 `interface Vlan <VLAN 号>`命令来配置 VLAN 接口。

可以配置接口的描述、IP 地质、子网掩码等。

示例:```[Router-Vlan10] description Management VLAN[Router-Vlan10] ip address 10:0:0.1 255.255.255:0```3、静态路由配置使用 `ip route-static <目的网络> <子网掩码> <下一跳地质>` 命令来配置静态路由。

静态路由指定了如何将数据包从一个网络发送到另一个网络。

示例:```[Router] ip route-static 192.168.2:0 255.255.255:0 10:0:0.2```4、路由协议配置4.1 OSPF 配置使用 `ospf <进程 ID>` 命令进入 OSPF 配置模式,并使用`area <区域 ID>` 命令配置区域。

华三路由器交换机配置命令

华三路由器交换机配置命令

路由器:1、进入SETUP模式Router#setup2、时间设置router#clock set hh:mm:ss date moth year3、router>show historyRouter>terminal history size lines4、router#show version5、router#show running-config6、router#show starup-config7、router(config)#hostname name主机命名8、router(config)#banner motd # message #开机时的固定显示信息9、router(config)#enable password password 特权模式明文密码10、router(config)#no enable password11、router(config)#enable secret password 特权模式加密密码12、router(config)#no enable secret13、router(config)#service password-encryption特权模式把明文密码加密密码,但没enable secret安全可以反解14、router(config)#line console控制台密码15、router(config-line)#login16、router(config-line)#password password17、router(config-line)#exec-timeout mm ss 禁止控制台会话自动退出18、router(config-line)#logging synchronous重显被打乱的控制台输入router(config)#no ip domain-lookup 禁止域名解析19、router(config)#line vty 0 4虚拟终端密码20、router(config-line)#login21、router(config-line)#password password22、router(config)#interface type number(slot/port)端口设置23、router(config-if)#ip address ip summast24、router(config-if)#clock rate 64000(时钟频率单位为bps,只在DCE端设置)25、router(config-if)#bandwith 64(带宽设置,单位为KB)26、router(config-if)#no shutdown(shutdown)27、router(config-if )#media-type type(10base) 为以太网端口选择适当的介质类型28、router(config-if )#ctrl+z保存退出到特权模式29、router#30、router>用户模式enable进入router#特权模式config terminal进入router(config)#全局配置模式31、Interface Router(config-if)#端口设置Subinterface Router(config-subif)# 子端口设置Controller Router(config-controller)# 控制口设置Line Router(config-line)# 虚拟口设置Router Router(config-router)# 路由设置IPX router Router(config-ipx-router)#IPX路由设置32、router#show interface33、router#show interface Ethernet 034、router#show interface serial 035、router#show running-config36、router#show starup-config37、router#show flash38、router#show controller39、router#show controller interface type40、router#show running-configrouter#copy running-config starup-configrouter#copy running-config tftprouter#copy starup-config tftprouter#copy flash tftprouter#copy tftp star-configrouter#copy tftp flash--------------------------------------------------------------------------------端口状态Serial1 is up, line protocol is up正常工作Serial1 is up, line protocol is down连接问题Serial1 is down, line protocol is down端口问题Serial1 is administratively down, line protocol is down人为关闭配置寄存器的值1、关闭路由器的电源重新启动按住ctrl+break键入进2、>3、>o/r 0×2142(跳过nvarm启动恢复密码)4、>I5、当系统提示是否进入setup模式时,按N6、router>7、router>enable8、router#9、进入修改后(包括密码、寄存器的值:0×2100为rom monitor启动、0×2101为setup 模式启动、0×2102为10、router#copy running-config starup-config11、router#reload12、也可以在router#setup进入setup模式静态路由协议设置router(config)#ip route network submask(要到达的网络号掩码)ip address(下一跳或出口ip地址)router(config)#ip route 0.0.0.0 s0(出口端口或下一跳IP地址)rip设置router(config)#router riprouter(config-router)#network network-numberrouter#show ip protocol查看RIP信息router#show ip route 查看路由表router#debug ip rip查看RIP更新信息router(config-router)#passive-interface e0(阻止发出作息)router(config-router)#ip rip receive version 1 2接收1、2RIP版本信息igrp设置router(config)#router igrp as numberrouter(config-router)#network network numberrouter#show ip route查看路由表router#debug ip igrp events查看IGRP路由更新大概信息router#debug ip igrp transaction查看IGRP路由更新详细信息Router(config-router)#variance multiplier 控制IGRP load balancingRouter(config-router)#traffic-share {balanced | min}控制load-balanced traffic 的分布eigrp设置router(config)#router eigrp as numberrouter(config-router)#network network numberrouter(config)#no auto-summry 关闭自动汇总router(config)# auto-summry 打开自动汇总(默认是打开的)router#show ip route eigrp 显示当前的路由表里的EIGRP条目router#show ip protocol 显示活动的路由协议进程的参数和当前的状态router#show ip eigrp neighbors 显示被EIGRP发现的邻居router#show ip eigrp traffic 显示发出和收到的IP EIGRP 包的数量router#show ip eigrp topology 显示IP EIGRP的拓扑表Router#debug ip eigrpospf设置1. Router(config)#router ospf process-idRouter(config-router)#network address(可以是网络号也可以是Ip地址mask(通配掩码)area area-idRouter(config-if)# ip ospf priority numbe 配置OSPF的优先级Router#show ip protocols 验证OSPF的配置Router#show ip route 显示路由器学到的所有路由Router#show ip ospf interface type number 显示area-ID 和邻接信息Router#show ip ospf neighbor 基于每接口显示OSPF邻居信息Router#debug ip ospf eventsRouter#debug ip ospf packet2. Router(config)# interface loopback number(lookback回路配置)Router(config-if)# ip address ip-address subnet-maskRouter(config-if)# ip ospf cost cost-numbe 修改OSPF 的Cost数值Router(config-if)# ip ospf authentication-key key 配置明文口令Router(config-if)# ip ospf messge-digest-key keyid md5 key 配置MD5口令(keyid和key必须配对一致,两邻居才可以通信)Router(config-route)# area area-id authentication [message-digest]message-digest为可选项,使用后路由器只传送口令消息的摘要(或散列)配置OSPF区域的验证:3. Router(config-if)# ip ospf hello-interval seconds 配置hello间隔:Router(config-if)# ip ospf dead-interval seconds配置down机判断间隔--------------------------------------------------------------------------------访问列表1.标准访问列表(standard access lists):只使用源IP地址来做过滤决定Router(config)#access-list 10 deny 172.16.40.0 0.0.0.255Router(config)#access-list 10 permit anyRouter(config)#int e1Router(config-if)#ip access-group 10 out使用IP标准ACL来控制VTY线路的访问.Router(config)#access-list 50 permit 172.16.10.3Router(config)#line vty 0 4Router(config-line)#access-class 50 in删除IP标准ACLRouter(config-line)#no ip access-class 50 inRouter(config)#no access-list 502.扩展访问列表(extended access lists):它比较源IP地址和目标IP地址,层3的协议字段,层4端口号来做过滤决定Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 21Router(config)#access-list 110 deny tcp any host 172.16.30.5 eq 23Router(config)#access-list 110 permit ip any anyRouter(config)#int e1Router(config-if)#ip access-group 110 out3.虚拟通道访问router(config)#access-list 12 permit 192.89.55.0 0.0.0.255router(config)#line vty 0 4outer(config-line)#access-class 12 in3.show ip interface:只显示IP访问列表信息4.show ip interface:显示所有接口的信息和配置的ACL信息5.show ip interface [接口号]:显示具体某个接口的信息和配置的ACL信息6.show running-config:显示DRAM信息和ACL信息,以及接口对ACL的应用信息. 交换机配置交换机上设置登陆口令Switch(config)# enable password level level passwordSwitch(config)# no enable password level level passwordhostname1900/2900(config)#hostname hostnameIP Address1900(config)#ip address {ip address} {mask}1900(config)#ip address 10.5.5.11 255.255.255.02950(config#interface vlan 12950(config-if)#ip address {ip_address} {mask}2950(config)#interface vlan 12950(config-if)#ip address 10.5.5.11 255.255.255.0default gateway1900/2950(config)#ip default-gateway {ip address}1900/2950(config)#ip default-gateway 172.20.137.1查看交换机的IP地址1900#show ipIP address: 10.5.5.11Subnet mask: 255.255.255.0Default gateway: 10.5.5.3Management VLAN: 12950#show interface vlan 1Vlan1 is up, line protocol is upHardware is Cat5k Virtual Ethernet, address is 0010.f6a9.9800 (bia 0010.f6a9.9800) Internet address is 172.16.80.79/24Broadcast address is 255.255.255.255设置双工选项1900(config)#interface e0/11900(config-if)#duplex {auto | full |full-flow-control | half}2950(config)#interface fe0/12950(config-if)#duplex {auto | full | half}设置端口速度:switch(config-if)# speed {10|100|auto}查勘双工选项Switch#show interfaces fastethernet0/3查看MAC地址表1900/2950#show mac-address-table配置永久MAC地址1900(config)#mac-address-table permanent {mac-address type module/port}1900(config)#mac-address-table permanent 2222.2222.2222 ethernet 0/31900#show mac-address-table2950(config)#mac-address-table static mac_addr {vlan vlan_id} [interface int1 [int2 ... int15]]--------------------------------------------------------------------------------配置受限静态MAC地址1900(config)#mac-address-table restricted static {mac-address type module/port src-if-list}1900(config)#mac-address-table restricted static 1111.1111.1111 e0/4 e0/11900#show mac-address-table2950(config)#mac-address-table secure mac-addr interface [vlan vlan-id]2950(config)#mac-address-table secure 0003.3333.3333 fa 0/1 vlan 12950#show mac-address-table配置端口安全性1900(config-if)#port secure max-mac-count count1900(config)#interface e0/41900(config-if)#port secure1900(config-if)#port secure max-mac-count 11900(config)#address-violation {suspend | disable | ignore1900# show mac-address-table security2950(config-if)#port security max-mac-count count2950(config)#interface fa0/12950(config-if)#port security2950(config-if)#port security max-mac-count 102950(config-if)#port security action {shutdown | trap}2950#show mac-address-table secure2950#show port-security管理配置文件1900#copy nvram tftp://host/dst_file1900#copy tftp://host/src_file nvram1950#copy nvram tftp://10.1.1.1/wgswd.cfg2950#copy startup-config tftp://host/dst_file清除NVRAM1900#delete nvram2950#erase startup-configvlan配置1900 VLAN建立1900下,使用vlan [vlan#] name [name] [vlan#]命令, 如下: >en#config t(config)#hostname 19001900(config)#vlan 2 name sales1900(config)#vlan 3 name marketing1900(config)#vlan 4 name mis1900(config)#exit端口分配1900(config)#int e0/21900(config-if)#vlan-membership static 21900(config)#int e0/41900(config-if)#vlan-membership static 31900(config)#int e0/51900(config-if)#vlan-membership static 41900(config-if)#exit1900(config)#exitVLAN验证1900#sh vlan2900 VLAN建立在2950下创建VLAN,在特权模式下使用vlan database命令2950#vlan database2950(vlan)#vlan 2 name MarketingVLAN 2 modified:Name: Marketing2950(vlan)#vlan 3 name AccountingVLAN 3 added:Name: Accounting2950(vlan)#applyAPPLY complete2950(vlan)#Ctrl+C2950#端口分配2950下的端口配置,使用switchport access vlan [vlan#]命令,2950(config-if)#int f0/22950(config-if)#switchport access vlan 22950(config-if)#int f0/32950(config-if)#switchport access vlan 32950(config-if)#int f0/42950(config-if)#switchport access vlan 42950(config-if)#exit2950(config)#exit验证配置信息,如下:2950#sh vlan或2950#sh vlan brieftrunk配置1900trunk配置1900(config)#int f0/261900(config-if)#trunk on2950下在接口配置模式,使用switchport命令,如下:2950(config)#int f0/122950(config-if)#switchport mode trunk2950(config-if)# switchport trunk encapsulation {isl|dot1q} 2950(config-if)#^Z将某VLAN从中继中删除2950(config-if)# switchport trunk allowed vlan remove vlan-list添加某个VLAN到中继线路2950(config-if)# switchport trunk allowed vlan add vlan-list Configuring Inter-VLAN Routing给连接1900的trunk端口配置,使用encapsulation isl [vlan#]命令,如下: 2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation isl [vlan#]2600Router(config-subif)#ip add ip add submask给连接2950的这样配置,如下:2600Router(config)#int f0/0.12600Router(config-subif)#encapsulation dot1q [vlan#]2600Router(config-subif)#ip add ip add submask--------------------------------------------------------------------------------VTP配置1900(config)#vtp server1900(config)#vtp domain noco1900(config)#vtp password noko在特权模式下使用show vtp命令验证,如下:1900#sh vtpVTP version: 1Configuration revision: 0Maximum VLANs supported locally: 1005Number of existing VLANs: 5VTP domain name: nocoVTP password: nokoVTP operating mode: Server2950如下:2950(config)#vtp mode server2950(config)#vtp domain noco验证信息,如下:2950#sh vtp ?counters VTP statisticsstatus VTP domain status2950#sh vtp statusNAT配置配置静态转换Router(config)#ip nat inside source static local-ip global-ipRouter(config-if)#ip nat insideRouter(config-if)#ip nat outside配置动态地址转换Router(config)#ip nat pool name start-ip end-ip {netmask netmask | prefix-length prefix-length} Router(config)#access-list access-list-number permit source [source-wildcard]Router(config)#ip nat inside source listaccess-list-number pool name配置OverloadingRouter(config)#access-list access-list-number permitsource source-wildcardRouter(config)#ip nat inside source listaccess-list-number interface interface overload清除NAT Translation TableRouter#clear ip nat translation * 清除所有的动态地址转换条目Router#clear ip nat translation inside global-iplocal-ip [outside local-ip global-ip] 清除一个简单的动态地址转换条目(内、外)Router#clear ip nat translation outsidelocal-ip global-ip清除一个简单的动态地址转换(外)Router#clear ip nat translation protocol inside global-ipglobal-port local-ip local-port [outside local-iplocal-port global-ip global-port] 清除一个扩展动态地址转换条目Show命令输出信息Router#show ip nat translations------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------交换机: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-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)# de脚本ion de脚本ion-string基于CLI的交换机的端口描述:switch(enable)set port name module/number de脚本ion-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-name cv21. 为了从一条中继链路上删除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-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-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)# de脚本ion de脚本ion-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-number ()41. 配置默认路由: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-acl--------------------------------------------------------------------------------51. 当某个交换机的第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高速缓存区的内容。

华三华为交换机路由器配置常用命令汇总

华三华为交换机路由器配置常用命令汇总

华三华为交换机路由器配置常用命令汇总华三华为交换机路由器配置常用命令汇总The final revision was on November 23, 2020H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、 language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、 port link-type Access|Trunk|Hybrid 设置端口访问模式7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器配置命令大全1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、 language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图7、 undo shutdown 打开以太网端口8、 shutdown 关闭以太网端口9、 quit 退出当前视图模式10、 ip route-H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、 language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置 :reset save ;reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

H3C交换机常用配置命令大全

H3C交换机常用配置命令大全

H3C交换机常用配置命令一.用户配置:<H3C>system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin[H3C]undo localuser bigheap 删除Web网管用户[H3C]user-interface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值[H3C]user-interface vty 0 只支持0和1[H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-vty]undo idle-timeout 恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态二.系统IP配置:[H3C]vlan 20[H3C]management-vlan 20[H3C]interface vlan-interface 20 创建并进入管理VLANH3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLAN接口静态IP地址(缺省为192.168.0.234)[H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息<H3C>debugging ip 开启IP调试功能<H3C>undo debugging ip三.DHCP客户端配置:[H3C-Vlan-interface20]ip address dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undo ip address dhcp-alloc 取消[H3C]display dhcp 显示DHCP客户信息<H3C>debugging dhcp-alloc 开启DHCP调试功能<H3C>undo debugging dhcp-alloc四.端口配置:[H3C]interface Ethernet0/3[H3C-Ethernet0/3]shutdown[H3C-Ethernet0/3]speed 100 速率,可为10,100,1000和auto(缺省)[H3C-Ethernet0/3]duplex full 双工,可为half,full和auto(缺省) 光口和汇聚后不能配置[H3C-Ethernet0/3]flow-control 开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression 20 设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响[H3C-Ethernet0/3]loopback internal 内环测试[H3C-Ethernet0/3]loopback external 外环测试,需插接自环头,必须为全双工或者自协商模式[H3C-Ethernet0/3]port link-type trunk 设置链路的类型为trunk,可为access(缺省),trunk [H3C-Ethernet0/3]port trunk pvid vlan 20 设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)[H3C-Ethernet0/3]port access vlan 20 将当前access端口加入指定的VLAN[H3C-Ethernet0/3]port trunk permit vlan all 允许所有的VLAN通过当前的trunk端口,可多次使用该命令[H3C-Ethernet0/3]mdi auto 设置以太端口为自动监测,normal(缺省)为直通线,across为交叉线[H3C]link-aggregation Ethernet 0/1 to Ethernet 0/4 将1-4口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚[H3C]undo link-aggregation Ethernet 0/1 删除该汇聚组[H3C]link-aggregation mode egress 配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 ingress,egress和both,缺省为both[H3C]monitor-port Ethernet 0/2 将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变[H3C]mirroring-port Ethernet 0/3 to Ethernet 0/4 both 将端口3和4设置为被镜像端口,both 为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound表示仅监控发送的报文[H3C]display mirror[H3C]display interface Ethernet 0/3<H3C>reset counters 清除所有端口的统计信息[H3C]display link-aggregation Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况五.VLAN配置:[H3C]vlan 2[H3C]undo vlan all 删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除[H3C-vlan2]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolate enable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolate uplink-port vlan 2 设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置[H3C]display vlan all 显示所有VLAN的详细信息S1550E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属于多个user-group,不属于同一个user-group的端口不能互相通信,最多支持50个user-group[H3C]user-group 20 创建user-group 20,默认只存在user-group 1[H3C-UserGroup20]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN20中,初始时都属于user-group 1中[H3C]display user-group 20 显示user-group 20的相关信息六.集群配置:S2100只能作为成员交换机加入集群中,加入后系统名改为"集群名_成员编号.原系统名"的格式.即插即用功能通过两个功能实现: 集群管理协议MAC组播地址协商和管理VLAN协商[H3C]cluster enable 启用群集功能,缺省为启用[H3C]cluster 进入群集视图[H3C-cluster]administrator-address H-H-H name switch H-H-H为命令交换机的MAC,加入switch集群[switch_1.H3C-cluster]undo administrator-address 退出集群[H3C]display cluster 显示集群信息[H3C]management-vlan 2 集群报文只能在管理VLAN中转发,同一集群需在同一个管理VLAN中,需在建立集群之前指定管理VLAN<H3C>debugging cluster七.QoS配置:QoS配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速[H3C-Ethernet0/3]priority 7 设置端口优先级为7,默认为0[H3C]priority-trust cos 设置交换机信任报文的优先级方式为cos(802.1p优先级,缺省值),还可以设为dscp方式(dscp优先级方式)[H3C]queue-scheduler hq-wrr 2 4 6 8 设置队列调度算法为HQ-WRR(默认为WRR),权重为2,4,6,8[H3C-Ethernet0/3]line-rate inbound 29 将端口进口速率限制为2Mbps,取1-28时,速率为rate*8*1024/125,即64,128,192...1.792M;29-127时,速率为(rate-27)*1024,即2M,3M,4M...100M,千兆时可继续往下取,128-240时,速率为(rate-115)*8*1024,即104M,112M,120M...1000M [H3C]display queue-scheduler 显示队列调度模式及参数[H3C]display priority-trust 显示优先级信任模式八.系统管理:[H3C]mac-address blackhole H-H-H vlan 1 在VLAN1中添加黑洞MAC[H3C]mac-address static H-H-H interface Ethernet 0/1 vlan 1 在VLAN1中添加端口一的一个mac[H3C]mac-address timer aging 500 设置MAC地址表的老化时间为500s[H3C]display mac-address[H3C]display arp[H3C]mac-address port-binding H-H-H interface Ethernet 0/1 vlan 1 配置端口邦定[H3C]display mac-address port-binding[H3C]display saved-configuration[H3C]display current-configuration<H3C>save[H3C]restore default 恢复交换机出厂默认配置,恢复后需重启才能生效[H3C]display version<H3C>reboot[H3C]display device[H3C]sysname bigheap[H3C]info-center enable 启用系统日志功能,缺省情况下启用[H3C]info-center loghost ip 192.168.0.3 向指定日志主机(只能为UNIX或LINUX,不能为Windows)输出信息,需先开启日志功能,缺省关闭[H3C]info-center loghost level 8 设置系统日志级别为8,默认为 5.级别说明:1.emergencies 2.alerts 3.critical 4.errors 5.warnings 6.notifications rmational 8.debuggin g<H3C>terminal debugging 启用控制台对调试信息的显示,缺省控制台为禁用<H3C>terminal logging 启用控制台对日志信息的显示,缺省控制台为启用<H3C>terminal trapping 启用控制台对告警信息的显示,缺省控制台为启用[H3C]display info-center 显示系统日志的配置和缓冲区记录的信息[H3C]display logbuffer 显示日志缓冲区最近记录的指定数目的日志信息[H3C]display trapbuffer 显示告警缓冲区最近记录的指定数目的日志信息<H3C>reset logbuffer 清除日志缓冲区的信息<H3C>reset trapbuffer 清除告警缓冲区的信息九.网络协议配置:NDP即是邻居发现协议,S1550E只能开启或关闭NDP,无法配置,默认有效保留时间为180s,NDP报文发送的间隔60s[H3C]ndp enable 缺省情况下是开启的[H3C-Ethernet0/3]ndp enable 缺省情况下开启[H3C]display ndp 显示NDP配置信息[H3C]display ndp interface Ethernet 0/1 显示指定端口NDP发现的邻居信息<H3C>debugging ndp interface Ethernet 0/1HABP协议即Huawei Authentication Bypass Protocol,华为鉴权旁路协议,是用来解决当交换机上同时配置了802.1x和HGMPv1/v2时,未经授权和认证的端口上将过滤HGMP报文,从而使管理设备无法管理下挂的交换机的问题。

H3C交换机常用配置命令大全

H3C交换机常用配置命令大全

一.用户配置:<H3C>system-view[H3C]super password H3C 设置用户分级密码[H3C]undo super password 删除用户分级密码[H3C]localuser bigheap 123456 1 Web网管用户设置,1(缺省)为管理级用户,缺省admin,admin[H3C]undo localuser bigheap 删除Web网管用户[H3C]user-interface aux 0 只支持0[H3C-Aux]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-Aux]undo idle-timeout 恢复默认值[H3C]user-interface vty 0 只支持0和1[H3C-vty]idle-timeout 2 50 设置超时为2分50秒,若为0则表示不超时,默认为5分钟[H3C-vty]undo idle-timeout 恢复默认值[H3C-vty]set authentication password 123456 设置telnet密码,必须设置[H3C-vty]undo set authentication password 取消密码[H3C]display users 显示用户[H3C]display user-interface 显示用户界面状态二.系统IP配置:[H3C]vlan 20[H3C]management-vlan 20[H3C]interface vlan-interface 20 创建并进入管理VLAN[H3C]undo interface vlan-interface 20 删除管理VLAN接口[H3C-Vlan-interface20]ip address 192.168.1.2 255.255.255.0 配置管理VLA N接口静态IP地址(缺省为192.168.0.234)[H3C-Vlan-interface20]undo ip address 删除IP地址[H3C-Vlan-interface20]ip gateway 192.168.1.1 指定缺省网关(默认无网关地址)[H3C-Vlan-interface20]undo ip gateway[H3C-Vlan-interface20]shutdown 关闭接口[H3C-Vlan-interface20]undo shutdown 开启[H3C]display ip 显示管理VLAN接口IP的相关信息[H3C]display interface vlan-interface 20 查看管理VLAN的接口信息<H3C>debugging ip 开启IP调试功能<H3C>undo debugging ip三.DHCP客户端配置:[H3C-Vlan-interface20]ip address dhcp-alloc 管理VLAN接口通过DHCP方式获取IP地址[H3C-Vlan-interface20]undo ip address dhcp-alloc 取消[H3C]display dhcp 显示DHCP客户信息<H3C>debugging dhcp-alloc 开启DHCP调试功能<H3C>undo debugging dhcp-alloc四.端口配置:[H3C]interface Ethernet0/3[H3C-Ethernet0/3]shutdown[H3C-Ethernet0/3]speed 100 速率,可为10,100,1000和auto(缺省)[H3C-Ethernet0/3]duplex full 双工,可为half,full和auto(缺省) 光口和汇聚后不能配置[H3C-Ethernet0/3]flow-control 开启流控,默认为关闭[H3C-Ethernet0/3]broadcast-suppression 20 设置抑制广播百分比为20%,可取5,10,20,100,缺省为100,同时组播和未知单播也受此影响[H3C-Ethernet0/3]loopback internal 内环测试[H3C-Ethernet0/3]loopback external 外环测试,需插接自环头,必须为全双工或者自协商模式[H3C-Ethernet0/3]port link-type trunk 设置链路的类型为trunk,可为access (缺省),trunk[H3C-Ethernet0/3]port trunk pvid vlan 20 设置20为该trunk的缺省VLAN,默认为1(trunk线路两端的PVID必须一致)[H3C-Ethernet0/3]port access vlan 20 将当前access端口加入指定的VLAN [H3C-Ethernet0/3]port trunk permit vlan all 允许所有的VLAN通过当前的tr unk端口,可多次使用该命令[H3C-Ethernet0/3]mdi auto 设置以太端口为自动监测,normal(缺省)为直通线,a cross为交叉线[H3C]link-aggregation Ethernet 0/1 to Ethernet 0/4 将1-4口加入汇聚组,1为主端口,两端需要同时配置,设置了端口镜像以及端口隔离的端口无法汇聚[H3C]undo link-aggregation Ethernet 0/1 删除该汇聚组[H3C]link-aggregation mode egress 配置端口汇聚模式为根据目的MAC地址进行负荷分担,可选为 in gress,egress和both,缺省为both[H3C]monitor-port Ethernet 0/2 将该端口设置为镜像端口,必须先设置镜像端口,删除时必须先删除被镜像端口,而且它们不能同在一个端口,该端口不能在汇聚组中,设置新镜像端口时,新取代旧,被镜像不变[H3C]mirroring-port Ethernet 0/3 to Ethernet 0/4 both 将端口3和4设置为被镜像端口,both为同时监控接收和发送的报文,inbound表示仅监控接收的报文,outbound 表示仅监控发送的报文[H3C]display mirror[H3C]display interface Ethernet 0/3<H3C>reset counters 清除所有端口的统计信息[H3C]display link-aggregation Ethernet 0/3 显示端口汇聚信息[H3C-Ethernet0/3]virtual-cable-test 诊断该端口的电路状况五.VLAN配置:[H3C]vlan 2[H3C]undo vlan all 删除除缺省VLAN外的所有VLAN,缺省VLAN不能被删除[H3C-vlan2]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN2中,此命令只能用来加access端口,不能用来增加trunk或者hybrid端口[H3C-vlan2]port-isolate enable 打开VLAN内端口隔离特性,不能二层转发,默认不启用该功能[H3C-Ethernet0/4]port-isolate uplink-port vlan 2 设置4为VLAN2的隔离上行端口,用于转发二层数据,只能配置一个上行端口,若为trunk,则建议允许所有VLAN通过,隔离不能与汇聚同时配置[H3C]display vlan all 显示所有VLAN的详细信息S1550E支持基于端口的VLAN,通过创建不同的user-group来实现,一个端口可以属于多个user-group,不属于同一个user-group的端口不能互相通信,最多支持50个user-group [H3C]user-group 20 创建user-group 20,默认只存在user-group 1[H3C-UserGroup20]port Ethernet 0/4 to Ethernet 0/7 将4到7号端口加入到VLAN20中,初始时都属于user-group 1中[H3C]display user-group 20 显示user-group 20的相关信息六.集群配置:S2100只能作为成员交换机加入集群中,加入后系统名改为"集群名_成员编号.原系统名"的格式.即插即用功能通过两个功能实现: 集群管理协议MAC组播地址协商和管理VLAN协商[H3C]cluster enable 启用群集功能,缺省为启用[H3C]cluster 进入群集视图[H3C-cluster]administrator-address H-H-H name switch H-H-H为命令交换机的MAC,加入switch集群[switch_1.H3C-cluster]undo administrator-address 退出集群[H3C]display cluster 显示集群信息[H3C]management-vlan 2 集群报文只能在管理VLAN中转发,同一集群需在同一个管理VLAN中,需在建立集群之前指定管理VLAN<H3C>debugging cluster七.QoS配置:QoS配置步骤:设置端口的优先级,设置交换机信任报文的优先级方式,队列调度,端口限速[H3C-Ethernet0/3]priority 7 设置端口优先级为7,默认为0[H3C]priority-trust cos 设置交换机信任报文的优先级方式为cos(802.1p优先级,缺省值),还可以设为dscp方式(dscp优先级方式)[H3C]queue-scheduler hq-wrr 2 4 6 8 设置队列调度算法为HQ-WRR(默认为WR R),权重为2,4,6,8[H3C-Ethernet0/3]line-rate inbound 29 将端口进口速率限制为2Mbps,取1-28时,速率为rate*8*1024/125,即64,128,192...1.792M;29-127时,速率为(rate-27)*1024,即2M,3M,4M...100M,千兆时可继续往下取,128-240时,速率为(rate-115)*8*1024,即104M, 112M,120M...1000M[H3C]display queue-scheduler 显示队列调度模式及参数[H3C]display priority-trust 显示优先级信任模式八.系统管理:[H3C]mac-address blackhole H-H-H vlan 1 在VLAN1中添加黑洞MAC[H3C]mac-address static H-H-H interface Ethernet 0/1 vlan 1 在VLAN1中添加端口一的一个mac[H3C]mac-address timer aging 500 设置MAC地址表的老化时间为500s[H3C]display mac-address[H3C]display arp[H3C]mac-address port-binding H-H-H interface Ethernet 0/1 vlan 1 配置端口邦定[H3C]display mac-address port-binding[H3C]display saved-configuration[H3C]display current-configuration<H3C>save[H3C]restore default 恢复交换机出厂默认配置,恢复后需重启才能生效[H3C]display version<H3C>reboot[H3C]display device[H3C]sysname bigheap[H3C]info-center enable 启用系统日志功能,缺省情况下启用[H3C]info-center loghost ip 192.168.0.3 向指定日志主机(只能为UNIX或LIN UX,不能为Windows)输出信息,需先开启日志功能,缺省关闭[H3C]info-center loghost level 8 设置系统日志级别为8,默认为5.级别说明: 1.emergencies 2.alerts 3.critical 4.errors 5.warnings 6.notifications rma tional 8.debugging<H3C>terminal debugging 启用控制台对调试信息的显示,缺省控制台为禁用<H3C>terminal logging 启用控制台对日志信息的显示,缺省控制台为启用<H3C>terminal trapping 启用控制台对告警信息的显示,缺省控制台为启用[H3C]display info-center 显示系统日志的配置和缓冲区记录的信息[H3C]display logbuffer 显示日志缓冲区最近记录的指定数目的日志信息[H3C]display trapbuffer 显示告警缓冲区最近记录的指定数目的日志信息<H3C>reset logbuffer 清除日志缓冲区的信息<H3C>reset trapbuffer 清除告警缓冲区的信息九.网络协议配置:NDP即是邻居发现协议,S1550E只能开启或关闭NDP,无法配置,默认有效保留时间为180 s,NDP报文发送的间隔60s[H3C]ndp enable 缺省情况下是开启的[H3C-Ethernet0/3]ndp enable 缺省情况下开启[H3C]display ndp 显示NDP配置信息[H3C]display ndp interface Ethernet 0/1 显示指定端口NDP发现的邻居信息<H3C>debugging ndp interface Ethernet 0/1HABP协议即Huawei Authentication Bypass Protocol,华为鉴权旁路协议,是用来解决当交换机上同时配置了802.1x和HGMPv1/v2时,未经授权和认证的端口上将过滤HGMP报文,从而使管理设备无法管理下挂的交换机的问题。

华三交换机-路由器配置命令

华三交换机-路由器配置命令

H3C交换机配置命令大全1、system-view 进入系统视图模式2、sysname 为设备命名3、display current-configuration 当前配置情况4、language-mode Chinese|English 中英文切换5、interface Ethernet 1/0/1 进入以太网端口视图6、port link-type Access|Trunk|Hybrid 设置端口访问模式7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、vlan 10 创建VLAN 10并进入VLAN 10的视图模式11、port access vlan 10 在端口模式下将当前端口加入到vlan 10中12、port E1/0/2 to E1/0/5 在VLAN模式下将指定端口加入到当前vlan中13、port trunk permit vlan all 允许所有的vlan通过H3C路由器1、system-view 进入系统视图模式2、sysname R1 为设备命名为R13、display ip routing-table 显示当前路由表4、language-mode Chinese|English 中英文切换5、interface Ethernet 0/0 进入以太网端口视图6、ip address 192.168.1.1 255.255.255.0 配置IP地址和子网掩码7、undo shutdown 打开以太网端口8、shutdown 关闭以太网端口9、quit 退出当前视图模式10、ip route-static 192.168.2.0 255.255.255.0 192.168.12.2 description To.R2 配置静态路由11、ip route-static 0.0.0.0 0.0.0.0 192.168.12.2 description To.R2 配置默认的路由H3C S3100 SwitchH3C S3600 SwitchH3C MSR 20-20 Router1、调整超级终端的显示字号;2、捕获超级终端操作命令行,以备日后查对;3、language-mode Chinese|English 中英文切换;4、复制命令到超级终端命令行,粘贴到主机;5、交换机清除配置:<H3C>reset save ;<H3C>reboot ;6、路由器、交换机配置时不能掉电,连通测试前一定要检查网络的连通性,不要犯最低级的错误。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
1 2 Catalyst 6000 supervisor 2 (Standby) WS-X6K-SUP2-2GE SAD04450LEU
2 2 Catalyst 6000 supervisor 2 (Active) WS-X6K-SUP2-2GE SAD04160FSR
3 48 SFM-capable 48-port 10/100 Mbps RJ45 WS-X6548-RJ-45 SAD050105Y0

snmp-server community xxxxxx rw(读写)
3. 冗余及系统高可用性配置
6000系列支持双supervisor engines或加强的高可用系统(EHSA),允许第二块supervisor engines处于standby模式或EHSA状态,在主用supervisor engines有问题时进行切换(切换过程中会照成网络的暂时中断),
可按以下的步骤手工同步二块supervisor engines:
命令 目的
Step 1 Router(config)# redundancy 进入冗余配置模式
Step 2 Router(config-r)# main-cpu 进入main-cpu配置模式
Step 3 Router(config-r-mc)# auto-sync {startup-config | config-register | bootvar | standard} 同步配置参数,有startup-config, config-register,bootvar,standard
Cisco Internetwork Operating System Software
IOS (tm) MSFC2 Software (C6MSFC2-BOOT-M), Version 12.1(3a)E4, EARLY DEPLOYMENT R
ELEASE SOFTWARE (fc1)
Copyright (c) 1986-2000 by cisco Systems, Inc.
当交换机加电后,EHSA会缺省地在二supervisor engine上运行(slot 1 or 2), 其中之一会成为活动的。
注意:二块supervisor engine必须有一致的IOS,内存等。
3.1. 同步Supervisor Engine配置
在正常的*作过程中,初始配置(startup-config)及config-registers配置缺省会在二supervisor engines之间同步. 发生切换后,新的活动supervisor engine会运行当前的配置。
7. 配置VLAN 16
8. 动态路由协议--OSPF配置 18
8.1. 启用OSPF动态路由协议 18
8.2. 定义参与OSPF的子网 18
8.3. OSPF区域间的路由信息汇总 19
8.4. 配置密码验证 19
8.5. 设置产生缺省路由 19
9. 交换机维护 20
9.1. 交换机IOS保存和升级 20
2. 基本信息配置
2.1. 配置机器名、telnet、密码
1. 在全局模式下,用conf t,进入配置模式,进行以下的配置:
管理方面的配置:
service timestamps debug datetime localtime
service timestamps log datetime localtime
· 8 data bits
· No parity
· 2 stop bits
检查电源无误后,开电,可能会出现类似下面的显示,按黑粗体字回答:
System Bootstrap, Version 6.1(2)
Copyright (c) 1994-2000 by cisco Systems, Inc.
509K bytes of non-volatile configuration memory.
16384K bytes of Flash internal SIMM (Sector size 512K).
Press RETURN to get started!
--- System Configuration Dialog ---
Router# copy running-config startup-config
注意 手工同步某参数后,会使原缺省的同步特征
3.2. 查看Supervisor Engine冗余
Command Purpose
Router# show module all Display the redundancy configuration.
Software clause at DFARS sec. 252.227-7013.
cisco Systems, Inc.
170 West Tasman Drive
San Jose, California 95134-1706
c6k_sup2 processor with 131072 Kbytes of main memory
rommon 1 > boot slot0:c6sup22-jsv-mz.121-5c.EX.bin
Self decompressing the image : ##############பைடு நூலகம்##################################
[OK]
Restricted Rights Legend
Use, duplication, or disclosure by the Government is
subject to restrictions as set forth in subparagraph
(c) of the Commercial Computer Software - Restricted
Rights clause at FAR sec. 52.227-19 and subparagraph
(c) (1) (ii) of the Rights in Technical Data and Computer
目 录
1. 连接设备 3
1.1. 从CONSOLE连接 3
1.2. 远程TELNET连接 6
2. 基本信息配置 6
2.1. 配置机器名、TELNET、密码 6
2.2. 配置SNMP网管串 6
3. 冗余及系统高可用性配置 7
3.1. 同步SUPERVISOR ENGINE配置 7
3.2. 查看SUPERVISOR ENGINE冗余 9
H3C路由器交换机配置命令大全1.txt再过几十年,我们来相会,送到火葬场,全部烧成灰,你一堆,我一堆,谁也不认识谁,全部送到农村做化肥。中望商业机器有限公司 &copy; 1992, 2002
Chinaweal Business Machinery Co., Ltd.
All Rights Reserve
service password-encryption
hostname xxxx
enable secret 0 xxxxx
line vty 0 4
exec-timeout 30 0
password 0 xxxx
login
2.2. 配置snmp网管串
conf t
snmp-server community xxxxxx ro(只读)
7 0 Switching Fabric Module-136 (Active) WS-X6500-SFM2 SAD04440663
Step 4 Router(config-r-mc)# end 退回全局模式
Step 5 Router# copy running-config startup-config 保存配置
注意 auto-sync standard命令不同步boot variables.
配置如下:
Router(config)# redundancy
Router(config-r)# main-cpu
Router(config-r-mc)# auto-sync standard
Router(config-r-mc)# auto-sync bootvar
Router(config-r-mc)# end
Compiled Sat 14-Oct-00 05:33 by eaarmas
Image text-base: 0x30008980, data-base: 0x303B6000
cisco Cat6k-MSFC2 (R7000) processor with 114688K/16384K bytes of memory.
Would you like to enter the initial dialog? [yes]: no
回答:NO,进入手工配置,在router>下,输入enable
回车,进入全局模式
1.2. 远程telnet连接
当完成交换机配置,并起给交换机配置了管理地址,就可以直接采用远程telnet登陆进入交换机了,但是必须先配置line vty的密码和enable密码才能允许远程登陆。
3.3. 向冗余SUPERVISOR ENGINE拷贝IOS文件 11
4. 端口设置 11
4.1. 基本设置 11
4.2. 配置三层端口 12
5. 配置二层端口 13
5.1. 配置TRUNK: 13
6. 配置HSRP 15
6.1. 配置二层普通交换接口 15
相关文档
最新文档