3. Mobile IPv6 for Linux

There are currently two Mobile IPv6 Linux implementations available. The Lancaster University in the UK has the oldest(?) implementation ( http://www.cs-ipv6.lancs.ac.uk/MobileIP/). The latest kernel supported is 2.1.90, and is compatible with IETF mobile IPv6 draft-v5 (the current revision is v24). The code and website has not been updated since 1998, so it is considered obsolete.

The other implementation, which is up-to-date, is Helsinki University of Technology's MIPL project. The latest supported kernel is 2.4.22, and they have patches for the upcoming 2.6 kernel (see the FAQ). Visit http://www.mobile-ipv6.org/ for papers, software or to browse the mail archive.

3.1. Patching the kernel

The MIPL MIPv6 implementation requires a kernel patch. The implementation modifies the IPv6 kernel stack, so a kernel recompile is necessary. The installation process is well documented, but I will give a brief step-by-step howto.

Please note! The need for two different kernels, one for MN and one for HA, is obsolete. Just compile support for MN and HA in the same kernel. It is not possible to run as both an MN and an HA at the same time; which mode is chosen depends on which of the modules are loaded.

  1. Download the latest Linux MIPv6 source code from http://www.mobile-ipv6.org/. The latest release today is: mipv6-1.0-v2.4.22. The last four numbers corresponds to the Linux kernel the patch should be applied to:

    
      # cd /usr/local/src
          # wget http://www.mobile-ipv6.org/download/mipv6-1.0-v2.4.22.tar.gz
          # tar zxfv mipv6-1.0-v2.4.22.tar.gz
        
  2. Download and unpack the correspondent Linux kernel version from ftp.kernel.org:

    
       # cd /usr/src
           # wget ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.22.tar.bz2
           # tar jxvf linux-2.4.22.tar.bz2
           # ln -s linux-2.4.22 linux
           # cd linux
         
  3. Apply the MIPv6 patch:

    
     # patch -p1 --dry-run < /usr/local/src/mipv6-1.0-v2.4.22/mipv6-1.0-v2.4.22.patch
        

    The --dry-run option checks that the patch will apply correctly. If you get any failed hunks, you should not proceed. If everything went fine do:

     
          # patch -p1 < /usr/local/src/mipv6-1.0-v2.4.22/mipv6-1.0-v2.4.22.patch 
        
  4. Now your kernel tree is ready for configuration. Run your favorite make *config. The MIPv6 options are under "Networking Options". The following options should be present in ".config":

    
     CONFIG_EXPERIMENTAL=y 
         CONFIG_SYSCTL=y 
         CONFIG_PROC_FS=y 
         CONFIG_MODULES=y 
         CONFIG_NET=y 
         CONFIG_NETFILTER=y 
         CONFIG_UNIX=y 
         CONFIG_INET=y 
         CONFIG_IPV6=m
         CONFIG_IPV6_SUBTREES=y
         CONFIG_IPV6_IPV6_TUNNEL=m
         CONFIG_IPV6_MOBILITY=m
         CONFIG_IPV6_MOBILITY_MN=m
         CONFIG_IPV6_MOBILITY_HA=m
        

    Since MIPL is still a work-in-progress you might want to enable:

    
   CONFIG_IPV6_MOBILITY_DEBUG=y
       

    With debug messages it is easier to figure out what happened when something goes wrong. Also, when reporting a bug, debug messages are very helpful.

    To be sure you have all the correct options, you can run chkconf_kernel.sh, which is a small shell script included in the MIPL tarball.

  5. Next you should compile and install your kernel.

    Hint: To easily distinguish this kernel from other kernels, you can change the "EXTRAVERSION" variable in the /usr/src/linux/Makefile to for example "-MIPv6-1".

Read the Linux Kernel HOWTO for detailed instruction on how to patch, compile and install your new kernel.

3.2. Userspace tools

The userspace tool mipdiag, config files and init scripts must be installed for the module to work correctly:


      # cd /usr/local/src/mipv6-1.0-v2.4.22
      # ./configure
      # make && make install
    

3.3. MIPv6 device node

The MIPv6 module also needs a new device node entry. Issue the command:


      # mknod /dev/mipv6_dev c 0xf9 0
    

3.4. Automatic startup

  1. Red Hat:

    All init scripts are located in /etc/init.d/, which are sym-linked to the correct runlevel (/etc/rcX.d/). You can issue the command:

    
   # chkconfig --add mobile-ip6
            

    to enable MIPv6 at startup, or

    
   # chkconfig --del mobile-ip6
            

    to remove MIPv6 from startup.

  2. Debian:

    If you are so lucky to be running Debian, you can issue the command:

    
   # update-rc.d -n mobile-ip6 start 75 3 4 5 . stop 05 1 2 6 .
            

    to set up all the necessary links.

  3. Slackware:

    Slackware users have all their startup/runlevel scripts in /etc/rc.d. Since 'configure' doesn't check for "/etc/rc.d", you can add INIT_SLACK="/etc/rc.d", and then INIT_SLACK to INITDIRS in 'configure' (search for INITDIR in configure). Since you are running Slackware, you probably know this already. The following command should then do the trick:

    
   # echo '/etc/rc.d/mobile-ip6 start' >> /etc/rc.d/rc.local
           

    If you don't hack the Makefile, the mobile-ip6 script is installed at '/' (you may then move it to /etc/rc.d/).

mirror server hosted at Truenetwork, Russian Federation.