[Cisco Packet Tracer| 5. Switch Link Aggregation Experiment]

16694199:

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.

image-20230421101301567

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.image-20230421103523091

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.

image-20230421102337983

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:

image-20230421103236552

3. Load balancing

In global mode:

Switch(config)#port-channel load-balance dst-ip #按照目的IP地址进行负载均衡

image-20230421102927317

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.

image-20230421104201550

Guess you like

Origin blog.csdn.net/qq_64428099/article/details/130283068