实验六以太通道.docx
《实验六以太通道.docx》由会员分享,可在线阅读,更多相关《实验六以太通道.docx(18页珍藏版)》请在冰豆网上搜索。
实验六以太通道
实验六:
以太通道
一:
实验目标
1掌握以太通道的用法
2掌握配置命令
二:
拓扑图
三:
预期结果
Down掉两条链路中的任意一条,数据可以继续保持流通。
四:
调试
基本配置
Router>enable
Router#configureterminal
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
Router(config)#noipdomain-lookup
Router(config)#lineconsole0
Router(config-line)#loggingsynchronous
Router(config-line)#exec-timeout00
Router(config-line)#nologin
Router(config-line)#lineaux0
Router(config-line)#loggingsynchronous
Router(config-line)#exec-timeout00
Router(config-line)#nologin
Router(config-line)#privilegelevel15
Router(config-line)#linevty04
Router(config-line)#nologin
Router(config-line)#privilegelevel15
Router(config-line)#exit
Router(config)#hostsw1
sw1(config)#
Router#configureterminal
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
Router(config)#noipdomain-lookup
Router(config)#lineconsole0
Router(config-line)#loggingsynchronous
Router(config-line)#exec-timeout00
Router(config-line)#nologin
Router(config-line)#lineaux0
Router(config-line)#loggingsynchronous
Router(config-line)#exec-timeout00
Router(config-line)#nologin
Router(config-line)#privilegelevel15
Router(config-line)#linevty04
Router(config-line)#nologin
Router(config-line)#privilegelevel15
Router(config-line)#exit
Router(config)#
Router(config)#hostsw2
sw2(config)#
Router>enable
Router#configureterminal
Enterconfigurationcommands,oneperline.EndwithCNTL/Z.
Router(config)#noipdomain-lookup
Router(config)#lineconsole0
Router(config-line)#loggingsynchronous
Router(config-line)#exec-timeout00
Router(config-line)#nologin
Router(config-line)#lineaux0
Router(config-line)#loggingsynchronous
Router(config-line)#exec-timeout00
Router(config-line)#nologin
Router(config-line)#privilegelevel15
Router(config-line)#linevty04
Router(config-line)#nologin
Router(config-line)#privilegelevel15
Router(config-line)#exit
Router(config)#hostsw3
sw3(config)#
二层链路配置
sw3#vlandata
sw3(vlan)#vlan10
VLAN10added:
Name:
VLAN0010
sw3(vlan)#vlan11
VLAN11added:
Name:
VLAN0011
sw3(vlan)#exit
APPLYcompleted.sw1#vlandata
sw1(vlan)#vlan10
VLAN10added:
Name:
VLAN0010
sw1(vlan)#vlan11
VLAN11added:
Name:
VLAN0011
Exiting....
sw2#vlandata
sw2(vlan)#vlan10
VLAN10added:
Name:
VLAN0010
sw2(vlan)#vlan11
VLAN11added:
Name:
VLAN0011
sw2(vlan)#exit
APPLYcompleted.
Exiting....
sw2(config)#interfacevlan10
sw2(config-if)#ipaddress192.168.10.2255.255.255.0
sw2(config)#noshut
sw2(config)#interfacevlan11
sw2(config-if)#ipaddress192.168.11.2255.255.255.0
sw2(config-if)#noshut
sw2(config-if)#exit
sw2(config)#spanning-treevlan10priority0
sw2(config)#spanning-treevlan11priority4096
sw1(config)#interfacevlan10
sw1(config-if)#ipaddress192.168.10.1255.255.255.0
sw1(config-if)#noshut
sw1(config-if)#interfacevlan11
sw1(config-if)#ipaddress12.168.11.1255.255.255.0
sw1(config-if)#noshut
sw1(config-if)#exit
sw1(config)#spanning-treevlan10priority4096
sw1(config)#spanning-treevlan11priority0
sw3(config)#interfacef0/10
sw3(config-if)#swmoaccess
sw3(config-if)#swaccessvlan10
sw3(config-if)#noshut
sw3(config-if)#interf0/11
sw3(config-if)#swmoaccess
sw3(config-if)#swaccessvlan11
sw3(config-if)#noshut
sw3(config-if)#
sw3(config)#interfacerangef0/1-2
sw3(config-if-range)#swtrend
sw3(config-if-range)#swmotr
sw3(config-if-range)#swtr
*Mar100:
09:
14.235:
%DTP-5-TRUNKPORTON:
PortFa0/1-2hasbecomedot1qtrunk
sw3(config-if-range)#swtralvlanall
sw3(config-if-range)#noshut
sw3(config-if-range)#exit
sw3(config)#end
sw2(config)#interfacerangef0/1-3
sw2(config-if-range)#swtrend
sw2(config-if-range)#swmotr
sw2(config-if-range)#
*Mar100:
07:
05.383:
%DTP-5-TRUNKPORTON:
PortFa0/1-3hasbecomedot1qtrunk
sw2(config-if-range)#swtrend
sw2(config-if-range)#swtralvlanall
sw2(config-if-range)#noshut
sw2(config-if-range)#exit
sw2(config)#interfacerangef0/1-2
sw2(config-if-range)#channel-group2modeon
Creatingaport-channelinterfacePort-channel2
sw1(config)#interfacerangef0/1-3
sw1(config-if-range)#swmotr
sw1(config-if-range)#swtrend
sw1(config-if-range)#swtralvlall
sw1(config-if-range)#noshut
sw1(config-if-range)#exit
sw1(config)#interfacerangef0/1-2
sw1(config-if-range)#channel-group2modeon
Creatingaport-channelinterfacePort-channel2
调制:
sw1(config)#doshowipinb
InterfaceIP-AddressOK?
MethodStatusProtocol
FastEthernet0/0unassignedYESunsetupdown
FastEthernet0/1unassignedYESunsetupup
FastEthernet0/2unassignedYESunsetupup
FastEthernet0/3unassignedYESunsetupup
FastEthernet0/4unassignedYESunsetupdown
FastEthernet0/5unassignedYESunsetupdown
FastEthernet0/6unassignedYESunsetupdown
FastEthernet0/7unassignedYESunsetupdown
FastEthernet0/8unassignedYESunsetupdown
FastEthernet0/9unassignedYESunsetupdown
FastEthernet0/10unassignedYESunsetupdown
FastEthernet0/11unassignedYESunsetupdown
FastEthernet0/12unassignedYESunsetupdown
FastEthernet0/13unassignedYESunsetupdown
FastEthernet0/14unassignedYESunsetupdown
FastEthernet0/15unassignedYESunsetupdown
Port-channel2unassignedYESunsetupup
Vlan1unassignedYESunsetupup
Vlan10192.168.10.1YESmanualupup
Vlan1112.168.11.1YESmanualupup
sw1(config)#doshowvlan-sw
VLANNameStatusPorts
----------------------------------------------------------------------------
1defaultactiveFa0/0,Fa0/4,Fa0/5,Fa0/6
Fa0/7,Fa0/8,Fa0/9,Fa0/10
Fa0/11,Fa0/12,Fa0/13,Fa0/14
Fa0/15
10VLAN0010active
11VLAN0011active
1002fddi-defaultactive
1003token-ring-defaultactive
1004fddinet-defaultactive
1005trnet-defaultactive
VLANTypeSAIDMTUParentRingNoBridgeNoStpBrdgModeTrans1Trans2
--------------------------------------------------------------------
1enet1000011500-----10021003
10enet1000101500-----00
11enet1000111500-----00
1002fddi1010021500-----11003
1003tr101003150010050--srb11002
1004fdnet1010041500--1ibm-00
1005trnet1010051500--1ibm-00
sw1(config)#
VLAN11
Spanningtreeenabledprotocolieee
RootIDPriority0
Addresscc00.1218.0002
Cost12
Port321(Port-channel2)
HelloTime2secMaxAge20secForwardDelay15sec
BridgeIDPriority4096
Addresscc01.1218.0002
HelloTime2secMaxAge20secForwardDelay15sec
AgingTime0
InterfaceDesignated
NamePortIDPrioCostStsCostBridgeIDPortID
-----------------------------------------------------------------------
FastEthernet0/3128.412819FWD124096cc01.1218.0002128.4
Port-channel2129.6512812FWD00cc00.1218.0002129.65
五:
总结与原理分析
以太通道有两种配置方式,第一种是手动配置:
modeon;第二种是协议配置模式,而协议配置模式有两种:
①LACP(链路汇聚控制协议/公有协议),其链路状态有四种,on(强制不适用协议,开启)、off(防止端口开启)、active(使得端口使用LACP协议开启)、passive(使得端口进入被动协商状态,被叫才开启,默认使用);②PAGP(端口汇聚协议/思科私有):
on(同上)off(同上)desirable(同active) auto(同passive)。
六:
配置showrun
SW3:
!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnamesw3
!
boot-start-marker
boot-end-marker
!
!
noaaanew-model
!
resourcepolicy
!
memory-sizeiomem5
ipsubnet-zero
!
!
ipcef
noipdhcpusevrfconnected
!
!
noipdomainlookup
noftp-serverwrite-enable
!
!
!
!
interfaceFastEthernet0/0
!
interfaceFastEthernet0/1
switchportmodetrunk
!
interfaceFastEthernet0/2
switchportmodetrunk
!
interfaceFastEthernet0/3
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
switchportaccessvlan10
!
interfaceFastEthernet0/11
switchportaccessvlan11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceVlan1
noipaddress
!
iphttpserver
ipclassless
!
!
!
!
!
control-plane
!
!
linecon0
exec-timeout00
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
privilegelevel15
nologin
!
End
SW2:
!
version12.3
servicetimestampsdebugdatetimemsec
servicetimestampslogdatetimemsec
noservicepassword-encryption
!
hostnamesw2
!
boot-start-marker
boot-end-marker
!
!
noaaanew-model
!
resourcepolicy
!
memory-sizeiomem5
ipsubnet-zero
!
!
ipcef
noipdhcpusevrfconnected
!
!
noipdomainlookup
noftp-serverwrite-enable
!
!
spanning-treevlan10priority0
spanning-treevlan11priority4096
!
!
!
interfacePort-channel2
switchportmodetrunk
!
interfaceFastEthernet0/0
!
interfaceFastEthernet0/1
switchportmodetrunk
channel-group2modeon
!
interfaceFastEthernet0/2
switchportmodetrunk
channel-group2modeon
!
interfaceFastEthernet0/3
switchportmodetrunk
!
interfaceFastEthernet0/4
!
interfaceFastEthernet0/5
!
interfaceFastEthernet0/6
!
interfaceFastEthernet0/7
!
interfaceFastEthernet0/8
!
interfaceFastEthernet0/9
!
interfaceFastEthernet0/10
!
interfaceFastEthernet0/11
!
interfaceFastEthernet0/12
!
interfaceFastEthernet0/13
!
interfaceFastEthernet0/14
!
interfaceFastEthernet0/15
!
interfaceVlan1
noipaddress
!
interfaceVlan10
ipaddress192.168.10.2255.255.255.0
!
interfaceVlan11
ipaddress192.168.11.2255.255.255.0
!
iphttpserver
ipclassless
!
!
!
!
!
control-plane
!
!
linecon0
exec-timeout00
loggingsynchronous
lineaux0
exec-timeout00
privilegelevel15
loggingsynchronous
linevty04
privilege