11-20-2014 12:40 PM - edited 03-05-2019 12:12 AM
We have an MPLS network between locations using BGP. Several locations have a VPN connection as a backup and use OSPF for those routes.
When an MPLS link goes down, the traffic switches over to the VPN connection just fine. But when the MPLS link comes back up, the OSPF route is still overriding the BGP route. I've changed the weights for both BGP & OSPF but still can't get the BGP route to override the OSPF route.
Any ideas as to what I'm missing?
Main router, MPLS link active at remote site:
nbrtr2#sh ip bgp
BGP table version is 6837, local router ID is 216.149.85.242
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.104.0/24 216.149.85.241 300 2828 3549 2828 i
nbrtr2#sh ip bgp 172.16.104.0
BGP routing table entry for 172.16.104.0/24, version 6839
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
2828 3549 2828
216.149.85.241 from 216.149.85.241 (216.149.85.241)
Origin IGP, localpref 100, weight 300, valid, external, best
After shutting down the remote interface, traffic switches to the VPN link.
nbrtr2#sh ip bgp
BGP table version is 6842, local router ID is 216.149.85.242
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.104.0/24 172.16.196.4 123 100 ?
nbrtr2#sh ip bgp 172.16.104.0
BGP routing table entry for 172.16.104.0/24, version 6842
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Advertised to update-groups:
1
Local
172.16.196.4 from 0.0.0.0 (216.149.85.242)
Origin incomplete, metric 123, localpref 100, weight 100, valid, sourced,
best
Bringing up the remote interface, the traffic stays on the VPN.
nbrtr2#sh ip bgp
BGP table version is 6843, local router ID is 216.149.85.242
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.104.0/24 172.16.196.4 123 100 ?
nbrtr2#sh ip bgp 172.16.104.0
BGP routing table entry for 172.16.104.0/24, version 6842
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Advertised to update-groups:
1
Local
172.16.196.4 from 0.0.0.0 (216.149.85.242)
Origin incomplete, metric 123, localpref 100, weight 100, valid, sourced,
best
Finally, terminating the site-site VPN tunnel restores the MPLS route:
nbrtr2#sh ip bgp
BGP table version is 6845, local router ID is 216.149.85.242
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 172.16.104.0/24 216.149.85.241 300 2828 3549 2828 i
nbrtr2#sh ip bgp 172.16.104.0
BGP routing table entry for 172.16.104.0/24, version 6845
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
2828 3549 2828
216.149.85.241 from 216.149.85.241 (216.149.85.241)
Origin IGP, localpref 100, weight 300, valid, external, best
Config details:
router ospf 100
log-adjacency-changes
redistribute static subnets
redistribute bgp 36166 metric 20 subnets
network 172.16.196.0 0.0.0.255 area 0
network 172.16.224.0 0.0.3.255 area 0
router bgp 36166
network 172.16.210.0 mask 255.255.255.0
network 172.16.211.0 mask 255.255.255.0
redistribute ospf 100 route-map Redist-OSPF
neighbor 216.149.85.241 remote-as 2828
neighbor 216.149.85.241 weight 300
default-information originate
access-list 11 remark Define OSPF routes for redistribution
access-list 11 permit 172.16.11.0 0.0.0.255
access-list 11 permit 172.16.16.0 0.0.1.255
access-list 11 permit 172.16.196.0 0.0.1.255
access-list 11 permit 172.16.198.0 0.0.0.255
access-list 12 remark Define VPN routes for redistribution
access-list 12 permit 172.16.104.0 0.0.0.255
access-list 12 permit 192.168.1.0 0.0.0.255
access-list 12 permit 192.168.3.0 0.0.0.255
access-list 12 permit 192.168.4.0 0.0.0.255
access-list 12 permit 192.168.8.0 0.0.0.255
route-map Redist-OSPF permit 10
match ip address 11
set weight 500
!
route-map Redist-OSPF permit 20
match ip address 12
set weight 100
!
route-map Redist-OSPF permit 30
!
11-20-2014 01:10 PM
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