cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
359
Views
0
Helpful
2
Replies

How to redistribute a /24 into BGP based on a /22 learned via OSPF

ewaizel
Level 1
Level 1

Hi everybody

I can see in my routing table 172.16.0.0/22 (learned via OSPF).

I want to redistribute into BGP only a part of it (172.16.0.0/24).

So far, I have not been able to do it with route maps or network statements.

Any ideas?

Thanks in advance

2 Replies 2

Mohamed Sobair
Level 7
Level 7

You Cant do that without the correct Subnet being exist in the routing table!

Since The /22 exist, you Can redistribute it but You Cant with the /24 because its not exist in the routing table.

Regards,

Mohamed

To redistribute into BGP the prefix (and mask) must exist in the local routing table. so if you want to redistribute 172.16.0.0/24 into BGP then you must assure that the prefix/mask are in the local routing table.

If you have learned a /22 that includes the prefix then you must create an entry in the local routing table for 172.16.0.0/24. The common way to achieve this is to configure a static route for the prefix/mask (probably with the next hop in the static route based on the next hop from the OSPF route).

To have the static route be consistent with the results of the OSPF routes you might want to configure IP SLA/Object tracking for the static route to monitor and track the behavior of the learned OSPF route for the /22.

HTH

Rick

HTH

Rick
Review Cisco Networking products for a $25 gift card