An internal table of information configured by systems using the TCP/IP
protocol to maintain information on how to reach different networks
To exist on a TCP/IP network, each interface must have an IP address together with a netmask which must be specified together with the IP address to correctly configure an interface, they form a unique node on that network.
(There's an excellent node on subnetting: IP Subnetting)
You can configure an interface with an address quite simply. A system can then connect to that interface and send data. This is fine, pinging a local intarface is used to verify the correct operation of the TCP/IP stack.
Not very useful if you want to talk to other hosts on the network, however. To do that you must tell the TCP/IP stack how to reach other hosts on that network. This information is stored in the system's routing tables.
It would seem logical that if an interface is configured with an IP address of 126.96.36.199 and a netmask of 255.255.255.128, then the system can talk to all other hosts on the same subnet via that interface. This is not automatically configured however, you must specify this.
In practice, systems will have scripts that do all this "magically" but the principle is important. Especially if you're ever stuck at a # and wonder why you can't make your computer talk to anything.
So the following entry is placed in the routing tables:
Destination Gateway Flags Ref Use Interface
-------------------- -------------------- ----- ----- ------ ---------
188.8.131.52 184.108.40.206 U 3 21417 qfe0
This instructs the system that all hosts in the range 220.127.116.11 to 18.104.22.168 can be contacted via the interface named "qfe0". On a windows system this will be replaced with the IP address with which the interface is configured.
The default route can be specified as the way to reach other systems that cannot explicitly contacted according to the system's routing tables. It is assumed that once a packet is sent out the interface configured as the default route, other systems will know how to get the data to its destination.
Note that the default route is not always required and will not always be required.
You can display routing tables with either:
- netstat -rn (UNIX)
- route print (Windows)