Troubleshooting BGP Route Advertisement

Hello Navraj

The whole problem of the last scenario is the fact that R1 does not have the destination of 3.3.3.0/24 in its routing table. However, you can see that it is in the BGP table. In the BGP table it says that the next hop is 192.168.23.3, but R1 doesn’t know this IP, and it doesn’t have any routes to be able to reach it. So to solve the issue, we need to let R1 know how to get to the next hop IP address indicated in the BGP table.

This can be done either by changing the next hop address to one that R1 knows, like that of R2, or to use a static route. Rene choose the first option. Now we see the route showing up in R1, but we still can’t ping.

This is because the ping is able to reach R3, but R3 must be able to send back a reply. If we look in R3’s routing table, we’ll see that it has no route to 192.168.12.0/24, and so it has no way of knowing where to return the packet, so it drops it.

For this reason, R2 must advertise the 192.168.12.0/24 network to R3 so that it knows where to send all packets destined for that network. Once that’s done, R3 can now return R1’s pings since it now has a route to R1’s IP address.

I hope this has been helpful!

Laz

Thank you, Laz it is cleared now.

1 Like

Your way of explaining topics are very easy to catch. Great work.

1 Like

Hi Folks,
If we create static route to get this entries to Routing table then BGP can advertise it to its neighbor. I will has problem, When packet return to R1, R1 will discard the packet, right?

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

Thank you
Steve

Hello Tuyen

In R1, we see the aggregate-address 172.16.0.0 255.255.0.0 command in the BGP configuration, and we want to send this aggregate address to BGP peers. This means that we must already have more specific routes in the routing table that we simply want to aggregate, such as 172.16.1.0/24 and 172.16.55.0/24 for example. These are not shown in the lesson, but would be there in a production environment.

Remember, a routing table lookup will look up the most specific routes. So even with the null static route, it would never be matched since something more specific would be matched, and successfully routed. If there are no routes that are more specific, then the packet would be dropped anyway so the null interface configuration wouldn’t make a difference.

I hope this has been helpful!

Laz

HI Laz,
You mean static route send to null interface is lower priority than others route even It’s static route, don’t you?

Thank you
Steve

Hello Tuyen

It’s not a matter of priority, but more a matter of specific routes. For example, let’s say you have the following routes in your routing table:

172.16.1.0/24
172.16.2.0/24
172.16.3.0/24
172.16.4.0/24
172.16.5.0/24

Now you want to share these routes via BGP, using the aggregate-address command. You put in the following command in your BGP configuration:

aggregate-address 172.16.0.0 255.255.248.0

This results in BGP attempting to send this prefix to its neighbors. But because there is no exact match in the routing table, it does not. So you add the following static route:

ip route 172.16.0.0 255.255.248.0 null 0

And BGP will begin advertising this route.

Now, let’s say an IP packet with a destination address of 172.16.2.54 arrives at the router. What will happen? This destination address will be compared with the entries in the routing table. Which one will it match? The most specific match is: 172.16.2.0/24. This is because this match has a subnet mask (or prefix) of /24 while the static null route we installed has a subnet mask (or prefix) of /21.

It is not a matter of priority, but a matter of how specific a match it is based on the subnet mask or prefix of the particular routing table entry.

I hope this has been helpful!

Laz

1 Like

Hi Laz,

As the example, Discard route(/21) will be installed to routing table. If the prefix /24 comes, It will be only matched with discard route, for sure the packet is dropped.

BR,
Steve.

Hello Tuyen

If you have a router with the routes I mentioned in the previous post, and you add the null route with the summary prefix, you will end up with a routing table that looks something like this (assume 10.10.10.1 and 10.20.20.2 are the next hop addresses for the individual routes):

 172.16.0.0 is variably subnetted, 5 subnets, 2 masks
S       172.16.1.0 255.255.255.0 via 10.10.10.1
S       172.16.2.0 255.255.255.0 via 10.10.10.1
S       172.16.3.0 255.255.255.0 via 10.10.10.1
S       172.16.4.0 255.255.255.0 via 10.20.20.2
S       172.16.5.0 255.255.255.0 via 10.20.20.2
S       172.16.0.0 255.255.248.0 Null0

