12-19-2021 08:47 AM - last edited on 12-24-2021 02:41 AM by Translator
Hi all,
I am a little lost in the myriads of documentation on cisco website.
Basically I am coming from Juniper world and need to create a routing policy that permits static, directly connected routes etc. over ibgp/ebgp. This is an example of what I have configured on my existing Juniper router:
policy-statement iBGP-Direct {
term iBGP-direct-permit {
from protocol direct;
then accept;
}
}
and this policy statement is applied to my bgp config to allow directly connected routes to peer.
How would I migrate this kind of configuration to cisco? What is the best approach to configure and apply routing policy options in general?
Many thanks for advice and guidance
Solved! Go to Solution.
12-20-2021 06:36 AM - last edited on 12-24-2021 02:55 AM by Translator
Hi @Hassaan ,
IOS will not redistribute any protocol by default in BGP. You need an explicit redistribute command for each protocol you want to redistribute. Additionally, You can use a " route-map" along with the redistribute command to limit the redistribution to certain prefixes.
router bgp xxx
address-family ipv4 uni
redistribute static route-map fromStatic
redistribute connected route-map fromConnected
redistribute ospf xxx route-map fromOSPF
!
route-map fromStatic permit 10
match ip address prefix-list Loopback0
!
ip prefix-list Loopback0 seq 10 permit 192.168.100.1/32
!
For more information, please refer to the following documentation page:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/49111-route-map-bestp.html
Regards,
12-19-2021 09:01 AM - last edited on 12-24-2021 02:43 AM by Translator
Hi @Hassaan ,
The equivalent on the Cisco IOS side would be something like this.
router bgp xxx
address-family ipv4 unicast
redistribute connected
Regards,
12-20-2021 12:34 AM
Thanks @Harold Ritter
Ok so further to that what if i wanted to, for example, accept or deny certain subnets from being advertised over a certain routing protocol?
12-20-2021 06:36 AM - last edited on 12-24-2021 02:55 AM by Translator
Hi @Hassaan ,
IOS will not redistribute any protocol by default in BGP. You need an explicit redistribute command for each protocol you want to redistribute. Additionally, You can use a " route-map" along with the redistribute command to limit the redistribution to certain prefixes.
router bgp xxx
address-family ipv4 uni
redistribute static route-map fromStatic
redistribute connected route-map fromConnected
redistribute ospf xxx route-map fromOSPF
!
route-map fromStatic permit 10
match ip address prefix-list Loopback0
!
ip prefix-list Loopback0 seq 10 permit 192.168.100.1/32
!
For more information, please refer to the following documentation page:
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/49111-route-map-bestp.html
Regards,
12-21-2021 07:44 AM
Thanks again @Harold Ritter
That looks like it answers my question, just what i was looking for.
I do have one last question though. We have two Internet connections and would like to configure the routers to back each other up by redistributing their gateway of last resort to the other with next hop for each being to our firewalls. I am attempting to do this using an iBGP peering between the two routers.
I presume the above method will work for a gw of last resort static ip?
12-22-2021 04:02 PM
Hi @Hassaan ,
> I presume the above method will work for a gw of last resort static ip?
Yes, it will definitely work.
Regards,
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide