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.
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.
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 XX is the number of tug that can be opened by the MA. Edit X, save the file and recompile the kernel.
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 .
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.
Use "make" to compile the deamon named MH in the ndpd-host directory.
Nothing to do here.
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=xl2These 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=1These 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
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 $interfacejust 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.
ifconfig_xxx="up"xxx is your interface name.
Note : You may add the line in your /etc/pccard_ether_remove
ifconfig $interface downjust after the lines
ifconfig $interface delete arp -d -aThis line is used to manage virtual prefix in the ndp deamon. It avoids error messages on the root console.
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 &
I add one new parameter for all HMIPv6 deamons
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.
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.
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.
Do you want to debug ?
You're welcome.
+-------+-------+-------+-------+ | 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
+-------+-------+ | 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)
+-------+-------+ | 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)
+-------+-------+ | 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)
1a mobility agent is not able to be a home agent.