昨天在论坛上看到有人在说他在packet tracer上做实验遇到的一个问题,帖子是这样的:
按理说不会出现这样的情况,今天就来做个实验看看是不是这样。
物理拓扑是一样的,我用了两台2950交换机,2台notebook,两条交叉线和两条直通线,ip分配:pc2为192.168.0.1,pc3为192.168.0.2,switch2 vlan1 ip为192.168.0.11,switch3 vlan1 ip为192.168.0.10。(vlan的ip可不配)
switch2上配置etherchannel:
int port 1
int range f0/1 - 2
channel-group 1 mode on
switch3上配置同样的etherchannel。
这里我没有分配其他vlan,所以可以不用将portchannel 1设置为trunk模式。
接好线,从pc2上ping pc3成功,拔出switch2或switch3上的任意一根网线,ping依然成功,说明etherchannel的冗余功能没有问题,也没有出现那位仁兄遇到的问题。所以可能是模拟器的bug吧。
接着再完善一下配置吧。
int port 1
duplex full
speed 100
config#port-channel load-balance src-mac
两台交换机上都做同样的配置,接着从pc2上拷贝pc3上的一个大文件,可以看到收和发的速率基本稳定在11M/9M左右,速率正常,并且中途拔除任意一根portchannel中的网线都不影响实际拷贝,但load-balance其实没有起作用,因为两边都只有一台pc在收发数据,所以不管是port-channel load-balace src-mac或dst-mac都不会有实际效果,在多pc的环境下就可以看出来了,交换机的端口指示灯说明了当前的工作状态。
下面贴上本次实验的配置及show int/ether/span的一些情况。
s1#sh run
Building configuration...
Current configuration : 2095 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname s1
!
enable secret 5 $1$Kfd4$A0Uc0l6MJUxJera6wGFnR0
!
ip subnet-zero
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
!
interface Port-channel1
duplex full
flowcontrol send off
!
interface FastEthernet0/1
duplex full
channel-group 1 mode on
!
interface FastEthernet0/2
duplex full
channel-group 1 mode on
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface FastEthernet0/25
!
interface FastEthernet0/26
!
interface FastEthernet0/27
!
interface FastEthernet0/28
!
interface FastEthernet0/29
!
interface FastEthernet0/30
!
interface FastEthernet0/31
!
interface FastEthernet0/32
!
interface FastEthernet0/33
!
interface FastEthernet0/34
!
interface FastEthernet0/35
!
interface FastEthernet0/36
!
interface FastEthernet0/37
!
interface FastEthernet0/38
!
interface FastEthernet0/39
!
interface FastEthernet0/40
!
interface FastEthernet0/41
!
interface FastEthernet0/42
!
interface FastEthernet0/43
!
interface FastEthernet0/44
!
interface FastEthernet0/45
!
interface FastEthernet0/46
!
interface FastEthernet0/47
!
interface FastEthernet0/48
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.0.11 255.255.255.0
no ip route-cache
!
ip http server
!
line con 0
logging synchronous
line vty 0 4
password 7 08354942071C11
login
line vty 5 15
login
!
!
end
s1#sh ether summ
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
u - unsuitable for bundling
U - in use f - failed to allocate aggregator
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) - Fa0/1(Pd) Fa0/2(P)
s1#sh ether load
Source MAC address
s2#sh run
1d00h: %SYS-5-CONFIG_I: Configured from console by console
s2#sh run
Building configuration...
Current configuration : 2095 bytes
!
version 12.1
no service pad
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname s2
!
enable secret 5 $1$ItOc$t4ycBxmtv1WDVdK4.ZDjI0
!
ip subnet-zero
!
!
spanning-tree mode pvst
no spanning-tree optimize bpdu transmission
spanning-tree extend system-id
!
!
!
!
interface Port-channel1
duplex full
flowcontrol send off
!
interface FastEthernet0/1
duplex full
channel-group 1 mode on
!
interface FastEthernet0/2
duplex full
channel-group 1 mode on
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface FastEthernet0/25
!
interface FastEthernet0/26
!
interface FastEthernet0/27
!
interface FastEthernet0/28
!
interface FastEthernet0/29
!
interface FastEthernet0/30
!
interface FastEthernet0/31
!
interface FastEthernet0/32
!
interface FastEthernet0/33
!
interface FastEthernet0/34
!
interface FastEthernet0/35
!
interface FastEthernet0/36
!
interface FastEthernet0/37
!
interface FastEthernet0/38
!
interface FastEthernet0/39
!
interface FastEthernet0/40
!
interface FastEthernet0/41
!
interface FastEthernet0/42
!
interface FastEthernet0/43
!
interface FastEthernet0/44
!
interface FastEthernet0/45
!
interface FastEthernet0/46
!
interface FastEthernet0/47
!
interface FastEthernet0/48
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
ip address 192.168.0.10 255.255.255.0
no ip route-cache
!
ip http server
!
line con 0
logging synchronous
line vty 0 4
password 7 0010160A0A5E1F
login
line vty 5 15
login
!
!
end
s2#sh ether summ
Flags: D - down P - in port-channel
I - stand-alone s - suspended
H - Hot-standby (LACP only)
R - Layer3 S - Layer2
u - unsuitable for bundling
U - in use f - failed to allocate aggregator
d - default port
Number of channel-groups in use: 1
Number of aggregators: 1
Group Port-channel Protocol Ports
------+-------------+-----------+-----------------------------------------------
1 Po1(SU) - Fa0/1(P) Fa0/2(Pd)
s2#sh ether load
Source MAC address
s1#sh spann vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0015.fa55.8dc0
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0015.fa55.8dc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1 Desg LRN 12 128.65 P2p
s1#
23:08:53: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan1, changed state t
o up
s1#sh spann vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0015.fa55.8dc0
This bridge is the root
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0015.fa55.8dc0
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 15
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1 Desg FWD 12 128.65 P2p
s1#sh interface ether
----
FastEthernet0/1:
Port state = Up Mstr In-Bndl
Channel group = 1 Mode = On/FEC Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 0d:00h:00m:44s
----
FastEthernet0/2:
Port state = Up Mstr In-Bndl
Channel group = 1 Mode = On/FEC Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 0d:00h:00m:51s
----
Port-channel1:
Age of the Port-channel = 0d:00h:03m:10s
Logical slot/port = 1/0 Number of ports = 2
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel Ag-Inuse
Protocol = -
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/1 On/FEC 0
0 00 Fa0/2 On/FEC 0
Time since last port bundled: 0d:00h:00m:45s Fa0/1
s2#sh spann vlan 1
VLAN0001
Spanning tree enabled protocol ieee
Root ID Priority 32769
Address 0015.fa55.8dc0
Cost 12
Port 65 (Port-channel1)
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Bridge ID Priority 32769 (priority 32768 sys-id-ext 1)
Address 0015.fa5f.6a40
Hello Time 2 sec Max Age 20 sec Forward Delay 15 sec
Aging Time 300
Interface Role Sts Cost Prio.Nbr Type
---------------- ---- --- --------- -------- --------------------------------
Po1 Root FWD 12 128.65 P2p
s2#sh interface ether
----
FastEthernet0/1:
Port state = Up Mstr In-Bndl
Channel group = 1 Mode = On/FEC Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 0d:00h:03m:59s
----
FastEthernet0/2:
Port state = Up Mstr In-Bndl
Channel group = 1 Mode = On/FEC Gcchange = -
Port-channel = Po1 GC = - Pseudo port-channel = Po1
Port index = 0 Load = 0x00 Protocol = -
Age of the port in the current state: 0d:00h:04m:06s
----
Port-channel1:
Age of the Port-channel = 0d:00h:12m:26s
Logical slot/port = 1/0 Number of ports = 2
GC = 0x00000000 HotStandBy port = null
Port state = Port-channel Ag-Inuse
Protocol = -
Ports in the Port-channel:
Index Load Port EC state No of bits
------+------+------+------------------+-----------
0 00 Fa0/1 On/FEC 0
0 00 Fa0/2 On/FEC 0
Time since last port bundled: 0d:00h:03m:59s Fa0/1
过年了,祝新年快乐!来年再接再厉!!!