写在最前面
端口聚合是在网络搭建中最常用的一种提高链路可靠性的方法,端口聚合不光可以提高链路的可靠性,还可以增大端口的带宽和实现负载均衡。
为什么说端口聚合可以提高链路可靠性呢?
在端口聚合中是将多根线路聚合成一根,也就是说将多个端口合起来当一个端口使用,如果其中一根线路断掉了,那么其他线路就会分担这条线路上的流量,除了带宽变小,其他并没有影响,所以说端口聚合可以提高链路可靠性。
为什么端口聚合又可以增大端口的带宽和实现负载均衡呢?
端口聚合看到名字就能理解到意思,将多个端口聚集起来使用,同时也将这些端口的带宽也聚合起来了,比如说现在要聚合4个fastEthernet类型的端口,每个端口本身就有100Mbps的带宽,聚合起来之后,那么这个聚合组就有400Mbps的带宽,有数据通过这个聚合组的时候,交换机会自动将这些数据平均分配给所属这个聚合组的4个端口,比如现在有800MB的数据,那么第一个端口将分到200MB的数据,第二个也将分到200MB的数据,同样第三个端口和第四个端口也将同时各分配到200MB的数据,这样一来就实现了增大端口带宽和负载均衡。
食用教程
拖出两个三层交换机并用交叉线将其连接好,刚连接好时可以看到有一个节点是黄色的,这是因为这些链路已经形成了一个环,所以要断开一条链路,见图:
![图片[1]-Cisco端口聚合-挨踢星球](https://edevplat.com/wp-content/uploads/2022/02/image-1.png)
现在开始配置左边这台交换机(switch0):
上面的命令写完,那么左边这台交换机的端口聚合也就完成了,可以show一下(没有必要的信息我已经删除):
Switch#show running-config!!hostname Switch!!!interface Port-channel 1//看到这个就说明端口聚合组1就已经配置好了!interface FastEthernet0/1!interface FastEthernet0/2!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 GigabitEthernet0/1channel-group 1 mode auto//看到这个就说明这个端口是端口聚合组1的成员端口,并且模式为auto!interface GigabitEthernet0/2channel-group 1 mode auto//看到这个就说明这个端口是端口聚合组1的成员端口,并且模式为auto!interface Vlan1no ip addressshutdown!endSwitch#show running-config ! ! hostname Switch ! ! ! interface Port-channel 1//看到这个就说明端口聚合组1就已经配置好了 ! interface FastEthernet0/1 ! interface FastEthernet0/2 ! 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 GigabitEthernet0/1 channel-group 1 mode auto//看到这个就说明这个端口是端口聚合组1的成员端口,并且模式为auto ! interface GigabitEthernet0/2 channel-group 1 mode auto//看到这个就说明这个端口是端口聚合组1的成员端口,并且模式为auto ! interface Vlan1 no ip address shutdown ! endSwitch#show running-config ! ! hostname Switch ! ! ! interface Port-channel 1//看到这个就说明端口聚合组1就已经配置好了 ! interface FastEthernet0/1 ! interface FastEthernet0/2 ! 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 GigabitEthernet0/1 channel-group 1 mode auto//看到这个就说明这个端口是端口聚合组1的成员端口,并且模式为auto ! interface GigabitEthernet0/2 channel-group 1 mode auto//看到这个就说明这个端口是端口聚合组1的成员端口,并且模式为auto ! interface Vlan1 no ip address shutdown ! end
右边的交换机也进行同样的配置,两边的编号必须一样,配置完成之后如图:
![图片[2]-Cisco端口聚合-挨踢星球](https://edevplat.com/wp-content/uploads/2022/02/image-2.png)
可以看到四个节点都是绿色,到这里配置已经完成了。可以自己测一下。
总结
整个配置来说很简单,需要多练习,多熟练,因为这个是在实际搭建过程中用到的还是很多。
© 版权声明
THE END
- 最新
- 最热
只看作者