Skip to main content

5. Network Reachability (NR) Message

Terminology: Let gateway G have an interface to network N. We say that G is AN APPROPRIATE FIRST HOP to network M relative to network N (where M and N are distinct networks) if and only if the following condition holds:

Traffic which is destined for network M, and which arrives at gateway G over its network N interface, will be forwarded to M by G over a path which does not include any other gateway with an interface to network N.

In short, G is an appropriate first hop for network M relative to network N just in case there is no better gateway on network N through which to route traffic which is destined for network M. For optimal routing, traffic in network N which is destined for network M ought always to be forwarded to a gateway which is an appropriate first hop.

In order for exterior neighbors G and G' (which are neighbors over network N) to be able to use each other as packet switches for forwarding traffic to remote networks, each needs to know the list of networks for which the other is an appropriate first hop. The Exterior Gateway Protocol defines a message, called the Network Reachability Message (or NR message), for transferring this information.

Let G be a gateway on network N. Then the NR message which G sends about network N must contain the following information:

A list of all the networks for which G is an appropriate first hop relative to network N.

If G' can obtain this information from exterior neighbor G, then it knows that no traffic destined for networks which are NOT in that list should be forwarded to G. (It cannot simply conclude, however, that all traffic for any networks in that list ought to be forwarded via G, since G' may also have other neighbors which are also appropriate first hops to network N. For example, G and G'' might each be neighbors of G', but might be "equidistant" from some network M. Then each could be an appropriate first hop.)

For each network in the list, the NR message also specifies the "distance" (according to some metric whose definition is left to the designers of the autonomous system of which gateway G is a member) from G to that network. Core gateways will report distances less than 128 for networks that can be reached without leaving the core system, and greater than or equal to 128 otherwise. A stub gateway should report distances less than 128 for all networks listed in its NR messages.

The maximum value of distance (255.) shall be taken to mean that the network is UNREACHABLE. ALL OTHER VALUES WILL BE TAKEN TO MEAN THAT THE NETWORK IS REACHABLE.

If an NR message from some gateway G fails to mention some network N which was mentioned in the previous NR message from G, it is possible that N has become unreachable from G. If several successive NR messages from G omit mention of N, it should be taken to mean that N is no longer reachable from G. This procedure is necessary to ensure that networks which can no longer be reached, but which are never explicitly declared unreachable, are timed out and removed from the list of reachable networks.

It will often be the case that where a core gateway G and a stub gateway G' are direct neighbors on network N, G knows of many more gateway neighbors on network N, and knows for which networks those gateway neighbors are the appropriate first hop. Since the stub G' may not know about all these other neighbors, it is convenient and often more efficient for it to be able to obtain this information from G. Therefore, the EGP NR message also contains fields which allow the core gateway G to specify the following information:

a) A list of all neighbors (both interior and exterior) of G (on network N) which G has reliably determined to be reachable. G may also include indirect neighbors in this list (see below.)

b) For each of those neighbors, the list of networks for which that neighbor is an appropriate first hop (relative to network N).

c) For each such <neighbor, network> pair, the "distance" from that neighbor to that network.

Thus the NR message provides a means of allowing a gateway to "discover" new neighbors by seeing whether a neighbor that it already knows of has any additional neighbors on the same network. This information also makes possible the implementation of the INDIRECT NEIGHBOR strategy defined below.

A more precise description of the NR message is the following.

The data portion of the message will consist largely of blocks of data. Each block will be headed by a gateway address, which will be the address either of the gateway sending the message or of one of that gateway's neighbors. Each gateway address will be followed by a list of the networks for which that gateway is an appropriate first hop. All networks at the same distance from the gateway will be grouped together in this list, preceded by the distance itself and the number of networks at that distance. The whole list is preceded by a count of the distance-groups in the list.

Preceding the list of data blocks is:

a) The count (one byte) of the number of interior neighbors of G for which this message contains data blocks. By convention, this count will include the data block for G itself, which should be the first one to appear.

b) The count (one byte) of the number of exterior neighbors of G for which this message contains data blocks.

c) The address of the network which this message is about. If G and G' are neighbors on network N, then in the NR message going from G to G', this is the address of network N. For convenience, four bytes have been allocated for this address -- the trailing one, two, or three bytes should be zero.

Then follow the data blocks themselves, first the block for G itself, then the blocks for all the interior neighbors of G (if any), then the blocks for the exterior neighbors. Since all gateways mentioned are on the same network, whose address has already been given, the gateway addresses are given with the network address part (one, two, or three bytes) omitted, to save space.

In the list of networks, each network address is either one, two, or three bytes, depending on whether it is a class A, class B, or class C network. No trailing bytes are used.

The NR message sent by a stub should be the simplest allowable. That is, it should have only a single data block, headed by its own address (on the network it has in common with the neighboring core gateway), listing just the networks to which it is an appropriate first hop. These will be just the networks that can be reached no other way, in general.

The core gateways will send complete NR messages, containing information about all other gateways on the common network, both core gateways (which shall be listed as interior neighbors) and other gateways (which shall be listed as exterior neighbors, and may include the stub itself). This information will enable the stub to become an indirect neighbor (see below) of all these other gateways. That is, the stub shall forward traffic directly to these other gateways as appropriate, but shall not become direct neighbors with them.

The stub should NEVER forward to any (directly or indirectly) neighboring core gateway any traffic for which that gateway is not an appropriate first hop, as indicated in an NR message. Of course, this does not apply to datagrams which are using the source route option; any such datagrams should always be forwarded as indicated in the source route option field, even if that requires forwarding to a gateway which is not an appropriate first hop.