OSPF Route Failover New: Difference between revisions
Line 54: | Line 54: | ||
Make the following changes: | Make the following changes: | ||
# Select interface: '''eth0.192''' | # Select interface: '''eth0.192''' | ||
=====Creating And Configuring WAN 2 Interface===== | |||
---- | |||
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion | |||
======General Settings====== | |||
---- | |||
Make the following changes: | |||
# Enter Name: '''Wan1Main''' | |||
# Select Protocol: '''Static''' | |||
# Enter IPv4 address: '''10.0.110.1''' | |||
# Enter IPv4 net mask: '''255.255.255.252''' | |||
======Physical Settings====== | |||
---- | |||
Make the following changes: | |||
# Select interface: '''eth0.10''' | |||
=====Creating And Configuring WAN 2 Interface===== | |||
---- | |||
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion | |||
======General Settings====== | |||
---- | |||
Make the following changes: | |||
# Enter Name: '''Wan1Main''' | |||
# Select Protocol: '''Static''' | |||
# Enter IPv4 address: '''172.16.110.1''' | |||
# Enter IPv4 net mask: '''255.255.255.252''' | |||
======Physical Settings====== | |||
---- | |||
Make the following changes: | |||
# Select interface: '''eth0.172''' | |||
====OSPF Configuration==== | ====OSPF Configuration==== |
Revision as of 11:25, 8 August 2024
Summary
The information in this page is updated in accordance with the RUTXXX_R_00_07_02 firmware version.
In this example we will setup redundant links using dynamic routing where 2 routers will be connected using multiple links directly – Main WAN and two Backup WANs in order to make sure LAN devices on each end would be available in case Main links fail.
Configuration Overview & Prerequisites
For this example, we will need two routers with 3 separate WAN interfaces. It can either be Wired links or Private Mobile networks. In this example we will use 3 wired links for the simplicity of testing. However, there can be other variations, such as 1 Wired link and 2 Mobile links.
Each WAN on both ends has to be in the same private network. In other words:
- RUT1 WAN1 interface must be able to reach RUT2 WAN1 interface;
- RUT1 WAN2 interface must be able to reach RUT2 WAN2 interface;
- RUT1 WAN3 interface must be able to reach RUT2 WAN3 interface.
Network Topology
Router1 Configuration
LAN as WAN Configuration
VLAN Configurtion
Open router‘s WebUI and navigate to Network → VLAN → Port Based configuration:
Port based VLAN
Add new VLANs by clicking and Make following changes to 3 new VLANS:
- VLAN ID: 192 | lan1: Untagged | Lan2: Off | Lan3: Off
- VLAN ID: 10 | lan1: Off | Lan2: Untagged | Lan3: Off
- VLAN ID: 172 | lan1: Off | Lan2: Off | Lan3: Untagged
WAN Interface Configurtion
Creating And Configuring WAN 1 Interface
Add new WAN by clicking and Make following changes to new interface configurtion
General Settings
Make the following changes:
- Enter Name: Wan1Main
- Select Protocol: Static
- Enter IPv4 address: 192.168.110.1
- Enter IPv4 net mask: 255.255.255.252
Physical Settings
Make the following changes:
- Select interface: eth0.192
Creating And Configuring WAN 2 Interface
Add new WAN by clicking and Make following changes to new interface configurtion
General Settings
Make the following changes:
- Enter Name: Wan1Main
- Select Protocol: Static
- Enter IPv4 address: 10.0.110.1
- Enter IPv4 net mask: 255.255.255.252
Physical Settings
Make the following changes:
- Select interface: eth0.10
Creating And Configuring WAN 2 Interface
Add new WAN by clicking and Make following changes to new interface configurtion
General Settings
Make the following changes:
- Enter Name: Wan1Main
- Select Protocol: Static
- Enter IPv4 address: 172.16.110.1
- Enter IPv4 net mask: 255.255.255.252
Physical Settings
Make the following changes:
- Select interface: eth0.172
OSPF Configuration
Router2 Configuration
LAN as WAN Configuration
OSPF Configuration
We will not go too deep into basics. Assuming we already have VLANs set up to have three different links between routers according to the topology, we can jump straight into configuring dynamic routes using OSPF.
OSPF can be configured in WebUI, by navigating to Network → Routing → Dynamic Routing → OSPF.
Note: if dynamic routing is not available in WebUI, you can install an additional package by navigating to Services → Package Manager.
OSPF - General settings
- Enable Service
- Enable vty
- Set Router ID (Can be set to any number or IP address)
- Set "Generate a default" external route as Default
- Select Connected in "Redistribution options"
OSPF Interface settings
- Add 3 new interfaces for wan, WAN2 and WAN3
- (Optional) Set interface priorities and custom dead times
- Leave other settings as default
OSPF Area settings
- Create 3 new instances with different Area codes and enable them:
- 1005
- 1004
- 1003
OSPF Networks settings
- Add new instance, Network: 192.168.110.0/24; Assign first area
- Add new instance, Network: 10.0.110.0/24; Assign second area
- Add new instance, Network: 172.16.110.0/24; Assign third area
Second router
Second router should be configured analogously as the first router.
OSPF will now set routes dynamically depending on availability of the connected links, therefore if Main link fails, traffic will route through a backup link.
Testing Configuration
If everything was set up correctly, we should see routes to the second network through the main link in the routing table:
Let us simulate Main link failure by disconnecting the cable and see how that affects routes to the second network:
As we can see, dynamic routing automatically switched to the next available route.
Testing communication between LAN devices
Let us connect a LAN device to each of the routers and see if they can communicate with each other, for this example, we will connect laptop to the first router and another laptop to the second router:
- Laptop 1 IP: 192.168.1.220
- Laptop 2 IP: 192.168.2.5
Let us run a ping command from the first laptop to the second and disconnect the Main link cable midway through:
We can see that after a short delay, laptop on the second router continued communication, which means dynamic routes are being set correctly.