ネットワーク構成

 図 イーサチャネルの設定例 ネットワーク構成
図 イーサチャネルの設定例 ネットワーク構成

Cat3750-1では、2つのリンクをまとめたPort-Channel1インタフェースをルーテッドポートとしてL3 EtherChannelの設定を行います。Port-Channel1インタフェースに直接IPアドレス10.1.1.1/24を設定します。

一方、Cat3750-2では、2つのリンクをまとめたPort-Channel1インタフェースをスイッチポートとしてL2 EtherChannelの設定を行います。Port-Channel1インタフェースはVLAN1のアクセスポートです。VLAN1のSVIを作成し、10.1.1.2/24のIPアドレスを設定します。

この設定例のネットワーク構成は、L2イーサチャネルとL3イーサチャネルを1つのシンプルなネットワーク構成で設定するための単なる例です。L3イーサチャネルとL2イーサチャネルの接続をすると何かメリットがあるわけではありません。

設定

Cat3750-1の設定(L3イーサチャネル)

Cat3750-1はL3 EtherChannelなので、物理ポートにno switchportコマンドを設定してルーテッドポートとしてからEtherChannelのchannel-groupコマンドを利用して、Port-Channel1インタフェースにバンドルします。すると、Port-Channel1インタフェースはルーテッドポートとして内部ルータに直結されます。そして、Port-Channel1インタフェースに直接IPアドレスの設定を行います。

Cat3750-1

interface Port-channel1
 no switchport
 ip address 10.1.1.1 255.255.255.0
!
interface FastEthernet1/0/21
 no switchport
 no ip address
 channel-group 1 mode active
!
interface FastEthernet1/0/22
 no switchport
 no ip address
 channel-group 1 mode active

Cat3750-2の設定(L2イーサチャネル)

Cat3750-2では、通常のEtherChannelの設定です。物理ポートをVLAN1のアクセスポート(デフォルト)として、channel-groupコマンドでPort-Channel1インタフェースにバンドルします。Port-Channel1はVLAN1のアクセスポートとして、VLAN1に接続されます。そして、VLAN1と内部ルータを接続するためのSVIを作成し、IPアドレスを設定します。

Cat3750-2

 interface Port-channel1
 switchport mode access
!
interface FastEthernet1/0/21
 switchport mode access
 channel-group 1 mode active
!
interface FastEthernet1/0/22
 switchport mode access
 channel-group 1 mode active
!
interface Vlan1
 ip address 10.1.1.2 255.255.255.0

以下の図は、ここまでのCat3750-1とCat3750-2の設定の様子を表しています。

図 Cat3750-1とCat3750-2の内部構成
図 Cat3750-1とCat3750-2の内部構成

検証

show etherchannel summaryおよびshow etherchannel detailコマンドでEtherChannelが正常に形成されていることを確認します。また、Pingによって正常に通信できることを確認します。

Cat3750-1

