最近在做3層EtherChannel的相關實驗,使用的是Andlinux下的IOU,簡單拓撲結構如下:
配置如下:
SW1:
interface Port-channel10
ip address 12.1.1.1 255.255.255.0
shutdown
!
interface Ethernet0/0
no ip address
shutdown
duplex auto
!
interface Ethernet0/1
no ip address
duplex auto
channel-group 10 mode passive
!
interface Ethernet0/2
no ip address
duplex auto
channel-group 10 mode passive
SW2:
interface Port-channel20
ip address 12.1.1.2 255.255.255.0
!
interface Ethernet0/0
no ip address
shutdown
duplex auto
!
interface Ethernet0/1
no ip address
duplex auto
channel-group 20 mode active
!
interface Ethernet0/2
no ip address
duplex auto
channel-group 20 mode active
結果是Etherchannel無法建立:
SW1#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, no aggregation due to minimum links not met
m - not in use, port not aggregated due to minimum links not met
u - unsuitable for bundling
d - default port
w - waiting to be aggregated
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------
10 Po10(RD) LACP Et0/1(D) Et0/2(D)
SW2#show etherchannel 20 port-channel
Port-channels in the group:
----------------------
Port-channel: Po20 (Primary Aggregator)
------------
Age of the Port-channel = 0d:00h:04m:45s
Logical slot/port = 16/1 Number of ports = 0
HotStandBy port = null
Passive port list = Et0/1 Et0/2
Port state = Port-channel L3-Ag Ag-Not-Inuse
Protocol = LACP
Port security = Disabled
Fast-switchover = disabled
Load share deferral = disabled
Last applied Hash Distribution Algorithm: -
SW2#show int port-channel 20
Port-channel20 is down, line protocol is down (notconnect)
Hardware is EtherChannel, address is aabb.cc80.0200 (bia aabb.cc80.0200)
Internet address is 12.1.1.2/24
MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Auto-duplex, Auto-speed, media type is RJ45
input flow-control is off, output flow-control is unsupported
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog, 0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier, 0 PAUSE output
0 output buffer failures, 0 output buffers swapped out
SW1和SW2的Show結果基本一致,可以看出來兩個接口已經都在ChannelGroup中了,但是“Down”的狀態。而物理接口本身是Up的,PortChannel是Down的,一致未找到原因,後來也嘗試過不通的協商方法,例如:Desirable - Auto On - On 等都未成功。之前做的2層,和trunk的channel都出過問題,但都解決掉了,就這個一直找不到原因,請高手指點!
後來使用Packet Tracer 和 GNS做相同的配置,很容易就成功了,不知道這是不是IOU的問題,還是真實環境與實驗環境有巨大的差異問題。
實驗心得:Channel建立不起來,有時候需要重新啓動兩端的物理端口,或者重啓整臺交換機。有些時候交換機的協商模式會影響到Channel建立的成功與否,儘量選擇on的模式,或者是在網絡穩定後選擇更改爲on的模式。