2022年端口聚合试验 .pdf
个人收集整理仅供参考学习1 / 4 端口聚合也叫做以太通道(ethernet channel ),主要用于交换机之间连接。由于两个交换机之间有多条冗余链路的时候,STP会将其中的几条链路关闭,只保留一条,这样可以避免二层的环路产生。但是,失去了路径冗余的优点,因为STP的链路切换会很慢,在50s左右。使用以太通道的话, 交换机会把一组物理端口联合起来,做为一个逻辑的通道,也就是channelgroup,这样交换机会认为这个逻辑通道为一个端口。这样有几个优点: 1. 带宽增加,带宽相当于组成组的端口的带宽总和。 2. 增加冗余,只要组内不是所有的端口都down 掉,两个交换机之间仍然可以继续通信。3. 负载均衡,可以在组内的端口上配置,使流量可以在这些端口上自动进行负载均衡。在用的时候要注意:端口要在一个vlan 里面,两边的全双工模式要一样,还有就是作用的端口个数不能是3 和 6, 而且不能超过 8 个,比如: 2,4,8。网络拓扑如下:华为交换机上配置端口聚合的命令是:link-aggregation ethernet0/1 to ethernet0/2 both文档收集自网络,仅用于个人学习试验一:在 switch2 上将 fa0/12和 fa0/16 口用网线连接,如果此时, switch2 上没有打开 stp, 则 switch2上存在环路,如果此时 switch1上 loop-deteaction打开, 则 switch1上有如下告警信息:文档收集自网络,仅用于个人学习%Jan 1 23:13:03 2002 test-switch1 DRV/5/LOOP BACK:Slot=1;文档收集自网络,仅用于个人学习Loopback does exist on port 24, please check it 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 1 页,共 4 页个人收集整理仅供参考学习2 / 4 如果在 swicth1 上将 stp打开, 则 0/12口 forwarding , 0/16 口 discarding, swicth1将环路消除。文档收集自网络,仅用于个人学习test-switch2display stp interface Ethernet 0/12 Protocol mode: IEEE RSTP The bridge ID (Pri.MAC): 32768.00e0-fc23-79fa The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec文档收集自网络,仅用于个人学习Root bridge ID(Pri.MAC): 32768.00e0-fc23-34a9 Root path cost: 180 Bridge bpdu-protection: disabled Timeout factor: 3 Port 12 (Ethernet0/12) of bridge is Forwarding Port spanning tree protocol: enabled Port role: DesignatedPort Port path cost: 200 Port priority: 128 Designated bridge ID(Pri.MAC): 32768.00e0-fc23-79fa文档收集自网络,仅用于个人学习The Port is a non-edged port Connected to a point-to-point LAN segment Maximum transmission limit is 3 Packets / hello time文档收集自网络,仅用于个人学习Times: Hello Time 2 sec, Max Age 20 sec Forward Delay 15 sec, Message Age 1 BPDU sent: 137 TCN: 0, RST: 137, Config BPDU: 0 BPDU received: 12 TCN: 0, RST: 12, Config BPDU: 0 test-switch2display stp interface Ethernet 0/16 Protocol mode: IEEE RSTP The bridge ID (Pri.MAC): 32768.00e0-fc23-79fa The bridge times: Hello Time 2 sec, Max Age 20 sec, Forward Delay 15 sec文档收集自网络,仅用于个人学习Root bridge ID(Pri.MAC): 32768.00e0-fc23-34a9 Root path cost: 180 Bridge bpdu-protection: disabled Timeout factor: 3 Port 16 (Ethernet0/16) of bridge is Discarding Port spanning tree protocol: enabled Port role: BackupPort Port path cost: 200 Port priority: 128 Designated bridge ID(Pri.MAC): 32768.00e0-fc23-79fa文档收集自网络,仅用于个人学习The Port is a non-edged port Connected to a point-to-point LAN segment Maximum transmission limit is 3 Packets / hello time文档收集自网络,仅用于个人学习Times: Hello Time 2 sec, Max Age 20 sec Forward Delay 15 sec, Message Age 1 精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 2 页,共 4 页个人收集整理仅供参考学习3 / 4 BPDU sent: 3 TCN: 0, RST: 3, Config BPDU: 0 BPDU received: 149 TCN: 0, RST: 149, Config BPDU: 0 再次证实了 loop-deteaction是针对下联端口环路的检测,而stp 是针对网络拓扑环路的检测。试验二:端口汇聚试验SWITCH1 :interface Vlan-interface1000 ip address interface Ethernet0/2 port access vlan 1000 # interface Ethernet0/23 duplex full speed 100 port link-type trunk port trunk permit vlan all interface Ethernet0/24 duplex full speed 100 port link-type trunk port trunk permit vlan all link-aggregation Ethernet0/23 to Ethernet0/24 both SWITCH2 :interface Vlan-interface1000 ip address interface Ethernet0/2 port access vlan 1000 interface Ethernet0/23 duplex full speed 100 port link-type trunk port trunk permit vlan all interface Ethernet0/24 duplex full speed 100 port link-type trunk port trunk permit vlan all link-aggregation Ethernet0/23 to Ethernet0/24 both 将 SWITCH1 的 0/23 口网线拔掉, 可以看到 PC到网关依然是可以通精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 3 页,共 4 页个人收集整理仅供参考学习4 / 4 的,端口汇聚可以避免双上联的stp端口阻塞,同时又可以保证双上联的动态流量均衡。文档收集自网络,仅用于个人学习精选学习资料 - - - - - - - - - 名师归纳总结 - - - - - - -第 4 页,共 4 页