In this section we'll have a quick look at configuring static routes. Static routes are routes that are configured by hand and don't really change often, as opposed to those routes learned from the network, which do. In the world of IPv4 we are often used to configuring a static route for the default gateway. An IPv6 host will usually learn its default route from the network, so in the usual case the job of configuring the default route is effectively the job of configuring the local router.
However, there are reasons why you might want to configure static routes. First, you may want to configure a static route on your router if you are not using IS-IS or OSPF to generate a routing table. Second, if you have a host connected to the IPv6 Internet via a tunnel (or some other transition mechanism) then you may not have a local router and you may need to configure your default route manually.
Table 5-11 and
Table 5-12 show how a
static route can be configured at boot time and at
runtime. In this case, we show how to configure a route to the
2001:db8:beef::/48 network via a
next hop of
Naturally, there are variants of these commands where you can add
routes to a specific host or routes via a specific interface; to find
out how to configure these permutations, consult your vendor's
Table 5-11. Boot time configuration of static routes: adding a route to 2001:db8:beef::/48 via 2001:db8:babe::1
Configuring static routes at boot