BGP Additional Paths

BGP routers only advertise the best path to their neighbors. When a better path is found, it replaces the current path. Advertising a path and replacing it with a new path is called an implicit withdraw.

Since we only advertise the best path, a lot of other possible paths are unknown to some of the routers. We call this path hiding.

Path hiding has a couple of disadvantages:

  • You can’t use BGP multipath
  • Possible sub-optimal routing
  • MED oscillation
  • Next hop failure means BGP has to reconverge before traffic can be forwarded again

With the BGP additional paths feature, BGP advertises multiple paths for the same prefix so we have path diversity instead of path hiding. Additional paths is an extension to BGP and it adds a unique path identifier to each path. The path ID is similar to how the RD (Route Distinguisher) works in MPLS VPN, except the path IDs can be used in any BGP address family.

This feature can only be used for iBGP and there are three steps to take to implement it:

  1. Configure your routers so they can send and/or receive additional paths.
  2. Configure a global selection criterion on the router to define which additional candidate paths should be selected next to the best path.
  3. To each neighbor, advertise a set or sets of additional paths that we selected as candidate paths.

For the additional path selection, there are three options:

  • Best N: this is the best path and the second best path(s). The second best path(s) is chosen by eliminating the (next) best path and then selecting the next best path.
  • Group-best: the set of paths that are the best paths from each AS. This is best explained with a quick example:
    • AS 1 advertises three paths for prefix 1.1.1.1/32:
      • One with next hop 192.168.1.1
      • One with next hop 192.168.1.2
      • One with next hop 192.168.1.3
    • AS 2 advertises three paths for prefix 2.2.2.2/32:
      • One with next hop 192.168.2.1
      • One with next hop 192.168.2.2
      • One with next hop 192.168.2.3
    • AS 3 advertises three paths for prefix 3.3.3.3/32:
      • One with next hop 192.168.3.1
      • One with next hop 192.168.3.2
      • One with next hop 192.168.3.3
    • We choose the best path from each AS and that becomes our set. This could be:
      • 1.1.1.1/32 with next hop 192.168.1.1
      • 2.2.2.2/32 with next hop 192.168.2.1
      • 3.3.3.3/32 with next hop 192.168.3.1
  • All: all paths that have a unique next hop can be used as an additional path.

Let’s take a look at the additional paths feature in action.

Configuration





We’ll use the following topology:

Bgp Additional Paths Topology

We have five routers in AS 12345 where R2 is the RR (Route Reflector).  R6 has a loopback interface with prefix 6.6.6.6/32 that is advertised in BGP.

Configurations

Want to take a look for yourself? Here you will find the startup configuration of each device.

R1

hostname R1
!
ip cef
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.12.1 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.13.1 255.255.255.0
!
router ospf 1
 network 1.1.1.1 0.0.0.0 area 0
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.13.0 0.0.0.255 area 0
!
router bgp 12345
 bgp router-id 1.1.1.1
 neighbor 2.2.2.2 remote-as 12345
 neighbor 2.2.2.2 update-source Loopback0
!
end

R2

hostname R2
!
ip cef
!
interface Loopback0
 ip address 2.2.2.2 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.12.2 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.23.2 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 192.168.24.2 255.255.255.0
!
router ospf 1
 network 2.2.2.2 0.0.0.0 area 0
 network 192.168.12.0 0.0.0.255 area 0
 network 192.168.23.0 0.0.0.255 area 0
 network 192.168.24.0 0.0.0.255 area 0
!
router bgp 12345
 bgp router-id 2.2.2.2
 neighbor 1.1.1.1 remote-as 12345
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 route-reflector-client
 neighbor 3.3.3.3 remote-as 12345
 neighbor 3.3.3.3 update-source Loopback0
 neighbor 3.3.3.3 route-reflector-client
 neighbor 4.4.4.4 remote-as 12345
 neighbor 4.4.4.4 update-source Loopback0
 neighbor 4.4.4.4 route-reflector-client
 neighbor 5.5.5.5 remote-as 12345
 neighbor 5.5.5.5 update-source Loopback0
 neighbor 5.5.5.5 route-reflector-client
!
end

R3

hostname R3
!
ip cef
!
interface Loopback0
 ip address 3.3.3.3 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.13.3 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.23.3 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 192.168.35.3 255.255.255.0
!
router ospf 1
 network 3.3.3.3 0.0.0.0 area 0
 network 192.168.13.0 0.0.0.255 area 0
 network 192.168.23.0 0.0.0.255 area 0
 network 192.168.35.0 0.0.0.255 area 0
!
router bgp 12345
 bgp router-id 3.3.3.3
 neighbor 2.2.2.2 remote-as 12345
 neighbor 2.2.2.2 update-source Loopback0
!
end

R4

hostname R4
!
ip cef
!
interface Loopback0
 ip address 4.4.4.4 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.45.4 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.24.4 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 192.168.46.4 255.255.255.0
