Troubleshooting BGP Route Advertisement

Once your BGP neighbor adjacency is up and running then you can try to troubleshoot issues with route advertisements. In a previous lesson I explained how to fix BGP neighbor adjacencies, this time we’ll focus on route advertisements. Let’s look at some examples!

BGP Network Command

Let’s start with an EBGP scenario:

BGP R1 R2 AS1 AS2

R1 and R2 are in different autonomous systems. We are trying to advertise network 1.1.1.0 /24 from R1 to R2 but it’s not showing up on R2. Here are the configurations:

R1#show  run | section bgp
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.0
 neighbor 192.168.12.2 remote-as 2
 no auto-summary
R2#show  run | section bgp
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.12.1 remote-as 1
 no auto-summary

At first sight there seems to be nothing wrong here. Let’s see if R2 learned anything:

R2#show ip bgp summary 
BGP router identifier 192.168.12.2, local AS number 2
BGP table version is 1, main routing table version 1

Neighbor     V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1 4     1       4       4        1    0    0 00:01:26        0

However R2 didn’t learn any prefixes from R1. Perhaps we have a filter?

R1#show ip protocols | include filter
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
R2#show ip protocols | include filter
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set

Maybe there’s a distribute-list but that’s not the case here. Let’s check the network commands on R1:

R1#show run | section router bgp
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.0
 neighbor 192.168.12.2 remote-as 2
 no auto-summary

The problem is the network command, it works differently for BGP vs our IGPs. If we configure a network command for BGP it has to be an exact match. In this case I forgot to add the subnet mask…let’s fix it:

R1(config)#router bgp 1
R1(config-router)#network 1.1.1.0 mask 255.255.255.0

I have to make sure I type the correct subnet mask. Now check R2 again:

R2#show ip bgp summary | begin Neighbor
Neighbor     V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1 4     1       9       8        2    0    0 00:05:15        1
R2#show ip route bgp 
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 192.168.12.1, 00:01:08

Now you can see we learned the prefix and R2 installs it in the routing table…problem solved!

Lesson learned: Type in the exact correct subnet mask…BGP is picky!

BGP Summarization

Let’s move onto the next scenario.

BGP Summarization Troubleshooting

The network engineer from AS1 wants to advertise a summary to AS 2. The network engineer from AS 2 is complaining however that he’s not receiving anything…let’s find out what is going wrong! Here are the configurations:

R1#show run | section router bgp
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 aggregate-address 172.16.0.0 255.255.0.0
 neighbor 192.168.12.2 remote-as 2
 no auto-summary 
R2#show run | section router bgp
router bgp 2
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.12.1 remote-as 1
 no auto-summary

You can see the aggregate-address command on R1 for network 172.16.0.0 /16. Did R2 receive anything?

R2#show ip bgp summary | begin Neighbor
Neighbor     V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1 4     1      21      19        3    0    0 00:16:21        0

Too bad…no prefixes have been received by R2. There are two things I could check here:

  • See if a distribute-list is blocking prefixes inbound like I did in the previous example.
  • See what R1 has in its routing table (can’t advertise what I don’t have!).

Let’s start with the routing table of R1 since I think by now you know what a distribute-list looks like..

R1#show ip route

C    192.168.12.0/24 is directly connected, FastEthernet0/0
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0

There’s nothing here that looks even close to 172.16.0.0 /16. If we want to advertise a summary we have to put something in the routing table of R1 first. Let me show you the different options:

R1(config)#interface loopback 0
R1(config-if)#ip address 172.16.0.1 255.255.255.0
R1(config-if)#exit
R1(config)#router bgp 1
R1(config-router)#network 172.16.0.0 mask 255.255.255.0

This is option 1: I’ll create a loopback interface and configure an IP address that falls within the range of the aggregate-address command. The summary can now be advertised to R2:

R2#show ip route bgp 
     172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
B       172.16.0.0/24 [20/0] via 192.168.12.1, 00:01:25
B       172.16.0.0/16 [20/0] via 192.168.12.1, 00:01:25

Now we see the summary in the routing table of R2. By default it will still advertise the other prefixes. If you don’t want this you need to use the aggregate-address summary-only command!

Let me show you option 2 of advertising the summary:

R1(config)#ip route 172.16.0.0 255.255.0.0 null 0
R1(config)#router bgp 1
R1(config-router)#network 172.16.0.0 mask 255.255.0.0

First we’ll put the 172.16.0.0 /16 network in the routing table by creating a static route and pointing it to the null0 interface. Secondly I’ll use a network command for BGP to advertise this network. The result will be this:

