今度、MLAGを設定する必要があり、そもそもLAG設定を忘れていたので、復習として、Cisco Packet TracerでEtherChannelの設定をしてみました。設定手順をメモとして残したいと思います。
構成
コマンド
■Switch8
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname SW08
SW08(config)#int range fa0/1-2
SW08(config-if-range)#switchport mode access
SW08(config-if-range)#exit
SW08(config)#vlan 2
SW08(config-vlan)#exit
SW08(config-if)#int fa0/2
SW08(config-if)#switchport access vlan 2
SW08(config-if)#exit
SW08(config)#int range fa0/23-24
SW08(config-if-range)#switchport mode trunk
SW08(config-if-range)#channel-group 1 mode on
SW08(config-if-range)#
SW08(config-if-range)#do show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+----------------------------------------------
1 Po1(SU) - Fa0/23(P) Fa0/24(P)
■Switch9
Switch>en
Switch#conf t
Switch(config)#hostname SW09
SW09(config)#vlan 2
SW09(config-vlan)#exit
SW09(config)#int range fa0/1-2
SW09(config-if-range)#switchport mode access
SW09(config-if)#int fa0/2
SW09(config-if)#switchport access vlan 2
SW09(config-if)#exit
SW09(config)#int range fa0/23-24
SW09(config-if-range)#switchport mode trunk
SW09(config-if-range)#channel-group 1 mode on
protocol on Interface FastEthernet0/24, changed state to up
SW09(config-if-range)#
SW09#show etherchannel summary
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
U - in use f - failed to allocate aggregator
u - unsuitable for bundling
w - waiting to be aggregated
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+----------------------------------------------
1 Po1(SU) - Fa0/23(P) Fa0/24(P)
■負荷分散方法の設定と確認
SW08(config)#port-channel load-balance src-mac
SW08(config)#exit
SW08#show etherchannel load-balance
EtherChannel Load-Balancing Operational State (src-mac):
Non-IP: Source MAC address
#負荷分散方法
※ちなみに、EtherChannelを設定しない場合は、以下のようにSTPで片方のポートがブロックされる。
SW09#show spanning-tree
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0002.1696.3EC7
Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0003.E455.7E17
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/1 Desg FWD 19 128.1 P2p
Fa0/24 Altn BLK 19 128.24 P2p
Fa0/23 Root FWD 19 128.23 P2p
VLAN0002
Spanning tree enabled protocol ieee
Root ID Priority 32770
Address 0002.1696.3EC7
Cost 19
Port 23(FastEthernet0/23)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32770 (priority 32768 sys-id-ext 2)
Address 0003.E455.7E17
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 20
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Fa0/2 Desg FWD 19 128.2 P2p
Fa0/24 Altn BLK 19 128.24 P2p
Fa0/23 Root FWD 19 128.23 P2p