2. Protocols Required in Gateways
Network Working Group R. Braden
Request for Comments: 1009 J. Postel
Obsoletes: 985 ISI
June 1987
Requirements for Internet Gateways
2. Protocols Required in Gateways
The Internet architecture uses datagram gateways to interconnect constituent networks. This section describes the various protocols which a gateway needs to implement.
2.1. Internet Protocol (IP)
IP is the basic datagram protocol used in the Internet system [19, 31]. It is described in RFC-791 [1] and also in MIL-STD-1777 [5] as clarified by RFC-963 [36] ([1] and [5] are intended to describe the same standard, but in quite different words). The subnet extension is described in RFC-950 [21].
With respect to current gateway requirements the following IP features can be ignored, although they may be required in the future: Type of Service field, Security option, and Stream ID option. However, if recognized, the interpretation of these quantities must conform to the standard specification.
It is important for gateways to implement both the Loose and Strict Source Route options. The Record Route and Timestamp options are useful diagnostic tools and must be supported in all gateways.
The Internet model requires that a gateway be able to fragment datagrams as necessary to match the MTU of the network to which they are being forwarded, but reassembly of fragmented datagrams is generally left to the destination hosts. Therefore, a gateway will not perform reassembly on datagrams it forwards.
However, a gateway will generally receive some IP datagrams addressed to itself; for example, these may be ICMP Request/Reply messages, routing update messages (see Sections 2.3 and 2.6), or for monitoring and control (see Section 5). For these datagrams, the gateway will be functioning as a destination host, so it must implement IP reassembly in case the datagrams have been fragmented by some transit gateway. The destination gateway must have a reassembly buffer which is at least as large as the maximum of the MTU values for its network interfaces and 576. Note also that it is possible for a particular protocol implemented by a host or gateway to require a lower bound on reassembly buffer size which is larger than 576. Finally, a datagram which is addressed to a gateway may use any of that gateway's IP addresses as destination address, regardless of which interface the datagram enters.
There are five classes of IP addresses: Class A through Class E [23]. Of these, Class D and Class E addresses are reserved for experimental use. A gateway which is not participating in these experiments must ignore all datagrams with a Class D or Class E destination IP address. ICMP Destination Unreachable or ICMP Redirect messages must not result from receiving such datagrams.
There are certain special cases for IP addresses, defined in the latest Assigned Numbers document [23]. These special cases can be concisely summarized using the earlier notation for an IP address:
IP-address ::= { <Network-number>, <Host-number> }
or
IP-address ::= { <Network-number>, <Subnet-number>,
<Host-number> }
if we also use the notation "-1" to mean the field contains all 1 bits. Some common special cases are as follows:
(a) {0, 0}
This host on this network. Can only be used as a source
address (see note later).
(b) {0, <Host-number>}
Specified host on this network. Can only be used as a
source address.
(c) { -1, -1}
Limited broadcast. Can only be used as a destination
address, and a datagram with this address must never be
forwarded outside the (sub-)net of the source.
(d) {<Network-number>, -1}
Directed broadcast to specified network. Can only be used
as a destination address.
(e) {<Network-number>, <Subnet-number>, -1}
Directed broadcast to specified subnet. Can only be used as
a destination address.
(f) {<Network-number>, -1, -1}
Directed broadcast to all subnets of specified subnetted
network. Can only be used as a destination address.
(g) {127, <any>}
Internal host loopback address. Should never appear outside
a host.
The following two are conventional notation for network numbers,
and do not really represent IP addresses. They can never be used
in an IP datagram header as an IP source or destination address.
(h) {<Network-number>, 0}
Specified network (no host).
(i) {<Network-number>, <Subnet-number>, 0}
Specified subnet (no host).
Note also that the IP broadcast address, which has primary application to Ethernets and similar technologies that support an inherent broadcast function, has an all-ones value in the host field of the IP address. Some early implementations chose the all-zeros value for this purpose, which is not in conformance with the specification [23, 49, 50].
2.2. Internet Control Message Protocol (ICMP)
ICMP is an auxiliary protocol used to convey advice and error messages and is described in RFC-792 [2].
We will discuss issues arising from gateway handling of particular ICMP messages. The ICMP messages are grouped into two classes: error messages and information messages. ICMP error messages are never sent about ICMP error messages, nor about broadcast or multicast datagrams.
The ICMP error messages are: Destination Unreachable, Redirect,
Source Quench, Time Exceeded, and Parameter Problem.
The ICMP information messages are: Echo, Information,
Timestamp, and Address Mask.
2.2.1. Destination Unreachable
The distinction between subnets of a subnetted network, which
depends on the address mask described in RFC-950 [21], must not
be visible outside that network. This distinction is important
in the case of the ICMP Destination Unreachable message.
The ICMP Destination Unreachable message is sent by a gateway
in response to a datagram which it cannot forward because the
destination is unreachable or down. The gateway chooses one of
the following two types of Destination Unreachable messages to
send:
* Net Unreachable
* Host Unreachable
Net unreachable implies that an intermediate gateway was unable
to forward a datagram, as its routing data-base gave no next
hop for the datagram, or all paths were down. Host Unreachable
implies that the destination network was reachable, but that a
gateway on that network was unable to reach the destination
host. This might occur if the particular destination network
was able to determine that the desired host was unreachable or
down. It might also occur when the destination host was on a
subnetted network and no path was available through the subnets
of this network to the destination. Gateways should send Host
Unreachable messages whenever other hosts on the same
destination network might be reachable; otherwise, the source
host may erroneously conclude that ALL hosts on the network are
unreachable, and that may not be the case.
2.2.2. Redirect
The ICMP Redirect message is sent by a gateway to a host on the
same network, in order to change the gateway used by the host
for routing certain datagrams. A choice of four types of
Redirect messages is available to specify datagrams destined
for a particular host or network, and possibly with a
particular type-of-service.
If the directly-connected network is not subnetted, a gateway
can normally send a network Redirect which applies to all hosts
on a specified remote network. Using a network rather than a
host Redirect may economize slightly on network traffic and on
host routing table storage. However, the saving is not
significant, and subnets create an ambiguity about the subnet
mask to be used to interpret a network Redirect. In a general
subnet environment, it is difficult to specify precisely the
cases in which network Redirects can be used.
Therefore, it is recommended that a gateway send only host (or
host and type-of-service) Redirects.
2.2.3. Source Quench
All gateways must contain code for sending ICMP Source Quench
messages when they are forced to drop IP datagrams due to
congestion. Although the Source Quench mechanism is known to
be an imperfect means for Internet congestion control, and
research towards more effective means is in progress, Source
Quench is considered to be too valuable to omit from production
gateways.
There is some argument that the Source Quench should be sent
before the gateway is forced to drop datagrams [62]. For
example, a parameter X could be established and set to have
Source Quench sent when only X buffers remain. Or, a parameter
Y could be established and set to have Source Quench sent when
only Y per cent of the buffers remain.
Two problems for a gateway sending Source Quench are: (1) the
consumption of bandwidth on the reverse path, and (2) the use
of gateway CPU time. To ameliorate these problems, a gateway
must be prepared to limit the frequency with which it sends
Source Quench messages. This may be on the basis of a count
(e.g., only send a Source Quench for every N dropped datagrams
overall or per given source host), or on the basis of a time
(e.g., send a Source Quench to a given source host or overall
at most once per T millseconds). The parameters (e.g., N or T)
must be settable as part of the configuration of the gateway;
furthermore, there should be some configuration setting which
disables sending Source Quenches. These configuration
parameters, including disabling, should ideally be specifiable
separately for each network interface.
Note that a gateway itself may receive a Source Quench as the
result of sending a datagram targeted to another gateway. Such
datagrams might be an EGP update, for example.
2.2.4. Time Exceeded
The ICMP Time Exceeded message may be sent when a gateway
discards a datagram due to the TTL being reduced to zero. It
may also be sent by a gateway if the fragments of a datagram
addressed to the gateway itself cannot be reassembled before
the time limit.
2.2.5. Parameter Problem
The ICMP Parameter Problem message may be sent to the source
host for any problem not specifically covered by another ICMP
message.
2.2.6. Address Mask
Host and gateway implementations are expected to support the
ICMP Address Mask messages described in RFC-950 [21].
2.2.7. Timestamp
The ICMP Timestamp message has proven to be useful for
diagnosing Internet problems. The preferred form for a
timestamp value, the "standard value", is in milliseconds since
midnight GMT. However, it may be difficult to provide this
value with millisecond resolution. For example, many systems
use clocks which update only at line frequency, 50 or 60 times
per second. Therefore, some latitude is allowed in a
"standard" value:
* The value must be updated at a frequency of at least 30
times per second (i.e., at most five low-order bits of
the value may be undefined).
* The origin of the value must be within a few minutes of
midnight, i.e., the accuracy with which operators
customarily set CPU clocks.
To meet the second condition for a stand-alone gateway, it will
be necessary to query some time server host when the gateway is
booted or restarted. It is recommended that the UDP Time
Server Protocol [44] be used for this purpose. A more advanced
implementation would use NTP (Network Time Protocol) [45] to
achieve nearly millisecond clock synchronization; however, this
is not required.
Even if a gateway is unable to establish its time origin, it
ought to provide a "non-standard" timestamp value (i.e., with
the non-standard bit set), as a time in milliseconds from
system startup.
New gateways, especially those expecting to operate at T1 or
higher speeds, are expected to have at least millisecond
clocks.
2.2.8. Information Request/Reply
The Information Request/Reply pair was intended to support
self-configuring systems such as diskless workstations, to
allow them to discover their IP network numbers at boot time.
However, the Reverse ARP (RARP) protocol [15] provides a better
mechanism for a host to use to discover its own IP address, and
RARP is recommended for this purpose. Information
Request/Reply need not be implemented in a gateway.
2.2.9. Echo Request/Reply
A gateway must implement ICMP Echo, since it has proven to be
an extremely useful diagnostic tool. A gateway must be
prepared to receive, reassemble, and echo an ICMP Echo Request
datagram at least as large as the maximum of 576 and the MTU's
of all of the connected networks. See the discussion of IP
reassembly in gateways, Section 2.1.
The following rules resolve the question of the use of IP
source routes in Echo Request and Reply datagrams. Suppose a
gateway D receives an ICMP Echo Request addressed to itself
from host S.
1. If the Echo Request contained no source route, D should
send an Echo Reply back to S using its normal routing
rules. As a result, the Echo Reply may take a different
path than the Request; however, in any case, the pair
will sample the complete round-trip path which any other
higher-level protocol (e.g., TCP) would use for its data
and ACK segments between S and D.
2. If the Echo Request did contain a source route, D should
send an Echo Reply back to S using as a source route the
return route built up in the source-routing option of
the Echo Request.
2.3. Exterior Gateway Protocol (EGP)
EGP is the protocol used to exchange reachability information between Autonomous Systems of gateways, and is defined in RFC-904 [11]. See also RFC-827 [51], RFC-888 [46], and RFC-975 [27] for background information. The most widely used EGP implementation is described in RFC-911 [13].
When a dynamic routing algorithm is operated in the gateways of an Autonomous System (AS), the routing data-base must be coupled to the EGP implementation. This coupling should ensure that, when a net is determined to be unreachable by the routing algorithm, the net will not be declared reachable to other ASs via EGP. This requirement is designed to minimize spurious traffic to "black holes" and to ensure fair utilization of the resources on other systems.
The present EGP specification defines a model with serious limitations, most importantly a restriction against propagating "third party" EGP information in order to prevent long-lived routing loops [27]. This effectively limits EGP to a two-level hierarchy; the top level is formed by the "core" AS, while the lower level is composed of those ASs which are direct neighbor gateways to the core AS. In practice, in the current Internet, nearly all of the "core gateways" are connected to the ARPANET, while the lower level is composed of those ASs which are directly gatewayed to the ARPANET or MILNET.
RFC-975 [27] suggested one way to generalize EGP to lessen these topology restrictions; it has not been adopted as an official specification, although its ideas are finding their way into the new EGP developments. There are efforts underway in the research community to develop an EGP generalization which will remove these restrictions.
In EGP, there is no standard interpretation (i.e., metric) for the distance fields in the update messages, so distances are comparable only among gateways of the same AS. In using EGP data, a gateway should compare the distances among gateways of the same AS and prefer a route to that gateway which has the smallest distance value.
The values to be announced in the distance fields for particular networks within the local AS should be a gateway configuration parameter; by suitable choice of these values, it will be possible to arrange primary and backup paths from other AS's. There are other EGP parameters, such as polling intervals, which also need to be set in the gateway configuration.
When routing updates become large they must be transmitted in parts. One strategy is to use IP fragmentation, another is to explicitly send the routing information in sections. The Internet Engineering Task Force is currently preparing a recommendation on this and other EGP engineering issues.
2.4. Address Resolution Protocol (ARP)
ARP is an auxiliary protocol used to perform dynamic address translation between LAN hardware addresses and Internet addresses, and is described in RFC-826 [4].
ARP depends upon local network broadcast. In normal ARP usage, the initiating host broadcasts an ARP Request carrying a target IP address; the corresponding target host, recognizing its own IP address, sends back an ARP Reply containing its own hardware interface address.
A variation on this procedure, called "proxy ARP", has been used by gateways attached to broadcast LANs [14]. The gateway sends an ARP Reply specifying its interface address in response to an ARP Request for a target IP address which is not on the directly-connected network but for which the gateway offers an appropriate route. By observing ARP and proxy ARP traffic, a gateway may accumulate a routing data-base [14].
Proxy ARP (also known in some quarters as "promiscuous ARP" or "the ARP hack") is useful for routing datagrams from hosts which do not implement the standard Internet routing rules fully -- for example, host implementations which predate the introduction of subnetting. Proxy ARP for subnetting is discussed in detail in RFC-925 [14].
Reverse ARP (RARP) allows a host to map an Ethernet interface address into an IP address [15]. RARP is intended to allow a self-configuring host to learn its own IP address from a server at boot time.
2.5. Constituent Network Access Protocols
See Section 3.
2.6. Interior Gateway Protocols
Distributed routing algorithms continue to be the subject of research and engineering, and it is likely that advances will be made over the next several years. A good algorithm needs to respond rapidly to real changes in Internet connectivity, yet be stable and insensitive to transients. It needs to synchronize the distributed data-base across gateways of its Autonomous System rapidly (to avoid routing loops), while consuming only a small fraction of the available bandwidth.
Distributed routing algorithms are commonly broken down into the following three components:
A. An algorithm to assign a "length" to each Internet path.
The "length" may be a simple count of hops (1, or infinity
if the path is broken), or an administratively-assigned
cost, or some dynamically-measured cost (usually an average
delay).
In order to determine a path length, each gateway must at
least test whether each of its neighbors is reachable; for
this purpose, there must be a "reachability" or "neighbor
up/down" protocol.
B. An algorithm to compute the shortest path(s) to a given
destination.
C. A gateway-gateway protocol used to exchange path length and
routing information among gateways.
The most commonly-used IGPs in Internet gateways are as follows.
2.6.1. Gateway-to-Gateway Protocol (GGP)
GGP was designed and implemented by BBN for the first
experimental Internet gateways [41]. It is still in use in the
BBN LSI/11 gateways, but is regarded as having serious
drawbacks [58]. GGP is based upon an algorithm used in the
early ARPANET IMPs and later replaced by SPF (see below).
GGP is a "min-hop" algorithm, i.e., its length measure is
simply the number of network hops between gateway pairs. It
implements a distributed shortest-path algorithm, which
requires global convergence of the routing tables after a
change in topology or connectivity. Each gateway sends a GGP
routing update only to its neighbors, but each update includes
an entry for every known network, where each entry contains the
hop count from the gateway sending the update.
2.6.2. Shortest-Path-First (SPF) Protocols
SPF [40] is the name for a class of routing algorithms based on
a shortest-path algorithm of Dijkstra. The current ARPANET
routing algorithm is SPF, and the BBN Butterfly gateways also
use SPF. Its characteristics are considered superior to
GGP [58].
Under SPF, the routing data-base is replicated rather than
distributed. Each gateway will have its own copy of the same
data-base, containing the entire Internet topology and the
lengths of every path. Since each gateway has all the routing
data and runs a shortest-path algorithm locally, there is no
problem of global convergence of a distributed algorithm, as in
GGP. To build this replicated data-base, a gateway sends SPF
routing updates to ALL other gateways; these updates only list
the distances to each of the gateway's neighbors, making them
much smaller than GGP updates. The algorithm used to
distribute SPF routing updates involves reliable flooding.
2.6.3. Routing Information (RIP)
RIP is the name often used for a class of routing protocols
based upon the Xerox PUP and XNS routing protocols. These are
relatively simple, and are widely available because they are
incorporated in the embedded gateway code of Berkeley BSD
systems. Because of this simplicity, RIP protocols have come
the closest of any to being an "Open IGP", i.e., a protocol
which can be used between different vendors' gateways.
Unfortunately, there is no standard, and in fact not even a
good document, for RIP.
As in GGP, gateways using RIP periodically broadcast their
routing data-base to their neighbor gateways, and use a
hop-count as the metric.
A fixed value of the hop-count (normally 16) is defined to be
"infinity", i.e., network unreachable. A RIP implementation
must include measures to avoid both the slow-convergence
phenomen called "counting to infinity" and the formation of
routing loops. One such measure is a "hold-down" rule. This
rule establishes a period of time (typically 60 seconds) during
which a gateway will ignore new routing information about a
given network, once the gateway has learned that network is
unreachable (has hop-count "infinity"). The hold-down period
must be settable in the gateway configuration; if gateways with
different hold-down periods are using RIP in the same
Autonomous System, routing loops are a distinct possibility.
In general, the hold-down period is chosen large enough to
allow time for unreachable status to propagate to all gateways
in the AS.
2.6.4. Hello
The "Fuzzball" software for an LSI/11 developed by Dave Mills
incorporated an IGP called the "Hello" protocol [39]. This IGP
is mentioned here because the Fuzzballs have been widely used
in Internet experimentation, and because they have served as a
testbed for many new routing ideas.
2.7. Monitoring Protocols
See Section 5 of this document.
2.8. Internet Group Management Protocol (IGMP)
An extension to the IP protocol has been defined to provide Internet-wide multicasting, i.e., delivery of copies of the same IP datagram to a set of Internet hosts [47, 48]. This delivery is to be performed by processes known as "multicasting agents", which reside either in a host on each net or (preferably) in the gateways.
The set of hosts to which a datagram is delivered is called a "host group", and there is a host-agent protocol called IGMP, which a host uses to join, leave, or create a group. Each host group is distinguished by a Class D IP address.
This multicasting mechanism and its IGMP protocol are currently experimental; implementation in vendor gateways would be premature at this time. A datagram containing a Class D IP address must be dropped, with no ICMP error message.