Some more notes on the TCP/IP suite:

Applications and security

Application addresses Application Ports Machine Naming Service Naming  

IP Routing

Please read chapter 8 to help understand this material. Also, please read sections 10.6 through 10.14 to help understand subnet masks.

Note: for most machines, a single default entry is all you need.

For example:

          A B C  D  E F G H 
          | | | / \ | | | |
         -------   ---------

 Machines A, B, C, E, F, G, and H all have a default route in their routing table, specifying D as the default router (A, B, and C specify the first interface of D. Machines E, F, G, and H specify the second interface of D).

Each entry in the routing table contains the following:

Before IP attempts to do any routing, it will do the following: If the destination is not on a directly attached network, then do the following: The table is populated one of three ways: Let's look at an example:

               A   B   C   D   E  F G H   I   J   K  L    M    N   O   P
      |   |   |  / \  |  | | |  / \  |   |  |    / \  |   |   |
     ------------   ------------  --------------   -------------

 We'll assign the following IP addresses:

D (interface 1):

D (interface 2):
I (interface 1):

I (interface 2):
M (interface 1):

M (interface 2):

The routing table for A is the following: N interface_1 N interface_1

The first line of the table means if the destination address has as the network number, deliver it directly out the network (note that A's address is in the second field, and that means deliver it directly). The "N" means the first field is a network number (as opposed to a full IP address).

The second line is the default entry. The "" in a routing table means "the default route". As you can see, the routing table says deliver all other destinations to machine D.

Very important: Every router must be on a directly-attached network. You cannot specify a router on another network. For example, machine A could
not have a table entry like the following: N interface_1
because is not on A's network!

The routing table for machine F would be the following:   N interface_1   N interface_1   N interface_1

Note that every router is on F's network. Also, machine I is the best machine for a default router. If we made machine D the default router, the routing table for F would be the following:   N interface_1   N interface_1   N interface_1   N interface_1

 ...and, that routing table has four entries instead of three, so it's not as good as the previous entry.

 let's look at the routing table for machine M:  N interface_1  N interface_2  N interface_1

And finally the routing table for I:  N interface_1 N interface_2  N interface_1 N interface_2

Note that I does not have a default route in this case. BUT, if machine P had a second interface that was connected to the internet, the routing table for I would be:  N interface_1 N interface_2  N interface_1 N interface_2