IPv6 Tunneling over IPv4

IPv6 Tunneling over IPv4

Topology


Initial configuration

The initial configuration consist basically of IPv4 interfaces and routing between R1 and R3:

R1 Configuration:

interface Loopback0
 ip address 1.1.1.1 255.255.255.255
 ip ospf 10 area 0

!
interface Ethernet0/0
 ip address 172.16.10.1 255.255.255.252
 ip ospf 10 area 0

router ospf 10


R2 Configuration:

R2#

interface Ethernet0/0
 ip address 172.16.10.2 255.255.255.252
 ip ospf 10 area 0
!
interface Ethernet0/1
 ip address 172.16.20.2 255.255.255.252
 ip ospf 10 area 0

router ospf 10


R3 Configuration:

interface Loopback0
 ip address 3.3.3.3 255.255.255.255
 ip ospf 10 area 0
!
interface Ethernet0/0
 ip address 172.16.20.1 255.255.255.252
 ip ospf 10 area 0
!
router ospf 10


Create Tunnel to encapsulate IPv6

  • Tunnel configuration:

R1:

interface Tunnel0
 no ip address
 tunnel source Loopback0
 tunnel destination 1.1.1.1


R2:

interface Tunnel0
 no ip address
 tunnel source Loopback0
 tunnel destination 3.3.3.3


  • Activate IPv6 and configure OSPFv3 on the interface Tunnel:

On R1 and R2:

Tunnel is up, we can enable IPv6 and configure OSPFv3 routing on the tunnel:

interface Tunnel0
 ipv6 enable
 ipv6 ospf 20 area 0


We can verify that OSPFv3 adjacency between Tunnel interfaces:

R3#show ipv6 ospf neighbor
            OSPFv3 Router with ID (3.3.3.3) (Process ID 20)

Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
1.1.1.1           0   FULL/  -        00:00:36    10              Tunnel0


R3#show ipv6 ospf interface
Tunnel0 is up, line protocol is up
  Link Local Address FE80::A8BB:CCFF:FE01:3000, Interface ID 11
  Area 0, Process ID 20, Instance ID 0, Router ID 3.3.3.3
  Network Type POINT_TO_POINT, Cost: 1000
  Transmit Delay is 1 sec, State POINT_TO_POINT
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    Hello due in 00:00:06
  Graceful restart helper support enabled
  Index 1/1/1, flood queue length 0
  Next 0x0(0)/0x0(0)/0x0(0)
  Last flood scan length is 2, maximum is 3
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 1.1.1.1
  Suppress hello for 0 neighbor(s)

  • Create an interface Lo1 with IPv6 address and advertise it through OSPFv3:

On R1:

interface Loopback1
 no ip address
 ipv6 address 2001::1/64
 ipv6 enable
 ipv6 ospf 20 area 0
end


On R2:

interface Loopback1
 no ip address
 ipv6 address 2003::3/64
 ipv6 enable
 ipv6 ospf 20 area 0
end


Verification and Test:

On Router R1:

R1#show ipv6 route
IPv6 Routing Table - default - 4 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
       B - BGP, HA - Home Agent, MR - Mobile Router, R - RIP
       H - NHRP, I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
       IS - ISIS summary, D - EIGRP, EX - EIGRP external, NM - NEMO
       ND - ND Default, NDp - ND Prefix, DCE - Destination, NDr - Redirect
       O - OSPF Intra, OI - OSPF Inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2, la - LISP alt
       lr - LISP site-registrations, ld - LISP dyn-eid, a - Application
C   2001::/64 [0/0]
     via Loopback1, directly connected
L   2001::1/128 [0/0]
     via Loopback1, receive
O   2003::3/128 [110/1000]
     via FE80::A8BB:CCFF:FE01:3000, Tunnel0
L   FF00::/8 [0/0]
     via Null0, receive


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


When pinging from R1 to R2, we performed a Wireshark capture:

We can see that the IPv6 packet is encapsulated inside IPv4 packet (through GRE) and the tunnel source and destination are the outer IP.


Bilel

Bilel

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x