Code Introduction (IPv6 Unicast Routing Protocols)

In BSD systems the Routing Information Base (RIB) is maintained in a user process called a routing daemon while the Forwarding Information Base (FIB) is stored in the kernel routing table. The routing daemon builds its RIB through routing information exchanges with other routers, and communicates with the kernel via a special type of socket named a routing socket so that the RIB and FIB are consistent. Some routing daemons also use a supplemental sysctl() interface to get access to the FIB and other kernel internal information.Figure 1-40 summarizes the overall implementation architecture.

The succeeding sections provide the KAME and FreeBSD implementation of some of the components shown in Figure 1-40 in more detail, focusing on IPv6-related topics. Section 1.8 describes IPv6 route entries in the kernel routing table; Section 1.9 explains how the routing socket and sysctl() interface can be used to deal with IPv6 routing information through code examples; finally, Sections 1.10 through 1.13 detail KAME’s route6d implementation, a simple example of the RIPng routing daemon. This set of descriptions will provide a solid base for developing IPv6 routing applications. The program files listed in Table 1-6 are covered in this topic.

FIGURE 1-40

FIGURE 1-40


TABLE 1-77

File

Description

${KAME}/freebsd4/usr.bin/netstat/route.c

The netstat command implementation

${KAME}/freebsd4/sys/net/route.h

Routing table and message structure

${KAME}/kame/kame/route6d/route6d.c

The route6d daemon implementation

${KAME}/kame/kame/route6d/route6d.h

Internal definitions for route6d

rtadd6.c

A sample program to install IPv6 route entry

Next post:

Previous post: