cks. It also carries out segmentation and reassembly function of a datagram to match frame sizes of data-link layer protocols. Addresses determine routing, and at the far end, equipment (hardware). Actual routing derives from the IP address, and equipment addresses derive from the data-link layer header (typically the 48-bit Ethernet address) (Ref. 5). 12.3 TCP/IP AND RELATED PROTOCOLS User data from upper-layer protocols is passed to the IP layer. The IP layer examines the network address (IP address) for a particular datagram and determines if the destination node is on its own local area network or some other network. If it is on the same network, the datagram is forwarded directly to the destination host. If it is on some other network, it is forwarded to the local IP router (gateway). The router, in turn, examines the address and forwards the datagram as appropriate. Routing is based on a look-up table residing in each router or gateway. 12.3.3.1 IP Routing Details. A gateway (router) needs only the network ID portion of the address to perform its routing function. Each router or gateway has a routing table which consists of: destination network addresses and specified next-hop gateway. Three types of routing are performed by the routing table: 1. Direct routing to locally attached devices 2. Routing to networks that are reached via one or more gateways 3. Default routing to destination network in case the first types of routing are unsuccessful Suppose a datagram (or datagrams) is (are) directed to a host which is not in the routing table resident in a particular gateway. Likewise, there is a possibility that the network address for that host is also unknown. These problems may be resolved with the address resolution protocol (ARP) (Ref. 7). First the ARP searches a mapping table which relates IP addresses with corresponding physical addresses. If the address is found, it returns the correct address to the requester. If it cannot be found, the ARP broadcasts a request containing the IP target address in que