2012年7月25日 星期三

EtherChannel

      要將兩台Switch之間的連線使用多條線路形成一個trunk通常需要兩台互聯的interface要設定成固定的trunk port (channel-group x mode on, x=ID),如果所處的兩台switch環境是在異地,如果沒有事先設定好,或是兩台switch已經安裝好但需更改架構,除非兩頭都有網管人員同時設定,如果只有一個網管人員時必須爭取時間,先設定完一頭,再趕忙跑到另一頭,以縮短斷線時間。

      但如果使用動態的EtherChannel就可以解決這個問題。目前Cisco Switch上的支援兩種動態的EtherChannel協定,包含Cisco自己的PAgP及標準的802.3ad LACP,如果使用PAgP的話有支援幾種模式,每個模式之間可以形成trunk的搭配方式如下:






如果使用Static Trunking的方式,PAgP與LACP的設定方式如下:

This example shows how to configure an EtherChannel. It assigns two ports as static-access ports in VLAN 10 to channel 5 with the PAgP mode desirable:
Switch# configure terminal Switch(config)# interface range gigabitethernet0/1 -2 Switch(config-if-range)# switchport mode accessSwitch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# channel-group 5 mode desirable
Switch(config-if-range)# end 

This example shows how to configure an EtherChannel. It assigns two ports as static-access ports in VLAN 10 to channel 5 with the LACP mode active
Switch# configure terminal 
Switch(config)# interface range gigabitethernet0/1 -2 
Switch(config-if-range)# switchport mode access
Switch(config-if-range)# switchport access vlan 10
Switch(config-if-range)# channel-group 5 mode active
Switch(config-if-range)# end 

Summary:

EtherChannel Modes 

Mode Description

on

Mode that forces the LAN port to channel unconditionally. In the on mode, a usable EtherChannel exists only when a LAN port group in the on mode is connected to another LAN port group in the on mode. Because ports configured in the on mode do not negotiate, there is no negotiation traffic between the ports.


auto

PAgP mode that places a LAN port into a passive negotiating state in which the port responds to PAgP packets it receives but does not initiate PAgP negotiation.


desirable

PAgP mode that places a LAN port into an active negotiating state in which the port initiates negotiations with other LAN ports by sending PAgP packets.


passive

LACP mode that places a port into a passive negotiating state in which the port responds to LACP packets it receives but does not initiate LACP negotiation.


active

LACP mode that places a port into an active negotiating state in which the port initiates negotiations with other ports by sending LACP packets.

LAN ports can form an EtherChannel when they are in different PAgP modes if the modes are compatible. For example:

YA LAN port in desirable mode can form an EtherChannel successfully with another LAN port that is in desirable mode.

YA LAN port in desirable mode can form an EtherChannel with another LAN port in auto mode.

NA LAN port in auto mode cannot form an EtherChannel with another LAN port that is also in auto mode because neither port initiates negotiation.





LAN ports can form an EtherChannel when they are in different LACP modes as long as the modes are compatible. For example:

YA LAN port in active mode can form an EtherChannel successfully with another LAN port that is in active mode.
YA LAN port in active mode can form an EtherChannel with another LAN port in passive mode.
NA LAN port in passive mode cannot form an EtherChannel with another LAN port that is also in passive mode, because neither port initiates negotiation.


沒有留言:

張貼留言