A Gateway is the default path thought which all our network traffic are sent though. It acts like a door though which, a user can interact with any Systems or server across the globe. Consider each network as a house, and gateway as the door of these houses. There should be door if someone has to go interact with the external world.

These gateways in the real world is just an address inside the internal network that we use. Just like every systems in a network has an internal address, the gateway also has the same sort of address. Gateway addresses are automatically assigned by the system. The user also can change the default gateway address inside the network on their individual systems. These systems can then route their traffic to the address of the gateway. If the system is addressing a PC outside the network then the gateway passes the traffic to the next level of network y=until it is routed to the destination.

Change the Default Gateway address in Windows.

Step 1 : Open ‘Network And Sharing Center‘ . Double Click the ‘Local Area Network‘ that you are connected to.

Open 'Network And Sharing Center' . Double Click the 'Local Area Network'

Open ‘Network And Sharing Center’ . Double Click the ‘Local Area Network’

Step 2 : Click ‘Properties’ Button.The property window loads. Select the ‘Internet protocol version 4‘ . Then Click the property button beneath it.

The property window

The property window

Step 3 :  Select the ‘Use the following IP Address‘ radio option, and the fields next to it gets activated. Fill out tour desired details in the fields top update your gateway address. Click OK.

Change the IP, Subnet Mask, Gateway.

Change the IP, Subnet Mask, Gateway.


Change the Default Gateway address in Linux.

In Linux the above is done in the Linux terminal with ‘route‘ Command. You must have the root user privileges in order to continue.

Step 1 : Open the terminal . type ‘route add default gw IP_address interface_name’

The interface name is the name of the interface through which we connect to network, In my case it is ‘eth0‘ which represents my Gigabyte Ethernet connection.

IP_address is the default address you want to set as the gateway.