Table of Contents
A default gateway is the IP address a device uses to send traffic to any network outside its own local subnet. In most home and office networks, this is the router connecting the local network to the internet.
Every device on a network can talk directly to other devices in the same subnet without any help. But to reach anything outside that subnet, such as a website on the internet, the device needs a gateway to forward that traffic on its behalf.
How a Default Gateway Works
Every device checks the destination IP address of outgoing traffic against its own subnet mask to decide whether that destination is local or remote.
If the destination is inside the local subnet, the device sends the data directly using the destination's MAC address, resolved through ARP. If the destination is outside the local subnet, the device instead sends the data to its default gateway, which takes over from there.
The default gateway, almost always a router, then checks its own routing table to decide where to forward the packet next, continuing this process hop by hop until the packet reaches its destination.
1. Device checks destination IP against its subnet mask
2. Destination is local -> send directly via ARP/MAC address
3. Destination is remote -> send to default gateway
4. Gateway checks its routing table and forwards the packet onward
The default gateway is also commonly responsible for Network Address Translation (NAT), which lets multiple devices on a private network share a single public IP address when communicating with the internet.
How a Default Gateway Is Assigned
A device's default gateway is configured the same way its IP address is, either automatically or manually.
| Method | How It Works | Common Use Case |
|---|---|---|
| DHCP (Automatic) | A DHCP server assigns the gateway IP along with the device's IP and subnet mask | Home networks, most client devices |
| Static (Manual) | The gateway IP is entered manually in the network settings | Servers, printers, routers, VPS instances |
The default gateway's IP address must always be in the same subnet as the device using it, since a device can only reach its gateway through direct, local communication.
How to Find Your Default Gateway
The exact command depends on your operating system. On Windows, the most common method is the Command Prompt:
ipconfig
The Default Gateway field in the output shows the current gateway IP address. On Linux or macOS, the same information is available through:
ip route | grep default
On a router itself, the routing table can be checked with:
show ip route
Typical home router default gateway addresses include:
192.168.0.1
192.168.1.1
10.0.0.1
Default Gateway on a VPS
A VPS is typically assigned a static IP address along with a default gateway provided by the hosting network, rather than receiving one automatically through DHCP. This gateway routes the VPS's outbound traffic to the wider internet and is usually pre-configured by the host at the network level.
If you're setting up networking manually on a Linux VPS or Windows VPS, for example after a fresh OS installation, the correct default gateway IP is provided in your hosting control panel and must match the subnet of your assigned IP address.
Related Guide
Linux VPS Hosting PlansGet a Linux VPS with a pre-configured network setup, including IP address and default gateway, ready to use.
The default gateway is what makes communication beyond the local network possible, and understanding how it's assigned and verified is a fundamental part of diagnosing connectivity issues on any device or server.
Need a Windows Server?
DropVPS Windows VPS gives you full Admin RDP access, instant setup, and dedicated resources โ run any Windows workload without limits.
- Full Admin Access
- RDP Ready Instantly
- Dedicated Resources
- 24/7 Support
No commitment ยท Cancel anytime