R2#show ip route bgp 
B    172.16.0.0/16 [20/0] via 192.168.12.1, 00:00:45

Now it shows up on R2! Problem solved!

Lesson learned: You can’t advertise what you don’t have. Create a static route and point it to the null0 interface or create a loopback interface that has a prefix that falls within the summary address range.

BGP Auto-Summary

Next problem coming up, this is the topology:

BGP R1 R2 AS1 AS2

Onto the next scenario. You are working as a network engineer for AS 1 and one day you get a phone call from the network engineer at AS 2 asking you why you are advertising a summary for 1.0.0.0 /8. You have no idea what the hell he is talking about so you decide to do some research. Here’s what we see on R2:

R2#show ip route bgp
B    1.0.0.0/8 [20/0] via 192.168.12.1, 00:02:15

This is what the network engineer on R2 is seeing. Let’s check why R1 is advertising this:

R1#show ip bgp 1.0.0.0
BGP routing table entry for 1.0.0.0/8, version 3
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to update-groups:
     1         
  Local
    0.0.0.0 from 0.0.0.0 (1.1.1.1)
      Origin incomplete, metric 0, localpref 100, weight 32768, valid, sourced, best

We can see that we have network 1.0.0.0 /8 in the BGP table of R1. Let’s check its routing table:

R1#show ip route 1.0.0.0
Routing entry for 1.0.0.0/24, 1 known subnets
  Attached (1 connections)
  Redistributing via bgp 1
  Advertised by bgp 1

C       1.1.1.0 is directly connected, Loopback0

Network 1.1.1.0 /24 is configured on the loopback interface but it’s in the BGP table as 1.0.0.0 /8. This could mean only 1 thing….summarization. Take a look below:

R1#show ip protocols 
Routing Protocol is "bgp 1"
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set
  IGP synchronization is disabled
  Automatic route summarization is enabled

A quick look at show ip protocols reveals that automatic summarization is enabled. Let’s disable it:

R1(config)#router bgp 1
R1(config-router)#no auto-summary

We’ll disable it on R1 so R2 learns the subnet:

R2#show ip route bgp
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 192.168.12.1, 00:00:20

Now we see 1.1.1.0 /24 on R2…problem solved!

Lesson learned: If you see classful networks in your BGP table you might have auto-summary enabled.

Some of the problems I’ve been showing you could be resolved easily by just looking and/or comparing the output of a “show run”. This might be true but keep in mind that you don’t always have access to all BGP routers in the network so maybe there’s no way to compare configurations. There could be a switch or another router in between the devices you are trying to troubleshooting that are causing issues. Using the appropriate show and debug commands will show you exactly what your router is doing and what it is advertising to other routers.

BGP Route-Maps

Same topology, different problem:

BGP R1 R2 AS1 AS2

The people from AS 2 are complaining that they are not receiving anything from AS 1. To keep it interesting I’m not going to show you the configurations…

R2#show ip bgp summary | begin Neighbor
Neighbor     V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.168.12.1 4     1      51      48        1    0    0 00:08:51        0

For starters, we can see that R2 is not receiving any prefixes. Do we have any filters?

R1#show ip protocols | include filter
  Outgoing update filter list for all interfaces is not set
  Incoming update filter list for all interfaces is not set

I can also verify that R1 doesn’t have any distribute-lists. Let’s check if R1 has 1.1.1.0 /24 in its BGP table:

R1#show ip bgp 1.1.1.0
BGP routing table entry for 1.1.1.0/24, version 4
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Not advertised to any peer
  Local
    0.0.0.0 from 0.0.0.0 (1.1.1.1)
      Origin incomplete, metric 0, localpref 100, weight 32768, valid, sourced, best

I can confirm that R1 does have network 1.1.1.0 /24 in its routing table so why is it not advertising this to R2?

Let’s see if R1 has configured anything special for its neighbor R2:

R1#show ip bgp neighbors 192.168.12.2
BGP neighbor is 192.168.12.2,  remote AS 2, external link
  BGP version 4, remote router ID 192.168.12.2
  BGP state = Established, up for 00:03:34
  Last read 00:00:33, last write 00:00:33, hold time is 180, keepalive interval is 60 seconds
  Neighbor capabilities:
    Route refresh: advertised and received(old & new)
    Address family IPv4 Unicast: advertised and received
  Message statistics:
    InQ depth is 0
    OutQ depth is 0
                         Sent       Rcvd
    Opens:                 11         11
    Notifications:          0          0
    Updates:                7          0
    Keepalives:            85         86
    Route Refresh:          0          0
    Total:                103         97
  Default minimum time between advertisement runs is 30 seconds

 For address family: IPv4 Unicast
  BGP table version 3, neighbor version 3/0
 Output queue size : 0
  Index 1, Offset 0, Mask 0x2
  1 update-group member
  Outbound path policy configured
  Route map for outgoing advertisements is NEIGHBORS
                                 Sent       Rcvd
  Prefix activity:               ----       ----
    Prefixes Current:               0          0
    Prefixes Total:                 0          0
    Implicit Withdraw:              0          0
    Explicit Withdraw:              0          0
    Used as bestpath:             n/a          0
    Used as multipath:            n/a          0