!
router ospf 1
 network 4.4.4.4 0.0.0.0 area 0
 network 192.168.24.0 0.0.0.255 area 0
 network 192.168.45.0 0.0.0.255 area 0
!
router bgp 12345
 bgp router-id 4.4.4.4
 neighbor 2.2.2.2 remote-as 12345
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 192.168.46.6 remote-as 6
!
end

R5

hostname R5
!
ip cef
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.45.5 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.35.5 255.255.255.0
!
interface GigabitEthernet0/3
 ip address 192.168.56.5 255.255.255.0
!
router ospf 1
 network 5.5.5.5 0.0.0.0 area 0
 network 192.168.35.0 0.0.0.255 area 0
 network 192.168.45.0 0.0.0.255 area 0
!
router bgp 12345
 bgp router-id 5.5.5.5
 neighbor 2.2.2.2 remote-as 12345
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
 neighbor 192.168.56.6 remote-as 6
!
end

R6

hostname R6
!
ip cef
!
interface Loopback0
 ip address 6.6.6.6 255.255.255.255
!
interface GigabitEthernet0/1
 ip address 192.168.46.6 255.255.255.0
!
interface GigabitEthernet0/2
 ip address 192.168.56.6 255.255.255.0
!
router bgp 6
 network 6.6.6.6 mask 255.255.255.255
 neighbor 192.168.46.4 remote-as 12345
 neighbor 192.168.56.5 remote-as 12345
!
end

Let’s see what we have. R4 and R5 have learned about 6.6.6.6/32 from R6:

R4#show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 *>   6.6.6.6/32       192.168.46.6             0             0 6 i
R5#show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 *>   6.6.6.6/32       192.168.56.6             0             0 6 i
 * i                   4.4.4.4                  0    100      0 6 i

R4 and R5 advertise 6.6.6.6/32 to R2, our route reflector:

R2#show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 * i  6.6.6.6/32       5.5.5.5                  0    100      0 6 i
 *>i                   4.4.4.4                  0    100      0 6 i

R2 has both paths in its BGP table but installs the path to R4. It only advertises this best path to its clients. Let’s look at two scenarios where this might be an issue.

Load Balancing

Let’s take a look at R1:

R1#show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 *>i  6.6.6.6/32       4.4.4.4                  0    100      0 6 i

Since R2 only advertises its best path, R1 only knows about the path through R4. How is the next hop resolved? Let’s have a look:

R1#show ip route 4.4.4.4
Routing entry for 4.4.4.4/32
  Known via "ospf 1", distance 110, metric 3, type intra area
  Last update from 192.168.12.2 on GigabitEthernet0/1, 01:15:01 ago
  Routing Descriptor Blocks:
  * 192.168.12.2, from 4.4.4.4, 01:15:01 ago, via GigabitEthernet0/1
      Route metric is 3, traffic share count is 1

4.4.4.4 resolves to R2 so R1 will never use the path through R3. Because R2 is “hiding” the path, we have two disadvantages here:

  • There is no load balancing, R1 could have used R3 to get to 6.6.6.6/32.
  • When next hop 4.4.4.4 fails, BGP has to reconverge before traffic can resume.

Sub-optimal Routing

Let’s check R3:

R3#show ip bgp | begin Network
     Network          Next Hop            Metric LocPrf Weight Path
 *>i  6.6.6.6/32       4.4.4.4                  0    100      0 6 i

R3 also uses 4.4.4.4 as the next hop to get to 6.6.6.6. How does 4.4.4.4 get resolved?

R3#show ip route 4.4.4.4 | include via
  Known via "ospf 1", distance 110, metric 3, type intra area
    192.168.35.5, from 4.4.4.4, 01:13:48 ago, via GigabitEthernet0/3
  * 192.168.23.2, from 4.4.4.4, 01:16:15 ago, via GigabitEthernet0/2

Also, when 4.4.4.4 fails, BGP has to reconverge. What we have seen so far is just the way it is; this is how BGP works. Can we improve it though?

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now!

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You’ve Ever Spent on Your Cisco Career!
  • Full Access to our 799 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)
570 Sign Ups in the last 30 days
satisfaction-guaranteed

  • 100% Satisfaction Guaranteed!
  • You may cancel your monthly membership at any time.
  • No Questions Asked!

Tags:


Forum Replies

  1. Hi Zain,

    You are right, that doesn’t really help :smile: I just fixed this.

    Rene

  2. Hi Rene,
    I have learnt lots of networking stuff in your plain way . God bless you . carry on dear .Thanks

    br//zaman

  3. Hi Rene,

    For eBGP additional paths is working by default, is this correct ?

    Thx…

  4. Hi Fabio,

    I’m afraid not. eBGP only advertises a single best path to its neighbors.

    Rene

45 more replies! Ask a question or join the discussion by visiting our Community Forum