The Virtual Router Redundancy Protocol (VRRP) is a computer networking protocol that provides for automatic assignment of available Internet Protocol (IP) routers to participating hosts. This increases the availability and reliability of routing paths via automatic default gateway selections on an IP subnetwork.
The protocol achieves this by creation of virtual routers, which are an abstract representation of multiple routers, i.e. master and backup routers, acting as a group. The default gateway of a participating host is assigned to the virtual router instead of a physical router. If the physical router that is routing packets on behalf of the virtual router fails, another physical router is selected to automatically replace it. The physical router that is forwarding packets at any given time is called the master router.
Configure LAN interface
To configure VRRP on ePack, we need to configure the LAN interface of our routers in the first place.
For Router1, go to Network > Interfaces > Edit LAN and set the IP address to 192.168.1.2. Click Save & Apply.
For Router1, go to Network > Interfaces > Edit LAN and set the IP address to 192.168.1.3. Click Save & Apply.
Install VRRP packages
Go to System > Software and install the required software packages on both routers:
- Type the URL “http://dev.maestro-wireless.eu/download/880/?version=1-0-3” to install the package
- Click OK
Repeat the process to install the package
luci-app-vrrp. Use the URL “http://dev.maestro-wireless.eu/download/882/?version=0-12-1” in this case.
After the package is installed, the following confirmation message will be shown:
Click Logout on the top menu of the router and log back in again so the VRRP entry is shown under Services:
Add VRRP settings
Go to Services > VRRP and configure the settings for your installation:
- Enable the VRRP daemon.
192.168.1.1as the Virtual IP
- The Virtual ID can be any value as long as it is the same for both routers.
255(the maximum value) for the Priority for the master router. Use
100for the backup router.
- The Interval can be left with the default value.
- Configure Router1 as master and Router2 as backup.
- Set a password, if you like. It has to be the same for both routers.
- Click Save & Apply to confirm the changes.
Validate the configuration
You will need an Ethernet switch to validate the configuration. Both routers have to be connected to the Internet (either via WAN, WWAN or cellular). The LAN interfaces of both routers should be attached to the Ethernet switch. Connect a PC to the switch and configure its network settings manually:
IP address: 192.168.1.4 Subnet mask: 255.255.255.0 Gateway: 192.168.1.1
Once the network settings have been applied, you should be able to ping the virtual IP address (192.168.1.1) from your computer. Now disconnect Router1 (i.e. the master) from the switch and try pinging either the virtual IP address or any Internet host such as google.com. The ping request should go through.
Connect Router1 back and now disconnect Router2 from the switch. If you send a new ping request, it should still work proving that the physical routers are replacing each other behind the virtual IP in a transparent way for the LAN clients.