A tunnel is organized between the two branches via the ISP. For redundancy, a second tunnel is organized over the network of another ISP.
Scheme with IP-addresses:
Switching to the backup route is performed when OSPF connectivity is lost through the tunnel over the network of the ISP “A”. BFD is used to quickly evaluate connectivity.
The settings for routers:
Router WEST
hostname WEST
no ip domain lookup
interface Loopback0
no shutdown
description PC_A
ip address 172.16.1.1 255.255.255.0
interface Tunnel0
no shutdown
ip address 172.16.12.1 255.255.255.252
bfd interval 50 min_rx 50 multiplier 3
tunnel source 10.1.1.1
tunnel destination 10.2.2.1
interface Tunnel1
no shutdown
description RESERV
ip address 172.16.21.1 255.255.255.252
ip ospf cost 1500
bfd interval 50 min_rx 50 multiplier 3
tunnel source 10.3.3.1
tunnel destination 10.4.4.1
interface GigabitEthernet0/0
no shutdown
description to_ISP_A
ip address 10.1.1.1 255.255.255.252
duplex auto
speed auto
media-type rj45
interface GigabitEthernet0/1
no shutdown
description to_ISP_B
ip address 10.3.3.1 255.255.255.252
duplex auto
speed auto
media-type rj45
router ospf 1
log-adjacency-changes detail
network 172.16.1.0 0.0.0.255 area 0
network 172.16.12.0 0.0.0.3 area 0
network 172.16.21.0 0.0.0.3 area 0
bfd all-interfaces
ip route 10.2.2.0 255.255.255.252 10.1.1.2
ip route 10.4.4.0 255.255.255.252 10.3.3.2
line con 0
exec-timeout 0 0
logging synchronous
Router EAST
hostname EAST
no ip domain lookup
interface Loopback0
no shutdown
description PC_B
ip address 172.16.2.1 255.255.255.0
interface Tunnel0
no shutdown
ip address 172.16.12.2 255.255.255.252
bfd interval 50 min_rx 50 multiplier 3
tunnel source 10.2.2.1
tunnel destination 10.1.1.1
interface Tunnel1
no shutdown
description RESERV
ip address 172.16.21.2 255.255.255.252
ip ospf cost 1500
bfd interval 50 min_rx 50 multiplier 3
tunnel source 10.4.4.1
tunnel destination 10.3.3.1
interface GigabitEthernet0/0
no shutdown
description to_ISP_A
ip address 10.2.2.1 255.255.255.252
duplex auto
speed auto
media-type rj45
interface GigabitEthernet0/1
no shutdown
description to_ISP_B
ip address 10.4.4.1 255.255.255.252
duplex auto
speed auto
media-type rj45
router ospf 1
log-adjacency-changes detail
network 172.16.2.0 0.0.0.255 area 0
network 172.16.12.0 0.0.0.3 area 0
network 172.16.21.0 0.0.0.3 area 0
bfd all-interfaces
ip route 10.1.1.0 255.255.255.252 10.2.2.2
ip route 10.3.3.0 255.255.255.252 10.4.4.2
line con 0
exec-timeout 0 0
logging synchronous
Router ISP_A
hostname ISP_A
no ip domain lookup
interface GigabitEthernet0/0
no shutdown
description to_WEST
ip address 10.1.1.2 255.255.255.252
duplex auto
speed auto
media-type rj45
interface GigabitEthernet0/1
no shutdown
description to_EAST
ip address 10.2.2.2 255.255.255.252
duplex auto
speed auto
media-type rj45
line con 0
exec-timeout 0 0
logging synchronous
Router ISP_B
hostname ISP_B
no ip domain lookup
interface GigabitEthernet0/0
no shutdown
description to_WEST
ip address 10.3.3.2 255.255.255.252
duplex auto
speed auto
media-type rj45
interface GigabitEthernet0/1
no shutdown
description to_EAST
ip address 10.4.4.2 255.255.255.252
duplex auto
speed auto
media-type rj45
line con 0
exec-timeout 0 0
logging synchronous