IPV6 Testing—Based on Cisco,Linux
Without the tremendous functions Linux provides, I couldn’t go deeper in the road of seeking network technologies. Learning Linux really help me broaden my vision. The feeling of freely use linux skills is really indescribable ^_^. After 2 days’ hard work, I successfully emulated the ipv6 testbed on my lovable Gentoo server. So far, all basic functions have been carried out except mobile ipv6. The testbed of Mobile IPV6 comprises a mobile device with ipv6 support, it’s no problem to me as I bought my favorite Nokia N900, this baby will play an important role in the show. However, N900′s default kernel doesn’t support ipv6 stack. Some little tweaking job has to be done.
Test 1: IPV6 Tunnel
1. Configured Tunnel
To setup a configured tunnel between R7 and R9 , tunnelling over IPV4 network.
root@Dom1 #ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:3E:34:3C:C8
inet6 addr: 2001:0:0:1::10/64 Scope:Global
inet6 addr: 2001::1:216:3eff:fe34:3cc8/64 Scope:Global
inet6 addr: 2001::216:3eff:fe34:3cc8/64 Scope:Global
inet6 addr: fe80::216:3eff:fe34:3cc8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:123 errors:0 dropped:0 overruns:0 frame:0
TX packets:103 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:17238 (16.8 KiB) TX bytes:11386 (11.1 KiB)
If there’re multiple global ipv6 address on one Ethernet port, which one will be used as source address, while sending packet of the box?
R9#s run int tun0
Building configuration…
interface Tunnel0
no ip address
ipv6 address 2003::9/64 configure ipv6 here is not mandatory option,
tunnel source Loopback0 the purpose of configuring ipv6 address is to
tunnel destination 7.7.7.7 enable ipv6 function. “ipv6 enable”
tunnel mode ipv6ip
R7#s run int tun 0
interface Tunnel0
no ip address
ipv6 address 2003::7/64
tunnel source Loopback0
tunnel destination 9.9.9.9
tunnel mode ipv6ip
end
2. 6to4 Tunnel
Reassigning IPV6 address to both network to comply with 6to4 addressing rule.
R7#s run int tun 0
interface Tunnel0
no ip address
no ip redirects
ipv6 unnumbered FastEthernet0/1
tunnel source Loopback0
tunnel mode ipv6ip 6to4
end
R9#s run int tun 0
interface Tunnel0
no ip address
no ip redirects
ipv6 unnumbered Loopback0
tunnel source Loopback0
tunnel mode ipv6ip 6to4
root@Dom1 #ifconfig eth0 inet6 add 2002:77:77:1::10/64
root@Dom1 #ip -f inet6 route add ::/0 via 2002:77:77:1::1
root@Dom1 #ip -f inet6 route show
2002:77:77:1::/64 dev eth0 proto kernel metric 256 mtu 1500 advmss 1440 hoplimit 4294967295
fe80::/64 dev eth0 metric 256 expires -193sec mtu 1500 advmss 1440 hoplimit 4294967295
ff00::/8 dev eth0 metric 256 expires -193sec mtu 1500 advmss 1440 hoplimit 4294967295
default via fe80::c800:13ff:feee:6 dev eth0 proto kernel metric 1024 expires 1759sec mtu 1500 advmss 1440 hoplimit 64
default via 2002:77:77:1::1 dev eth0 metric 1024 expires -34sec mtu 1500 advmss 1440 hoplimit 4294967295
R7#deb tunnel
Tunnel Interface debugging is on
R7#
*Apr 22 14:00:27.075: Tunnel0: IPv6/IP 6to4 adjacency fixup, 7.7.7.7->9.9.9.9, tos set to 0×0
*Apr 22 14:00:27.199: Tunnel0: IPv6/IP to classify 9.9.9.9->7.7.7.7 (tbl=0,”IPv4:Default” len=124 ttl=251 tos=0×0) ok, oce_rc=0×0
ICMP ECHO REQUEST PACKET FROM R7 TO R9:
Internet Protocol, Src: 7.7.7.7 (7.7.7.7), Dst: 9.9.9.9 (9.9.9.9)
Version: 4
Header length: 20 bytes
Differentiated Services Field: 0×00 (DSCP 0×00: Default; ECN: 0×00)
0000 00.. = Differentiated Services Codepoint: Default (0×00)
…. ..0. = ECN-Capable Transport (ECT): 0
…. …0 = ECN-CE: 0
Total Length: 124
Identification: 0×0149 (329)
Flags: 0×00
0.. = Reserved bit: Not Set
.0. = Don’t fragment: Not Set
..0 = More fragments: Not Set
Fragment offset: 0
Time to live: 252
Protocol: IPv6 (0×29)
Header checksum: 0x9cf0 [correct]
[Good: True]
[Bad : False]
Source: 7.7.7.7 (7.7.7.7)
Destination: 9.9.9.9 (9.9.9.9)
Internet Protocol Version 6
0110 …. = Version: 6
[0110 .... = This field makes the filter "ip.version == 6" possible: 6]
…. 0000 0000 …. …. …. …. …. = Traffic class: 0×00000000
…. …. …. 0000 0000 0000 0000 0000 = Flowlabel: 0×00000000
Payload length: 64
Next header: ICMPv6 (0x3a)
Hop limit: 63
Source: 2002:707:707:1:216:3eff:fe5e:3c1c (2002:707:707:1:216:3eff:fe5e:3c1c)
Destination: 2002:909:909:1::40 (2002:909:909:1::40)
Internet Control Message Protocol v6
Type: 128 (Echo request)
Code: 0
Checksum: 0xd41f [correct]
ID: 0x1a0b
Sequence: 0×0000
Data (56 bytes)
3. IPV6 over GRE tunnel
IPV6 Replacement of ARP:
Ethernet II, Src: Xensourc_01:44:da (00:16:3e:01:44:da), Dst: IPv6mcast_ff:00:00:01 (33:33:ff:00:00:01)
Destination: IPv6mcast_ff:00:00:01 (33:33:ff:00:00:01)
Source: Xensourc_01:44:da (00:16:3e:01:44:da)
Type: IPv6 (0x86dd)
Internet Protocol Version 6
0110 …. = Version: 6
…. 0000 0000 …. …. …. …. …. = Traffic class: 0×00000000
…. …. …. 0000 0000 0000 0000 0000 = Flowlabel: 0×00000000
Payload length: 32
Next header: ICMPv6 (0x3a)
Hop limit: 255
Source: 2002:909:909:1::40 (2002:909:909:1::40)
Destination: ff02::1:ff00:1 (ff02::1:ff00:1)
Internet Control Message Protocol v6
Type: 135 (Neighbor solicitation)
Code: 0
Checksum: 0×9241 [correct]
Target: 2002:909:909:1::1 (2002:909:909:1::1)
ICMPv6 Option (Source link-layer address)
Type: Source link-layer address (1)
Length: 8
Link-layer address: 00:16:3e:01:44:da
==================================================================================
Ethernet II, Src: ca:02:13:ee:00:06 (ca:02:13:ee:00:06), Dst: Xensourc_01:44:da (00:16:3e:01:44:da)
Destination: Xensourc_01:44:da (00:16:3e:01:44:da)
Source: ca:02:13:ee:00:06 (ca:02:13:ee:00:06)
Type: IPv6 (0x86dd)
Internet Protocol Version 6
0110 …. = Version: 6
…. 1110 0000 …. …. …. …. …. = Traffic class: 0x000000e0
…. …. …. 0000 0000 0000 0000 0000 = Flowlabel: 0×00000000
Payload length: 32
Next header: ICMPv6 (0x3a)
Hop limit: 255
Source: 2002:909:909:1::1 (2002:909:909:1::1)
Destination: 2002:909:909:1::40 (2002:909:909:1::40)
Internet Control Message Protocol v6
Type: 136 (Neighbor advertisement)
Code: 0
Checksum: 0x212b [correct]
Flags: 0xe0000000
1… …. …. …. …. …. …. …. = Router
.1.. …. …. …. …. …. …. …. = Solicited
..1. …. …. …. …. …. …. …. = Override
Target: 2002:909:909:1::1 (2002:909:909:1::1)
ICMPv6 Option (Target link-layer address)
Type: Target link-layer address (2)
Length: 8
Link-layer address: ca:02:13:ee:00:06
IPV6 Fragmentation:
root@dom4 #ping6 2002:909:909:1::1 -s 1500 -c 1
F1:14(ether frame)+40(IPV6 header)+8(IPV6 fragment header)+ 8(ICMP) + 1440(DATA) = 1510
F2: 14(ether frame)+40(IPV6 header)+8(IPV6 fragment header)+ 60(DATA) = 122
From the above two formulas, we can deduce that S option is used to specify the payload of
ICMP.
root@dom4 #ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:16:3E:01:44:DA
inet addr:192.168.1.79 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2002:909:909:1::40/64 Scope:Global
inet6 addr: 2002:909:909:1:216:3eff:fe01:44da/64 Scope:Global
inet6 addr: 2002:99:99:1:216:3eff:fe01:44da/64 Scope:Global
inet6 addr: fe80::216:3eff:fe01:44da/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:845 errors:0 dropped:0 overruns:0 frame:0
TX packets:440 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:181032 (176.7 KiB) TX bytes:51132 (49.9 KiB)
root@dom4 #ping6 2002:909:909:1::1 -s 1452 -c 1
14(ether frame)+40(IPV6 header)+8(ICMP)+ 1452(DATA) = 1514
This ICMPv6 is not being fragmented.
Send ICMPv6 from R9 to dom4 via f0/1.
R9#sh int f0/1
FastEthernet0/1 is up, line protocol is up
Hardware is i82543 (Livengood), address is ca02.13ee.0006 (bia ca02.13ee.0006)
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
R9#sh ipv int f0/1
FastEthernet0/1 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C802:13FF:FEEE:6
No Virtual link-local address(es):
Global unicast address(es):
2002:909:909:1::1, subnet is 2002:909:909:1::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FFEE:6
MTU is 1500 bytes
Ethernet MTU :1500
IPV6 MTU:1500
R9#ping ipv6 2002:909:909:1::40 repeat 1 size 1452 (size option specify the whole ipv6 packet including ipv6 header)
So the total byte is 1466 on wire.
R9#ping ipv6 2002:909:909:1::40 repeat 1 size 1500
1514 bytes on wire, no fragmentation.
Ethernet MTU :1500
IPV6 MTU: 1499
interface FastEthernet0/1
mtu 1530
ipv6 address 2002:909:909:1::1/64
R9#sh ipv int f0/1
FastEthernet0/1 is up, line protocol is up
IPv6 is enabled, link-local address is FE80::C802:13FF:FEEE:6
No Virtual link-local address(es):
Global unicast address(es):
2002:909:909:1::1, subnet is 2002:909:909:1::/64
Joined group address(es):
FF02::1
FF02::2
FF02::1:FF00:1
FF02::1:FFEE:6
MTU is 1530 bytes
R9#sh int f0/1
FastEthernet0/1 is up, line protocol is up
Hardware is i82543 (Livengood), address is ca02.13ee.0006 (bia ca02.13ee.0006)
MTU 1530 bytes, BW 100000 Kbit/sec, DLY 100 usec,
4. ISATAP Tunnel ( Pending)
5. Mobile IPV6 (Pending)


