Network security

What Is a Default Gateway? How It Routes Your Traffic

Every device on your network needs an exit point for traffic leaving the local network. That exit point is the default gateway, usually your router.

Cysoro Security TeamPublished · 7 min read
PC192.168.1.20your laptopGW192.168.1.1default gateway NETWORK SECURITY Defaultgateway The exit from your local network.
Quick answer

A default gateway is the IP address of the router a device sends traffic to when the destination is outside its own local network. Your computer compares each destination address with its subnet mask; if the destination is local, it sends the packet directly, and if it is remote, it sends the packet to the gateway, which forwards it toward the internet or another network.

Key takeaways

  • A default gateway is the router address your devices use for traffic leaving their own subnet, usually 192.168.1.1 or 192.168.0.1 at home.
  • Your device decides local versus remote by applying its subnet mask to the destination address, as described in RFC 1122.
  • Most gateway addresses arrive automatically by DHCP; a wrong gateway is one of the most common causes of no internet access.

You type a website address, and the page loads. Behind that simple act, your computer made a decision in milliseconds: is this destination on my network, or do I need to send it out? When the answer is "out", the packet goes to your default gateway — usually your router — and from there to the internet.

What is a default gateway?

A default gateway is the IP address of the router a device sends traffic to when the destination is outside its own local network. It is the exit point from your subnet, and in most homes and small offices it is the router that also connects you to the internet.

Think of your local network as a building and the gateway as its front door. Devices inside the building talk to each other directly, but anything addressed to the outside world goes through the front door. Without a gateway, your devices could only reach each other.

The gateway is usually a router, but it does not have to be a separate box. It can be a firewall, a layer 3 switch, or a virtual router in the cloud.

What matters is that it has an address on your local network and knows how to forward packets onward. BlueCat defines it as a routing configuration that tells a host where to send packets bound for addresses outside its local subnet.

How does a default gateway work?

When your device wants to send a packet, it first compares the destination address with its own address using the subnet mask. If the result matches its own network, the destination is local and the packet goes directly to that device. If it does not match, the packet goes to the default gateway.

This local-or-remote decision is described in RFC 1122, section 3.3.1.1, the internet standard for host behavior. The host applies its address mask to the destination and compares the result with its own network prefix, then chooses direct delivery or a gateway.

Once the packet reaches the gateway, the gateway looks up the destination in its own routing table and forwards it toward the next hop, which may be another router or your internet provider. Replies come back the same way, through the gateway to your device.

Local or remote? Your device decides firstYour laptop192.168.1.20mask /24Local printer192.168.1.50sent directlyDefault gateway192.168.1.1your routerRemote website at 203.0.113.10? Not local, so send it to the gateway.The gateway forwards it toward the internet. Replies return the same way.The destination IP never changes; only the link-layer address points at the gateway.
Your device sends local traffic directly and remote traffic to the gateway. Illustration by Cysoro.

What are the most common default gateway addresses?

Home routers commonly use 192.168.1.1 or 192.168.0.1, and some use 10.0.0.1 or 192.168.2.1. These are private addresses from the ranges set aside in RFC 1918, so they work inside your network but are not reachable from the internet.

The exact address depends on the router maker and how the network was set up. Some internet providers use 192.168.1.254, and business networks often use the first or last usable address in their subnet, such as 10.1.1.1. There is no rule that says a gateway must be a particular address.

Do not guess the address. Open your network settings and read it, or type the address you find there into a browser to reach the router admin page. If you want to check what the internet sees instead, our what is my IP tool shows your public address, which is different from the gateway.

Private range (RFC 1918)Typical gateway examplesWhere you see it
192.168.0.0/16192.168.0.1, 192.168.1.1, 192.168.1.254Most home routers
10.0.0.0/810.0.0.1, 10.1.1.1Business and larger networks
172.16.0.0/12172.16.0.1, 172.31.0.1Some business and cloud networks

How is a default gateway configured?

Most devices learn their gateway automatically from DHCP, the protocol that hands out IP addresses on a network. When your laptop joins a network, the DHCP server sends it an address, a subnet mask, DNS servers and the gateway address in one reply.

DHCP option 3, called the router option, carries the gateway address. That is defined in RFC 2131, the DHCP standard. Your router usually runs the DHCP server for a home network, so it tells devices to use itself as the gateway.

You can also set a gateway manually in your network settings. That is common on servers, printers and network equipment that need a fixed address. A static gateway must be on the same subnet as the device, or the device cannot reach it at all.

In IPv6, devices can learn a default router from router advertisements instead of DHCP. The idea is the same: the device needs to know which router to trust with traffic leaving its network.

How do I find my default gateway?

Finding your gateway takes less than a minute on any platform, and it is the first thing to check when the internet stops working. The gateway is listed as "default gateway" on Windows and as "router" on Mac and many phones.

On Windows, open Command Prompt and run ipconfig. Look for the adapter you are using, such as Wi-Fi or Ethernet, and read the "Default Gateway" line. On a Mac, open System Settings, choose Network, select your connection, click Details, and read the router address.

On Linux, run ip route in a terminal and look for the line starting with "default via". On an iPhone, go to Settings, Wi-Fi, tap the network name, and read the router field. On Android, the path varies by maker, but it is usually under the connected network details.

Once you know the address, you can test it. A successful ping to the gateway means your local network works and the problem is beyond the router. A failed ping means the problem is between your device and the router, such as Wi-Fi or a cable.

