構成
トポロジ図
|------------------|
[SW1]| |[SW2]
|------------------|
|------------------|
[SW]| |[RT]
|------------------|
パラメータ
- Vlan
- VlanMode : Trunk
- Vlan : 10, 20
- Channel
- Pattern1
- Type : L2
- Protocol : LACP
- SW1 : active
- SW2 : active
- Pattern2
- Type : L2
- Protocol : Static
- SW1 : on
- SW2 : on
- Pattern3
- Type : L3
- Protocol : Static
- SW1 : on
- SW2 : on
- Pattern4
- Type : L2, L3
- Protocol : Static
- SW : on
- RT : on
- Pattern1
- IP
- SW1 <--> SW2
- Vlan10
- Segment : 10.0.0.0/24
- SW1 : 10.0.0.1/24
- SW2 : 10.0.0.2/24
- Vlan20
- Segment : 20.0.0.0/24
- SW1 : 20.0.0.1/24
- SW2 : 20.0.0.2/24
- Vlan10
- SW <--> RT
- Vlan10
- Segment : 10.0.0.0/24
- SW : 10.0.0.1/24
- RT : 10.0.0.2/24
- Vlan20
- Segment : 20.0.0.0/24
- SW : 20.0.0.1/24
- RT : 20.0.0.2/24
- Vlan10
- SW1 <--> SW2
EtherChannelとは
概要
EtherChannelとは一般的にはLink-Aggregation(LAG)やPort-Channelと呼ばれている。
機器の接続を冗長化する為に、複数のI/F接続をまとめて論理的に一つのI/Fとして扱う技術。
STP/RSTPの様にいずれかのI/Fを無効化せずに、負荷分散しつつ使用することが可能。
メリット/デメリット
- メリット
- 冗長化 : 複数のI/Fを一つにまとめることにより、何れかが故障しても通信を継続できる
- 負荷分散 : 通信を分散することで、通常のI/F以上の帯域を使用できる
- デメリット
- トラブル対応 : 通信経路が一定でなくなり、障害の特定が困難になる
条件
- プロトコルを合わせる必要がある
- リンク速度を合わせる必要がある
- Duplexモードを合わせる必要がある
- Vlanモード(Access|Trunk)を合わせる必要がある
- ネイティブVlanを一致させる必要がある (Trunkの場合)
- I/Fモード(Swicth|Routed)を一致させる必要がある
種類
Etherchannelには大きく分けて以下の2種類が存在する。
L2-Etherchannel、Switchポート同士でchannelを組むことができる。
L3-Etherchannel、Routedポート同士でchannelを組むことができ、SW同士だけでなくRouterともchannelを組むことができる。
負荷分散の基準となる方式
src-ip : 送信元IPアドレスを基準とする dst-ip : 宛先IPアドレスを基準とする src-dst-ip : 送信元/宛先IPアドレスを基準とする src-mac : 送信元MACアドレスを基準とする dst-mac : 宛先MACアドレスを基準とする src-dst-mac : 送信元/宛先MACアドレスを基準とする src-port : 送信元ポート番号を基準とする dst-port : 宛先ポート番号を基準とする src-dst-port : 送信元/宛先ポート番号を基準とする
プロトコル
Static (ON)
概要
対向機器とネゴシエーションをせずに強制的にEtherChannel組む。
RouterとのChannelや機器メーカーが異なる場合は強制で組むStaticが推奨となる。
ネゴシエーション
ネゴシエーション不要で強制LAGを組む
LACP (Link Aggregation Control Protocol)
概要
IEEE802.3ad規格で標準化されている一般的なEtherChannelのネゴシエーションプロトコル。
Cisco機器以外でも使用できるので通常はこちらが使用される。
最大16ポートで組むことができるが、通常使用は8ポートで残りはスタンバイとなる。
ネゴシエーション
- passive : 対向からのネゴシエーション通信を 待機
- active : 自身からネゴシエーション通信を 送信
ネゴシエーション対応表
passive active passive NG OK active OK OK
PAgP (Port Aggregation Protocol)
概要
Cisco独自のEtherChannelのネゴシエーションプロトコル。 Cisco機器でしか使用できないため、あまり一般的には使用されない。
ネゴシエーション
- auto : 対向からのネゴシエーション通信を 待機
- desirable : 自身からネゴシエーション通信を 送信
ネゴシエーション対応表
auto desirable auto NG OK desirable OK OK
Command
port-channel load-balance [MODE] : 負荷分散方式の指定 interface GigabitEthernet [NO] : ChannelメンバにするI/F channel-group [NO] mode [MODE] : Channel番号とプロトコル&モードを指定
Show Command
show etherchannel summary show etherchannel load-balance show lacp neighbor show lacp internal show interfaces port-channel [NO] etherchannel show platform software fed switch [NO] etherchannel [NO] load-balance
Pattern1 L2 EtherChannel LACP
Configuration
SW1
vlan 10 vlan 20 interface GigabitEthernet0/0 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode active interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode active interface Port-channel1 switchport trunk encapsulation dot1q switchport mode trunk interface Vlan10 ip address 10.0.0.1 255.255.255.0 no shutdown interface Vlan20 ip address 20.0.0.1 255.255.255.0 no shutdown
SW2
vlan 10 vlan 20 interface GigabitEthernet0/0 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode active interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode active interface Port-channel1 switchport trunk encapsulation dot1q switchport mode trunk interface Vlan10 ip address 10.0.0.2 255.255.255.0 no shutdown interface Vlan20 ip address 20.0.0.2 255.255.255.0 no shutdown
Status Check
show etherchannel summary
# show etherchannel summary Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) LACP Gi0/0(P) Gi0/1(P)
show etherchannel load-balance
# show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
show lacp neighbor
SW1# show lacp neighbor
Channel group 1 neighbors
Partner's information:
LACP port Admin Oper Port Port
Port Flags Priority Dev ID Age key Key Number State
Gi0/0 SA 32768 5000.0009.0000 27s 0x0 0x1 0x1 0x3D
Gi0/1 SA 32768 5000.0009.0000 1s 0x0 0x1 0x2 0x3D
show lacp internal
# show lacp internal
Channel group 1
LACP port Admin Oper Port Port
Port Flags State Priority Key Key Number State
Gi0/0 SA bndl 32768 0x1 0x1 0x1 0x3D
Gi0/1 SA bndl 32768 0x1 0x1 0x2 0x3D
show interfaces port-channel [NO] etherchannel
# show interfaces port-channel 1 etherchannel Port-channel1 (Primary aggregator) Age of the Port-channel = 0d:00h:03m:40s Logical slot/port = 16/0 Number of ports = 2 HotStandBy port = null Port state = Port-channel Ag-Inuse Protocol = LACP Port security = Disabled Ports in the Port-channel: Index Load Port EC state No of bits ------+------+------+------------------+----------- 0 00 Gi0/0 Active 0 0 00 Gi0/1 Active 0 Time since last port bundled: 0d:00h:00m:28s Gi0/1
Pattern2 L2 EtherChannel Static
Configuration
SW1
vlan 10 vlan 20 interface GigabitEthernet0/0 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode on interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode on interface Port-channel1 switchport trunk encapsulation dot1q switchport mode trunk interface Vlan10 ip address 10.0.0.1 255.255.255.0 no shutdown interface Vlan20 ip address 20.0.0.1 255.255.255.0 no shutdown
SW2
vlan 10 vlan 20 interface GigabitEthernet0/0 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode on interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode on interface Port-channel1 switchport trunk encapsulation dot1q switchport mode trunk interface Vlan10 ip address 10.0.0.2 255.255.255.0 no shutdown interface Vlan20 ip address 20.0.0.2 255.255.255.0 no shutdown
Status Check
show etherchannel summary
# show etherchannel summary Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) - Gi0/0(P) Gi0/1(P)
show etherchannel load-balance
# show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
show interfaces port-channel [NO] etherchannel
# show interfaces port-channel 1 etherchannel Age of the Port-channel = 0d:00h:04m:51s Logical slot/port = 16/0 Number of ports = 2 GC = 0x00000000 HotStandBy port = null Port state = Port-channel Ag-Inuse Protocol = - Port security = Disabled Ports in the Port-channel: Index Load Port EC state No of bits ------+------+------+------------------+----------- 0 00 Gi0/0 On 0 0 00 Gi0/1 On 0 Time since last port bundled: 0d:00h:04m:21s Gi0/1
Pattern3 L3 EtherChannel Static
Configuration
SW1
interface GigabitEthernet0/0 no switchport channel-group 1 mode on interface GigabitEthernet0/1 no switchport channel-group 1 mode on interface Port-channel1 no switchport no ip address interface Port-channel1.10 encapsulation dot1Q 10 ip address 10.0.0.1 255.255.255.0 interface Port-channel1.20 encapsulation dot1Q 20 ip address 20.0.0.1 255.255.255.0
SW2
interface GigabitEthernet0/0 no switchport# channel-group 1 mode on interface GigabitEthernet0/1 no switchport channel-group 1 mode on interface Port-channel1 no switchport no ip address interface Port-channel1.10 encapsulation dot1Q 10 ip address 10.0.0.2 255.255.255.0 interface Port-channel1.20 encapsulation dot1Q 20 ip address 20.0.0.2 255.255.255.0
Status Check
show etherchannel summary
# show etherchannel summary Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(RU) - Gi0/0(P) Gi0/1(P)
show etherchannel load-balance
# show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
show interfaces port-channel [NO] etherchannel
# show interfaces port-channel 1 etherchannel Age of the Port-channel = 0d:08h:53m:20s Logical slot/port = 16/0 Number of ports = 2 GC = 0x00000000 HotStandBy port = null Passive port list = Gi0/0 Gi0/1 Port state = Port-channel L3-Ag Ag-Inuse Protocol = - Port security = Disabled Ports in the Port-channel: Index Load Port EC state No of bits ------+------+------+------------------+----------- 0 00 Gi0/0 On 0 0 00 Gi0/1 On 0 Time since last port bundled: 0d:08h:52m:44s Gi0/1
Pattern4 L3 EtherChannel Static btwn SW and RT
Configuration
SW
vlan 10 vlan 20 interface GigabitEthernet0/0 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode on interface GigabitEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk channel-group 1 mode on interface Port-channel1 switchport trunk encapsulation dot1q switchport mode trunk interface Vlan10 ip address 10.0.0.1 255.255.255.0 no shutdown interface Vlan20 ip address 20.0.0.1 255.255.255.0 no shutdown
RT
interface GigabitEthernet0/0 no shutdown no ip address channel-group 1 interface GigabitEthernet0/1 no shutdown no ip address channel-group 1 interface Port-channel1 no ip address interface Port-channel1.10 encapsulation dot1Q 10 ip address 10.0.0.2 255.255.255.0 interface Port-channel1.20 encapsulation dot1Q 20 ip address 20.0.0.2 255.255.255.0
Status Check
show etherchannel summary
#show etherchannel summary Number of channel-groups in use: 1 Number of aggregators: 1 Group Port-channel Protocol Ports ------+-------------+-----------+----------------------------------------------- 1 Po1(SU) - Gi0/0(P) Gi0/1(P)
show etherchannel load-balance
# show etherchannel load-balance
EtherChannel Load-Balancing Configuration:
src-dst-ip
EtherChannel Load-Balancing Addresses Used Per-Protocol:
Non-IP: Source XOR Destination MAC address
IPv4: Source XOR Destination IP address
IPv6: Source XOR Destination IP address
show interfaces port-channel [NO] etherchannel
# show interfaces port-channel 1 etherchannel Age of the Port-channel = 0d:00h:08m:39s Logical slot/port = 16/0 Number of ports = 2 GC = 0x00000000 HotStandBy port = null Port state = Port-channel Ag-Inuse Protocol = - Port security = Disabled Ports in the Port-channel: Index Load Port EC state No of bits ------+------+------+------------------+----------- 0 00 Gi0/0 On 0 0 00 Gi0/1 On 0 Time since last port bundled: 0d:00h:08m:36s Gi0/1