Your default gateway is the device that sends your traffic to the internet when your computer doesn't know where else to send it
When you open a web browser or send an email, your device needs to know how to reach servers that live outside your home or office network. The default gateway is the middleman that makes this possible. It's usually your router — the box that connects you to your internet service provider. Your device looks at the destination address of every packet of data it sends. If that address is on your local network, the packet goes directly there. If it's not, your device sends the packet to the default gateway instead, and the gateway figures out the next step.
Without a default gateway, your computer could talk to other devices on the same network but couldn't reach anything beyond it. You'd have internet access but no way to use it. Most of the time this setup happens automatically when you connect to a network — your router tells your device what the gateway address is, and you never think about it again. But when something breaks, knowing what a default gateway is and how to find yours becomes the first step to fixing it.
Key Takeaways
- Your default gateway is almost always your router, and it acts as the exit point for data leaving your local network.
- Your device learns its default gateway address automatically when you connect to a network, usually through DHCP.
- On Windows, you can find your default gateway by typing ipconfig in Command Prompt and looking for the line that says "Default Gateway".
- On Mac or Linux, open Terminal and type netstat -nr or route -n to see the gateway address listed as "default".
- If your default gateway is missing or wrong, your device can see your local network but cannot reach the internet.
How the default gateway routes your data
Think of your local network as a neighborhood and the internet as the rest of the world. Your device is a house in that neighborhood. When you want to send a letter to someone in your neighborhood, you hand it to a neighbor who knows where they live. But when you want to send a letter to someone across the country, you hand it to the post office — that's your default gateway.
Every packet your device sends has a destination IP address attached to it. Your device checks that address against its subnet mask, which is a set of rules that defines what counts as "local." If the destination is local, the packet goes directly to that device using its MAC address. If the destination is not local, your device wraps the packet and sends it to the default gateway's MAC address instead. The gateway then unwraps it, looks at the real destination, and sends it toward the internet backbone. The gateway also handles traffic coming back to you from the internet, unwrapping it and sending it to your device.
This system means your device doesn't need to know about every server on the internet — it only needs to know about one address: the default gateway. The gateway knows how to reach everything else, or it knows another gateway that does. That chain of gateways eventually reaches the server you're trying to talk to.
Where your default gateway address comes from
When you connect to a network, your device doesn't automatically know what the gateway address is. Instead, your router tells it. Most home and office networks use a system called DHCP (Dynamic Host Configuration Protocol) to hand out network settings automatically. When your device connects, it sends a broadcast message asking "Who is the DHCP server?" Your router answers and sends back a package of information: your device's IP address, the subnet mask, the default gateway address, and usually the addresses of DNS servers too.
On most home networks, the default gateway is 192.168.1.1 or 192.168.0.1 — these are the standard private IP addresses that routers use. Some routers use different addresses like 10.0.0.1 or 192.168.100.1. The exact address depends on how the router was configured, but DHCP takes care of telling your device what it is. You only need to know the address yourself if something has gone wrong and you need to troubleshoot or log into the router.
If DHCP fails — because the router is broken, the network is misconfigured, or your device's network settings got corrupted — your device might not receive a default gateway address at all. When that happens, your device can still see other devices on the network if you've manually set an IP address, but it won't be able to reach the internet.
Finding your default gateway on Windows
Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. Type ipconfig and press Enter. You'll see a list of network adapters and their settings. Look for the section labeled with your active network connection — usually "Ethernet" if you're plugged in with a cable, or "Wireless LAN adapter" if you're on Wi-Fi.
In that section, find the line that says "Default Gateway" followed by an IP address. That address is what your device is using to reach the internet. If the line is blank or missing, your device doesn't have a default gateway assigned, which means it can't reach anything beyond your local network. If you see multiple gateways listed, the first one is the primary route.
If you need to change your default gateway — which is rare and usually only happens if you're replacing your router or reconfiguring your network — you would do it through your network adapter settings. Right-click the network icon in your system tray, select "Open Network & Internet settings," then "Change adapter options," then right-click your active connection and select "Properties." But in most cases, DHCP will handle this for you automatically.
Finding your default gateway on Mac or Linux
On a Mac, open Terminal (you can find it in Applications > Utilities or search for it with Spotlight). Type netstat -nr and press Enter. You'll see a table of routes. Look for the line that starts with "default" — the address in the second column is your default gateway. On some Macs, you might also type route -n get default to see just the default gateway information.
On Linux, open a terminal and type route -n or ip route show. Look for the line that starts with "default via" — the IP address after "via" is your default gateway. Different Linux distributions format this output slightly differently, but the default gateway is always listed as the route for 0.0.0.0/0, which means "everything that's not on my local network."
If you see no default gateway listed on Mac or Linux, your device hasn't received one from DHCP, or your network connection is not active. Check that you're connected to the network and that your router is powered on and working.
What happens when your default gateway is missing or wrong
If your device has no default gateway, you can still reach other devices on your local network — you can ping your router, access a printer on the same network, or talk to another computer in the same room. But you cannot reach the internet. Websites won't load, email won't sync, and cloud services won't work. Your device simply has no way to send data beyond the local network.
If your default gateway address is wrong — pointing to an address that doesn't exist or isn't actually a router — the same thing happens. Your device tries to send internet traffic to that address, nothing answers, and the connection times out. This can happen if you manually configured your network settings and made a typo, or if your router's IP address changed and your device is still looking for the old one.
The fix is usually simple: restart your device or reconnect to the network to trigger DHCP again. Your router will send the correct gateway address, and internet access will return. If that doesn't work, restart your router. If it still doesn't work, check that your router is actually connected to your internet service provider's modem and that both devices are powered on.
The difference between default gateway and DNS
People often confuse the default gateway with DNS servers, but they do different jobs. Your default gateway is the physical path your data takes to leave your network. DNS servers are the phone book that translates domain names like google.com into IP addresses like 142.250.185.46. You need both to browse the web, but they work at different stages.
When you type a URL into your browser, your device first contacts a DNS server to find out what IP address that domain name points to. That DNS query goes through your default gateway to reach the DNS server. Once your device knows the IP address, it sends the actual web request through the default gateway to that IP address. If your default gateway is missing, neither the DNS query nor the web request can leave your network. If your DNS is wrong, your device can reach the internet but won't know what IP address to send traffic to.
Frequently Asked Questions
Can I have more than one default gateway?
Technically no — your device can only have one default gateway at a time. However, some advanced network setups use multiple gateways for redundancy or load balancing. In those cases, your device still has one primary default gateway, and the others are backup routes that only get used if the primary one fails. For home and small office networks, you'll always have just one.
Is my default gateway the same as my router's IP address?
Yes, in almost all cases. Your router's IP address on your local network is the same address that serves as your default gateway. When you log into your router to change Wi-Fi settings or check connected devices, you're connecting to that same IP address. The router has other IP addresses too — one from your internet service provider on the internet side — but the one you see in ipconfig is the one that matters for your local network.
What if I can't find my default gateway address?
If ipconfig, netstat, or route shows no default gateway, your device isn't connected to the network properly or DHCP isn't working. First, check that you're actually connected — look for a network icon in your system tray or menu bar. If you're connected but still see no gateway, try disconnecting and reconnecting to the network. If that doesn't work, restart your router and then restart your device. If the problem persists, your router may need to be reconfigured or replaced.
Can I change my default gateway manually?
Yes, but you shouldn't unless you have a specific reason. Manually setting a default gateway means DHCP won't override it, so if your router's address changes or you move to a different network, you'll have to change it again by hand. If you do need to change it, go into your network adapter settings and switch from "Obtain an IP address automatically" to "Use the following IP address," then enter your gateway address. Most of the time, letting DHCP handle it is simpler and more reliable.