BGP + OSPF redundancy setup Failover configuration between BGP and OSPF
BGP + OSPF redundancy setup Failover configuration between BGP and OSPF
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
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.
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.
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.
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.
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.