3.3 SPECIFIC ISSUES 3.3.1 Routing Outbound Datagrams The IP layer chooses the correct next hop for each datagram it sends. If the destination is on a connected network, the datagram is sent directly to the destination host; otherwise, it has to be routed to a gateway on a connected network. 3.3.1.1 Local/Remote Decision To decide if the destination is on a connected network, the following algorithm MUST be used [see IP:3]: (a) The address mask (particular to a local IP address for a multihomed host) is a 32-bit mask that selects the network number and subnet number fields of the corresponding IP address. (b) If the IP destination address bits extracted by the address mask match the IP source address bits extracted by the same mask, then the destination is on the corresponding connected network, and the datagram is to be transmitted directly to the destination host. (c) If not, then the destination is accessible only through a gateway. Selection of a gateway is described below (3.3.1.2).