This article is an introduction to different default gateway solutions. Those technologies are enabling devices on IPv4 local subnets to have more than one Default gateway configured or at least some configuration that make them work half the way of ideal redundant solution. Idea behind this article is to be an introduction to a set of articles that will explain different redundancy solutions based on IPv6 technology. Some of those technologies, will be used in future and some of them already existing and suggested to be used from day one on IPv6 implementation.
Default gateway is the next hop address of the device that leads the packets out of the local LAN segment. If there are packets destined to an IP address that is not from local subnet PC will forward those packets usually to router device that will have the information where to forward those packets in order to get them transferred towards the destination.
IP hosts have different ways of deciding which default router or default gateway they will use. Some of the methods are DHCP, BOOTP, ICMP Router Discovery Protocol (IRDP), manual configuration, or sometimes by routing protocol. Though is not normally usual that hosts are running routing protocols, it can be done. Most frequent method is DHCP because is automatic and there is one DHCP server on almost every user LAN segment. The other usual solution is manual configuration that is basically typing the IP address of the default gateway into device. Result with manual configuration is of course in the host knowing a single IP address of its default gateway.
Redundant Default Gateway solutions
The fact that there can be only one default gateway IP address configured on almost every device in the network it’s sometimes a limitation. It basically makes network hosts completely reliant on only one router when communicating with all nodes that are not on the local subnet. There is no redundancy and that’s the issue.
But I have two routers that can be Default Gateway for the subnet?!?
You have a possibility to configure DHCP server to give to the host two different default gateway IP address. It can be done by defining two pools if IP address from one subnet. Let’s say that you have 172.16.20.0/24 and there are R1 with 172.16.20.1 and R2 with 172.16.20.128 routers on your LAN segment edge. You can split the scope to two subnets 172.16.20.1-172.16.20.127 -> 172.16.20.0/25 and other one 172.16.20.128-172.16.20.254 -> 172.16.20.128/25 and then give to first one the router option of R1 and to other scope the router option of R2.
It would mean that on your /24 subnet some devices will receive R1 IP address as their Default Gateway and some others with get R2 IP address for their Default Gateway. If one router goes down at least half of devices will still be able to reach outside networks across R2. This is not really a redundant solution, but is something close to that.
The real solution
VRRP, HSRP, GLBP i.e. Virtual Router Redundancy Protocol, Hot Standby Router Protocol and Gateway Load Balancing Protocol represent protocols that are making default gateway redundancy possible. Issues related to a host knowing a single IP address as its path to get outside the subnet. You configure one IP address on all devices on the subnet and then two routers/L3 switches in VRRP,HSRP or GLBP configuration will work together to act as a single device using different techniques. VRRP and HSRP will do Active-Passive configuration and GLBP will also have a possibility to work in Active-Active config. (More about those protocols in a separate article)
IRDP – ICMP Router Discovery Protocol enables computers inside local LAN to find all routers that can be used for default gateway purposes. If devices running IRDP runs in router mode, router discovery packets are sent to the LAN. If devices running IRDP runs in host mode, router discovery packets are received.