Article directory
1. Principle of port aggregation
Port aggregation means using two ports between two switches, that is, two corresponding crossed twisted pairs, to aggregate the two switch ports together and increase the data transmission bandwidth of the switch through certain settings . When the amount of data is relatively large, balancing the amount of data among the aggregation ports is called load balancing.
But like the topology diagram of the connection above, when the switches are connected using two lines, the data will cause loop problems during transmission. The spanning tree algorithm of the Cisco simulator prevents us from making any configuration. Both links work simultaneously.
But having two physical real lines does not mean two ports, because the port can be closed. In this case, even if there are two physical real lines, only one port is working.
2. Link aggregation
Experimental equipment: two switches, two hosts
Line connection: Two crossed twisted pairs are used between the two switches, and a direct twisted pair is used between the host and the switch.
The previous experiments have been discussed in detail, so I won’t go into details.
Switch(config)#interface range f0/1,f0/3 #将端口1和3聚合
Switch(config-if-range)#switchport mode trunk #将端口设置成trunk模式
Switch(config-if-range)#channel-group 1 mode on #加入链路组1并开启
Switch(config-if-range)#
Check whether link aggregation is successful in privileged mode:
3. Load balancing
In global mode:
Switch(config)#port-channel load-balance dst-ip #按照目的IP地址进行负载均衡
In fact, load balancing can be achieved in other ways
Switch(config)#port-channel load-balance ?
dst-ip Dst IP Addr
dst-mac Dst Mac Addr
src-dst-ip Src XOR Dst IP Addr
src-dst-mac Src XOR Dst Mac Addr
src-ip Src IP Addr
src-mac Src Mac Addr
Finally, complete the link aggregation of another switch to complete the aggregation of the entire link.