1、实验六以太通道实验六:以太通道一:实验目标1 掌握以太通道的用法2 掌握配置命令二:拓扑图三:预期结果 Down掉两条链路中的任意一条,数据可以继续保持流通。四:调试基本配置RouterenableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#no ip domain-lookupRouter(config)#line console 0Router(config-line)# logging synchronousRouter(config
2、-line)# exec-timeout 0 0Router(config-line)# no loginRouter(config-line)#line aux 0Router(config-line)# logging synchronousRouter(config-line)# exec-timeout 0 0Router(config-line)# no loginRouter(config-line)# privilege level 15Router(config-line)#line vty 0 4Router(config-line)# no loginRouter(conf
3、ig-line)# privilege level 15Router(config-line)#exitRouter(config)#host sw1sw1(config)#Router#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#no ip domain-lookupRouter(config)#line console 0Router(config-line)# logging synchronousRouter(config-line)# exec
4、-timeout 0 0Router(config-line)# no loginRouter(config-line)#line aux 0Router(config-line)# logging synchronousRouter(config-line)# exec-timeout 0 0Router(config-line)# no loginRouter(config-line)# privilege level 15Router(config-line)#line vty 0 4Router(config-line)# no loginRouter(config-line)# pr
5、ivilege level 15Router(config-line)#exitRouter(config)#Router(config)#host sw2sw2(config)#RouterenableRouter#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Router(config)#no ip domain-lookupRouter(config)#line console 0Router(config-line)# logging synchronousRouter(con
6、fig-line)# exec-timeout 0 0Router(config-line)# no loginRouter(config-line)#line aux 0Router(config-line)# logging synchronousRouter(config-line)# exec-timeout 0 0Router(config-line)# no loginRouter(config-line)# privilege level 15Router(config-line)#line vty 0 4Router(config-line)# no loginRouter(c
7、onfig-line)# privilege level 15Router(config-line)#exitRouter(config)#host sw3sw3(config)#二层链路配置sw3#vlan datasw3(vlan)#vlan 10VLAN 10 added: Name: VLAN0010sw3(vlan)#vlan 11VLAN 11 added: Name: VLAN0011sw3(vlan)#exitAPPLY completed. sw1#vlan datasw1(vlan)#vlan 10VLAN 10 added: Name: VLAN0010sw1(vlan)
8、#vlan 11VLAN 11 added:Name: VLAN0011Exiting.sw2#vlan datasw2(vlan)#vlan 10VLAN 10 added: Name: VLAN0010sw2(vlan)#vlan 11VLAN 11 added: Name: VLAN0011sw2(vlan)#exitAPPLY completed.Exiting.sw2(config)#interface vlan 10sw2(config-if)#ip address 192.168.10.2 255.255.255.0sw2(config)#no shutsw2(config)#i
9、nterface vlan 11sw2(config-if)#ip address 192.168.11.2 255.255.255.0sw2(config-if)#no shutsw2(config-if)#exitsw2(config)#spanning-tree vlan 10 priority 0 sw2(config)#spanning-tree vlan 11 priority 4096sw1(config)#interface vlan 10sw1(config-if)#ip address 192.168.10.1 255.255.255.0sw1(config-if)#no
10、shutsw1(config-if)#interface vlan 11sw1(config-if)#ip address 12.168.11.1 255.255.255.0sw1(config-if)#no shutsw1(config-if)#exitsw1(config)#spanning-tree vlan 10 priority 4096sw1(config)#spanning-tree vlan 11 priority 0sw3(config)#interface f0/10sw3(config-if)#sw mo accesssw3(config-if)#sw access vl
11、an 10sw3(config-if)#no shutsw3(config-if)#inter f0/11sw3(config-if)#sw mo accesssw3(config-if)#sw access vlan 11sw3(config-if)#no shutsw3(config-if)#sw3(config)#interface range f0/1 - 2sw3(config-if-range)#sw tr en dsw3(config-if-range)#sw mo trsw3(config-if-range)#sw tr *Mar 1 00:09:14.235: %DTP-5-
12、TRUNKPORTON: Port Fa0/1-2 has become dot1q trunksw3(config-if-range)#sw tr al vlan allsw3(config-if-range)#no shutsw3(config-if-range)#exitsw3(config)#endsw2(config)#interface range f0/1 - 3sw2(config-if-range)#sw tr en dsw2(config-if-range)#sw mo trsw2(config-if-range)# *Mar 1 00:07:05.383: %DTP-5-
13、TRUNKPORTON: Port Fa0/1-3 has become dot1q trunksw2(config-if-range)#sw tr en dsw2(config-if-range)#sw tr al vlan allsw2(config-if-range)#no shutsw2(config-if-range)#exitsw2(config)#interface range f0/1 - 2sw2(config-if-range)#channel-group 2 mode onCreating a port-channel interface Port-channel2sw1
14、(config)#interface range f0/1 - 3sw1(config-if-range)#sw mo trsw1(config-if-range)#sw tr en dsw1(config-if-range)#sw tr al vl allsw1(config-if-range)#no shutsw1(config-if-range)#exitsw1(config)#interface range f0/1 - 2sw1(config-if-range)#channel-group 2 mode onCreating a port-channel interface Port
15、-channel2调制:sw1(config)#do show ip in bInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 unassigned YES unset up down FastEthernet0/1 unassigned YES unset up up FastEthernet0/2 unassigned YES unset up up FastEthernet0/3 unassigned YES unset up up FastEthernet0/4 unassigned YES unset up
16、down FastEthernet0/5 unassigned YES unset up down FastEthernet0/6 unassigned YES unset up down FastEthernet0/7 unassigned YES unset up down FastEthernet0/8 unassigned YES unset up down FastEthernet0/9 unassigned YES unset up down FastEthernet0/10 unassigned YES unset up down FastEthernet0/11 unassig
17、ned YES unset up down FastEthernet0/12 unassigned YES unset up down FastEthernet0/13 unassigned YES unset up down FastEthernet0/14 unassigned YES unset up down FastEthernet0/15 unassigned YES unset up down Port-channel2 unassigned YES unset up up Vlan1 unassigned YES unset up up Vlan10 192.168.10.1
18、YES manual up up Vlan11 12.168.11.1 YES manual up upsw1(config)#do show vlan-swVLAN Name Status Ports- - - -1 default active Fa0/0, Fa0/4, Fa0/5, Fa0/6 Fa0/7, Fa0/8, Fa0/9, Fa0/10 Fa0/11, Fa0/12, Fa0/13, Fa0/14 Fa0/1510 VLAN0010 active 11 VLAN0011 active 1002 fddi-default active 1003 token-ring-defa
19、ult active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2- - - - - - - - - - -1 enet 100001 1500 - - - - - 1002 100310 enet 100010 1500 - - - - - 0 0 11 enet 100011 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 1 100310
20、03 tr 101003 1500 1005 0 - - srb 1 10021004 fdnet 101004 1500 - - 1 ibm - 0 0 1005 trnet 101005 1500 - - 1 ibm - 0 0 sw1(config)# VLAN11 Spanning tree enabled protocol ieee Root ID Priority 0 Address cc00.1218.0002 Cost 12 Port 321 (Port-channel2) Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
21、 Bridge ID Priority 4096 Address cc01.1218.0002 Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec Aging Time 0 Interface DesignatedName Port ID Prio Cost Sts Cost Bridge ID Port ID- - - - - - - -FastEthernet0/3 128.4 128 19 FWD 12 4096 cc01.1218.0002 128.4 Port-channel2 129.65 128 12 FWD 0 0 cc00
22、.1218.0002 129.65 五:总结与原理分析以太通道有两种配置方式,第一种是手动配置:mode on;第二种是协议配置模式,而协议配置模式有两种:LACP(链路汇聚控制协议/公有协议),其链路状态有四种,on(强制不适用协议,开启)、off(防止端口开启)、active(使得端口使用LACP协议开启)、passive(使得端口进入被动协商状态,被叫才开启,默认使用);PAGP(端口汇聚协议/思科私有):on (同上) off (同上) desirable(同active)auto (同passive)。六:配置show runSW3:!version 12.3service time
23、stamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname sw3!boot-start-markerboot-end-marker!no aaa new-model!resource policy!memory-size iomem 5ip subnet-zero!ip cefno ip dhcp use vrf connected! ! no ip domain lookupno ftp-server write-enable! ! ! ! int
24、erface FastEthernet0/0! interface FastEthernet0/1 switchport mode trunk! interface FastEthernet0/2 switchport mode trunk! interface FastEthernet0/3! interface FastEthernet0/4! interface FastEthernet0/5! interface FastEthernet0/6! interface FastEthernet0/7!interface FastEthernet0/8!interface FastEthe
25、rnet0/9!interface FastEthernet0/10 switchport access vlan 10!interface FastEthernet0/11 switchport access vlan 11!interface FastEthernet0/12!interface FastEthernet0/13!interface FastEthernet0/14!interface FastEthernet0/15!interface Vlan1 no ip address!ip http serverip classless!control-plane!line co
26、n 0 exec-timeout 0 0 logging synchronousline aux 0 exec-timeout 0 0 privilege level 15 logging synchronousline vty 0 4 privilege level 15 no login!EndSW2:!version 12.3service timestamps debug datetime msecservice timestamps log datetime msecno service password-encryption!hostname sw2!boot-start-mark
27、erboot-end-marker!no aaa new-model!resource policy!memory-size iomem 5ip subnet-zero!ip cefno ip dhcp use vrf connected! !no ip domain lookupno ftp-server write-enable!spanning-tree vlan 10 priority 0spanning-tree vlan 11 priority 4096!interface Port-channel2 switchport mode trunk!interface FastEthe
28、rnet0/0!interface FastEthernet0/1 switchport mode trunk channel-group 2 mode on!interface FastEthernet0/2 switchport mode trunk channel-group 2 mode on! interface FastEthernet0/3 switchport mode trunk!interface FastEthernet0/4!interface FastEthernet0/5!interface FastEthernet0/6!interface FastEtherne
29、t0/7!interface FastEthernet0/8!interface FastEthernet0/9!interface FastEthernet0/10!interface FastEthernet0/11!interface FastEthernet0/12!interface FastEthernet0/13! interface FastEthernet0/14!interface FastEthernet0/15!interface Vlan1 no ip address!interface Vlan10 ip address 192.168.10.2 255.255.255.0!interface Vlan11 ip address 192.168.11.2 255.255.255.0!ip http serverip classless!control-plane! line con 0 exec-timeout 0 0 logging synchronousline aux 0 exec-timeout 0 0 privilege level 15 logging synchronousline vty 0 4 privilege
copyright@ 2008-2022 冰豆网网站版权所有
经营许可证编号:鄂ICP备2022015515号-1