3
IPv6 Linux Kernel Support – Mobile IPv6 David Tarrant ([email protected]) Toby Hunt ([email protected]) Page 1 of 3 Introduction Mobile IPv6 has been designed to enable mobile devices, such as wireless laptops to migrate seamlessly between networks whilst keeping the same IPv6 address, regardless of the local subnet addressing scheme. While away from home, a mobile node is given a care-of address by the foreign network, allowing it to communicate with local peers. IPv6 packets addressed to a mobile node's home address are transparently routed to its care-of address via the mobile node’s Home Agent (HA). The protocol enables IPv6 nodes to cache the binding of a mobile node's home address with its care-of address, and then to send any packets destined for the mobile node directly to it at this care-of address. Requirements At time of writing Mobile-v6 is only supported as far up as the 2.4.26 kernel with no support for 2.6 or higher. Installation of Mobile-v6 requires a kernel patch and recompile of the kernel sources (See IPv6 Linux Kernel Support Parts 1 and 2). Downloads The official site for Mobile-v6 is located at www.mobile-ipv6.org and provides the latest downloads, documentation and getting-started guides. Mobile-IPv6 - http://www.mobile-ipv6.org/software/download/mipv6-1.1-v2.4.26.tar.gz Getting Started Guide - http://www.tldp.org/HOWTO/Mobile-IPv6-HOWTO/index.html Installation 1) Once downloaded the installation process in relatively simple. This guide assumes you have already read and understood the IPv6 Linux Kernel Support Parts 1 and 2 documents. First step is to download and unpack the source. 2) Patching the kernel with the mipv6 patches. Providing you have the correct kernel in the right place this should succeed first time. Checking the patch applies correctly can be done with the following command. If no errors occur then the patch may be applied successfully. # patch -p1 < /usr/src/mipv6-1.0-v2.4.26/mipv6-1.0-v2.4.26.patch # patch -p1 --dry-run < /usr/src/mipv6-1.0-v2.4.26/mipv6-1.0-v2.4.26.patch # cd linux # cd /usr/src/ # wget http://www.mobile-ipv6.org/software/download/mipv6-1.1-v2.4.26.tar.gz # tar –zxvf mipv6-1.1-v2.4.26.tar.gz # rm –f mipv6-1.1-v2.4.26.tar.gz IPv6 Linux Kernel Support – Mobile IPv6

IPv6 Mobile Part1

Embed Size (px)

Citation preview

IPv6 Linux Kernel Support – Mobile IPv6 David Tarrant ([email protected]) Toby Hunt ([email protected])

Page 1 of 3

Introduction

Mobile IPv6 has been designed to enable mobile devices, such as wireless laptops to migrate seamlessly between networks whilst keeping the same IPv6 address, regardless of the local subnet addressing scheme. While away from home, a mobile node is given a care-of address by the foreign network, allowing it to communicate with local peers. IPv6 packets addressed to a mobile node's home address are transparently routed to its care-of address via the mobile node’s Home Agent (HA). The protocol enables IPv6 nodes to cache the binding of a mobile node's home address with its care-of address, and then to send any packets destined for the mobile node directly to it at this care-of address. Requirements At time of writing Mobile-v6 is only supported as far up as the 2.4.26 kernel with no support for 2.6 or higher. Installation of Mobile-v6 requires a kernel patch and recompile of the kernel sources (See IPv6 Linux Kernel Support Parts 1 and 2). Downloads The official site for Mobile-v6 is located at www.mobile-ipv6.org and provides the latest downloads, documentation and getting-started guides. Mobile-IPv6 - http://www.mobile-ipv6.org/software/download/mipv6-1.1-v2.4.26.tar.gz Getting Started Guide - http://www.tldp.org/HOWTO/Mobile-IPv6-HOWTO/index.html Installation

1) Once downloaded the installation process in relatively simple. This guide assumes you have already read and understood the IPv6 Linux Kernel Support Parts 1 and 2 documents. First step is to download and unpack the source.

2) Patching the kernel with the mipv6 patches. Providing you have the correct kernel in the right place this should succeed first time.

Checking the patch applies correctly can be done with the following command.

If no errors occur then the patch may be applied successfully.

# patch -p1 < /usr/src/mipv6-1.0-v2.4.26/mipv6-1.0-v2.4.26.patch

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

# cd linux

# cd /usr/src/ # wget http://www.mobile-ipv6.org/software/download/mipv6-1.1-v2.4.26.tar.gz # tar –zxvf mipv6-1.1-v2.4.26.tar.gz # rm –f mipv6-1.1-v2.4.26.tar.gz

IPv6 Linux Kernel Support – Mobile IPv6

IPv6 Linux Kernel Support – Mobile IPv6 David Tarrant ([email protected]) Toby Hunt ([email protected])

Page 2 of 3

3) With the patches applied it is now necessary to reconfigure and recompile the kernel. Now your kernel tree is ready for configuration. Run your favourite variant on make xxxconfig. The MIPv6 options are under "Networking Options". The following options should be present in .config:

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

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.

4) Recompile and install your new Kernel See IPv6 Linux Kernel Support – Part 1. A New Kernel from step 3 for instructions.

5) Userspace tools - The userspace tool mipdiag, plus the configuration files and init scripts must be built and

installed for the Mobile-IPv6 module to work correctly

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

7) Automatic startup

RedHat: 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 to enable MIPv6 at startup:

The following will remove the startup entry:

Debian:

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

# chkconfig --del mobile-ip6

# chkconfig --add mobile-ip6

# mknod /dev/mipv6_dev c 0xf9 0

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

# /usr/src/mipv6-1.0-v2.4.26/chkconf_kernel.sh

CONFIG_IPV6_MOBILITY_DEBUG=y

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

IPv6 Linux Kernel Support – Mobile IPv6 David Tarrant ([email protected]) Toby Hunt ([email protected])

Page 3 of 3

Slackware: Slackware users have all their startup/runlevel scripts in /etc/rc.d. Since the configure script 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 the configure script). Since you are running Slackware, you probably know this already. The following command should then do the trick:

If you don't hack the Makefile, the mobile-ip6 script is installed in the root directory of your system (you may then move it to /etc/rc.d/).

8) Now you can call your startup command (eg /etc/init.d/mobile-v6 start) to start mobile-ipv6. The next guide details how to configure the different parts of the system.

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