What is Default Gateway and How To Find Current Default Gateway In Windows and Ubuntu?
Default gateway is a network term used to specify a special host which is used to to access other networks. Default gateway is also called as default route. One of the other popular use case for default gateway is using to access to the internet.
Default Gateway IP Address
Network administrators manages the default gateway IP address and they generally uses the first or last usable IP address in the network. Let’s look network
10.0.0./24 . This network range is from IP address 10.0.0.1 to 10.0.0.254 . The popular use case is using
10.0.0.1 as default gateway IP address.
List Windows Default Gateway
In windows operating systems we can use
ifconfig command in order to find detailed information about the network stack and protocols. Detailed tutorial about
ifconfig can be reached from following link.
We can also use
route print command to print defualt gateway.
> route print
As we can see from screenshot the network destination address
0.0.0.0 specifies the default gateway line. If we look to the
Gateway column we will see
192.168.122.1 which is default gateway of the windows system.
List Linux Default Gateway
Linux distributions like Ubuntu, CentOS, RedHAT uses
ip command to get detailed information about network and protocols. Look following tutorial for detailed information.
We will use
ip route command which will print all routes by starting from default route or default gateway.
$ ip route
Here default gateway line starts with
default via keywords which means all networks those do not exists in the current route table.
Modems and Routers Default Routes
The home internet users generally connect to the internet with modems or router. These routers generally uses
192.168.0.0/16 network or more specifically
192.168.0.0/24 network . The default gateway will be
192.168.1.1 in most of the situations.