Connected: An Internet Encyclopedia
3.3.1.1 Local/Remote Decision
Up:
Connected: An Internet Encyclopedia
Up:
Requests For Comments
Up:
RFC 1122
Up:
3. INTERNET LAYER PROTOCOLS
Up:
3.3 SPECIFIC ISSUES
Up:
3.3.1 Routing Outbound Datagrams
Prev: 3.3.1 Routing Outbound Datagrams
Next: 3.3.1.2 Gateway Selection
3.3.1.1 Local/Remote Decision
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]:
- 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.
- 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.
- If not, then the destination is accessible only through
a gateway. Selection of a gateway is described below
(3.3.1.2).
A special-case destination address is handled as follows:
- For a limited broadcast or a multicast address, simply
pass the datagram to the link layer for the appropriate
interface.
- For a (network or subnet) directed broadcast, the
datagram can use the standard routing algorithms.
The host IP layer MUST operate correctly in a minimal
network environment, and in particular, when there are no
gateways. For example, if the IP layer of a host insists on
finding at least one gateway to initialize, the host will be
unable to operate on a single isolated broadcast net.
Next: 3.3.1.2 Gateway Selection
Connected: An Internet Encyclopedia
3.3.1.1 Local/Remote Decision