Wiedza Tworzenie tunelu IPv6 <> IPv4 - mikrotik

Silas Mariusz

rm -rf /
Help us, GOD!
5 Kwiecień 2008
10 168
31
2 248
153
39
Nowy Sącz
forum.qnap.net.pl
QNAP
TS-x77
Ethernet
1 GbE
Source: Setting up an IPv6 tunnel via a tunnel broker - MikroTik Wiki

Setting up an IPv6 tunnel via a tunnel broker
First sign up for your tunnel at http://www.tunnelbroker.net or an equivalent service.

This will get you some information that looks like this:

Kod:
Server IPv4 address: 216.66.80.26
Server IPv6 address: 2001:470:1111:11::1/64
Client IPv4 address: 222.222.222.222
Client IPv6 address: 2001:470:1111:11::2/64
Assigned /64: 2001:470:3333:33::/64

First enable ipv6 package if it has not been already!

Setup the 6to4 interface
Kod:
/interface 6to4 add mtu=1280 name=sixbone local-address=222.222.222.222

Add your client IPv6 address to the new interface
Kod:
/ipv6 address add address=2001:470:1111:11::2/64 interface=sixbone

Add a default IPv6 route via your tunnel
Kod:
/ipv6 route add dst-address=2000::/3 gateway=::216.66.80.26

As of ROS 3.8 the syntax is:
Kod:
/ipv6 route add dst-address=<destination> gateway=::<ipv4-tunnelend>,<interface>
Sample:
Kod:
/ipv6 route add dst-address=2000::/3 gateway=::216.66.80.26,sixbone

The reason is, that with multiple tunnels on multiple interfaces, RouterOS would before 3.8 have assigned the routes to random 6in4 tunnel interfaces.
Also note, that if you upgrade from pre-3.8 to 3.8 and beyond, all static routes with ::IPv4 gateway will have be re-created from scratch.

New syntax for ROS 3.13+ routing-test:
Kod:
/ipv6 route add dst-address=<destination> gateway=::<ipv4-tunnelend>%<interface>
e.g.
Kod:
/ipv6 route add gateway=::216.66.80.26%sixbone

ROS 3.9 & 3.10: Adding routes is broken in these releases. Winbox returns an error message. Terminal will add the destination 2000::/3 as ::/3 which will not work as a default route. To work around this problem use the destination ::/0 instead.

You can now add your assigned IPv6 addresses as required.

-
ROS 3.22: I had to use mine "Server IPv6 address" (like 2001:470:1111:11::1 which i used as an example here!) for the gateway in order for routing to work.

Also do not forget to add assigned /64 subnet (2001:470:3333:33::/64 in this example) tp ipv6->Addresses so your clients behind Mikrotik can connect to the IPv6 network as well! This will enable clients there to autoconfigure correctly and make things work almost out of the box!
 

Użytkownicy znaleźli tą stronę używając tych słów:

  1. static routing