Mobile IPv6 with Linux

To start off
simply, let's begin without Route Optimization (RO), without
IPsec and with a manually configured HA address in the MN. Once we
have the basic setup working, we can enhance and expand
it incrementally. Keep in mind that in the real world, like on the Internet or in
enterprise networks, RO and IPsec are essential. In production networks,
you also might desire other extensions, such as Fast Mobile IPv6 (FMIPv6)
or Hierarchical Mobile IPv6 (HMIPv6), although those aren't implemented
by MIPL.

First, let's do the Home Agent configuration (denali),
Host State (sysctl).
At the outset, we need to put the HA in the right state of mind and
configure the HA machine to operate as a router, so we need to
turn on packet forwarding. We'll do this by setting the variable
/proc/sys/net/ipv6/conf/all/forwarding, using one of the following two
commands:

Our next step is to configure the Layer 3 (Network Layer) parameters. This
includes addressing, configuring the Router Advertisement Dæmon and
configuring the Mobility Dæmon.
To configure addressing, use the commands shown in Listing 2.

In the stanza pertaining to wlan0, you
can see that we have enabled router advertisements on the interface by
setting AdvSendAdvert. We also have configured the interface to operate as
an HA by setting AdvHomeAgentFlag. The other wireless interface, wlan1,
is configured similarly, except that AdvHomeAgentFlag isn't set. Note
that the more frequent the router advertisements are, the faster movement
can be detected but they generate more overhead.

Now launch the router advertisement dæmon, radvd:

[denali]# radvd -C /etc/radvd.conf

To configure the Mobility Dæmon, we need to edit the /etc/mip6d.conf
file, as follows:

NodeConfig HA;
## If set to > 0, will not detach from tty
DebugLevel 0;
## List of interfaces where we serve as Home Agent
Interface "wlan0";
UseMnHaIPsec disabled;

Notice that we merely indicated that the
machine is an HA and specified the interface that will be operating as
an HA. By launching the Mobility Dæmon, the router is set to fulfill
its duty as a faithful HA:

[denali]# mip6d -c /etc/mip6d -d 7

Now, let's move on to the Mobile Node Configuration (raven), Host State
(sysctl).
Just as with the HA, we'll start by establishing the mindset of the
MN. First, we must configure the MN to accept Router Advertisements
(RAs) to be able to configure a CoA and discover and track
default routers on the link automatically:

On the MN, an automatically created tunnel interface, called ip6tnl1
(IPv6 Tunnel 1), represents the tunneling process described above. This interface claims no global addresses when the MN is
in the Home network and assumes the HoA when the MN is away.

The primary mobility configuration parameters are the Home Address (HoA)
and the Home Agent (HA) address. To configure them, we need to edit the
/etc/mip6d.conf file as follows: