cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1790
Views
10
Helpful
5
Replies

routing policy options question

Hassaan
Level 1
Level 1

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

 

1 Accepted Solution

Accepted Solutions

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,

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

5 Replies 5

Harold Ritter
Spotlight
Spotlight

Hi @Hassaan ,

 

The equivalent on the Cisco IOS side would be something like this.

 

router bgp xxx

address-family ipv4 unicast

redistribute connected

 

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

Hassaan
Level 1
Level 1

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?

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,

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

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?

 

Hi @Hassaan ,

 

> I presume the above method will work for a gw of last resort static ip?

 

Yes, it will definitely work.

 

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
Review Cisco Networking for a $25 gift card