cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7531
Views
10
Helpful
6
Replies

prefer ospf over bgp for specific network

NAGISWAREN2
Level 1
Level 1

Hi all,

I have HQ and mutiple branches in Hub-Spoke environtment. All site comes with 2 link. Primary link is MPLS using BGP, backup with DMVPN over OSPF.

if let say one of the branch MPLS connection having problem(intermittent, high packet loss), I would need change the routing on that branch and HQ to prefer OSPF path, till MPLS connection resume stable. in Branch I can totaly change AD for BGP higher than 110, but how do I do in HQ. Since changing AD for BGP in HQ would effect connection to all branch? How to prefer OSPF over BGP for specific network only in HQ?

Regards, Nagis
2 Accepted Solutions

Accepted Solutions

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

You can configure the AD for individual routes using a standard ACL. Assuming you can modify the BGP configuration on the HQ, this would be the configuration example:

access-list 99 permit 192.0.2.0 0.0.0.255

access-list 99 permit 223.255.255.0 0.0.0.255

!

router bgp 64512

  distance 111 0.0.0.0 255.255.255.255 99

This example will set the AD of BGP-learned routes 192.0.2.0/24 and 223.255.255.0/24 to 111. The "0.0.0.0 255.255.255.255" refers to the source of the BGP-learned route and is currently set to the value signifying "any source".

Best regards,

Peter

View solution in original post

6 Replies 6

Peter Paluch
Cisco Employee
Cisco Employee

Hello,

You can configure the AD for individual routes using a standard ACL. Assuming you can modify the BGP configuration on the HQ, this would be the configuration example:

access-list 99 permit 192.0.2.0 0.0.0.255

access-list 99 permit 223.255.255.0 0.0.0.255

!

router bgp 64512

  distance 111 0.0.0.0 255.255.255.255 99

This example will set the AD of BGP-learned routes 192.0.2.0/24 and 223.255.255.0/24 to 111. The "0.0.0.0 255.255.255.255" refers to the source of the BGP-learned route and is currently set to the value signifying "any source".

Best regards,

Peter

Hi peter,

thanks for the quick responce.. Will try it and let you know

Regards, Nagis

Hi Peter,

wouldn't it be easier to use the

network backdoor

BGP command?

See http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800c95bb.shtml#bgpbackdoor

for an example.

BR,

Milan

Milan,

Oh, yes, I forgot about that! I believe that using the network backdoor could also solve this issue nicely! The major difference, though, is that the neighbor backdoor will cause the route to be assiged the AD of 200 and not be advertised further in BGP. I am not sure if the original poster wants this particular behavior.

In any case, thank you!

Best regards,

Peter

Hi All,

Thanks. both config work for me.

Regards, Nagis

kadambari
Level 1
Level 1

Thank you. This works for me.