Community discussions

MikroTik App
 
User avatar
boen_robot
Forum Guru
Forum Guru
Topic Author
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

How to set up IPv6 on 5.19 and Windows 7?

Fri Aug 10, 2012 5:45 pm

Hi.

I'm trying to set up a new router, and abandon all of the outdated practices I've used before. Part of that (in fact, the main part) is the idea of using a dual stack network.

From my ISP, I have one IPv4 address (78.130.165.174, received via ethernet cable and DHCPv4) and just one router, and per the instructions in the wiki, I have created a tunnel at HE. The IPv4 part works fine, but the IPv6 one doesn't. Possibly because on 5.19, the instructions don't follow as nicely as described there. Or maybe there's something else I don't understand yet.

I'm trying to do everything with DHCP servers and/or IPv6 stateless configuration (anything, as long as end user devices can be configured automatically) via a wireless interface. I have a Windows 7 machine for testing client connectivity. The way I have it now, I've been able to give it an IPv6 with stateless configuration, and I can ping the HE gateway, but I can't ping my own router, nor do I ever see any gateway and DNS assigned. Needless to say I can't even ping any site, as DNS resolution doesn't even occur.

Here's an export on my current configuration (actual IPs and everything):
/interface wireless
set 0 band=2ghz-b/g country=bulgaria disabled=no frequency=2427 l2mtu=2290 \
    mode=ap-bridge wireless-protocol=802.11
/interface 6to4
add comment="HE IPv6 Tunnel" disabled=no local-address=78.130.165.174 mtu=\
    1280 name=sit1 remote-address=216.66.84.46
/ip pool
add name=clients ranges=192.168.2.2-192.168.2.254
/ip dhcp-server
add add-arp=yes address-pool=clients always-broadcast=yes disabled=no \
    interface=wlan1 lease-time=1h name=DHCP-IPv4
/ipv6 dhcp-server
add address-pool=clients disabled=no interface=wlan1 lease-time=1h name=\
    DHCP-IPv6
/ipv6 pool
add name=clients prefix=2001:470:1f14:69c::/64 prefix-length=64
/ip address
add address=192.168.2.1/24 interface=wlan1
/ip dhcp-client
add disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=192.168.2.1 gateway=192.168.2.1
/ip dns
set allow-remote-requests=yes servers=89.25.0.253,94.155.155.4,2001:470:20::2
/ip firewall nat
add action=src-nat chain=srcnat src-address=192.168.2.0/24 to-addresses=\
    78.130.165.174
/ip neighbor discovery
set wlan1 disabled=yes
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
/ipv6 address
add address=2001:470:1f14:69c::2/64 advertise=no interface=sit1
/ipv6 nd
set [ find default=yes ] advertise-dns=yes interface=wlan1 \
    managed-address-configuration=yes other-configuration=yes
/ipv6 nd prefix
add interface=wlan1 prefix=2001:470:1f14:69c::/64
/ipv6 route
add distance=1 gateway=sit1
add distance=1 dst-address=2001:470:1f14:69c::/64 gateway=wlan1
add distance=1 dst-address=2001:470:1f14:69c::1/128 gateway=sit1
What am I doing wrong?
 
biomesh
Long time Member
Long time Member
Posts: 562
Joined: Fri Feb 10, 2012 8:25 pm

Re: How to set up IPv6 on 5.19 and Windows 7?

Fri Aug 10, 2012 6:31 pm

This will probably work for you:


/interface 6to4
add comment="HE IPv6 Tunnel" disabled=no local-address=78.130.165.174 mtu=\
1280 name=sit1 remote-address=216.66.84.46
/ipv6 pool
add name=clients prefix=2001:470:1f15:69c::/64 prefix-length=64
/ipv6 address
add address=2001:470:1f14:69c::2/64 advertise=no interface=sit1
add address=2001:470:1f15:69c::1/64 advertise=yes disabled=no eui-64=no interface=wlan1
/ipv6 nd
set [ find default=yes ] advertise-dns=yes interface=wlan1 \
managed-address-configuration=yes other-configuration=yes
/ipv6 nd prefix
add interface=wlan1 prefix=2001:470:1f15:69c::/64
/ipv6 route
add disabled=no distance=1 dst-address=::/0 gateway=2001:470:1f14:69::1 scope=30 target-scope=10
add disabled=no distance=1 dst-address=2000::/3 gateway=2001:470:1f14:69::1 scope=30 target-scope=10



If you look at the tunnel broker config page you will see your routed prefix which is different than your client and server prefix (off by one). You need to add two IP addresses, one externally that is your client ipv6 address, and an address in your routed prefix to an internal interface. Your default route(s) then need to point to your server address as part of the tunnel.
 
User avatar
boen_robot
Forum Guru
Forum Guru
Topic Author
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How to set up IPv6 on 5.19 and Windows 7?

Fri Aug 10, 2012 7:21 pm

I hadn't noticed the difference in the routed addresses. Thanks.

But despite the adjustments, there's still no IPv6 internet, and no gateway and DNS on the Win7 machine. The only noticeable difference is that the Win7 machine now receives an address in the routed subnet, as it should.

Here's the full settings, after the adjustments:
/interface wireless
set 0 band=2ghz-b/g country=bulgaria disabled=no frequency=2427 l2mtu=2290 \
    mode=ap-bridge wireless-protocol=802.11
