ECMP and load balancing

Hi , I’m stuck with a very weird problem. So I have R1 (AS1) conneced to R2 and R3 (both in AS2 and connected between each other). No problems with ECMP on R1. But I want load balancing from R2/R3 as well so valid path to R1 for R2 is R2>R1 and also R2>R3>R1

I see that both routes are in BGP table

 * >     10.53.89.0/26          10.254.196.73         0       100     0       65517 i
 *       10.53.89.0/26          10.254.196.6          0       100     0       65517 i

But they are not installed into routing table. Moreover from detailed output I see that one route called internal and one external. That might be an issue, right ?

BGP routing table entry for 10.53.89.0/24
 Paths: 2 available
  65517
    10.254.196.73 from 10.254.196.73 (10.53.8.10)
      Origin IGP, metric 0, localpref 100, IGP metric 1, weight 0, received 174d10h ago, valid, external, best
      Rx SAFI: Unicast
  65517 (Received from a RR-client)
    10.254.196.6 from 10.254.196.6 (10.54.8.2)
      Origin IGP, metric 0, localpref 100, IGP metric 1, weight 0, received 00:18:33 ago, valid, internal
      Rx SAFI: Unicast

Hello Aleksei

From my understanding, your topology is similar to this one, but with different IP addresses:

Now load balancing at R1 can take place with little effort. However, R2 can’t load balance between its connections to R1 and R3. Similarly, R3 can’t load balance between its connections to R1 and R2. This is because, as you mentioned, from the point of view of these routers, one link is internal while the other is external.

Trying to load balance between eBGP and iBGP learned routes is like trying to load balance between EIGRP and OSPF learned routes. This is because routers consider eBGP and iBGP as two different routing protocols. Well not quite, but as far as the Administrative Distance (AD) goes, they are. eBGP has an AD of 20 while iBGP has an AD of 200 by default. (If you want to know why that is, take a look at this NetworkLessons note on the subject).

If the AD is different on the sources from which the routing information has been obtained, then ECMP is not possible. Even if you adjusted the AD for iBGP and eBGP to be the same, ECMP between iBGP and eBGP would still not operate.

In order to get ECMP to operate between all three routers, you must either put each router in its own AS (use eBGP between routers), or put them all in the same AS (use iBGP between routers).

I hope this has been helpful!

Laz

1 Like

That’s a great answer. Thank you so much. Let me think how to redesign my network

1 Like