OSPF Route Failover New: Difference between revisions

From Teltonika Networks Wiki
 
(20 intermediate revisions by the same user not shown)
Line 1: Line 1:
__TOC__
__TOC__
<p style="color:red">The information on this page is updated in accordance with the [https://wiki.teltonika-networks.com/view/FW_%26_SDK_Downloads'''00.07.08'''] firmware version.</p>
==Summary==
==Summary==
<span style="color: red;">The information in this page is updated in accordance with the <span style="color: #0054A6;"><b>RUTXXX_R_00.07.08.1</b></span> firmware version.</span>


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.
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.
Line 16: Line 16:
==Network Topology==
==Network Topology==


[[File:OSPF_WAN_TOPOLOGY.png|center]]
[[File:OSPF_WAN_TOPOLOGY_1.png|center|1100px]]
 
==Configuration Example==


===Router 1 Configuration===
===Router 1 Configuration===
----
----
===LAN as WAN Configuration===
====VLAN Configurtion====
====VLAN Configurtion====
----
----
Line 39: Line 39:
----
----
Open router‘s '''WebUI''' and navigate to '''Network → WAN → WAN interfaces''' configuration:
Open router‘s '''WebUI''' and navigate to '''Network → WAN → WAN interfaces''' configuration:
=====Creating And Configuring WAN 1 Interface=====
====Creating And Configuring WAN 1 Interface====
----
----
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
======General Settings======
=====General Settings=====
----
----
Make the following changes:
Make the following changes:
Line 49: Line 49:
# Enter IPv4 address: '''192.168.110.1'''
# Enter IPv4 address: '''192.168.110.1'''
# Enter IPv4 net mask: '''255.255.255.252'''
# Enter IPv4 net mask: '''255.255.255.252'''
[[File:OSPF_ROUTER1_WAN1_General.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER1_WAN1_General.png|border|class=tlt-border|center| 1100px]]
======Physical Settings======
=====Physical Settings=====
----
----
Make the following changes:
Make the following changes:
# Select interface: '''eth0.192'''
# Select interface: '''eth0.192'''
[[File:OSPF_ROUTER2_WAN1_Physical.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN1_Physical.png|border|class=tlt-border|center| 1100px]]




=====Creating And Configuring WAN 2 Interface=====
====Creating And Configuring WAN 2 Interface====
----
----
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
======General Settings======
=====General Settings=====
----
----
Make the following changes:
Make the following changes:
Line 67: Line 67:
# Enter IPv4 address: '''10.0.110.1'''
# Enter IPv4 address: '''10.0.110.1'''
# Enter IPv4 net mask: '''255.255.255.252'''
# Enter IPv4 net mask: '''255.255.255.252'''
[[File:OSPF_ROUTER1_WAN2_General.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER1_WAN2_General.png|border|class=tlt-border|center| 1100px]]


======Physical Settings======
=====Physical Settings=====
----
----
Make the following changes:
Make the following changes:
Line 75: Line 75:
[[File:OSPF_ROUTER2_WAN2_Physical.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN2_Physical.png|border|class=tlt-border|center]]


=====Creating And Configuring WAN 3 Interface=====
====Creating And Configuring WAN 3 Interface====
----
----
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
======General Settings======
=====General Settings=====
----
----
Make the following changes:
Make the following changes:
Line 85: Line 85:
# Enter IPv4 address: '''172.16.110.1'''
# Enter IPv4 address: '''172.16.110.1'''
# Enter IPv4 net mask: '''255.255.255.252'''
# Enter IPv4 net mask: '''255.255.255.252'''
[[File:OSPF_ROUTER1_WAN3_General.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER1_WAN3_General.png|border|class=tlt-border|center|1100px]]


======Physical Settings======
=====Physical Settings=====
----
----
Make the following changes:
Make the following changes:
# Select interface: '''eth0.172'''
# Select interface: '''eth0.172'''
[[File:OSPF_ROUTER2_WAN3_Physical.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN3_Physical.png|border|class=tlt-border|center|1100px]]


====OSPF Configuration====
====OSPF Configuration====
Line 104: Line 104:
# Select External Route: '''Default'''
# Select External Route: '''Default'''
# Select Redistribution Options: '''Connected'''
# Select Redistribution Options: '''Connected'''
[[File:OSPF_GLOBAL_ROUTER1.png|border|class=tlt-border|center]]
[[File:OSPF_GLOBAL_ROUTER1.png|border|class=tlt-border|center| 1100px]]


=====OSPF interfaces=====
=====OSPF interfaces=====
----
Add new OSPF interface for each WAN interface created by clicking [[File:Add Button.png|40x70px]]
Add new OSPF interface for each WAN interface created by clicking [[File:Add Button.png|40x70px]]
----
 
Make following changes to new interfaces:
Make following changes to new interfaces:
# Select Interface: '''eth0.192 (WanMAIN)''' | Enable Interface: '''on'''
# Select Interface: '''eth0.192 (WanMAIN)''' | Enable Interface: '''on'''
Line 114: Line 115:
# Select Interface: '''eth0.172 (Wan3Backup)''' | Enable Interface: '''on'''
# Select Interface: '''eth0.172 (Wan3Backup)''' | Enable Interface: '''on'''


[[File:OSPF_INTERFACES_1.png|border|class=tlt-border|center| 1000px]]
[[File:OSPF_INTERFACES_1.png|border|class=tlt-border|center| 1100px]]


=====OSPF area=====
=====OSPF area=====
----
Add new OSPF area for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
Add new OSPF area for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
----
 
Make following changes to the areas:
Make following changes to the areas:
# Name: '''First''' | Area: '''1005''' | Stub: '''off''' | '''on'''
# Name: '''First''' | Area: '''1005''' | Stub: '''off''' | '''on'''
# Name: '''Second''' | Area: '''1004''' | Stub: '''off''' | '''on'''
# Name: '''Second''' | Area: '''1004''' | Stub: '''off''' | '''on'''
# Name: '''Third''' | Area: '''1003''' | Stub: '''off''' | '''on'''
# Name: '''Third''' | Area: '''1003''' | Stub: '''off''' | '''on'''
[[File:OSPF_AREA_1.png|border|class=tlt-border|center]]
[[File:OSPF_AREA_1.png|border|class=tlt-border|center|1100px]]


=====OSPF networks=====
=====OSPF networks=====
----
Add new OSPF network for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
Add new OSPF network for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
----
 
Make following changes to the netwroks:
Make following changes to the netwroks:
# Name: '''WAN1''' | Network: '''192.168.110.0/30''' | Area: '''First''' | '''on'''
# Name: '''WAN1''' | Network: '''192.168.110.0/30''' | Area: '''First''' | '''on'''
# Name: '''WAN2''' | Network: '''10.0.110.0/30''' | Area: '''Second''' | '''on'''
# Name: '''WAN2''' | Network: '''10.0.110.0/30''' | Area: '''Second''' | '''on'''
# Name: '''WAN3''' | Netwrok: '''172.16.110.0/30''' | Area: '''Third''' | '''on'''
# Name: '''WAN3''' | Netwrok: '''172.16.110.0/30''' | Area: '''Third''' | '''on'''
[[File:OSPF_NETWORKS_1.png|border|class=tlt-border|center]]
[[File:OSPF_NETWORKS_1.png|border|class=tlt-border|center| 1100px]]


===Router 2 Configuration===
===Router 2 Configuration===
----
----


===LAN as WAN Configuration===


====VLAN Configurtion====
====VLAN Configurtion====
Line 159: Line 161:
----
----
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
======General Settings======
=====General Settings=====
----
----
Make the following changes:
Make the following changes:
Line 166: Line 168:
# Enter IPv4 address: '''192.168.110.2'''
# Enter IPv4 address: '''192.168.110.2'''
# Enter IPv4 net mask: '''255.255.255.252'''
# Enter IPv4 net mask: '''255.255.255.252'''
[[File:OSPF_ROUTER2_WAN1_General.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN1_General.png|border|class=tlt-border|center|1100px]]
======Physical Settings======
=====Physical Settings=====
----
----
Make the following changes:
Make the following changes:
# Select interface: '''eth0.192'''
# Select interface: '''eth0.192'''
[[File:OSPF_ROUTER2_WAN1_Physical.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN1_Physical.png|border|class=tlt-border|center|1100px]]




=====Creating And Configuring WAN 2 Interface=====
====Creating And Configuring WAN 2 Interface====
----
----
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
======General Settings======
=====General Settings=====
----
----
Make the following changes:
Make the following changes:
Line 184: Line 186:
# Enter IPv4 address: '''10.0.110.2'''
# Enter IPv4 address: '''10.0.110.2'''
# Enter IPv4 net mask: '''255.255.255.252'''
# Enter IPv4 net mask: '''255.255.255.252'''
[[File:OSPF_ROUTER2_WAN2_General.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN2_General.png|border|class=tlt-border|center| 1100px]]


======Physical Settings======
=====Physical Settings=====
----
----
Make the following changes:
Make the following changes:
# Select interface: '''eth0.10'''
# Select interface: '''eth0.10'''
[[File:OSPF_ROUTER2_WAN2_Physical.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN2_Physical.png|border|class=tlt-border|center| 1100px]]


=====Creating And Configuring WAN 3 Interface=====
====Creating And Configuring WAN 3 Interface====
----
----
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
Add new WAN by clicking [[File:Add Button.png|40x70px]] and Make following changes to new interface configurtion:
======General Settings======
=====General Settings=====
----
----
Make the following changes:
Make the following changes:
Line 202: Line 204:
# Enter IPv4 address: '''172.16.110.2'''
# Enter IPv4 address: '''172.16.110.2'''
# Enter IPv4 net mask: '''255.255.255.252'''
# Enter IPv4 net mask: '''255.255.255.252'''
[[File:OSPF_ROUTER2_WAN3_General.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN3_General.png|border|class=tlt-border|center|1100px]]


======Physical Settings======
======Physical Settings======
Line 208: Line 210:
Make the following changes:
Make the following changes:
# Select interface: '''eth0.172'''
# Select interface: '''eth0.172'''
[[File:OSPF_ROUTER2_WAN3_Physical.png|border|class=tlt-border|center]]
[[File:OSPF_ROUTER2_WAN3_Physical.png|border|class=tlt-border|center|1100px]]


====OSPF Configuration====
====OSPF Configuration====
Line 221: Line 223:
# Select External Route: '''Default'''
# Select External Route: '''Default'''
# Select Redistribution Options: '''Connected'''
# Select Redistribution Options: '''Connected'''
[[File:OSPF_GLOBAL_ROUTER2.png|border|class=tlt-border|center]]
[[File:OSPF_GLOBAL_ROUTER2.png|border|class=tlt-border|center|1100px]]


=====OSPF interfaces=====
=====OSPF interfaces=====
----
Add new OSPF interface for each WAN interface created by clicking [[File:Add Button.png|40x70px]]
Add new OSPF interface for each WAN interface created by clicking [[File:Add Button.png|40x70px]]
----
 
Make following changes to new interfaces:
Make following changes to new interfaces:
# Select Interface: '''eth0.192 (WanMAIN)''' | Enable Interface: '''on'''
# Select Interface: '''eth0.192 (WanMAIN)''' | Enable Interface: '''on'''
Line 231: Line 234:
# Select Interface: '''eth0.172 (Wan3Backup)''' | Enable Interface: '''on'''
# Select Interface: '''eth0.172 (Wan3Backup)''' | Enable Interface: '''on'''


[[File:OSPF_INTERFACES_1.png|border|class=tlt-border|center| 1000px]]
[[File:OSPF_INTERFACES_1.png|border|class=tlt-border|center| 1100px]]


=====OSPF area=====
=====OSPF area=====
----
Add new OSPF area for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
Add new OSPF area for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
----
 
Make following changes to the areas:
Make following changes to the areas:
# Name: '''First''' | Area: '''1005''' | Stub: '''off''' | '''on'''
# Name: '''First''' | Area: '''1005''' | Stub: '''off''' | '''on'''
# Name: '''Second''' | Area: '''1004''' | Stub: '''off''' | '''on'''
# Name: '''Second''' | Area: '''1004''' | Stub: '''off''' | '''on'''
# Name: '''Third''' | Area: '''1003''' | Stub: '''off''' | '''on'''
# Name: '''Third''' | Area: '''1003''' | Stub: '''off''' | '''on'''
[[File:OSPF_AREA_1.png|border|class=tlt-border|center]]
[[File:OSPF_AREA_1.png|border|class=tlt-border|center|1100px]]


=====OSPF networks=====
=====OSPF networks=====
----
Add new OSPF network for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
Add new OSPF network for each WAN interface by entering the area name and clicking [[File:Add Button.png|40x70px]]
----
 
Make following changes to the networks:
Make following changes to the networks:
# Name: '''WAN1''' | Network: '''192.168.110.0/30''' | Area: '''First''' | '''on'''
# Name: '''WAN1''' | Network: '''192.168.110.0/30''' | Area: '''First''' | '''on'''
# Name: '''WAN2''' | Network: '''10.0.110.0/30''' | Area: '''Second''' | '''on'''
# Name: '''WAN2''' | Network: '''10.0.110.0/30''' | Area: '''Second''' | '''on'''
# Name: '''WAN3''' | Netwrok: '''172.16.110.0/30''' | Area: '''Third''' | '''on'''
# Name: '''WAN3''' | Netwrok: '''172.16.110.0/30''' | Area: '''Third''' | '''on'''
[[File:OSPF_NETWORKS_1.png|border|class=tlt-border|center]]
[[File:OSPF_NETWORKS_1.png|border|class=tlt-border|center|1100px]]


==Testing Configuration==
==Configuration Testing==


If everything was set up correctly, we should see routes to the second network through the main link in the routing table:
If everything was set up correctly, we should see routes to the second network through the main link in the routing table:
Line 263: Line 268:
As we can see, dynamic routing automatically switched to the next available route.
As we can see, dynamic routing automatically switched to the next available route.


===Testing communication between LAN devices===
===Testing Communication Between LAN Devices===
----
----



Latest revision as of 13:17, 9 August 2024

The information on this page is updated in accordance with the 00.07.08 firmware version.

Summary

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

Configuration Example

Router 1 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:

  1. VLAN ID: 192 | lan1: Untagged | Lan2: Off | Lan3: Off
  2. VLAN ID: 10 | lan1: Off | Lan2: Untagged | Lan3: Off
  3. VLAN ID: 172 | lan1: Off | Lan2: Off | Lan3: Untagged

WAN Interface Configurtion


Open router‘s WebUI and navigate to Network → WAN → WAN interfaces configuration:

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:

  1. Enter Name: Wan1Main
  2. Select Protocol: Static
  3. Enter IPv4 address: 192.168.110.1
  4. Enter IPv4 net mask: 255.255.255.252
Physical Settings

Make the following changes:

  1. 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:

  1. Enter Name: Wan2Backup
  2. Select Protocol: Static
  3. Enter IPv4 address: 10.0.110.1
  4. Enter IPv4 net mask: 255.255.255.252
Physical Settings

Make the following changes:

  1. Select interface: eth0.10

Creating And Configuring WAN 3 Interface


Add new WAN by clicking and Make following changes to new interface configurtion:

General Settings

Make the following changes:

  1. Enter Name: Wan3Backup
  2. Select Protocol: Static
  3. Enter IPv4 address: 172.16.110.1
  4. Enter IPv4 net mask: 255.255.255.252
Physical Settings

Make the following changes:

  1. Select interface: eth0.172

OSPF Configuration


Open router‘s WebUI and navigate to Network → Routing → Dynamic routes → OSPF configuration:

OSPF - Global Settings

Make following changes:

  1. Enable Service: on
  2. Enable Vty: on
  3. Enter Router ID: 192.168.110.1
  4. Select External Route: Default
  5. Select Redistribution Options: Connected
OSPF interfaces

Add new OSPF interface for each WAN interface created by clicking

Make following changes to new interfaces:

  1. Select Interface: eth0.192 (WanMAIN) | Enable Interface: on
  2. Select Interface: eth0.10 (Wan2Backup) | Enable Interface: on
  3. Select Interface: eth0.172 (Wan3Backup) | Enable Interface: on
OSPF area

Add new OSPF area for each WAN interface by entering the area name and clicking

Make following changes to the areas:

  1. Name: First | Area: 1005 | Stub: off | on
  2. Name: Second | Area: 1004 | Stub: off | on
  3. Name: Third | Area: 1003 | Stub: off | on
OSPF networks

Add new OSPF network for each WAN interface by entering the area name and clicking

Make following changes to the netwroks:

  1. Name: WAN1 | Network: 192.168.110.0/30 | Area: First | on
  2. Name: WAN2 | Network: 10.0.110.0/30 | Area: Second | on
  3. Name: WAN3 | Netwrok: 172.16.110.0/30 | Area: Third | on

Router 2 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:

  1. VLAN ID: 192 | lan1: Untagged | Lan2: Off | Lan3: Off
  2. VLAN ID: 10 | lan1: Off | Lan2: Untagged | Lan3: Off
  3. VLAN ID: 172 | lan1: Off | Lan2: Off | Lan3: Untagged

WAN Interface Configurtion


Open router‘s WebUI and navigate to Network → WAN → WAN interfaces configuration:

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:

  1. Enter Name: Wan1Main
  2. Select Protocol: Static
  3. Enter IPv4 address: 192.168.110.2
  4. Enter IPv4 net mask: 255.255.255.252
Physical Settings

Make the following changes:

  1. 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:

  1. Enter Name: Wan2Backup
  2. Select Protocol: Static
  3. Enter IPv4 address: 10.0.110.2
  4. Enter IPv4 net mask: 255.255.255.252
Physical Settings

Make the following changes:

  1. Select interface: eth0.10

Creating And Configuring WAN 3 Interface


Add new WAN by clicking and Make following changes to new interface configurtion:

General Settings

Make the following changes:

  1. Enter Name: Wan3Backup
  2. Select Protocol: Static
  3. Enter IPv4 address: 172.16.110.2
  4. Enter IPv4 net mask: 255.255.255.252
Physical Settings

Make the following changes:

  1. Select interface: eth0.172

OSPF Configuration


Open router‘s WebUI and navigate to Network → Routing → Dynamic routes → OSPF configuration:

OSPF - Global Settings

Make following changes:

  1. Enable Service: on
  2. Enable Vty: on
  3. Enter Router ID: 192.168.110.2
  4. Select External Route: Default
  5. Select Redistribution Options: Connected
OSPF interfaces

Add new OSPF interface for each WAN interface created by clicking

Make following changes to new interfaces:

  1. Select Interface: eth0.192 (WanMAIN) | Enable Interface: on
  2. Select Interface: eth0.10 (Wan2Backup) | Enable Interface: on
  3. Select Interface: eth0.172 (Wan3Backup) | Enable Interface: on
OSPF area

Add new OSPF area for each WAN interface by entering the area name and clicking

Make following changes to the areas:

  1. Name: First | Area: 1005 | Stub: off | on
  2. Name: Second | Area: 1004 | Stub: off | on
  3. Name: Third | Area: 1003 | Stub: off | on
OSPF networks

Add new OSPF network for each WAN interface by entering the area name and clicking

Make following changes to the networks:

  1. Name: WAN1 | Network: 192.168.110.0/30 | Area: First | on
  2. Name: WAN2 | Network: 10.0.110.0/30 | Area: Second | on
  3. Name: WAN3 | Netwrok: 172.16.110.0/30 | Area: Third | on

Configuration Testing

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.