GATEWAYS(5)

NAME
gateways - Annex network initialization

DESCRIPTION
When an Annex boots, it reads the gateways section of the config.annex file from /usr/spool/erpcd/bfs. This file contains commands to initialize the routing tables of all Annexes on the local network. Finally, it can be used to add host names to an annex's host name table.

For routing information, the Annex gateways category has a format that corresponds closely to the /etc/gateways file used by routed(8C). That is, you can prep the Annex routing table with routes for networks and hosts. However, a few differences exist. The basic entry has the format:

    {net|host} addr1 gateway addr2 metric value {passive|hardwired}

The keywords net and host indicate whether the Internet address addr1 specifies a destination network or host. The Internet address addr2 specifies the gateway via which the destination is reached.

Since the RIP implementation on an Annex is listen-only and does not exchange any routing information with other routers, the Annex does not have the notion of active gateways. Thus, active routes are not supported in the Annex gateways file. However, a route learned from an active gateway producing RIP broadcasts will be aged. Thus, if that gateway stops including a route in its routing updates, the route will eventually be discarded.

The Annex does support passive gateways, and the keyword passive marks a route as such. This indicates that the gateway does not generate its own routing information. The principal effect of a passive route is to keep a routing entry from being aged and ultimately discarded. However, such a route can be overridden by a routing update containing a better route to the destination. The Annex also supports the notion of hardwired (or fixed) routes, marked by the keyword hardwired. Such a route will never be changed or deleted, even if a routing update containing a better route is received by the Annex.

Finally, the metric value indicates the number of hops needed to reach the destination.

There are a few additional differences between the Annex gateways category and the /etc/gateways file used by routed(8C). First, all Internet addresses in the Annex gateways file are required to be specified in standard Internet dot notation. This is because when the Annex is reading the gateways file, it is still in the process of booting, and thus cannot yet do name-to-address translations. Comments can be placed in the gateways section and are introduced by a ``#'' character anywhere on a line and terminated by the end of that line. Excess white space in the file is ignored.

If an Annex has syslogging enabled, it will report errors encountered while reading the gateways section with an extensive selection of syslog messages. The messages are self-descriptive and include the line number of the offending line. Various information useful for only for debugging is logged at the the info and debug levels.

In addition to routing information, there are two other types of entries possible in the gateways category. The first is the conditional:

    annex ipaddr
     ...
    else
     ...
    end

The ellipses represent any group of entries normally valid in the gateways file. This conditional causes all the entries in the first set of ellipses to be evaluated only on the Annex that uses the given Internet address ipaddr for its Ethernet interface. The optional else clause causes all the entries in the second set of ellipses to be evaluated on all Annexes, except for the Annex that matched the annex clause. This can be used to selectively assign routes to hosts, such as only giving a default route to an external gateway to certain Annexes.

The second additional entry is used for adding host name entries to the host table of an annex. The entries are similar to entries in the /etc/host file, except aliasing is not supported. When the Annex boots, it adds the host name entries in the gateway section of the configuration file to its host table. The format of a host name entry is the Internet Address of the host followed by the host name. For example:

    192.9.200.2 snoopy

Host name entries may be conditional with the use of the annex and end statements. This restricts the loading of the host names to particular annexes.

The following is an example:

    annex 132.245.10.7
    	net 132.245.5.0 gateway 132.245.99.2 metric 1 hardwired
    else
    	net 132.245.5.0 gateway 132.245.10.7 metric 2 hardwired
    	host 132.245.99.2 gateway 132.245.10.7 metric 2 hardwired
    end

    These entries inform annex01, ipaddr 132.245.10.7, that host01, ipaddr 132.245.99.2, is a gateway to network 132.245.5 and informs other Annexes on network 132.245.10 that annex01 is a gateway to either host01 or network 132.245.5.

BUGS

The current implementation does not allow the annex/else/end clause to be nested. That is, you cannot use another annex conditional while already in the scope of another annex or else clause. While an error message will not be generated if they are nested, the results will not be what is expected.

FILES
/usr/spool/erpcd/bfs/config.annex

SEE ALSO
erpcd(8), routed(8C), config.annex(5)
Annex Network Administrator's Guide