實驗名稱:端口聚合配置
實驗目的:理解端口聚合的工作原理,掌握如何在交換機上配置端口聚合。
實驗步驟:
第一步:配置兩臺交換機的主機名和管理 IP 地址
S3750#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
S3750(config)#hostname L3-SW
L3-SW(config)#interface vlan 1
L3-SW(config-if)#Dec 3 01:03:22 L3-SW %7:%LINE PROTOCOL CHANGE:
Interface VLAN 1, changed state to UP
L3-SW(config-if)#ip address 192.168.1.1 255.255.255.0
L3-SW(config-if)#no shutdown
L3-SW(config-if)#exit
Switch#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname L2-SW
L2-SW(config)#interface vlan 1
L2-SW(config-if)#ip address 192.168.1.2 255.255.255.0
L2-SW(config-if)#no shutdown
L2-SW(config-if)#exit
第二步:在兩臺交換機上配置聚合端口
L3-SW(config)#interface range fastEthernet 0/1-2
L3-SW(config-if-range)#port-group 1
!將端口 Fa0/1~2 加入聚合端口 1,同時創建該聚合端口
L3-SW(config-if-range)#Dec 3 01:03:57 L3-SW %7:%LINE PROTOCOL CHANGE:
Interface AggregatePort 1, changed state to UP
Dec 3 01:03:58 L3-SW %7:%LINK CHANGED: Interface FastEthernet 0/1, changed
state to administratively down
Dec 3 01:03:58 L3-SW %7:%LINE PROTOCOL CHANGE: Interface FastEthernet
0/1, changed state to DOWN
Dec 3 01:03:58 L3-SW %7:%LINK CHANGED: Interface FastEthernet 0/2, changed
state to administratively down
L3-SW(config-if-range)#exit
L3-SW(config)#
L2-SW(config)#interface range fastEthernet 0/1-2
L2-SW(config-if-range)#port-group 1
!將端口 Fa0/1~2 加入聚合端口 1,同時創建該聚合端口
L2-SW(config-if-range)#exit
L2-SW(config)#
第三步:將聚合端口設置爲 Trunk
L3-SW(config)#interface aggregateport 1
L3-SW(config-if)#switchport mode trunk
L3-SW(config-if)#exit
L3-SW(config)#
L2-SW(config)#interface aggregatePort 1
L2-SW(config-if)#switchport mode trunk
L2-SW(config-if)#exit
L2-SW(config)#
第四步:設置聚合端口的負載平衡方式
L3-SW(config)#aggregateport load-balance ?
!查看交換機支持的負載平衡方式
dst-ip Destination IP address
dst-mac Destination MAC address
ip Source and destination IP address
src-dst-mac Source and destination MAC address
src-ip Source IP address
src-mac Source MAC address
L3-SW(config)#aggregateport load-balance dst-mac
!設置負載平衡方式爲依據目的地址進行,默認是依據源和目的地址
L3-SW(config)#exit
L2-SW(config)#aggregatePort load-balance ?
!查看交換機支持的負載平衡方式
dst-mac Destination MAC address
ip Source and destination IP address
src-mac Source MAC address
L2-SW(config)#aggregatePort load-balance dst-mac
!設置負載平衡方式爲依據目的地址進行,默認是依據源地址
L2-SW(config)#exit
第五步:查看聚合端口的配置
L3-SW#show aggregatePort load-balance
Load-balance : Destination MAC
L3-SW#
L3-SW#show aggregatePort summary