複数の物理ポートを一つの論理ポートに束ねる技術、Etherchannelの検証をしてみる。
CCNPの範囲に絞って構築しよう。
EtherChannel
複数の物理ポートを一つの論理ポートに束ねることをEtherChannel という。
単純な構成で構築してみよう。
Switch1、Switch2を用意する。結線はしていない。
まず、Switch1のインターフェイスコンフィギュレーションモードに入りコンフィグ投入する。
Switch1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch1(config)#interface range ethernet 0/0 – 1
Switch1(config-if-range)#switchport trunk encapsulation dot1q
Switch1(config-if-range)#shutdown
EtherChannel対象のポートをシャットダウンした理由は、Switch1とSwitch2に対して順番に設定をするためうまくEtherChannelが形成できないことを避けるためである。
ローカルスイッチにEtherChannelを設定したものの、一方のデバイスでEtherChannelが設定されていない場合、スイッチのインターフェイスをerr-disableにする。これをEtherChannelガード といい、今回はそれを避けるためあらかじめポートをshutdownした。
続いて、今回はIEEE802.3adで標準化されたLACPプロトコルを使用してEtherChannelを自動形成する設定にする。
Switch1を積極的なネゴシエーション、Switch2を消極的なネゴシエーションとしたとき、Switch1のコンフィグは次のようになる。
Switch1(config-if-range)#channel-protocol lacp
Switch1(config-if-range)#channel-group 1 mode active
Creating a port-channel interface Port-channel 1
続いて、同様にSwitch2にコンフィグを投入する。
Switch2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch2(config)#interface range ethernet 0/0-1
Switch2(config-if-range)#switchport trunk encapsulation dot1q
Switch2(config-if-range)#shutdown
Switch2(config-if-range)#channel-protocol lacp
Switch2(config-if-range)#channel-group 1 mode passive
Creating a port-channel interface Port-channel 1
以上で設定が完了したので結線の前に設定を確認しておこう。
Switch1#show etherchannel summary
Flags: D – down P – bundled 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
M – not in use, minimum links not met
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(SD) LACP Et0/0(D) Et0/1(D)
Switch2#show etherchannel summary
Flags: D – down P – bundled 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
M – not in use, minimum links not met
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(SD) LACP Et0/0(D) Et0/1(D)
Switch1、Switch2それぞれでグループ番号1、プロトコルはLACPのポートチャネル1が形成されていることが確認できる。
それでは設定を元に、結線をしてみる。
そして、それぞれのポートをリンクアップさせると、
Switch1(config-if-range)#no shutdown
Switch1(config-if-range)#
*Sep 8 12:40:10.627: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
Switch2(config-if-range)#no shutdown
Switch2(config-if-range)#
*Sep 8 12:40:10.630: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up
両方のスイッチでEtherChannelを認識し、自動形成された。
関連記事
コメントを書く