These four terms describe different parts of the same setup, and mixing them up makes troubleshooting harder. The router is the device, the gateway is the address you send traffic to, the subnet mask defines what counts as local, and DNS turns names into addresses.

TermWhat it isExample
RouterThe device that forwards packets between networksYour home router box
Default gatewayThe router's IP address on your subnet192.168.1.1
Subnet maskDefines which addresses are local255.255.255.0 (/24)
DNS serverTurns domain names into IP addresses1.1.1.1 or your provider's DNS

A gateway of last resort is the same idea at router level: a router's own default route, used when no more specific route matches. Network engineers also talk about a default route, written as 0.0.0.0/0, which is the routing-table entry that points at the gateway.

If your Wi-Fi itself is the problem, our guide on how to secure your Wi-Fi covers router settings that affect both security and connectivity.

Why is my default gateway not available?

The "default gateway is not available" message on Windows usually means your computer cannot reach the router. The gateway address may be wrong, the router may have stopped responding, or the link between your device and the router may be broken.

Work through the fixes in order. First, restart the router and your device. Then check that you are connected to the right network, and try a cable instead of Wi-Fi if you can. Renew your address with ipconfig /renew on Windows, which asks DHCP for a fresh gateway.

If that fails, check the gateway address in your settings against the address printed on the router or in its manual. A static address left over from another network is a common cause. Also check for a VPN or firewall that may be blocking local traffic, and update the network adapter driver if the problem keeps returning.

One more check: if the gateway responds to a ping but websites do not load, the problem is beyond the router, such as DNS or your internet provider. Try our DNS lookup tool to see whether names resolve, and check whether other devices on the same network have the same problem.

Is the default gateway a security risk?

Yes, the gateway is a security control point, because all traffic leaving your network passes through it. Anyone who controls the gateway can see where your traffic goes, and an attacker who changes your gateway setting can redirect your traffic to a malicious router.

That is why router security matters so much. Change the router's default admin password, keep its firmware updated, and turn off remote admin access unless you need it. An attacker who logs into your router can change DNS, the gateway and port forwarding in minutes.

On business networks, teams protect the gateway with a firewall, monitor it for changes, and use redundancy so a single failed router does not take the network down. Protocols such as VRRP let a backup router take over the same gateway address automatically.

Also watch for rogue DHCP servers, which hand out a wrong gateway to devices on the network. That is a classic attack on office and public Wi-Fi, and it is one reason to avoid untrusted networks for sensitive work. If you suspect your phone was affected by a network attack, read our guide on how to know if your phone is hacked.

Gateway not available? Work in this order1Restart the router, then restart your device2Check you are on the right network, try a cable3Renew DHCP: ipconfig /renew or reconnect to Wi-Fi4Ping the gateway: success means the fault is beyond itIf the ping fails, check cables, Wi-Fi and the router admin page.
Troubleshoot a missing gateway in order, from restart to ping test. Illustration by Cysoro.

The bottom line

A default gateway is simply the router address your devices use for everything outside their own network. Your device decides local versus remote with its subnet mask, then hands remote traffic to the gateway, which forwards it onward.

When the internet stops working, check the gateway first: find its address, ping it, and renew your DHCP lease. You can confirm what the internet sees from your network with the free what is my IP tool.

Frequently asked questions

What is a default gateway in simple terms?

It is the exit point from your local network. When your computer wants to reach a website or a server outside your home or office network, it sends the traffic to the default gateway, usually your router, and the router forwards it onward.

What is the default gateway IP address?

There is no single address for every network. Home routers commonly use 192.168.1.1 or 192.168.0.1, and some use 10.0.0.1. Your own gateway is the address your router uses on your local network, and you can find it in your device network settings.

Is the default gateway the same as the router?

Almost always, yes. The default gateway is the IP address of the router interface on your local network. The router is the device; the gateway is the address your devices send traffic to in order to reach that device.

What happens if the default gateway is wrong?

Local traffic still works, so you can reach printers and other devices on your own network, but you cannot reach the internet or any other network. Fix it by checking the gateway address in your network settings or by renewing your DHCP lease.

How do I find my default gateway on Windows and Mac?

On Windows, open Command Prompt and run ipconfig; the gateway is listed under your network adapter. On a Mac, open System Settings, then Network, select your connection, click Details, and look at the router address.

Can a network have more than one default gateway?

A device normally has one default gateway, which is the route of last resort. Routers themselves can have several routes, and businesses use redundancy protocols such as VRRP so a backup router takes over if the main gateway fails.

What is the difference between a default gateway and a subnet mask?

The subnet mask defines which addresses count as local on your network. The default gateway is the router address used for everything that is not local. Your device uses the mask to decide, and the gateway to send.

Is the default gateway the same as a DNS server?

No. The gateway forwards your traffic, while a DNS server turns domain names into IP addresses. They are often provided together by DHCP and may live on the same router, but they do different jobs.

Sources

  1. BlueCat — What is a default gateway?
  2. Techopedia — What is Default Gateway?
  3. IETF — RFC 1122: Requirements for Internet Hosts
  4. IETF — RFC 2131: Dynamic Host Configuration Protocol
  5. IETF — RFC 1918: Address Allocation for Private Internets
  6. Cisco — Routing Concepts (CCNA)
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against RFC 1122, RFC 2131, RFC 1918 and BlueCat's networking glossary.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free