はじめに
Link Aggregation Control Protocol (LACP)とは複数の物理的なポートを束ねてひとつの論理的チャネル(Port-channel)として扱うためのプロトコルのことです。IEEE 802.3ad に規定されています。
LACP による port-channel を形成する利点
複数の物理的なポートを束ねて、Port-channel として扱うことのメリットは
- 利用可能な帯域を増やすことができる
- port-channel を構成するポートがダウンしても、他のポートで転送を継続することができる
- spanning-tree を構成する場合、port-channel は 1 本のリンクとしてみなすため、そのリンクについてはループを気にする必要がない
などが挙げられます。
LACP のモード
LACPは、対向機器同士でLink Aggregation Control Protocol Data Unit (LACPDU) を交換することで、
ひとつのport-channel を形成します。そのため、機器単体の設定では動作せず、接続する
LACP には Active モード と Passive モードがあります。
Active モードはその機器から LACPDU のやり取りを開始します。
Passive モードは対向機器から LACPDU を受信した場合、そのやり取りを開始します。
設定例
switchport (Layer 2 のポート) としても、routed port(Layer 3 のポート)としても設定することができます。
設定例: switchport で trunk として port-channel を設定する場合
! グローバルコンフィグレーションモードで、機器で LACP を有効にします。
feature lacp
! port-channel を設定する予定の物理ポートのインターフェイスコンフィグレーションモードに入ります。
interface eth 1/1-2
! switchport と trunk を設定します。
switchport
switchport mode trunk
! port-channel として LACP を利用することを設定します。
channel-group 1 mode active
! 自動的に interface port-channel 1 が作成されます。
設定例: Routed port (Layer 3 のポート)として port-channel を設定する場合
! グローバルコンフィグレーションモードで、機器で LACP を有効にします。
feature lacp
! port-channel を設定する予定の物理ポートのインターフェイスコンフィグレーションモードに入ります。
interface eth 1/1-2
! switchport を無効化して、Layer 3 のポートとして動作するように設定します。
no switchport
! port-channel として LACP を利用することを設定します。
channel-group 1 mode active
! 自動的に interface port-channel 1 が作成されます。
port-channel を先に定義して、その後に物理ポートを紐づけすることも可能ですが、port-channel が switchport、物理ポートが routed port として動作していた場合、エラーが表示され設定できない場合があります。
switch(config)# int po 1
switch(config-if)# switchport
switch(config-if)# switchport mode trunk
switch(config-if)# int e 1/1
switch(config-if)# channel-group 1 mode active
command failed: port not compatible [Ethernet Layer]
** You can use force option to override the port's parameters
** (e.g. "channel-group X force")
** Use "show port-channel compatibility-parameters" to get more information on failure
エラーを解消するには、
- 物理ポートの属性を、channel-group を設定する前に、port-channel の属性と合わせるように設定しておく
- 物理ポート設定時に force オプションを利用する
2.の例を示します。
switch(config)# interface eth 1/1
switch(config-if)# channel-group 1 ?
<CR>
force Forcefully add a port
mode Specify channeling mode
switchconfig-if)# channel-group 50 force ?
<CR>
mode Specify channeling mode
switch(config-if)# channel-group 50 force mode active
正常性の確認
正常に LACP による port-channel が形成されたかどうかは、show port-channel summary で確認することができます。
表示された各ポートの後ろにある()内の表示が P となっていれば、正常に port-channel が形成されています。
# show port-channel summary
Flags: D - Down P - Up in port-channel (members)
I - Individual H - Hot-standby (LACP only)
s - Suspended r - Module-removed
S - Switched R - Routed
U - Up (port-channel)
p - Up in delay-lacp mode (member)
M - Not in use. Min-links not met
--------------------------------------------------------------------------------
Group Port- Type Protocol Member Ports
Channel
--------------------------------------------------------------------------------
1 Po1(SU) Eth LACP Eth1/1(P) Eth1/2(P)
関連コンテンツ
Nexus シリーズ : Nexus シリーズ : LACP Data Unit
Nexus シリーズ : Nexus シリーズ : LACP max-bundle と min-links
Nexus シリーズ : LACP suspend-individual
Nexus スイッチ (NX-OS) : 設定例
参考情報
Nexus 9000 の場合
Cisco Nexus 9000 Series NX-OS Interfaces Configuration Guide, Release 9.3(x)