《H3C 交换机基本配置.doc》由会员分享,可在线阅读,更多相关《H3C 交换机基本配置.doc(11页珍藏版)》请在淘文阁 - 分享文档赚钱的网站上搜索。
1、PC1PC2E1/0/1E1/0/2E1/0/1Switch BSwitch AE1/0/2SwitchAl # 创建手工汇聚组1。l system-viewl H3C link-aggregation group 1 mode manuall # 将以太网端口Ethernet1/0/1至Ethernet1/0/3加入汇聚组1。l H3C interface ethernet1/0/1l H3C-Ethernet1/0/1 port link-aggregation group 1l H3C-Ethernet1/0/1 interface ethernet1/0/2l H3C-Ethernet
2、1/0/2 port link-aggregation group 1l H3C-Ethernet1/0/2 interface ethernet1/0/3l H3C-Ethernet1/0/3 port link-aggregation group 1SwitchB上需要做同样的配置组网需求:在交换机上设置镜像功能,使端口e1/0/2监控端口e1/0/1的报文1. 设置镜像组 SWAmirroring-group 1 local2. 设置端口E1/0/2端口为监控端口、E1/0/1为源端口对进出报文都进行监控SWAmirroring-group 1 monitor-port e1/0/2SW
3、A mirroring-group 1 mirroring -port e1/0/1 both也可以在端口视图下设置:SWAinterface e1/0/1SWA-Ethernet1/0/1 mirroring -port bothSWA-Ethernet1/0/1 interface e1/0/2SWA-Ethernet1/0/2 monitor-port 3显示以太网镜像端口SWA display mirrorl 配置VLAN:SwitchA & SwitchB SwitchAvlan 10 SwitchA-vlan10port ethernet 1/0/1 SwitchA-vlan10v
4、lan 20 SwitchA-vlan20port ethernet 1/0/2l 配置接口 SwitchAinterface ethernet1/0/23 SwitchA-Ethernet 1/0/23speed 100 SwitchA-Ethernet 1/0/23duplex full SwitchA-Ethernet 1/0/23port link-type trunk SwitchA-Ethernet 1/0/23port trunk permit vlan 10 to 20 SwitchA-Ethernet 1/0/24speed 100 SwitchA-Ethernet 1/0/
5、24duplex full SwitchA-Ethernet 1/0/24port link-type trunk SwitchA-Ethernet 1/0/24port trunk permit vlan 10 to 20l 配置端口聚合 SwitchAlink-aggregation group 1 mode manual SwitchA interface ethernet1/0/23 SwitchA-Ethernet 1/0/23 port link-aggregation group 1 SwitchA-Ethernet 1/0/23 interface ethernet1/0/24
6、 SwitchA-Ethernet 1/0/24 port link-aggregation group 1l 设置主机IP地址SwitchB的配置与SwitchA相同l PC10和PC20分别处在不同的VLAN中(VLAN 10,VLAN 20),通过设置上层三层交换机SWITCHB的lll 从而实现两个VLAN之间的互相访问。【SwitchA交换机配置】配置前,先将SwitchA和SwitchB 的端口24用网线进行连接。 1)配置VLAN 10,加入端口10; VLAN 20加入端口20SwitchA vlan 10SwitchA-vlan10 port Ethernet 1/0/10S
7、witchA vlan 20SwitchA-vlan20 port Ethernet 1/0/20 2)配置TrunkSwitchAinterface ethernet 1/0/24SwitchA-Ethernet1/0/24port link-type trunkSwitchA-Ethernet1/0/24port trunk permit vlan all【SwitchB交换机配置】SwitchBvlan 10SwitchBinterface vlan-interface 10SwitchBvlan 20SwitchBinterface vlan-interface 203)在端口24配置
8、trunkSwitchBinterface ethernet 1/0/24SwitchB-Ethernet1/0/24port link-type trunkSwitchB-Ethernet1/0/24port trunk permit vlan all【主机的配置】1)PC10:2)PC20:.254l 首先,把SWTICHA的23端口和SWITCHC的23端口做好TRUNK,并允许VLAN 10 和VLAN 20 通过;把SWTICHB的24端口和SWITCHC的24端口做好TRUNK,并允许VLAN 10 和VLAN 20 通过。l 然后在SwitchC中做下列步骤:1、创建(进入)VL
9、AN10SwitchC vlan 102、创建(进入)VLAN虚接口10SwitchCAinterface Vlan-interface 103、为VLAN 虚接口10配置IP地址4、创建(进入)VLAN20SwitchC vlan 205、创建(进入)VLAN虚接口20SwitchCAinterface Vlan-interface 206、为VLAN 虚接口10配置IP地址配置主机1.2.3.4.telnet远程管理交换机配置1. 仅密码方式登录 配置telnet登录的IP地址system-viewSWAinterface vlan-interface 1 进入用户界面视图SWA user
10、-interface vty 0 设置认证方式为密码认证方式SWA-ui-vty 0authentication-mode password 设置登录验证的password为明文密码“999”SWA-ui-vty0set authentication password simple 999 设置登录用户的级别为最高级3(缺省为级别1)SWA-ui-vty0 user privilege level 3 设置VTY0用户界面支持Telnet协议。H3C-ui-vty0 protocol inbound telnetHDLC协议的配置l 在接口上封装HDLC协议 link-protocol hdl
11、cl 打开HDLC所有报文调试信息开关 debugging hdlc all interface type number l 打开HDLC事件调试信息开关 debugging hdlc event interface type number l 打开HDLC数据包调试信息开关 debugging hdlc packet interface type number PPP配置命令l 封装PPP link-protocol pppl 设置验证类型 ppp authentication-mode pap|chap l 设置用户名、口令、服务类型 H3Clocal-user huawei H3C-lu
12、ser-huaweipassword simple sharepass H3C-luser-huaweiservice-type ppp【主验证方配置】配置验证方式 H3C-serial1/0ppp authentication-mode pap配置用户列表 H3Clocal-user routerb H3C-luser-huaweipassword simple hello H3C-luser-huaweiservice-type ppp【被验证方配置】配置PAP用户名,密码 H3C-serial1/0ppp pap routerb password simple hello静态路由配置注意
13、:只有下一跳所属的的接口是点对点(PPP、HDLC)的接口时,才可以填写,否则必须填写。129.1.0.0/16E0/0H3C BS0/010.0.0.2H3C A10.0.0.1S0/0l 在路由器 H3C A上配置: Public NetworkH3C A10.0.0.1S0/010.0.0.2S0/0H3C BNetwork N路由器A的更名以及相关端口的IP地址配置H3C sysname RTARTAinterface ethernet 0/0RTA-Ethernet0/0interface serial 1/02、查看一下当前的路由表信息:RTAdisplay ip routing-
14、table3、静态路由配置4、再次查看一下当前的路由表信息:RTAdisplay ip routing-table路由器B的配置过程类似实验结果验证: 主机之间可以相互ping通,主机和两台路由器的各个端口之间也可以相互ping通RTA:RTA ripRTA-Ethernet1/0 rip version 2 broadcastRTA-Serial0/0 link-protocol pppRTA-Serial0/0 rip version 2 broadcastRTA-Serial0/0 rip authentication-mode md5 usual H3CRTB:RTB ripRTB-E
15、thernet1/0 rip version 2 broadcastRTB-Serial0/0 link-protocol pppRTB-Serial0/0 rip version 2 broadcastRTB-Serial0/0 rip authentication-mode md5 usual H3C RTB-Serial0/1 link-protocol frRTB-Serial0/1 rip version 2 broadcastRTC:RTC fr switchingRTC ripRTC-Ethernet1/0 rip version 2 broadcastRTC-Serial0/0
16、 link-protocol frRTC-Serial0/0 fr interface-type DCERTC-Serial0/0 fr dlci 20RTC-Serial0/0 rip version 2 broadcast显示RIP协议配置信息 H3C display ripRIP is runningpublic net VPN-Instance Checkzero is on Default cost : 1 Summary is on Preference : 100 Validate-source-address is on Traffic-share-across-interfa
17、ce is off Period update timer : 30 Timeout timer : 180 Garbage-collection timer : 120 No peer router Network :l 第一步:打开终端显示调试信息功能 terminal monitor terminal debuggingl 第二步:打开RIP的调试开关 debugging rip packetl 实际显示的RIP信息 packet : vers 1,cmd Response,length 24packet : vers 1,cmd Response,length 44(1) 配置RouterARTA interface ethernet0/0RTA- ethernet 0/0 interface serial1/0/RTA ospfRTA-ospf-1 area 1RTA-ospf-1 area 0(2) 配置RouterBRTB interface ethernet0/0RTB-ethernet 0/0 interface serial1/0RTB-serial1/0 interface ethernet 1/0/0RTB ospfRTB-ospf-1 area 0RTB-ospf-1 area 2
限制150内