メインコンテンツまでスキップ

Appendix A. Technical Details

Network Working Group                                          R. Braden
Request for Comments: 1009 J. Postel
Obsoletes: 985 ISI
June 1987
Requirements for Internet Gateways

Appendix A. Technical Details​

This Appendix collects a number of technical details and rules concerning datagram forwarding by gateways and datagram handling by hosts, especially in the presence of broadcasting and subnets.

A.1. Rules for Broadcasting​

The following rules define how to handle broadcasts of packets and datagrams [50]:

  a.  Hosts (which do not contain embedded gateways) must NEVER
forward any datagrams received from a connected network,
broadcast or not.

When a host receives an IP datagram, if the destination
address identifies the host or is an IP broadcast address,
the host passes the datagram to its appropriate
higher-level protocol module (possibly sending ICMP
protocol unreachable, but not if the IP address was a
broadcast address). Any other IP datagram must simply be
discarded, without an ICMP error message. Hosts never send
redirects.

b. All packets containing IP datagrams which are sent to the
local-network packet broadcast address must contain an IP
broadcast address as the destination address in their IP
header. Expressed in another way, a gateway (or host) must
not send in a local-network broadcast packet an IP datagram
that has a specific IP host address as its destination
field.

c. A gateway must never forward an IP datagram that arrives
addressed to the IP limited broadcast address {-1,-1}.
Furthermore, it must must not send an ICMP error message
about discarding such a datagram.

d. A gateway must not forward an IP datagram addressed to
network zero, i.e., {0, *}.

e. A gateway may forward a directed broadcast datagram, i.e.,
a datagram with the IP destination address:

{ <Network-number>, -1}.

However, it must not send such a directed broadcast out the
same interface it came in, if this interface has
<Network-number> as its network number. If the code in the
gateway making this decision does not know what interface
the directed-broadcast datagram arrived on, the gateway
cannot support directed broadcast to this connected network
at all.

f. A gateway is permitted to protect its connected networks by
discarding directed broadcast datagrams.

A gateway will broadcast an IP datagram on a connected network if it is a directed broadcast destined for that network. Some gateway-gateway routing protocols (e.g., RIP) also require broadcasting routing updates on the connected networks. In either case, the datagram must have an IP broadcast address as its destination.

  Note:  as observed earlier, some host implementations (those
based on Berkeley 4.2BSD) use zero rather than -1 in the host
field. To provide compatibility during the period until these
systems are fixed or retired, it may be useful for a gateway to
be configurable to send either choice of IP broadcast address
and accept both if received.

A.2. ICMP Redirects​

A gateway will generate an ICMP Redirect if and only if the destination IP address is reachable from the gateway (as determined by the routing algorithm) and the next-hop gateway is on the same (sub-)network as the source host. Redirects must not be sent in response to an IP network or subnet broadcast address or in response to a Class D or Class E IP address.

A host must discard an ICMP Redirect if the destination IP address is not its own IP address, or the new target address is not on the same (sub-)network. An accepted Redirect updates the routing data-base for the old target address. If there is no route associated with the old target address, the Redirect is ignored. If the old route is associated with a default gateway, a new route associated with the new target address is inserted in the data-base.