I will use the show ip bgp neighbors command to see detailed information of R2. We can see that a route-map has been applied to R2 and it’s called “NEIGHBORS”. Keep in mind that besides distribute-lists we can use also use route-maps for BGP filtering. Let’s check it out:

R1# show route-map 
route-map NEIGHBORS, permit, sequence 10
  Match clauses:
    ip address prefix-lists: PREFIXES 
  Set clauses:
  Policy routing matches: 0 packets, 0 bytes

There’s only a match statement for prefix-list “PREFIXES”. Take a look:

R1#show ip prefix-list 
ip prefix-list PREFIXES: 1 entries
   seq 5 deny 1.1.1.0/24

There’s our troublemaker…its denying network 1.1.1.0 /24! Let’s get rid of this route-map:

R1(config)#router bgp 1
R1(config-router)#no neighbor 192.168.12.2 route-map NEIGHBORS out

That should take care of our problem…

R2#show ip route bgp
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 192.168.12.1, 00:00:03

And finally R2 has learned about this prefix…problem solved!

Lesson learned: Make sure there are no route-maps blocking the advertisement of prefixes.

IBGP Split Horizon

Here’s a new topology:

BGP AS1 R1 R2 R3

R1 is advertising network 1.1.1.0 /24 but R3 is not learning this prefix. Here are the configurations:

R1#show run | section router bgp
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.0 mask 255.255.255.0
 neighbor 192.168.12.2 remote-as 1
 no auto-summary
R2#show run | section router bgp
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.12.1 remote-as 1
 neighbor 192.168.23.3 remote-as 1
 no auto-summary
R3#show run | section router bgp
router bgp 1
 no synchronization
 bgp log-neighbor-changes
 neighbor 192.168.23.2 remote-as 1
 no auto-summary

The neighbor adjacencies have been configured,R1 is advertising network 1.1.1.0 /24. Let’s see if R2 and/or R3 have learned about it:

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

If you like to keep on reading, Become a Member Now! Here is why:

  • 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 654 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

535 Sign Ups in the last 30 days

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

Forum Replies

  1. bgp log-neighbor-changes
    This command simply causes a message to displayed to the console or in the event log that a status has changed with one of your established BGP neighbors. This is very useful for an administrator to know.

    no synchronization
    This can be considered a legacy command now, because in modern IOS the “no synchronization” is on by default. The explanation of this is a bit long. Your best bet is to review the synchronization lesson.

    In a nutshell, the purpose for Synchronization rule was back when many internal routers didn’t have the CPU and

    ... Continue reading in our forum

  2. Hi Rene,
    I really appreciate your nice explanation. I love the way you explained the things. I have one confusion in below statement.
    "When two EBGP routers that are directly connected do not form a working BGP neighbor adjacency there could be a number of things that are wrong:

    _Layer 2 down preventing us from reaching the other side._
    _Layer 3 issue: wrong IP address on one of the routers._
    _Access-list blocking TCP port 179 (BGP)._
    _Wrong IP address configured for BGP neighbor router."

    What do you mean by layer 2 down preventing us from reaching the other si

    ... Continue reading in our forum

  3. I was reading through this and then got to the trouble section on BGP Summarization. I had never really thought about it before as I have not had to configure it in the real world though I am sure I have came across it but was no problems with it so did not take any notice.

    I studied CCNP Switch and Route and I don’t ever remember coming across summarization for BGP. I then did a DDG (DuckDuckGo my google replacement search engine) search on a line of code you had in there called aggregate-address.

    Now normally when I thought about aggregate I thought about

    ... Continue reading in our forum

  4. Thank you for replying Rene.
    I understand how time consuming this could be to make videos for great topics.
    Your website has a lot of good contents.
    The videos are easy to follow and allow me to follow your labs.
    Reading the content can be challenging and that is why I sent my last comment.
    Great work on all your topic but the videos are what brought me here in the first place.

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