Now if a packet arrives with a destination IP of 172.16.3.55 for example, it will always match the most specific route in the routing table. In this case, it will match 172.16.3.0/24 and be sent to a next hop IP address of 10.10.10.1. Even though there is a null route to 172.16.0.0/21, this route is less specific and will never be matched by such a destination IP.

I hope this has been helpful!

Laz

Some of us do prefer the text :slight_smile:

Hi Laz,

I think there should not be be any problem on R2 when auto summary is enabled on R1 and n/w is being advertised with exact subnet mask b/c then still R2 will receive 1.1.1.0/24 n/w.

second if suppose we do not write exact subnet mask only advertise 1.1.1.0 and auto-summary also enabled in this case I think R2 should not face any issue b/c 1.1.1.0/8 will get stored in R2 Routing table and 1.1.1.0/24 is also part of this then why would he do complain?

Hello Pradyumna

Just to confirm, I went in and labbed this up. I configured R1 like so:

router bgp 1
 bgp log-neighbor-changes
 network 1.1.1.0
 neighbor 192.168.12.2 remote-as 2

R2 still did not receive any advertisements for this network. The reason is because the network command and the address space assigned to a particular interface must be an exact match. If the loopback is assigned 1.1.1.1/24 then the network command must be exactly 1.1.1.0/24.

Now if we were to put in the command network 1.0.0.0 with auto-summary enabled, then yes, the classful network would be advertised, even without an exact match. I have tried this in my lab, and it did indeed work.

For more info on the auto-summary feature of BGP, take a look at this lesson:

I hope this has been helpful!

Laz

Hi Rene and Laz,
I have the configuration from you, and everything is the same as in your config.
but I can not ping the 3.3.3.3

Router#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

How can I add the routerconfigs here?
Many thanks
Mihaly

Hello Mihaly

There could be many reasons for you not being able to ping. The troubleshooting process described in the lesson should take you step by step in checking all of the configuration to ensure that everything is correct. Take a look again, and if you still encounter problems, give us some more information so that we can help you troubleshoot.

I hope this has been helpful!

Laz

Hello there,
Just being a little curious, I was applying a CLI command on a BGP glass server, and I noticed that this neighbor is on Idle state and / Admin. My question is why is showing that Admin part?

route-views.optus.net.au>show ip bgp summary
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
192.65.89.161   4         7474 8012417 3753277 1200480580    0    0 3y14w       38809
202.139.124.130 4         7474 3228706 1464654 1200480580    0    0 1y14w       38809
202.160.242.71  4         7473       0       0        1    0    0 never    Active
203.13.132.7    4         7474 1330507  399282 1200480580    0    0 18w1d       38629
203.13.132.29   4         7474       0       0        1    0    0 4y49w    Idle
203.13.132.35   4         7474       0       0        1    0    0 4y51w    Active
203.13.132.37   4         7474       0       0        1    0    0 4y49w    Active
203.13.132.41   4         7474       0       0        1    0    0 4y51w    Active
203.13.132.49   4         7474       0       0        1    0    0 4y50w    Active
203.13.132.51   4         7474       0       0        1    0    0 5y7w     Active
203.13.132.53   4         7474       0       0        1    0    0 4y48w    Idle
203.202.143.3   4         7474       0       0        1    0    0 never    Idle (Admin)
203.202.143.33  4         7474 3182392   67930 1200480580    0    0 3w0d       817743
203.202.143.34  4         7474 107475766 2133163 1200480580    0    0 1y44w      817757

Regards!

Hello Elihu

Taking a look at the Cisco command line reference for this command, it states that:

An (Admin) entry with Idle status indicates that the connection has been shut down using the neighbor shutdown command.

I hope this has been helpful!

Laz

Hello Laz,

Thank you for your explanation.

BR!

1 Like

Hi Laz,

everything is ok, I could configure it.
But many thanks
Mihaly

1 Like

Lets say you have iBGP neighborship between two routers using loopback interfaces then what will the next hop be changed to with next-hop-self while passing eBGP prefix received from another neighbor? Loopback address or the interface address used to reach the other iBGP neighbor?

Hello Muhammad

The next-hop IP address used in BGP is always that of the source of the BGP information. This means that whenever the next-hop-self feature is used, the router replaces the next-hop IP address of the route with its own IP address, and specifically, the IP address which is used for the BGP peering. If that is the loopback address, then that is what will be used.

I hope this has been helpful!

Laz

1 Like