cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
883
Views
5
Helpful
8
Replies

BGP /24 announcement fails

allahverdiyev
Level 1
Level 1

Hello guys,

I have very urgent question that I need to get answer quickly.

Here is the case:

---------------------------------------------

R1

interface Ethernet0/1
ip address 10.110.160.1 255.255.255.240

 

router bgp 64333
bgp log-neighbor-changes
neighbor 10.10.160.1 remote-as 64222
!
address-family ipv4
bgp soft-reconfig-backup
network 10.110.160.0 mask 255.255.255.0
neighbor 10.10.160.1 activate
exit-address-family

-----------------------------------------

When I run show ip bgp in remote end I only see 0.0.0.0 that is I understand that bgp does not advertise 10.110.160.0/24. I should be able to see 10.110.160.0/24 on remote peer. The only I see advertised is when I run network 10.110.160.0 mask 255.255.255.240 under bgp, so remote peer sees 10.110.160.0/28. 
Why cannot I announce /24?

Regards

1 Accepted Solution

Accepted Solutions

Harold Ritter
Cisco Employee
Cisco Employee

for 10.110.160.0/24 to be injected in BGP via the network statement, you need to have that same /24 installed in the RIB. From the config you posted, it looks like only 10.110.160.0/28 (E0/1) is present in the RIB.

 

If you want to advertise the /24, you could always put a static route as follow:

 

ip route 10.110.160.0 255.255.255.0 null 0

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

View solution in original post

8 Replies 8

Hello,

 

your 'neighbor 10.10.160.1 remote-as 64222' might only accept prefixes smaller than /24. What do you see with 'show ip bgp neighbors 10.10.160.1 advertised-routes' ?

This is lab environment. I have control on remote peer.

Result is nothing:

Total number of prefixes 0

This is normal as I just configured peering on remote peer.

Harold Ritter
Cisco Employee
Cisco Employee

for 10.110.160.0/24 to be injected in BGP via the network statement, you need to have that same /24 installed in the RIB. From the config you posted, it looks like only 10.110.160.0/28 (E0/1) is present in the RIB.

 

If you want to advertise the /24, you could always put a static route as follow:

 

ip route 10.110.160.0 255.255.255.0 null 0

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Harold Ritter, is this the only way?

I am simulating real environment. 10.110.160 will be subnet bought from RIPE. So what will be real approach in that case? Assume that we got 10.110.160.0/24 from RIPE and subnetted via /28 to use for other purposes. So what will the impact if I run ip 10.110.160.0 255.255.255.0 null 0 command?

If the prefix installed in the RIB does not match the network statement, BGP will simply not advertise it.

 

There is no real impact of configuring the static route for the /24 to null 0. Traffic falling outside the /28 will simply be sent to null0.

 

Regards,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

So basically as long as I have more specific routes (as I will use other /28 ranges from /24) traffic will match with these routes and /24 set aside from routing. If so that make sense.

What if I would configure ip route 10.110.160.0 255.255.255.0 eth0/1 ?

> So basically as long as I have more specific routes (as I will use other /28

> ranges from /24) traffic will match with these routes and /24 set aside from

> routing. If so that make sense.

 

That is correct.

 

> "What if I would configure ip route 10.110.160.0 255.255.255.0 eth0/1 ?

 

Would be better to change the subnet mask to /24 on e0/1 in this case.

 

Regards,

 

 

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Would be better to change the subnet mask to /24 on e0/1 in this case.

 

It seem correct, does not make sense to set next hop eth0/1. Thank you for your help. with static route it works.

Review Cisco Networking products for a $25 gift card