F5F Stay Refreshed Power Users Networks BGP + OSPF redundancy setup Failover configuration between BGP and OSPF

BGP + OSPF redundancy setup Failover configuration between BGP and OSPF

BGP + OSPF redundancy setup Failover configuration between BGP and OSPF

M
Monolit_YT
Member
52
09-12-2025, 02:59 PM
#1
Hello Everyone, I am having an issue with failing over to my backup internet connection. How I have my home network set up is 2 internet connections, going to 2 different routers. I have OSPF routing inside my home and then going to my friends I have BGP set up between me and them. Anyways, without further ado, here is my configuration. Please let me know if there is something wrong with them. I put the configuration into spoilers so that way it doesn't take up too much space. Router A: Spoiler router bgp 64512 bgp log-neighbor-changes network 10.90.100.0 mask 255.255.255.0 network 10.90.110.0 mask 255.255.255.0 network 10.200.1.3 mask 255.255.255.255 network 172.16.2.0 mask 255.255.255.252 network 192.168.8.0 mask 255.255.254.0 redistribute ospf 1 metric 0 neighbor EBGP peer-group neighbor EBGP soft-reconfiguration inbound neighbor EBGP route-map Failover in neighbor EBGP route-map Failover out neighbor 10.90.100.1 remote-as 65535 neighbor 10.90.100.1 peer-group EBGP neighbor 10.90.110.1 remote-as 65535 neighbor 10.90.110.1 peer-group EBGP neighbor 172.16.2.2 remote-as 64512 router ospf 1 redistribute static subnets redistribute bgp 64512 subnets network 10.200.1.3 0.0.0.0 area 0 network 172.16.1.0 0.0.0.7 area 0 network 172.16.2.0 0.0.0.3 area 0 default-information originate metric 110 redistribute ospf 1 metric 0 route-map Failover permit 10 set metric 15000 set as-path prepend 64512 64512 64512 64512 64512 64512 64512 64512 64512 1 Router B: Spoiler router bgp 64512 bgp log-neighbor-changes network 10.90.100.0 mask 255.255.255.0 network 10.90.110.0 mask 255.255.255.0 network 10.200.1.4 mask 255.255.255.255 network 192.168.8.0 mask 255.255.254.0 timers bgp 30 45 redistribute ospf 1 metric 0 neighbor IBGP peer-group neighbor IBGP remote-as 64512 neighbor IBGP route-reflector-client neighbor IBGP soft-reconfiguration inbound neighbor EBGP peer-group neighbor EBGP remote-as 65535 neighbor EBGP soft-reconfiguration inbound neighbor EBGP route-map Secondary in neighbor EBGP route-map Secondary out neighbor 10.90.100.1 peer-group EBGP neighbor 10.90.110.1 peer-group EBGP neighbor 172.16.2.1 peer-group IBGP router ospf 1 redistribute static subnets redistribute bgp 64512 subnets network 10.200.1.4 0.0.0.0 area 0 network 172.16.1.8 0.0.0.7 area 0 network 172.16.2.0 0.0.0.3 area 0 default-information originate metric 105 redistribute ospf 1 metric 0 route-map Secondary permit 10 set metric 10000 set as-path prepend 64512 64512 64512 64512 64512 64512 64512 1 1
M
Monolit_YT
09-12-2025, 02:59 PM #1

Hello Everyone, I am having an issue with failing over to my backup internet connection. How I have my home network set up is 2 internet connections, going to 2 different routers. I have OSPF routing inside my home and then going to my friends I have BGP set up between me and them. Anyways, without further ado, here is my configuration. Please let me know if there is something wrong with them. I put the configuration into spoilers so that way it doesn't take up too much space. Router A: Spoiler router bgp 64512 bgp log-neighbor-changes network 10.90.100.0 mask 255.255.255.0 network 10.90.110.0 mask 255.255.255.0 network 10.200.1.3 mask 255.255.255.255 network 172.16.2.0 mask 255.255.255.252 network 192.168.8.0 mask 255.255.254.0 redistribute ospf 1 metric 0 neighbor EBGP peer-group neighbor EBGP soft-reconfiguration inbound neighbor EBGP route-map Failover in neighbor EBGP route-map Failover out neighbor 10.90.100.1 remote-as 65535 neighbor 10.90.100.1 peer-group EBGP neighbor 10.90.110.1 remote-as 65535 neighbor 10.90.110.1 peer-group EBGP neighbor 172.16.2.2 remote-as 64512 router ospf 1 redistribute static subnets redistribute bgp 64512 subnets network 10.200.1.3 0.0.0.0 area 0 network 172.16.1.0 0.0.0.7 area 0 network 172.16.2.0 0.0.0.3 area 0 default-information originate metric 110 redistribute ospf 1 metric 0 route-map Failover permit 10 set metric 15000 set as-path prepend 64512 64512 64512 64512 64512 64512 64512 64512 64512 1 Router B: Spoiler router bgp 64512 bgp log-neighbor-changes network 10.90.100.0 mask 255.255.255.0 network 10.90.110.0 mask 255.255.255.0 network 10.200.1.4 mask 255.255.255.255 network 192.168.8.0 mask 255.255.254.0 timers bgp 30 45 redistribute ospf 1 metric 0 neighbor IBGP peer-group neighbor IBGP remote-as 64512 neighbor IBGP route-reflector-client neighbor IBGP soft-reconfiguration inbound neighbor EBGP peer-group neighbor EBGP remote-as 65535 neighbor EBGP soft-reconfiguration inbound neighbor EBGP route-map Secondary in neighbor EBGP route-map Secondary out neighbor 10.90.100.1 peer-group EBGP neighbor 10.90.110.1 peer-group EBGP neighbor 172.16.2.1 peer-group IBGP router ospf 1 redistribute static subnets redistribute bgp 64512 subnets network 10.200.1.4 0.0.0.0 area 0 network 172.16.1.8 0.0.0.7 area 0 network 172.16.2.0 0.0.0.3 area 0 default-information originate metric 105 redistribute ospf 1 metric 0 route-map Secondary permit 10 set metric 10000 set as-path prepend 64512 64512 64512 64512 64512 64512 64512 1 1

