cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Join Customer Connection to register!
469
Views
0
Helpful
1
Replies
smith606306
Beginner

BGP always overides OSPF

I have a network with various remote sites

with dual connections into each (BT is the ISP)

The primary link is over an MPLS and work s fine alone using OSPF.

The secondary link is an ADSL link using BGP and is redistributed into OSPF using prefix lists and route-maps and works fine alone.

When we have both connected the route from the remote site is via the MPLS but the return path from the core is via BGP.

How do i manipulate this so MPLS becomes the main link.

site B#sh ip route 10.20.238.0
Routing entry for 10.20.238.0/27
  Known via "bgp 65876", distance 20, metric 0
  Tag 2856, type external
  Redistributing via ospf 100
  Advertised by ospf 100 subnets route-map BGP_OSPF
  Last update from 192.168.1.21 00:23:04 ago
  Routing Descriptor Blocks:
  * 192.168.1.21, from 192.168.1.21, 00:23:04 ago
      Route metric is 0, traffic share count is 1
      AS Hops 1
      Route tag 2856
      MPLS label: none

1 ACCEPTED SOLUTION

Accepted Solutions
jgraafmans
Beginner

It's because eBGP routes have an Administrative Distance of 20 which is lower than the OSPF routes and therefore preferred. You can change this by creating a network statement under BGP for the subnets which should take the OSPF path with backdoor at the end:

network 10.20.238.0 mask 255.255.255.224 backdoor

This will change the distance from 20 to 200

Or you can match the routes with an access-list and change the AD under BGP

distance 200 192.168.1.21 0.0.0.0 10

access-list 10 permit 10.20.238.0 0.0.0.31

This will set the AD to 200 for routes learned from 192.168.1.21 matching access-list 10

View solution in original post

1 REPLY 1
jgraafmans
Beginner

It's because eBGP routes have an Administrative Distance of 20 which is lower than the OSPF routes and therefore preferred. You can change this by creating a network statement under BGP for the subnets which should take the OSPF path with backdoor at the end:

network 10.20.238.0 mask 255.255.255.224 backdoor

This will change the distance from 20 to 200

Or you can match the routes with an access-list and change the AD under BGP

distance 200 192.168.1.21 0.0.0.0 10

access-list 10 permit 10.20.238.0 0.0.0.31

This will set the AD to 200 for routes learned from 192.168.1.21 matching access-list 10

View solution in original post