/interface 6to4
add comment="HE IPv6 Tunnel" disabled=no local-address=78.130.165.174 mtu=\
    1280 name=sit1 remote-address=216.66.84.46
/interface wireless security-profiles
set [ find default=yes ] eap-methods=passthrough
/ip pool
add name=clients ranges=192.168.2.2-192.168.2.254
/ip dhcp-server
add add-arp=yes address-pool=clients always-broadcast=yes disabled=no \
    interface=wlan1 lease-time=1h name=DHCP-IPv4
/ipv6 dhcp-server
add address-pool=clients disabled=no interface=wlan1 lease-time=1h name=\
    DHCP-IPv6
/ipv6 pool
add name=clients prefix=2001:470:1f15:69c::/64 prefix-length=64
/ip address
add address=192.168.2.1/24 interface=wlan1
/ip dhcp-client
add disabled=no interface=ether1
/ip dhcp-server network
add address=192.168.2.0/24 dns-server=192.168.2.1 gateway=192.168.2.1
/ip dns
set allow-remote-requests=yes servers=89.25.0.253,94.155.155.4,2001:470:20::2
/ip firewall nat
add action=src-nat chain=srcnat src-address=192.168.2.100 to-addresses=\
    78.130.165.174
/ip neighbor discovery
set wlan1 disabled=yes
/ip service
set telnet disabled=yes
set ftp disabled=yes
set ssh disabled=yes
/ipv6 address
add address=2001:470:1f14:69c::2/64 advertise=no interface=sit1
add address=2001:470:1f15:69c::1/64 interface=wlan1
/ipv6 nd
set [ find default=yes ] advertise-dns=yes interface=wlan1 \
    managed-address-configuration=yes other-configuration=yes
/ipv6 route
add distance=1 gateway=sit1
I should note that the key difference from the wiki tutorial is that the gateway in "/ipv6 route", can't be specified as an IP. It can only be specified as an interface, or a link-local address, with interface attached to it (which, let's face it, isn't any more useful than just the interface name).
 
biomesh
Long time Member
Long time Member
Posts: 562
Joined: Fri Feb 10, 2012 8:25 pm

Re: How to set up IPv6 on 5.19 and Windows 7?

Fri Aug 10, 2012 8:07 pm

You are getting the address via RA and I don't think that the windows ipv6 stack supports dns configuration except via static or DHCP, which is not available in the ROS implementation. (I use bind). You don't have to have ipv6 addressable dns servers, but it does help if you want full ipv6 support. Just add them statically if you can't run a copy of bind locally to hand out ipv6 dns server options.

You will need to set those two routes for the tunnel to work (one of the two might work, but I use both).

They are both basically default gateway routes with the 2000::/3 is the old legacy reference and ::/0 being the current reference. You just need to point them to the tunnel server address.
/ipv6 route
add disabled=no distance=1 dst-address=::/0 gateway=2001:470:1f14:69::1 scope=30 target-scope=10
add disabled=no distance=1 dst-address=2000::/3 gateway=2001:470:1f14:69::1 scope=30 target-scope=10
 
User avatar
boen_robot
Forum Guru
Forum Guru
Topic Author
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How to set up IPv6 on 5.19 and Windows 7?

Fri Aug 10, 2012 9:03 pm

Setting the DNS server statically doesn't seem to work. In fact, setting the IP and gateway statically sort of broke the whole thing (no pings to anything).

I'll retry later with a different, Windows 8 machine. I remember there were some changes in it with regards to IPv6. Hopefully, it includes a proper DHCP client and/or stateless DNS/gateway configuration. If even that doesn't work, I guess I'll hold out IPv6, since MikroTik woudn't be ready yet. Damn...

BTW, what exactly is this "bind" thingy?
Last edited by boen_robot on Sun Aug 12, 2012 5:51 pm, edited 1 time in total.
 
biomesh
Long time Member
Long time Member
Posts: 562
Joined: Fri Feb 10, 2012 8:25 pm

Re: How to set up IPv6 on 5.19 and Windows 7?

Fri Aug 10, 2012 9:12 pm

Sorry, not BIND, but dhcpd from isc.org. Bind is the dns server and dhcpd is the DHCP server. That was my typo.

The DHCP server from isc.org would only be used to hand out the DHCP option to the clients, not the actual addresses (if you want to use autoconfig).
 
hci
Long time Member
Long time Member
Posts: 674
Joined: Fri May 28, 2004 5:10 pm

Re: How to set up IPv6 on 5.19 and Windows 7?

Tue Oct 16, 2012 3:10 am

Has 'Windows 7' been updated to to obtain IPv6 DNS servers by RA yet?
 
User avatar
boen_robot
Forum Guru
Forum Guru
Topic Author
Posts: 2400
Joined: Thu Aug 31, 2006 4:43 pm
Location: europe://Bulgaria/Plovdiv

Re: How to set up IPv6 on 5.19 and Windows 7?

Tue Oct 16, 2012 12:08 pm

Has 'Windows 7' been updated to to obtain IPv6 DNS servers by RA yet?
That's just it... it seems it hasn't. It can only obtain IPv6 DNS with DHCPv6 or manually. But MikroTik don't support DNS over DHCPv6 yet.

Although I haven't yet tried Windows 8, I've already seen comments in the Windows 8 blog that Windows 8 also doesn't support DNS via RA.

Who is online

Users browsing this forum: boingolover, lubara and 140 guests