When multiple routes have the same routing protocol preference and metric, these routes are called equal-cost routes, among which load balancing can be implemented.
The FW supports the multi-route mode. Users can configure multiple routes with the same destination and the same preference. If the destinations and costs of the multiple routes discovered by a routing protocol are the same, you can implement load balancing among the routes. To implement load balancing, run the maximum load-balancing number command in each protocol view. The load balancing is classified into the following types:
Packet-by-packet
When the packet-by-packet load balancing is configured, FW at the network layer forward packets to the same destination through various equal-cost paths. That is, FW always choose the next hop address that is different from the last one to send packets. Figure 1 shows the networking for the packet-by-packet load balancing.
In the illustration, FW sends packets to the destination address 10.1.1.0/24. Packets P1, P2, P3, P4, P5, and P6 need to be forwarded to the destination. To balance the load, FW sends packets to the destination address by alternating between the two interfaces, as follows:
P1 through GE0/0/0
P2 through GE0/0/1
P3 through GE0/0/0
P4 through GE0/0/1
P5 through GE0/0/0
P6 through GE0/0/1
Session-by-session
If the load balancing mode is per-flow load balancing, the FW default selects a link based on source and destination IP addresses. If the hash value is identical, the FW selects the next-hop same as that for the last time to send the packet, as shown in Figure 2.
FW forwards packets to the destinations at 10.1.1.0/24 and 10.2.1.0/24 respectively. The routing policy of session-by-session load balancing is that packets in the same flow are always transmitted along the previous path. The process for FW to forward packets is as follows:
The first packet P1 to the destination address 10.1.1.0/24 is forwarded through GE0/0/0, so all the following packets to the destination are forwarded through the interface.
The first packet P1 to the destination address 10.2.1.0/24 is forwarded through GE0/0/1, so all the following packets to the destination are forwarded through the interface.
In real application, the protocols that support load balancing are RIP, RIPng, OSPF, OSPFv3, BGP, BGP4+, IS-IS, and IPv6 IS-IS. Besides, static routes also support load balancing.