Getting Linux Connected, using Ethernet and TCP/IP

Default Gateway Setting



What is a Gateway ?

A Gateway is a device which is used to forward IP packets to a remote destination. Another name for a Gateway is a Router.

The definition of "remote" in this case, is a device that is not directly attached to the same network segment as the sending device (eg. the same ethernet segment).

Because the source device can't send the IP packet directly to the destination device, it must ask another device on the network to help. The device that helps it send to remote destinations is the gateway, attached to multiple networks.

The gateway, when it receives the packet to relay, determines the next closest hop on the path towards the ultimate destination, and relays the IP packet to that next hop. This next hop could either be the ultimate destination for the IP packet, or it could be another gateway closer towards the destination.

This hop-by-hop process continues until the IP packet reaches its ultimate destination.

Some Examples

The following are some examples of how a machine on the 10.0.1.0 subnet in the above diagram will communcate with a node on the same subnet, on subnet 10.0.2.0, and finally, subnet 10.0.3.0. The subnet mask in the example network is 255.255.255.0.

What Default Gateway address do I use ?

The Default Gateway IP address is the IP address of one of the gateways / routers attached to the local segment. This will be the device which is asked for help when sending an IP packet to a remote destination.

Default Gateway IP Address examples

The following are the IP addresses that would be used for Default Gateway IP addresses in the above diagram.

When don't you set a Default Gateway address ?

You don't set a Default Gateway address in two situations :


[Previous Page] | [Next Page] | [Start of Current Topic] | [Previous Topic] | [Next Topic]

LinuxSA - http://www.linuxsa.org.au

Prepared by Mark Smith
marks@senet.com.au

Fri Feb 20 13:28:08 CST 1998