Cat3750-1#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(RU)         LACP      Fa1/0/21(P) Fa1/0/22(P)
Cat3750-1#show etherchannel detail
Channel-group listing:
----------------------
Group: 1
----------
Group state = L3
Ports: 2   Maxports = 16
Port-channels: 1 Max Port-channels = 16
Protocol:   LACP
Ports in the group:
-------------------
Port: Fa1/0/21
------------
Port state    = Up Mstr In-Bndl
Channel group = 1           Mode = Active          Gcchange = -
Port-channel  = Po1         GC   =   -             Pseudo port-channel = Po1
Port index    = 0           Load = 0x00            Protocol =   LACP
Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
A - Device is in active mode.        P - Device is in passive mode.
Local information:
LACP port     Admin     Oper    Port     Port
Port      Flags   State     Priority      Key       Key     Number   State
Fa1/0/21  SA      bndl      32768         0x1       0x1     0x40F    0x3D
Partner's information:
LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa1/0/21  SA      32768     0013.6060.6480   7s    0x1     0x17     0x3D
Age of the port in the current state: 00d:00h:03m:39s
Port: Fa1/0/22
------------
Port state    = Up Mstr In-Bndl
Channel group = 1           Mode = Active          Gcchange = -
Port-channel  = Po1         GC   =   -             Pseudo port-channel = Po1
Port index    = 0           Load = 0x00            Protocol =   LACP
Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
A - Device is in active mode.        P - Device is in passive mode.
Local information:
LACP port     Admin     Oper    Port     Port
Port      Flags   State     Priority      Key       Key     Number   State
Fa1/0/22  SA      bndl      32768         0x1       0x1     0x410    0x3D
Partner's information:
LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa1/0/22  SA      32768     0013.6060.6480  28s    0x1     0x18     0x3D
Age of the port in the current state: 00d:00h:03m:42s
Port-channels in the group:
---------------------------
Port-channel: Po1    (Primary Aggregator)
------------
Age of the Port-channel   = 00d:00h:10m:40s
Logical slot/port   = 10/1          Number of ports = 2
HotStandBy port = null
Passive port list   = Fa1/0/21 Fa1/0/22
Port state          = Port-channel L3-Ag Ag-Inuse
Protocol            =   LACP
Ports in the Port-channel:
Index   Load   Port     EC state        No of bits
------+------+------+------------------+-----------
0     00     Fa1/0/21 Active             0
0     00     Fa1/0/22 Active             0
Time since last port bundled:    00d:00h:03m:43s    Fa1/0/21
Time since last port Un-bundled: 00d:00h:03m:47s    Fa1/0/22
Cat3750-1#ping 10.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

Cat3750-2

Cat3750-2#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)         LACP      Fa1/0/21(P) Fa1/0/22(P)
Cat3750-2#show etherchannel detail
Channel-group listing:
----------------------
Group: 1
----------
Group state = L2
Ports: 2   Maxports = 16
Port-channels: 1 Max Port-channels = 16
Protocol:   LACP
Ports in the group:
-------------------
Port: Fa1/0/21
------------
Port state    = Up Mstr In-Bndl
Channel group = 1           Mode = Active          Gcchange = -
Port-channel  = Po1         GC   =   -             Pseudo port-channel = Po1
Port index    = 0           Load = 0x00            Protocol =   LACP
Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
A - Device is in active mode.        P - Device is in passive mode.
Local information:
LACP port     Admin     Oper    Port     Port
Port      Flags   State     Priority      Key       Key     Number   State
Fa1/0/21  SA      bndl      32768         0x1       0x1     0x17     0x3D
Partner's information:
LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa1/0/21  SA      32768     0012.8049.3600   4s    0x1     0x40F    0x3D
Age of the port in the current state: 00d:00h:05m:09s
Port: Fa1/0/22
------------
Port state    = Up Mstr In-Bndl
Channel group = 1           Mode = Active          Gcchange = -
Port-channel  = Po1         GC   =   -             Pseudo port-channel = Po1
Port index    = 0           Load = 0x00            Protocol =   LACP
Flags:  S - Device is sending Slow LACPDUs   F - Device is sending fast LACPDUs.
A - Device is in active mode.        P - Device is in passive mode.
Local information:
LACP port     Admin     Oper    Port     Port
Port      Flags   State     Priority      Key       Key     Number   State
Fa1/0/22  SA      bndl      32768         0x1       0x1     0x18     0x3D
Partner's information:
LACP port                        Oper    Port     Port
Port      Flags   Priority  Dev ID         Age     Key     Number   State
Fa1/0/22  SA      32768     0012.8049.3600  14s    0x1     0x410    0x3D
Age of the port in the current state: 00d:00h:05m:11s
Port-channels in the group:
---------------------------
Port-channel: Po1    (Primary Aggregator)
------------
Age of the Port-channel   = 00d:00h:11m:19s
Logical slot/port   = 10/1          Number of ports = 2
HotStandBy port = null
Port state          = Port-channel Ag-Inuse
Protocol            =   LACP
Ports in the Port-channel:
Index   Load   Port     EC state        No of bits
------+------+------+------------------+-----------
0     00     Fa1/0/21 Active             0
0     00     Fa1/0/22 Active             0
Time since last port bundled:    00d:00h:05m:13s    Fa1/0/22
Time since last port Un-bundled: 00d:00h:05m:17s    Fa1/0/22
Cat3750-2#ping 10.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

関連記事

レイヤ2スイッチの仕組み