TCP/IP For Internet Administrators
Previous Section Previous Page Query/Search Next Page Next Section

Moving Data Between Protocol Layers

The Transport Layer above IP and the Network Access Layer below it can both contain more than one protocol. Part of the task performed by IP is to determine to which of these protocols, at the higher and lower level, a packet should be passed.

When a datagram is received that is addressed to the local host, IP must determine to which protocol at the Transport Layer the packet should be passed. The third 32-bit word of the IP header contains a field that carries a protocol number. Each Transport Layer protocol has a unique protocol number, or port, associated with it. IP strips the datagram header and passes the packet to the protocol identified by the protocol number.

When IP receives a packet that has a destination that is not on the local host, it passes the datagram to the Network Access Layer. If a system is connected to more than one network, IP must determine to which network the datagram should be passed. This is done by comparing the IP address of the destination to the entries in the routing table. When a matching entry is found in the routing table, the interface field of that entry is read. This field identifies the proper Network Access Level interface to which the packet should be passed.

Previous Section Previous Page Query/Search Next Page Next Section