T
thefrogkid
Member
209
09-15-2025, 01:50 PM
#2
Your failover testing strategy outlines the steps and procedures to verify system resilience during outages. When executing this plan, you typically assess performance, confirm data integrity, and ensure seamless transitions to backup systems.
T
thefrogkid
09-15-2025, 01:50 PM #2

Your failover testing strategy outlines the steps and procedures to verify system resilience during outages. When executing this plan, you typically assess performance, confirm data integrity, and ensure seamless transitions to backup systems.

Y
YkseyHD
Member
59
09-18-2025, 11:20 PM
#3
The testing approach involves switching BGP failover via a route map, then transitioning to OSPF and adjusting the metric for the primary edge router's default route. During execution, I’m unable to reach the tunnel addresses but can access the networks they connect to.
Y
YkseyHD
09-18-2025, 11:20 PM #3

The testing approach involves switching BGP failover via a route map, then transitioning to OSPF and adjusting the metric for the primary edge router's default route. During execution, I’m unable to reach the tunnel addresses but can access the networks they connect to.

_
_Gemini_
Junior Member
11
09-19-2025, 04:29 AM
#4
In short, I handle failovers by logging into the primary router. Then I configure BGP neighbor EBGP with a route map named Failover in that map. The failover route map is set to use OSPF metric 105, switch it to BGP metric 10000, and prepend the number 64512 about seven times. The Failover route map is added nine times at the beginning, making the higher metric more important.
_
_Gemini_
09-19-2025, 04:29 AM #4

In short, I handle failovers by logging into the primary router. Then I configure BGP neighbor EBGP with a route map named Failover in that map. The failover route map is set to use OSPF metric 105, switch it to BGP metric 10000, and prepend the number 64512 about seven times. The Failover route map is added nine times at the beginning, making the higher metric more important.

C
coolkillerny
Junior Member
44
09-22-2025, 10:51 AM
#5
Confirm that there isn't an issue with your friends' setup.
C
coolkillerny
09-22-2025, 10:51 AM #5

Confirm that there isn't an issue with your friends' setup.

J
JamesHond7
Posting Freak
838
09-23-2025, 04:20 AM
#6
How does the network look like for ospf?
J
JamesHond7
09-23-2025, 04:20 AM #6

How does the network look like for ospf?

C
ChickaaBoom
Member
64
09-23-2025, 08:24 AM
#7
I discovered the issue last night. It turns out the routers I'm linking to in LV.Net and at my friend's place using https://voiptek.info were set up incorrectly on BGP. After redistributing and adjusting the metrics—making 100 the primary and 105 the backup—I changed the OSPF metric for default-information originate to 110, and updated the route redistribution metric from BGP to OSPF to 110. This ensures the backup with the lower metric takes precedence in routing decisions.
C
ChickaaBoom
09-23-2025, 08:24 AM #7

I discovered the issue last night. It turns out the routers I'm linking to in LV.Net and at my friend's place using https://voiptek.info were set up incorrectly on BGP. After redistributing and adjusting the metrics—making 100 the primary and 105 the backup—I changed the OSPF metric for default-information originate to 110, and updated the route redistribution metric from BGP to OSPF to 110. This ensures the backup with the lower metric takes precedence in routing decisions.

S
Sebekerga
Junior Member
9
09-24-2025, 01:31 PM
#8
The system avoids VRRP to implement automated WAN failover. There may be constraints from your ISP or hardware that prevent it. Check your documentation for specifics, like the MX-Warm-Spare-in-NAT-Mode example.
S
Sebekerga
09-24-2025, 01:31 PM #8

The system avoids VRRP to implement automated WAN failover. There may be constraints from your ISP or hardware that prevent it. Check your documentation for specifics, like the MX-Warm-Spare-in-NAT-Mode example.

F
FocusSnell
Junior Member
2
10-02-2025, 11:12 AM
#9
I'm facing challenges with OSPF due to equipment constraints. My routers are linked to Cisco ASAs, which is where I intended to deploy OSPF. Additionally, I only have DHCP for my ISP connections, so I can't implement VRRP or other first-hop redundancy methods.
F
FocusSnell
10-02-2025, 11:12 AM #9

I'm facing challenges with OSPF due to equipment constraints. My routers are linked to Cisco ASAs, which is where I intended to deploy OSPF. Additionally, I only have DHCP for my ISP connections, so I can't implement VRRP or other first-hop redundancy methods.