Cisco リンクアグリゲーション(LAG)まとめ

スイッチ

リンクアグリゲーションについて

モード

  • 静的リンクアグリゲーション
    • 静的構成
  • 動的リンクアグリゲーション
    • LACP(IEEE 802.3ad)
    • PAgP
      • Cisco 独自のプロトコル

負荷分散方式

  • 送信元に基づく負荷分散
    • IP アドレス
    • MAC アドレス(デフォルト)
  • 宛先に基づく負荷分散
    • IP アドレス
    • MAC アドレス
  • 送信元と宛先に基づく負荷分散
    • IP アドレス
    • MAC アドレス

リンクアグリゲーションの設定

モードの設定

モードの設定はリンクアグリゲーションに含めたいインターフェースに対して設定します。

  • channel-group <number> mode <mode>
    • <number>:チャネルグループ番号
    • <mode>:モード
      • on:静的構成
      • active:LACP のモード
        • インターフェイスは LACP パケットを送信することによって、相手インターフェイスとのネゴシエーションを開始
      • passive:LACP のモード
        • インターフェイスは受信する LACP パケットに応答するが、LACP パケットネゴシエーションを開始することはない
      • desirable:PAgP のモード
        • インターフェイスは PAgP パケットを送信することによって、相手インターフェイスとのネゴシエーションを開始
      • auto:PAgP のモード
        • インターフェイスは受信する PAgP パケットに応答するが、PAgP パケット ネゴシエーションを開始することはない

例:C2960-8TC-L の CLI

SW(config-if)#channel-group ?
  <1-6>  Channel group number

SW(config-if)#channel-group 1 mode ?
  active     Enable LACP unconditionally
  auto       Enable PAgP only if a PAgP device is detected
  desirable  Enable PAgP unconditionally
  on         Enable Etherchannel only
  passive    Enable LACP only if a LACP device is detected

リンクアグリゲーションを構成可能なモードの組み合わせ

No.SW#1モードSW#2モードLAG構成可否
1ononOK
2activeactiveOK
3activepassiveOK
4desirabledesirableOK
5desirableautoOK

負荷分散方式の設定

負荷分散方式はグローバルで設定します。

  • port-channel load-balance <method>
    • <method>:負荷分散方式
      • src-ip:送信元 IP アドレス
      • src-mac:送信元 MAC アドレス(デフォルト)
      • dst-ip:宛先 IP アドレス
      • dst-mac:宛先 MAC アドレス
      • src-dst-ip:送信元と宛先 IP アドレス
      • src-dst-mac:送信元と宛先 MAC アドレス

例:C2960-8TC-L の CLI

SW(config)#port-channel load-balance ?
  dst-ip       Dst IP Addr
  dst-mac      Dst Mac Addr
  src-dst-ip   Src XOR Dst IP Addr
  src-dst-mac  Src XOR Dst Mac Addr
  src-ip       Src IP Addr
  src-mac      Src Mac Addr

ポートチャネルの MAC アドレス

以下のインターフェースでリンクアグリゲーションを構成したとします。

  • SW#1 po1
    • fa0/5:0022.0cbe.7a85
    • fa0/6:0022.0cbe.7a86
  • SW#2 po1
    • fa0/5:0022.0cbe.7985
    • fa0/6:0022.0cbe.7986

ポートチャネル po1 の MAC アドレスは以下の様に表示されます。

1.初期構成時

  • SW#1 po1:0022.0cbe.7a85(fa0/5 の MAC アドレス)
  • SW#2 po1:0022.0cbe.7985(fa0/5 の MAC アドレス)
SW1#show interfaces po1
Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0022.0cbe.7a85 (bia 0022.0cbe.7a85)
...
SW2#show interfaces po1
Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0022.0cbe.7985 (bia 0022.0cbe.7985)
...

2.fa0/5 間リンク障害時

  • SW#1 po1:0022.0cbe.7a86(fa0/6 の MAC アドレス)
  • SW#2 po1:0022.0cbe.7986(fa0/6 の MAC アドレス)
SW1#show interfaces po1
Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0022.0cbe.7a86 (bia 0022.0cbe.7a86)
...
SW2#show interfaces po1
Port-channel1 is up, line protocol is up (connected)
  Hardware is EtherChannel, address is 0022.0cbe.7986 (bia 0022.0cbe.7986)
...

3.fa0/5 間リンク復旧時

  1. SW#1 po1:0022.0cbe.7a86(fa0/6 の MAC アドレス)
  2. SW#2 po1:0022.0cbe.7986(fa0/6 の MAC アドレス)

4.fa0/6 間リンク障害時

  1. SW#1 po1:0022.0cbe.7a85(fa0/5 の MAC アドレス)
  2. SW#2 po1:0022.0cbe.7985(fa0/5 の MAC アドレス)

5.fa0/6 間リンク復旧時

  1. SW#1 po1:0022.0cbe.7a85(fa0/5 の MAC アドレス)
  2. SW#2 po1:0022.0cbe.7985(fa0/5 の MAC アドレス)

以上の結果からポートチャネルの MAC アドレスについて以下のことがいえます。

  • ポートチャネル構成時は所属ポートのうち最初にチャネルグループの設定をしたポートの MAC アドレスがポートチャネルの MAC アドレスになる
    • interface range コマンドで複数ポート同時に設定した場合は若番ポートの MAC アドレスになる
  • ポートチャネルの MAC アドレスを持つ物理ポートがダウンすると、ポートチャネルの MAC アドレスは、ポートチャネルに所属する別の物理ポートの MAC アドレスに変化する
  • ダウンしていた物理ポートが復旧してもポートチャネルの MAC アドレスが自動で切り戻ることは無い

リンクアグリゲーション状態確認コマンド

SW#show etherchannel ?
  <1-6>         Channel group number
  detail        Detail information
  load-balance  Load-balance/frame-distribution scheme among ports in port-channel
  port          Port information
  port-channel  Port-channel information
  protocol      protocol enabled
  summary       One-line summary per channel-group
  |             Output modifiers
  <cr>

  • show etherchannel summary:静的構成をしている場合
SW#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(SU)          -        Fa0/5(P)    Fa0/6(P)

  • show etherchannel summary:LACP モードの場合
SW#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(SU)         LACP      Fa0/5(P)    Fa0/6(P)

  • show etherchannel summary:PAgP モードの場合
SW#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(SU)         PAgP      Fa0/5(P)    Fa0/6(P)

参考資料

EtherChannel の設定

―――――――――――――

タイトルとURLをコピーしました