BGP-17 Configuring BGP Load Balancing

    First of all, in JUNOS, the default load balancing method is flow-based load balancing. A group of data with the same source IP address and the same destination IP address is called a flow. When there are two equivalent paths in the network, flow-based The load balancing provisions of the same flow will only be transmitted on one link. Therefore, we need to force the default flow-based load balancing to be a packet-based load balancing.

   First look at the configuration command:

  load balancing command.png


Topology:

topology.png

   1. Configure BGP.

r1 a path.png

r2 bgp.png

r3 bgp.png

2. Check the path.

2.1 View routing:

r1 route 1.png

It can be seen that R1 prefers the next hop 10.0.1.1.

2.2 View the forwarding table:

r1 forwarding table 1.png

3. Configure packet-based load balancing.

r1 load balancing.png


4. View the path.

4.1 Routing:

R1 load balancing routing.png

r1 detail.png

4.2 View the forwarding table:

r1 zhuanfabiao.png

It can be clearly seen that the next hops of the destination address 10.0.2.0/30 of defalut.inet in the forwarding table are 10.0.1.1 and 10.0.0.2 respectively.


 My understanding of BGP is limited. My question is why there are not two paths in the routing table with * in front of them, but two next hops in one route. In the route details, 10.0.0.2 is still INACTIVE, while in 10.0. There are two next hops in 1.1, and 10.0.1.1 shows selected.

    "The actual forwarding of the data packet is carried out according to the forwarding table issued by the RE." There are indeed two next hops in the forwarding table.

     The original text shown in the document is as follows:

    The show route detail command output designates one gateway as selected. This output is potentially confusing in the context of load balancing. The selected gateway is used for many purposes in addition to deciding which gateway to install into the kernel when Junos OS is not performing per-packet load-balancing. For instance, the ping mpls command uses the selected gateway when sending packets. Multicast protocols use the selected gateway in some cases to determine the upstream interface. Therefore, even when Junos OS is performing per-packet load-balancing by way of a forwarding-table policy, the selected gateway information is still required for other purposes. It is useful to display the selected gateway for troubleshooting purposes. Additionally, it is possible to use forwarding-table policy to override what is installed into the kernel (for example, by using the install-nexthop action). In this case, the next-hop gateway installed in the forwarding table might be a subset of the total gateways displayed in the show route command.


     The general meaning is: In fact, the load is balanced, but if it is displayed in the routing table, a gateway is still selected for other purposes. Such as PING, such as kernel (the kernel of the kernel junos system), such as multicast protocol.


    There is also a very interesting problem. At the beginning, I used VMX to do it. When I checked the forwarding table:

    r1 forwarding table 1.png

    Found that there is no load balancing, I checked the configuration and routing table and there is no problem. So the above routers all use SRX340.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324479580&siteId=291194637
BGP