INRIA Hierarchical Mobile IPv6
How to

C. CASTELLUCCIA - L. BELLIER - INRIA Rhône-Alpes
claude.castelluccia@inrialpes.fr

08/25/00

1  Glossary

A micro movement   is a movement within a domain.

A macro movement   is a movement between two different domains.

Hierarchical Mobile IPv6   is an extention of the Mobile IPv6 protocol. Mobile IPv6 is not a good solution to handle micro mobility, because a mobile has to send binding updates each time it moves. Mobile IPv6 is not scalable. The idea is to hide micro mobility.

The mobile host registers with an Agent in the domain it is visiting. This agent gives the mobile host a second care-of address, we call this a global care-of address(GCOA). The mobile host also has to configure the care-of address in the link it is attached to, this is the local care-of address (LCOA). Each time the mobile host moves within the site, it gets a new loca care-of address in the link, but it keep its GCOA.

Correspondent Nodes  

we defined two different kind of correspondent nodes (CN). The local correspondent nodes are in the visited domain. The external CN are out of the visited domain.

Binding updates  

When a mobile host comes in a new domain, it gets a new GCOA and a new LCOA. Its has to send binding updates to all its CN. It sends its GCOA to its extenal CN and its LCOA to its local CN. Of course, it has to register with the Agent. Each time the mobile host performs a micro movement within a domain, it has to register with the Agent and to send binding updates to all the local CN, to advertize its new LCOA. No binding update is sent over the Internet to the external correspondent nodes.

Handoff  

When a mobile host goes in a new domain (from an other), the new Agent should perform a smooth handoff. It asks the previous Agent to forward packets destined to the old GCOA to the new one.

An Agent  

is a router similar to a home agent. It has to intercept packets destined to all the GCOA and to tunnel these packets to the mobile host's LCOA. The Agent has to be connected to a virtual network. On this link, no station are allowed to connect. This is an address space, used to build the GCOA. You only need an interface, you do not need a real link.

Base stations  

are the router whitch advertize prefixes on the visited links. These router sends Mobile IPv6 router advertissements with a new option : the Agent option. This option contains the address of the Agent. The Agent periodically sends its address to the base stations.

2  How to install

The Hierarchical Mobile IPv6 Protocol is included in a .tar.gz file.
Use tar zxf to decompress the files. The release contains 4 directories and a few files :

The hacked file has to be copied to the /usr/src/sys/netinet directory of all your Agents. If a station is not going to be an Agent, you do not need to recompile its kernel.

See for more details on the kernel compilation.

3  How to compile

3.1  Kernel

Copy the needed files in the /usr/src/sys/netinet/ directory.

cd /sys/i386/conf
config your_kernel_file
cd ../../compile/your_kernel_file
make clean
make depend
make
make install
reboot

You may recompile the MA's kernel because a MA opens a tug per managed mobile host. So you need a lot of tug if you want to manage a lot of mobile hosts.
In your kernel_config_file, find the line :

pseudo-device   tug    X
X is the number of tug that can be opened by the MA. Edit X, save the file and recompile the kernel.

3.2  Simple router and base station

Go to the ndpd-router directory. Here they are two different makefiles. One for the base station and one for the mobility agent 1.
Use "make -f Makefile.b" to compile the base station deamon. This produces a deamon named HA_BS. Remove all *.o files (rm *.o) and go to .

3.3  Mobility agent

If you compiled the base station deamon, remove all .o files (but keep the HA_BS file). Then use "make -f Makefile.a" to compile the mobility agent deamon. It produces a deamon named MA. You may remove all .o files.

3.4  Mobile host

Use "make" to compile the deamon named MH in the ndpd-host directory.

4  How to configure

4.1  Base Station

Nothing to do here.

4.2  Mobility Agent

Just add a few lines in /etc/gateway6, if you do not have this file, create it :

virtual prefix=3ffe:306:1130:100::/64 
virtual if=xl0 
virtual BS=3ffe:306:1130:100::50
virtual Root=xl2
These lines are needed, the Agent will not start if you do not include these lines.
virtual Domain=8
virtual SHRet=4
timeout Forward=15 
timeout Annonce=10 
timeout Home=30 
timeout Livetime=300 
timeout Refresh=250 
timeout Smooth=1
These lines are optionals.

Note that you can group several lines with the same keyword ; ex :

virtual prefix=3ffe:306:1130:100::/64 if=xl0 BS=3ffe:306:1130:100::50

4.2.1  Mobile Host

Just add a few lines in /etc/mobile6 :

timeout Forward=15 
timeout Postion=10 
timeout Home=30 
timeout Lifetime=300 
timeout Refresh=250 
timeout Smooth=1
timeout retransmission=300
Domain Len=8
Domain RtReg=5

See 4.2 for details on others parameters.

All others MobileIPv6 parameters (home addr, home agent, etc. see man ndpd-mobility) still are used.

Note  You may add the following line in your /etc/pccard_ether

    /sbin/autoconf6 -i $interface
just after the lines
if [ "x$ifconfig_args" != "xNO" ]; then
    ifconfig $interface $ifconfig_args $*
This new line performs the IPv6 autoconfiguration of a new interface. It is usefull for pccard swapping. If you do not insert this line, you have to launch autoconf6 yourself when you insert a new pccard in your laptop.

If the autoconfiguration does not work (ndpd-host does not learn new interface, and you have to do a ifconfig up and the autoconf6), have a look at your /etc/rc.conf or your /etc/defaults/rc.conf
You must have a line like this :

