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.
Let's configure local parameters first, then Layer 2 parameters and finally Layer 3 parameters.
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:
[denali]# echo "1" > /proc/sys/net/ipv6/conf/all/forwarding [denali]# sysctl -w net.ipv6.conf.all.forwarding=1
You could make those settings permanent across reboots by editing /etc/sysctl.conf.
Now, let's configure Layer 2 (the Data Link Layer) parameters (Listing 1). We'll assign each wireless interface a different wireless network ID (ESSID) and sufficiently space their frequency channels apart to avoid inter-cell interference.
Listing 1. Configuring the Data Link Layer—Home Agent
[denali]# iwconfig wlan0 essid "home" channel 3
[denali]# iwconfig wlan0 essid "remote" channel 8
[denali]# iwconfig wlan0 ; iwconfig wlan1
wlan0 IEEE 802.11b ESSID:"home"
Mode:Master Frequency:2.422 GHz Access Point: 00:02:6F:06:0B:CF
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:97 Invalid misc:342 Missed beacon:0
wlan1 IEEE 802.11b ESSID:"remote"
Mode:Master Frequency:2.447 GHz Access Point: 00:02:6F:06:46:10
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality:0 Signal level:0 Noise level:0
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:10 Invalid misc:6767 Missed beacon:0
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.
Listing 2. Configuring the Network Layer Parameters—Home Agent
[denali]# ifconfig wlan0 inet6 add 2001:db8::/64
[denali]# ifconfig wlan1 inet6 add 2001:db8:1::/64
[denali]# ifconfig wlan0 ; ifconfig wlan1
wlan0 Link encap:Ethernet HWaddr 00:02:6F:06:0B:CF
inet6 addr: 2001:db8::/64 Scope:Global
inet6 addr: fe80::202:6fff:fe06:bcf/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:205 overruns:0 frame:0
TX packets:204 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:27604 (26.9 Kb)
Interrupt:11 Base address:0x100
wlan1 Link encap:Ethernet HWaddr 00:02:6F:06:46:10
inet6 addr: 2001:db8:1::/64 Scope:Global
inet6 addr: fe80::202:6fff:fe06:4610/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:64 overruns:0 frame:0
TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:28068 (27.4 Kb)
Interrupt:11 Base address:0x140
To configure router advertisements, edit the /etc/radvd.conf file, as shown here:
interface wlan0
{
AdvSendAdvert on;
AdvIntervalOpt on;
MaxRtrAdvInterval 10;
MinRtrAdvInterval 1;
MinDelayBetweenRAs 1;
AdvHomeAgentFlag on;
prefix 2001:db8::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
interface wlan1
{
AdvSendAdvert on;
AdvIntervalOpt on;
MaxRtrAdvInterval 10;
MinRtrAdvInterval 1;
MinDelayBetweenRAs 1;
AdvHomeAgentFlag off;
prefix 2001:db8:1::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr on;
};
};
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:
[raven]# echo "1" > /proc/sys/net/ipv6/conf/all/accept_ra [raven]# sysctl -w net.ipv6.conf.all.accept_ra=1
To make the changes permanent across reboots, edit /etc/sysctl.conf.
Next, let's configure Layer 2 parameters. We'll configure the MN as a wireless client (a managed wireless node) of the Home network:
[raven]# iwconfig wlan0 mode managed essid "home"
[raven]# iwconfig wlan0
wlan0 IEEE 802.11b ESSID:"home"
Mode:Managed Frequency:2.422 GHz Access Point:
00:02:6F:06:0B:CF
Bit Rate:11 Mb/s Sensitivity=1/3
Retry min limit:8 RTS thr:off Fragment thr:off
Encryption key:off
Power Management:off
Link Quality=48/92 Signal level=-63 dBm Noise level=-100 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:175 Missed beacon:0
And, finally, let's configure Layer 3 parameters. We'll start by assigning the HoA to the wireless interface:
[raven]# ifconfig wlan0 inet6 add 2001:db8::beef/64
[raven]# ifconfig wlan0 ; ifconfig ip6tnl1
wlan0 Link encap:Ethernet HWaddr 00:05:5D:F2:DB:2B
inet6 addr: 2001:db8::beef/64 Scope:Global
inet6 addr: fe80::205:5dff:fef2:db2b/64 Scope:Link
inet6 addr: 2001:db8::205:5dff:fef2:db2b/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:141 errors:0 dropped:0 overruns:0 frame:0
TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:16094 (15.7 Kb) TX bytes:5592 (5.4 Kb)
Interrupt:17 Base address:0x2100
ip6tnl1 Link encap:UNSPEC
↪HWaddr 20-01-0D-B8-00-00-00-00-00-00-00-00-00-00-00-00
inet6 addr: fe80::205:5dff:fef2:db2b/64 Scope:Link
UP POINTOPOINT RUNNING NOARP MTU:1460 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
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:
NodeConfig MN;
DebugLevel 7;
UseMnHaIPsec disabled;
DoRouteOptimizationMN disabled;
DoRouteOptimizationCN disabled;
Interface "wlan0";
MnHomeLink "wlan0" {
HomeAddress 2001:db8::beef/64;
HomeAgentAddress 2001:db8::;
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
Built-in forensics, incident response, and security with Red Hat Enterprise Linux 6
Every security policy provides guidance and requirements for ensuring adequate protection of information and data, as well as high-level technical and administrative security requirements for a system in a given environment. Traditionally, providing security for a system focuses on the confidentiality of the information on it. However, protecting the data integrity and system and data availability is just as important. For example, when processing United States intelligence information, there are three attributes that require protection: confidentiality, integrity, and availability.
Learn more about catching the bad guy in this free white paper.
Sponsored by DLT Solutions
| Dynamic DNS—an Object Lesson in Problem Solving | May 21, 2013 |
| Using Salt Stack and Vagrant for Drupal Development | May 20, 2013 |
| Making Linux and Android Get Along (It's Not as Hard as It Sounds) | May 16, 2013 |
| Drupal Is a Framework: Why Everyone Needs to Understand This | May 15, 2013 |
| Home, My Backup Data Center | May 13, 2013 |
| Non-Linux FOSS: Seashore | May 10, 2013 |
- RSS Feeds
- Making Linux and Android Get Along (It's Not as Hard as It Sounds)
- Using Salt Stack and Vagrant for Drupal Development
- Dynamic DNS—an Object Lesson in Problem Solving
- New Products
- Validate an E-Mail Address with PHP, the Right Way
- Drupal Is a Framework: Why Everyone Needs to Understand This
- A Topic for Discussion - Open Source Feature-Richness?
- Download the Free Red Hat White Paper "Using an Open Source Framework to Catch the Bad Guy"
- Tech Tip: Really Simple HTTP Server with Python
- Roll your own dynamic dns
4 hours 39 sec ago - Please correct the URL for Salt Stack's web site
7 hours 12 min ago - Android is Linux -- why no better inter-operation
9 hours 27 min ago - Connecting Android device to desktop Linux via USB
9 hours 55 min ago - Find new cell phone and tablet pc
10 hours 54 min ago - Epistle
12 hours 22 min ago - Automatically updating Guest Additions
13 hours 31 min ago - I like your topic on android
14 hours 17 min ago - This is the easiest tutorial
20 hours 53 min ago - Ahh, the Koolaid.
1 day 2 hours ago
Enter to Win an Adafruit Pi Cobbler Breakout Kit for Raspberry Pi

It's Raspberry Pi month at Linux Journal. Each week in May, Adafruit will be giving away a Pi-related prize to a lucky, randomly drawn LJ reader. Winners will be announced weekly.
Fill out the fields below to enter to win this week's prize-- a Pi Cobbler Breakout Kit for Raspberry Pi.
Congratulations to our winners so far:
- 5-8-13, Pi Starter Pack: Jack Davis
- 5-15-13, Pi Model B 512MB RAM: Patrick Dunn
- 5-21-13, Prototyping Pi Plate Kit: Philip Kirby
- Next winner announced on 5-27-13!
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?




Comments
MIPL site is down.
I am trying to setup MIP for IPv6 but unable to get the kernel patch for it as mipl site is down always. Is there any alternate place for the patch against 2.6.16 to download?