Sunday, March 19, 2017

IPv6 through IPv4 Tunnel

Scenario: 


You need to connect 2 IPv6 LAN's accross an IPv4 WAN.


Configs:

R1:


int lo 1
ip add 1.1.1.1 255.255.255.255
no shut
exit

int fa0/0
ip add 10.0.12.1 255.255.255.0
no shut
exit

ip route 2.2.2.2 255.255.255.255 10.0.12.2

int tunnel12
ipv6 add 12::1/64
tunnel source Lo1
tunnel dest 2.2.2.2
tunnel mode ipv6ip


!test
ping 2.2.2.2 so lo 1


!verify ipv6
ping ipv6 12::2


R2:


int lo2
ip add 2.2.2.2 255.255.255.255
no shut
exit

int fa0/0
ip add 10.0.12.2 255.255.255.0
no shut
exit

ip route 1.1.1.1 255.255.255.255 10.0.12.1

int tunnel12
ipv6 add 12::2/64
tunnel source lo2
tunnel dest 1.1.1.1
tunnel mode ipv6ip


!test
ping 1.1.1.1 so lo 2


!verify ipv6
ping 12::1



Output:



 R1:

R1#ping 2.2.2.2 so lo 1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/40/76 ms

R1#ping ipv6 12::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12::2, timeout is 2 seconds:
!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/25/32 ms


R2:

R2#ping 1.1.1.1 so lo 2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/40/76 ms

R2#ping ipv6 12::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 12::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/32/56 ms


Proof:

R1:

NOTE: "icmp" filter is only for IPv4


NOTE:
  1. "icmpv6" is for IPv6
  2. Wireshark does NOT show the encapsulating source and destination in the "Packet List" pane by default
  3. IP protocol 41 is IPv6 encapsulation. (Wikipedia, RFC)


No comments:

Post a Comment