pccard_ether="ed0 ep0 ....."
Check if your inteface name is in this section, add it if it is not.
If you add your interface, add a new line line like this in your /etc/rc.conf file :
ifconfig_xxx="up"
xxx is your interface name.

Note :  You may add the line in your /etc/pccard_ether_remove

ifconfig $interface down
just after the lines
ifconfig $interface delete
arp -d -a
This line is used to manage virtual prefix in the ndp deamon. It avoids error messages on the root console.
ndpd-host removes all IPv6 addresses from an interface when this interface is ejected from the pccard port. If ndpd-host does not run, IPv6 addresses will stay on your interfaces. To remove all IPv6 addresses you may add this lines just after the ifconfig down (in your /etc/pccard_ether_remove) :
ifconfig $inteface inet6 delete
ifconfig $inteface inet6 delete
ifconfig $inteface inet6 delete
ifconfig $inteface inet6 delete

If you insert these lines, you have to kill the pccardd deamon and to restart it

> killall pccardd
> pccardd &

5  How to use

I add one new parameter for all HMIPv6 deamons

5.1  Base Station

Just add -B to the command line. Start all base stations before the mobility agent. You may use -Dx/y to set the router adv periode(I use 4/1). This parameter enables faster handoffs.

5.2  Mobility Agent

Launch the deamon with -a. You may used the -V -d flags to read debug traces. when the deamon is runing in debug mode (-d), the CTR+C sequence is used to dump statistics.

5.3  Mobile Host

Launch the deamon with -H. The mobile host is able to swap to Mobileipv6 mode if no MA is available, but it will always try to come to the HMIPv6 mode.
-F : enables fast handoff,  1 sec instead of  12 sec.

6  How to debug

Do you want to debug ?
You're welcome.

6.1  Packet Formats

6.1.1  Router Advertisement Mobility Option Format


+-------+-------+-------+-------+
| type  | length|  na   | plen  |
+-------+-------+-------+-------+
|                               |
|            MA address         |
|                               |
|                               |
+-------------------------------+
- type = the type of the option, we use 100.
- length = the length of the option = 20.
- na = not used, set to 0.
- plen = prefix length of the Mobility Network.
- MA = the address of the local mobility agent

6.1.2  registration packet

                +-------+-------+
                | otype | olen  |
+-------+-------+-------+-------+
| flag  | malen |  seq number   |
+-------+-------+-------+-------+
|           lifetime            |
+-------+-------+-------+-------+
| ptype | plen  |  pad  |  pad  |
+-------+-------+-------+-------+
|                               |
|           previous            |
|        mobility agent         |
|           address             |
+-------+-------+-------+-------+
| htype | hlen  |  pad  |  pad  |
+-------+-------+-------+-------+
|                               |
|                               |
|          home agent           |
|           address             |
+-------------------------------+
|  pad  |  pad  | atype | alen  |
+-------+-------+-------+-------+
|                               |
|                               |
|        home address           |
|                               |
+-------------------------------+
- otype = 9.
- olen = the option length, 48 bytes (0x30).
- flag = the uMIPv6 requested mode.
- malen = prefix length of the MN.
- seq number = see Mobile IPv6 draft.
- lifetime = see Mobile IPv6 draft.
- ptype = the sub-option type, SUB_OPT6_MA => 102 (0x66).
- plen = the length of the sub-option, 18 (0x12).
- MA = the address of the previous MA.
- htype = sub-option type, SUB_OPT6_HA => 103 (0x67.)
- hlen = the length of the sub-option, 18 (0x12).
- HA = the home agent address.
- atype = home address option type => OPT6_HOME_ADDR => 201 (0xC9).
- alen = 16 (0x10).
- home address = home address ;-)

this packet is in a destination option header. The two first bytes are : 0x3c (60) 0x08 (8)

6.1.3  refresh packet

                +-------+-------+
                | otype | olen  |
+-------+-------+-------+-------+
| flag  | malen |  seq number   |
+-------+-------+-------+-------+
|           lifetime            |
+-------------------------------+
|  pad  |  pad  | atype | alen  |
+-------+-------+-------+-------+
|                               |
|                               |
|        home address           |
|                               |
+-------------------------------+
- otype = 10 (0x0a).
- olen = the option length, 8 bytes.
- flag = not used.
- seq number = see Mobile IPv6 draft.
- lifetime = see Mobile IPv6 draft.

this packet is in a destination option header. The two first bytes are : 0x3c (60) 0x03 (3)

6.1.4  smooth handoff packet

6.1.5  forward request packet

                +-------+-------+
                | otype | olen  |
+-------+-------+-------+-------+
| flag  | malen |  seq number   |
+-------+-------+-------+-------+
|           lifetime            |
+-------------------------------+
|                               |
|                               |
|        careof address         |
|                               |
+-------------------------------+
|  pad  |  pad  | atype | alen  |
+-------+-------+-------+-------+
|                               |
|                               |
|        home address           |
|                               |
+-------------------------------+
- otype = option type => OPT6_BINDING_UPD => 198 (0xC6),
will become a new option in the next release => 11 (0x0b).
- olen = the option length, 24 bytes (0x18).
- flag = 0x22.
- coa = new position of the MH (i.e. its new vcoa).

this packet is in a destination option header. The two first bytes are : 0x3c (60) 0x05 (5)


Footnotes:

1a mobility agent is not able to be a home agent.


File translated fromTEXby TTH,version 2.56.
On 25 Aug 2000, 09:31.