What is a default gateway?

Anton P. | December 29, 2020

A default gateway is a real trooper of your network. It deals with the smooth delivery of packets outside the original network. Once you make a request, it passes through the default gateway before reaching an external destination. The so-called request can be anything. If you want to visit a website or chat with your friend Mary, you send outbound requests. In typical home environments, your main router becomes the gateway. With many active clients or several networks working simultaneously, subnets can operate next to a particular gateway.

What is a default gateway?

A default gateway is a middleman, negotiating the terms for your communications with external subnets. In other words, it represents a brief stop between your device and the internet. “Default” indicates that a specific gateway routes all outbound requests as a part of a standard routine. In a typical domestic setting, your router’s private IP address stands as the default gateway.

Computers can substitute routers and function in the same manner. It requires multiple network adapters, pointing to the local subnet and the external network. So, a note here is that the default gateway does have to be a router, but it usually is.

How do host connections happen?

To understand the value of a default gateway, let’s consider two connection patterns.

Connecting to a host in the same local network:

  1. Imagine that a host 192.168.11.13 wants to communicate with a host called 192.168.11.14.
  2. Networking rules indicate that each new connection must check the routing table. Generally, the routing table shows the route your request should take to reach the final destination. Each device operates with a routing table, and the 192.168.11.13 host has it. The machine scans the routing base information and compares it to the destination network (192.168.11.14). During this check, the routing table will indicate that there is a direct connection (on-link). In such a case, the default gateway is not essential.
  3. The first host still needs to retrieve the MAC address of the recipient host. Then, ARP (Address Resolution Protocol) stands in to finish the job. The host 192.168.11.13 checks its ARP table, indicating the MAC address of the 192.168.11.14 host. Then, with the help of a switch, the first host sends the packet, and the recipient host accepts it.

But what happens if the routing table does not have an entry for a specific host? If the destination network does not have a pre-set routing path, it follows a different routine:

  1. The same 192.168.11.13 host wants to connect to a host at 120.105.80.30.
  2. The first host checks its routing table but comes back empty-handed. In other words, there is no route indicated for that destination.
  3. The default gateway works as a fallback for all such communication.
  4. Instead of using the MAC address of 120.105.80.30, the primary host finds the default gateway’s MAC address.
  5. Then, the packet reaches the default gateway (router), and it finds the best path for the packet from its routing table. Finally, the packet goes its merry way and ends up in its final destination.

More on inbound/outbound requests

Determining whether the request is outbound or inbound could seem complicated. However, thanks to a well-oiled networking mechanism, making such distinctions is reasonably straightforward. Let’s assume you send your friend Steve a message via Facebook Messenger. Steve is currently at your house, connected to the same Wi-Fi as you. It is still an outbound request since you contact Facebook first, and the service delivers the message to Steve.

The message will remain in the local network if you have built a unique messaging application to contact Steve. An inbound request would also be if your roommate hosts a game server and invites you to play. In this scenario, both of you need to connect to the same network.

Is a router IP address always the same as the default gateway?

As mentioned above, the typical default gateway represents the router IP address. Hence, most descriptions highlight that the router is the most common default gateway, but alternatives do exist. In a sense, the router takes the role of a default gateway due to configurations, not an innate purpose. Other devices can be alternatives. For instance, a virtual machine could function as a default gateway, too.

Finding your default gateway

Instructions for finding your default gateway are typically the same as the guidelines for discovering router IP addresses. Hence, it will take up to a minute to figure out the exact default gateway you use. In other news, nurturing an interest in your network’s infrastructure is healthy. It can not only be educational but worth it in the long-run.

For instance, you should be sure that a network uses the right amount of encryption. A less tech-savvy configuration is the password, which should not feature its original combination. The latter refers to the combination displayed on your router. The last step is to maintain fortress-like security beyond passwords and default encryption.

Atlas VPN reassures around-the-clock protection against villains in the digital space. No one can snoop on your online movements, and your privacy can remain intact. As a bonus, Atlas VPN delivers the final blow to suspicious websites, digital spies, marketers, and quirky ads. All these issues will vanish after you connect to our VPN servers.

Anton P.

Anton P.

Former chef and the head of Atlas VPN blog team. He's an experienced cybersecurity expert with a background of technical content writing.

Tags:

network adapterroutermac address

© 2021 Atlas VPN. All rights reserved.