Setting up an IPv6 tunnel via 6to4

From MikroTik Wiki
Jump to: navigation, search

You must have a static IP address for this to work.

This is some necessary information:

   Static IPv4 address: 62.157.9.98
   Static IPv6 address: 2002:3e9d:0962:1::1 
   Usable /48: 2002:3e9d:0962::/48

Note: A 6to4 calculator is available at grox.net - select IPv4 to 6to4 address

6to4.gif

Setup the 6to4 interface

   /interface 6to4 add mtu=1280 name=ipng-tunnel local-address=62.157.9.98 remote-address=192.88.99.1 disabled=no


Add your client IPv6 address to the new interface

   /ipv6 address add address=2002:3e9d:0962:1::1/3 interface=ipng-tunnel

Add a default route to the global IPv6 Internet through the tunnel interface using the anycast IPv4 address:

ipv6 route add dst-address=2000::/3 gateway=::192.88.99.1,ipng-tunnel

Syntax for RouterOS v4.x, or RouterOS 3.x with routing-test:

ipv6 route add dst-address=2000::/3 gateway=::192.88.99.1%ipng-tunnel

You can now add your IPv6 addresses as required for your internal network.

Example:

   /ipv6 address add address=2002:3e9d:0962:2::1/64 interface=ether1 advertise=yes disabled=no 


Image taken from O'Reilly ONLamp