What Your Default Gateway Is and Why You Need It
Your default gateway is the device on your network that sends your computer's traffic to the internet. It is usually your router. When your computer needs to reach a website or send an email to someone outside your home or office network, it sends that data to the gateway first, and the gateway forwards it onward. Knowing your gateway's address helps you troubleshoot connection problems, access your router's settings, or diagnose why certain devices cannot reach the internet.
The default gateway appears as an IP address — four numbers separated by dots, like 192.168.1.1 or 10.0.0.1. Finding it takes less than a minute on any device, and the steps differ slightly depending on whether you use Windows, Mac, or Linux.
Key Takeaways
- Your default gateway is almost always your router's IP address, and you can find it by running a single command on your computer.
- On Windows, open Command Prompt and type ipconfig, then look for the line labeled "Default Gateway".
- On Mac and Linux, open Terminal and type route -n or netstat -rn to see your gateway address.
- Once you have the gateway address, you can type it into a web browser to log into your router and change its settings.
- If the gateway field is blank or shows 0.0.0.0, your computer is not connected to a network properly.
Finding Your Default Gateway on Windows
Open Command Prompt by pressing the Windows key, typing cmd, and pressing Enter. A black window will appear with a cursor blinking at the bottom.
Type ipconfig and press Enter. Your computer will display a list of network information. Look for the section labeled "Ethernet adapter" or "Wireless LAN adapter" — whichever one you are using to connect to the internet. Within that section, find the line that says "Default Gateway" followed by an IP address. That address is what you are looking for. Write it down or take a screenshot.
If you see multiple network adapters listed, check the one that shows an "IPv4 Address" starting with a number like 192.168 or 10.0. That is the active connection, and its default gateway is the one you need.
Finding Your Default Gateway on Mac
Open Terminal by pressing Command + Space, typing terminal, and pressing Enter. A white window with black text will open.
Type route -n get default and press Enter. Look for the line that says "gateway:" followed by an IP address. That is your default gateway. Alternatively, you can type netstat -rn | grep default to see the same information in a different format.
If you prefer using the graphical interface instead, you can also go to System Settings, click Network, select your active connection (Wi-Fi or Ethernet), and click Details. The gateway address will appear in the TCP/IP tab.
Finding Your Default Gateway on Linux
Open a terminal window. Type route -n and press Enter. A table will appear showing your network routes. Look at the row where the "Destination" column shows 0.0.0.0 or default. The IP address in the "Gateway" column is your default gateway.
If that command does not work, try netstat -rn or ip route show. All three commands show the same information in slightly different layouts. The gateway address will be the one associated with your active internet connection.
On some Linux systems, you may also see the gateway listed under default via when you run ip route. The address that follows "via" is your default gateway.
What to Do Once You Have Your Gateway Address
Once you have written down your default gateway address, you can type it directly into a web browser's address bar — for example, 192.168.1.1 — and press Enter. This will take you to your router's login page. From there, you can change your Wi-Fi password, restart the router, check which devices are connected, or adjust other network settings.
Most routers use a default username and password printed on a sticker on the back or bottom of the device. If you have changed the password and forgotten it, you can reset the router to factory settings by holding down a small reset button for 10 to 15 seconds, though this will erase any custom settings you have made.
Troubleshooting When the Gateway Field Is Empty
If you run the command and the default gateway field is blank, shows 0.0.0.0, or does not appear at all, your computer is not properly connected to your network. This usually means either your network adapter is disabled, your Wi-Fi is not connected, or your router is not responding.
First, check that you are actually connected to your network. On Windows, look at the network icon in the system tray at the bottom right. On Mac, check the Wi-Fi icon in the top right corner. On Linux, check your network manager applet. If you are not connected, click the network icon and select your network name, then enter your password.
If you are connected but still see no gateway, try restarting your computer and your router. Unplug the router for 30 seconds, plug it back in, wait for all lights to stop blinking, then restart your computer and run the command again.
Frequently Asked Questions
Why does my default gateway look different from my router's IP address?
It should not look different — they are the same thing. Your default gateway is your router's IP address on your local network. If you see a different address, you may be looking at the wrong network adapter or your computer may be connected to a different network than you think.
Can I change my default gateway address?
You can change your router's IP address by logging into the router and adjusting its settings, but this is rarely necessary and can cause problems if you do not know what you are doing. Most people should leave the default gateway address as it is.
Is my default gateway the same as my public IP address?
No. Your default gateway is a private address used only on your home or office network. Your public IP address is assigned by your internet provider and is visible to websites you visit. You can find your public IP by searching "what is my IP" in a web browser.
What if I have multiple default gateways listed?
You may see multiple network adapters if your computer is connected to more than one network at once — for example, both Wi-Fi and Ethernet. Each adapter will have its own gateway. Use the gateway for whichever connection you are actually using to reach the internet.