<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML ><HEAD ><TITLE >Doing some tests</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK REL="HOME" TITLE="Linux Mobile IPv6 HOWTO" HREF="index.html"><LINK REL="PREVIOUS" TITLE="Test bed" HREF="testbed.html"><LINK REL="NEXT" TITLE="FAQ" HREF="faq.html"></HEAD ><BODY CLASS="sect1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE SUMMARY="Header navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >Linux Mobile IPv6 HOWTO</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="testbed.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="faq.html" ACCESSKEY="N" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="sect1" ><H1 CLASS="sect1" ><A NAME="dotest" ></A >5. Doing some tests</H1 ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="pretest" ></A >5.1. Pre-test</H2 ><P >Do every configuration as shown above; it's especially important to have a different ESSID on the home net and visited network. </P ><P >When you start mobile-IPv6 on MN, you will see multicasting router solicitations messages:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # tcpdump -i eth0 -vv ip6 or proto ipv6 ... 13:32:54.681763 fe80::202:a5ff:fe6f:a08a > ff02::2: icmp6: router solicitation \ (src lladdr: 0:2:a5:6f:a0:8a) (len 16, hlim 255) 13:32:55.681763 fe80::202:a5ff:fe6f:a08a > ff02::2: icmp6: router solicitation \ (src lladdr: 0:2:a5:6f:a0:8a) (len 16, hlim 255) 13:32:57.681765 fe80::202:a5ff:fe6f:a08a > ff02::2: icmp6: router solicitation \ (src lladdr: 0:2:a5:6f:a0:8a) (len 16, hlim 255) ... </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="MovDet" ></A >5.2. Movement detection</H2 ><P >Generic movement detection uses Neighbor Unreachability Detection to detect when the default router is no longer bi-directionally reachable, in which case the mobile node must discover a new default router (usually on a new link).</P ><P > To easily see whats going on, you should have one xterm window for each of these commands: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # watch ifconfig eth0 # watch route -A inet6 # tcpdump -i eth0 -vv ip6 or proto ipv6 </PRE ></FONT ></TD ></TR ></TABLE ><P >To <SPAN CLASS="QUOTE" >"travel"</SPAN > to another net, you can issue the command on MN:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # iwconfig eth1 essid visitnet </PRE ></FONT ></TD ></TR ></TABLE ><P >The MN is then on the other wireless network, and since it is sending out <SPAN CLASS="QUOTE" >"router solicitation"</SPAN > (multicast), our AR will respond with it's prefix. MN will then configure itself with at new IPv6 address with the received prefix and it's own MAC address. If you type <B CLASS="command" >ifconfig eth0</B > you will see the new IPv6 address:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # ifconfig eth0 eth0 Link encap:Ethernet HWaddr 00:90:7D:F3:03:1A inet6 addr: fec0:106:1100:0:290:7dff:fef3:31a/64 Scope:Site <A NAME="newaddr" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A > inet6 addr: fec0:106:2700:0:290:7dff:fef3:31a/64 Scope:Site <A NAME="superadr" ><IMG SRC="../images/callouts/2.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(2)"></A > inet6 addr: fec0:106:2700::4/64 Scope:Site <A NAME="oldaddr" ><IMG SRC="../images/callouts/3.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(3)"></A > inet6 addr: fe80::290:7dff:fef3:31a/64 Scope:Link <A NAME="linkaddr" ><IMG SRC="../images/callouts/4.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(4)"></A > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:854 errors:154 dropped:154 overruns:0 frame:148 TX packets:293 errors:58 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:96536 (94.2 Kb) TX bytes:44664 (43.6 Kb) Interrupt:3 Base address:0x100 </PRE ></FONT ></TD ></TR ></TABLE ><DIV CLASS="calloutlist" ><DL COMPACT="COMPACT" ><DT ><A HREF="dotest.html#newaddr" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A ></DT ><DD >The new <SPAN CLASS="QUOTE" >"foreign"</SPAN > address, generated by combining AR's prefix and MAC-address</DD ><DT ><A HREF="dotest.html#superadr" ><IMG SRC="../images/callouts/2.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(2)"></A ></DT ><DD >The superfluous home network address (because of HA radvd messages and MN autoconf set to <SPAN CLASS="QUOTE" >"true"</SPAN >).</DD ><DT ><A HREF="dotest.html#oldaddr" ><IMG SRC="../images/callouts/3.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(3)"></A ></DT ><DD >The <SPAN CLASS="QUOTE" >"original"</SPAN > (home) address</DD ><DT ><A HREF="dotest.html#linkaddr" ><IMG SRC="../images/callouts/4.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(4)"></A ></DT ><DD >The link-local address generated at boot</DD ></DL ></DIV ><P >Almost at the same time, the MN will perform a binding update to HA. In your tcpdump window, you will see several packets destined to HA. To verify that the binding update has been sent and acknowledged from MN:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # mipdiag -s Mobile IPv6 Statistics NEncapsulations : 0 NDecapsulations : 0 NBindUpdatesRcvd : 0 NBindAcksRcvd : 1 <A NAME="back" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A > NBindNAcksRcvd : 0 NBindRqsRcvd : 0 NBindUpdatesSent : 1 <A NAME="bupdate" ><IMG SRC="../images/callouts/2.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(2)"></A > NBindAcksSent : 0 NBindNAcksSent : 0 NBindRqsSent : 0 NBindUpdatesDropAuth : 0 NBindUpdatesDropInvalid : 0 NBindUpdatesDropMisc : 0 NBindAcksDropAuth : 0 NBindAcksDropInvalid : 0 NBindAcksDropMisc : 0 NBindRqsDropAuth : 0 NBindRqsDropInvalid : 0 NBindRqsDropMisc : 0 </PRE ></FONT ></TD ></TR ></TABLE ><DIV CLASS="calloutlist" ><DL COMPACT="COMPACT" ><DT ><A HREF="dotest.html#back" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A ></DT ><DD >One binding ACK received.</DD ><DT ><A HREF="dotest.html#bupdate" ><IMG SRC="../images/callouts/2.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(2)"></A ></DT ><DD >One binding UPDATE sent.</DD ></DL ></DIV ><P >You can also verify the binding with the following command (on MN):</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # mipdiag -l Mobile IPv6 Binding update list Recipient CN: fec0:106:2700::2 BINDING home address: fec0:106:2700::4 care-of address: fec0:106:1100:0:290:7dff:fef3:31a expires: 936 sequence: 0 state: 1 delay: 3 max delay 32 callback time: 736 </PRE ></FONT ></TD ></TR ></TABLE ><P >You can also verify it on HA with the statistics option (-s) and with the <SPAN CLASS="QUOTE" >"binding cache"</SPAN > (-c) option:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # mipdiag -c Mobile IPv6 Binding cache Home Address Care-of Address Lifetime Type fec0:106:2700::4 fec0:106:1100:0:290:7dff:fef3:31a 971 2 </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="ping6" ></A >5.3. ping6</H2 ><P >From the MN, you can try to ping AR's eth1 (fec0:106:1100::1):</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # ping6 fec0:106:1100::1 PING fec0:106:1100::1(fec0:106:1100::1) from fec0:106:2700::4 : 56 data bytes 64 bytes from fec0:106:1100::1: icmp_seq=1 ttl=62 time=8.01 ms 64 bytes from fec0:106:1100::1: icmp_seq=2 ttl=62 time=8.02 ms ... </PRE ></FONT ></TD ></TR ></TABLE ><P >By using tcpdump, you can see how the packets travel:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > 12:13:51.789688 fec0:106:1100:0:202:a5ff:fe6f:a08a > fec0:106:2700::2: \ <A NAME="mntoha" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A > fec0:106:2700::4 > fec0:106:1100::1: icmp6: echo request \ <A NAME="hatocr" ><IMG SRC="../images/callouts/2.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(2)"></A > (len 64, hlim 64) (len 104, hlim 255) 12:13:51.797675 fec0:106:2700::2 > fec0:106:1100:0:202:a5ff:fe6f:a08a: \ <A NAME="artomn" ><IMG SRC="../images/callouts/3.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(3)"></A > fec0:106:1100::1 > fec0:106:2700::4: icmp6: echo reply \ (len 64, hlim 62) (len 104, hlim 253) </PRE ></FONT ></TD ></TR ></TABLE ><DIV CLASS="calloutlist" ><DL COMPACT="COMPACT" ><DT ><A HREF="dotest.html#mntoha" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A ></DT ><DD >The packet first goes from MN to the HA using MN new IPv6 address.</DD ><DT ><A HREF="dotest.html#hatocr" ><IMG SRC="../images/callouts/2.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(2)"></A ></DT ><DD >Then from HA to AR.</DD ><DT ><A HREF="dotest.html#artomn" ><IMG SRC="../images/callouts/3.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(3)"></A ></DT ><DD >The AR then responds to HA and tunnels the packets to MN.</DD ></DL ></DIV ><P >You can now see the statistics have been updated (on MN):</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # mipdiag -s Mobile IPv6 Statistics NEncapsulations : 56 NDecapsulations : 25 ... </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="routeTable" ></A >5.4. Kernel IP routing table</H2 ><P >One interesting thing MIPv6 does is change the default route to a tunnel. The new default route becomes:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # route -A inet6 Kernel IPv6 routing table Destination Next Hop Flags Metric Ref Use Iface ::/0 :: UD 64 0 0 ip6tnl1 .... </PRE ></FONT ></TD ></TR ></TABLE ><P >If it doesn't add a default route, you may add it manually:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # ip route ::/0 via dev ip6tnl </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="movement" ></A >5.5. Travelling through several foregin LAN's</H2 ><P >To travel to several visited networks, is no different than travel to <EM >one</EM > network. The only thing you must have in mind is that you will generate a new address for each visited network. </P ><DIV CLASS="mediaobject" ><P ><IMG SRC="images/lanvisits.png" ALIGN="center" WIDTH="550px"><DIV CLASS="caption" ><P >MN travelling through severeal different LANs.</P ></DIV ></P ></DIV ><P ></P ><OL TYPE="1" ><LI ><P >MN first visits 'visitnet', as we have been through above.</P ></LI ><LI ><P >MN is then travelling from 'visitnet' to 'visitnet2'.</P ></LI ><LI ><P >When at 'visitnet2', MN generates a new IPv6 address and do a new binding update to HA.</P ></LI ><LI ><P >MN then travels back home. (Se next section.)</P ></LI ></OL ><P >The AR at <SPAN CLASS="QUOTE" >"visitnet2"</SPAN >, is configured exactly as the other AR (at <SPAN CLASS="QUOTE" >"visitnet"</SPAN >), except using address <TT CLASS="userinput" ><B >fec0:106:1000::/64</B ></TT > instead of <TT CLASS="userinput" ><B >fec0:106:1100::/64</B ></TT >.</P ><P >To make the mobile node travel from 'visitnet' to 'visitnet2', issue the command (on MN):</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # iwconfig eth0 essid visitnet2 </PRE ></FONT ></TD ></TR ></TABLE ><P >You will then see the MN configures itself to the new network:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # ifconfig eth0 eth1 Link encap:Ethernet HWaddr 00:90:7D:F3:03:1A inet6 addr: fec0:106:1000:0:290:7dff:fef3:31a/64 Scope:Site <A NAME="net2" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A > inet6 addr: fec0:106:1100:0:290:7dff:fef3:31a/64 Scope:Site inet6 addr: fec0:106:2700:0:290:7dff:fef3:31a/64 Scope:Site inet6 addr: fec0:106:2700::4/64 Scope:Site inet6 addr: fe80::290:7dff:fef3:31a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1073 errors:212 dropped:212 overruns:0 frame:204 TX packets:371 errors:72 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:100 RX bytes:120340 (117.5 Kb) TX bytes:56912 (55.5 Kb) Interrupt:3 Base address:0x100 </PRE ></FONT ></TD ></TR ></TABLE ><DIV CLASS="calloutlist" ><DL COMPACT="COMPACT" ><DT ><A HREF="dotest.html#net2" ><IMG SRC="../images/callouts/1.gif" HSPACE="0" VSPACE="0" BORDER="0" ALT="(1)"></A ></DT ><DD >The new autoconfigured address at 'visitnet2'.</DD ></DL ></DIV ><P ><EM >Note! You may have to restart mobile-ipv6 on MN when coming to a new network!</EM ></P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # /etc/init.d/mobile-ip6 restart Stopping Mobile IPv6: OK Starting Mobile IPv6: OK </PRE ></FONT ></TD ></TR ></TABLE ><P >The MN will then perform a new binding update to HA. Notice the new <SPAN CLASS="QUOTE" >"care-of address"</SPAN >:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # mipdiag -l Mobile IPv6 Binding update list Recipient CN: fec0:106:2700::2 BINDING home address: fec0:106:2700::4 care-of address: fec0:106:1000:0:290:7dff:fef3:31a expires: 973 sequence: 14 state: 1 delay: 3 max delay 32 callback time: 773 </PRE ></FONT ></TD ></TR ></TABLE ><P >You can also see the <SPAN CLASS="QUOTE" >"binding cache"</SPAN > on HA has been updated:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # mipdiag -c Mobile IPv6 Binding cache Home Address Care-of Address Lifetime Type fec0:106:2700::4 fec0:106:1000:0:290:7dff:fef3:31a 943 2 </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="home" ></A >5.6. Returning home</H2 ><P >To make the MN return home, you can just issue the command:</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > # iwconfig eth0 essid homenet </PRE ></FONT ></TD ></TR ></TABLE ><P >The MN will know it is back home, since HA is sending out radvd messages with the HA-bit set (AdvHomeAgentFlag), see <A HREF="testbed.html#radvdar" >Section 4.2.4</A ></P ><P >You can see the MN <SPAN CLASS="QUOTE" >"is back home"</SPAN >, since the binding cache information at HA is flushed (empty):</P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><FONT COLOR="#000000" ><PRE CLASS="screen" > Mobile IPv6 Binding cache Home Address Care-of Address Lifetime Type </PRE ></FONT ></TD ></TR ></TABLE ></DIV ><DIV CLASS="sect2" ><H2 CLASS="sect2" ><A NAME="realLife" ></A >5.7. Real life testing - smooth handover</H2 ><P >To really get the feel on how mobile IP works, fire up GnomeMeeting (See the figure GnomeMeeting and start a netmeeting. Note! You must use the latest GnomeMeeting to get support for IPv6! Then do a <SPAN CLASS="QUOTE" >"travel"</SPAN > and you can see an almost smooth handover.</P ><DIV CLASS="mediaobject" ><P ><IMG SRC="images/gnomemeeting1.png" ALIGN="center" WIDTH="250px"><DIV CLASS="caption" ><P >Using GnomeMeeting with IPv6 to test roaming between two wireless networks</P ></DIV ></P ></DIV ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE SUMMARY="Footer navigation table" WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="testbed.html" ACCESSKEY="P" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="index.html" ACCESSKEY="H" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="faq.html" ACCESSKEY="N" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Test bed</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >FAQ</TD ></TR ></TABLE ></DIV ></BODY ></HTML >