Technical data

Gateway Routing Daemon (GATED) Configuration Reference
A.16 The Kernel Statement
During normal shutdown processing, GATED normally deletes all the routes it
has installed in the kernel forwarding table, except for those marked with retain.
Optionally, GATED can leave all routes in the kernel forwarding table by not
deleting any routes. In this case changes will be made to insure that routes with
a retain indication are installed in the table. This is useful on systems with
large numbers of routes as it prevents the need to re-install the routes when
GATED restarts. This can greatly reduce the time it takes to recover from a
restart.
A.16.1 Forwarding Tables and Routing Tables
The table in the kernel that controls the forwarding of packets is a forwarding
table, also known as a forwarding information base, or FIB. The table
that GATED uses internally to store routing information it learns from routing
protocols is a routing table, also known as a routing information base,or
RIB. The routing table is used to collect and store routes from various protocols.
For each unique combination of network and mask an active route is chosen,
this route will be the one with the best (numerically smallest) preference. All
the active routes are installed in the kernel forwarding table. The entries in this
table are what the kernel actually uses to forward packets.
A.16.2 Updating the Forwarding Table
There are two main methods of updating the kernel FIB, the
ioctl( )
interface
and the routing socket interface. Their various characteristics are described
here.
A.16.2.1 Updating the Forwarding Table with the ioctl Interface
The
ioctl
interface to the forwarding table was introduced in BSD 4.3. This is a
one-way interface; it only allows GATED to update the kernel forwarding table.
It has several other limitations:
Fixed subnet masks
The BSD 4.3 networking code assumed that all subnets of a given network
had the same subnet mask. This limitation is enforced by the kernel. The
network mask is not stored in the kernel forwarding table, but determined
when a packet is forwarded by searching for interfaces on the same network.
One way interface
GATED is able to update the kernel forwarding table, but it is not aware of
other modifications of the forwarding table. GATED is able to listen to ICMP
messages and guess how the kernel has updated the forwarding table with
response to ICMP redirects.
Blind updates
GATED is not able to detect changes to the forwarding table resulting from
the use of the ROUTE command. Use of the ROUTE command on systems
that use the
ioctl( )
interface is strongly discouraged while GATED is
running.
Changes not supported
In all known implementations, there is no change operation supported, to
change a route that exists in the kernel, the route must be deleted and a new
one added.
A–24 Gateway Routing Daemon (GATED) Configuration Reference