EtherChannel Config

L2

コマンド

interface range <開始インターフェース名-終了インターフェース名>

channel-group <グループ番号> mode <on | プロトコル>

 

投入コンフィグ

test1(config)#interface range gi0/1-2
test1(config-if-range)#channel-group 2 mode on
Creating a port-channel interface Port-channel 2
test1(config-if-range)#

 

test2(config)#interface range gi0/1-2
test2(config-if-range)#channe
test2(config-if-range)#channel-group 1 mode on

test2(config-if-range)#

 

確認

test1

*Dec 18 06:49:23.772: %LINK-3-UPDOWN: Interface Port-channel2, changed state to up
*Dec 18 06:49:24.772: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel2, changed state to up

 

test1#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      N - not in use, no aggregation
        f - failed to allocate aggregator

        M - not in use, minimum links not met
        m - not in use, port not aggregated due to minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port

        A - formed by Auto LAG


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
2      Po2(SU)          -        Gi0/1(P)    Gi0/2(P)    

 

test1#show interface port-channel 2
Port-channel2 is up, line protocol is up (connected) 
  Hardware is EtherChannel, address is 5254.0008.9569 (bia 5254.0008.9569)
  MTU 1500 bytes, BW 2000000 Kbit/sec, DLY 10 usec, 
 reliability 255/255, txload 1/255, rxload 1/255

 

 

 

test2

*Dec 18 06:49:05.122: %LINK-3-UPDOWN: Interface Port-channel1, changed state to up
*Dec 18 06:49:06.122: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

 

test2#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      N - not in use, no aggregation
        f - failed to allocate aggregator

        M - not in use, minimum links not met
        m - not in use, port not aggregated due to minimum links not met
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port

        A - formed by Auto LAG


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Gi0/1(P)    Gi0/2(P)  

 

test2#show interfaces port-channel 1
Port-channel1 is up, line protocol is up (connected) 
  Hardware is EtherChannel, address is 5254.0009.33b4 (bia 5254.0009.33b4)
  MTU 1500 bytes, BW 2000000 Kbit/sec, DLY 10 usec, 
     reliability 255/255, txload 1/255, rxload 1/255

 

論理リンク→物理ポートへ設定反映

【設定前】

interface GigabitEthernet0/1
 negotiation auto
 channel-group 2 mode on
end


test1(config)#do sh run interface gigabitEthernet 0/2
Building configuration...

Current configuration : 79 bytes
!
interface GigabitEthernet0/2
 negotiation auto
 channel-group 2 mode on
end

 

test1(config)#interface port-channel 2

test1(config-if)#switchport access vlan 10

【設定後】

test1(config)#do sh run interface gigabitEthernet 0/1
Building configuration...

Current configuration : 106 bytes
!interface GigabitEthernet0/1
 switchport access vlan 10
 negotiation auto
 channel-group 2 mode on
end

 

rface gigabitEthernet 0/2
Building configuration...

Current configuration : 106 bytes
!
interface GigabitEthernet0/2
 switchport access vlan 10
 negotiation auto
 channel-group 2 mode on
end

 

VLAN情報変えると、下記ログのとおりCDPで検知するようです。

*Dec 18 07:05:43.340: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet0/2 (10), with test2 GigabitEthernet0/2 (1).

 

【設定削除】

物理ポートから「channel-group」を削除すると、PortChannelがDownします。

(削除はされません)→no portchannelで削除可能

Dec 18 07:10:38.132: %LINK-3-UPDOWN: Interface Port-channel1, changed state to down
*Dec 18 07:10:39.132: %LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to downg

 

ポートチャネルを削除すると、束ねていた物理IFがshutされるようです。

test1(config)#no interface port-channel 1
*Dec 18 07:44:27.922: %LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to administratively down
*Dec 18 07:44:27.945: %LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to administratively down