《H3C路由器配置命令手册.docx》由会员分享,可在线阅读,更多相关《H3C路由器配置命令手册.docx(31页珍藏版)》请在优知文库上搜索。
1、H3C路由器配置命令手册常用命令1.查看当前配置使用displaycurrent-configuration命令显示系统当前运行的配置,由于我们使用的设备以及模块不同,操作时显示的具体内容也会有所不同。displaycurrent-configurationdscurrent-configuration使用空格键可以继续翻页显示,键翻行显示,结束显示。2.显示接口IP状态与配置信息displayipinterfacebriefds ip interface brief “down: administratively down (s): spoofingInterfaceGigabitEther
2、netO/O/OGigabitEthernetO/O/1GigabitEthernetO/O/2GigabitEthernetO/O/3SerialO/l/OSerialO/1/1Serial0l2Seri al0/1/3Physical down down down down down down down downOOcotownwnwnwnwnwnwnwn oooooooo PddddddddIP Address unassigned unassigned unassigned unassigned unassigned unassigned unassigned unassignedDe
3、scription GigabitEt. GigabitEt. GigabitEt. GigabitEt. SerialOl. SerialOl. SerialOl. SerialO/!.Telnet远程登录192.168.1.1/24 GOAVO RTl192.168.1.2/24GOVOL把两台路由器的接口ip地址先配好:system-viewRT1interfaceg0/0/0RTl-GigabitEthernetO/O/Oipaddress192.168.1.124system-viewRT2interfaceg0/0/0RT2-GigabitEthernetOOOipaddress1
4、92.168.1.2242.在RTl上配置telnet 有两种:设置密码登陆RTllteInet server enableRTl user-interface vty 0 4开启Telnet服务进入VTY线路,允许0到4, 5个用户 同时Telnet这台设备RTl-ui-vtyO-4authentication-modePaSSWOrd服务器认证类型为密码RTl-ui-vtyO-4setauthenticationpasswordsimple123设置密码设置登陆级别权限RTl-ui-vtyO-4userprivilegelevel3设置用户名,密码登陆RTltelnetserverenab
5、leRT1Iocal-Userwangyu设置一个用户名wangyuRTl-Iuser-WangyuJpasswordsimple123设置密码为明文123RTl-Iuser-Wangyuauthorization-attributelevel1设置权限RTl-Iuser-Wangyuservice-typetelnet服务方式是TeInetRT1superpasswordlevel3simpleh3c超级密码,提升权限进入VTY线路RT1user-interfacevty04RTl-ui-vtyO-4authentication-modeschemeTelnet验证模式设为要用户名密码登陆配
6、置VLAN(将一个大的局域网划分成逻辑的几个小的局域网,每个小局域网都是单独的广播域)1.创建VLAN并将相应的端口加入到该VLAN中SWlvlan10SWl-VlanlOporte4lSwi-VlanlOlquitSWlvlan20SWl-vlan20porte042SWl-vlan20quit2 .将交换机与交换机相连的端口设置为端口设置为TrUnk型10 20 允许 VIanl0, 20通过,也可设为vlan allSWlJinterfacee040SWl-Ethernet040portlink-typetrunkSWl-Ethernet040porttrunkpermitvlan3 .
7、SW2配置SW2vlan10SW2-vlanlOporte4lSW2-vlanlOquitSW2vlan20SW2-vlan20porte042SW2-vlan20quitSW2interfaceeO4OSW2-Ethernet040portlink-typetrunkSW2-Ethernet040porttrunkpermitvlan1020【实验测试】查看配置信息displayylanVLANfunctionisenabled.Total3YLANexist(s).一共有3个Vlan存在,缺省的是VIan 1Now,thefollovingVLANexist(s):1(default),2
8、,10+-VSWitddisplayy典2VLANID:2VLANType:staticRouteinterface:notconfiguredDescription: VLAN 0002Tagged Ports: noneVLAN中哪些端口打标签Ifatagsed Ports: EthernetlZOZl Ethernetl0Z3 Ethemetl/0/4VLAN中哪些端口不打标签 display interface ethernet 1 /0/1PVID: 1Mdi type: auto Port 1 ink-type : accessTagged VUN ID : noneIfotagg
9、ed VLAH ID : 1当前端口的缺省VLAN当前端口链路类型为 ACCeSSPort priority: 0测试vlan间主机的通信:UPCS4 ping 192.168.1.10No gateway foundKJPCS4J ping 192.168.2.10192.168.2.10192.168.2.10192.168.2.10192.168.2.10192.168.2.10icnp_seq=l icnp_seq=2 icmp_seq=3 icnp_seq=4 icnp_seq=5ttl=64 ttl=64 ttl=64 tt1=64 ttl=64time=30.001 ms tin
10、e=20.000 ns tine =40.001 s tine=40.000 ms time=40.000 ms链路聚合的配置(将多根物理线缆逻辑上捆绑成一根,以增加链路带宽,可靠性)1.SW1配置system-viewSWUinterfaceBridge-Aggregation1创建链路聚合组SWllinterfaceeO/4/OSWl-Ethernet040portlink-aggregationgroup1将端口加入到聚合组中SWl-Ethernet040quitSWliinterfacee4lSWl-EthernetO/4/1portlink-aggregationgroup1SW1-
11、Ethernet4lquit2.SW2配置system-viewSW2interfaceBridge-Aggregation1SW2interfacee040SW2-Ethernet040portlink-aggregationgroup1SW2-Ethernet040quitSW2interfacee4lSW2-EthernetO4lJportlink-aggregationgroup1SW2-EthernetO4lquit【查看】1.查看链路聚合信息,主要看selectports部分:Displaylink-aggreationsumaryswldisplaylink-aggregatio
12、nsummaryAggregationinterfaceType:BAGG-Bridge-Aggregation,RAGG-Route-AggregationAggregationMode:Sstatic,D-Dynamic1.oadsnaringType:Shar-Loadsharing,Nons-Non-LoadsharingActorsystemID:0x8000,000f-e200-0100AGGAGGPartnerIDinterfaceModeSelectPortsUnselectPortsshareTypeBAGGlSnone5W1O0NonsBAGGl:聚合端口ID为1S:聚合方
13、式为静态聚合2:聚合组中包含2个聚合端口Shar:组中端口是负载分担类型2.查看具体哪些口加入组:displaylink-aggregationmember-portIswldisplaylink-aggregationmember-portFlags:A-LACP_Activity,B-LACP_TimeOUt,C-Aggregation,D-synchronization,E-Collecting,F-DiStributing,G-Defaulted,H-ExpiredCt挺rnet040ZAggrgal75Tnterface:Bridge-AggregationlPortNumber:1
14、PortPriority:32768Oper-Key:1fiernet0/47Trgrgaturrnterface:Bridge-AggregationlPortNumber:2PortPriority:32768IOPer-Key:工3.链路聚合组的验证配置完成之后,在PCl上执行Ping命令,并且不间断地发送ICMP报文,如下所示:UPCS1Ping192.168.1.2-t192.168.1.2icmp.Seq=Itt1=64tine=750.001RS192.168.1.2icmp.seq=2tt1=64tine=580.001RS192.168.1.2icnp_seq=3tt1=64tine=630.000ms192.168.1.2icmp-seq