OpenWrt Forum Archive

Topic: Subnetting ipv6 /64 network

The content of this topic has been archived on 27 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi
First of all: I know it's not a good idea to subnet an ipv6 network, but I have my provider that for the moment gives a routed /64 network in 6in4 tunnel which is ok for navigation but not for advanced use, like VPN ipv6 tunnel, NAT64 etc...
I have endup in a discussion regarding the subnetting of such short network here:

http://serverfault.com/questions/714890 … -around-it

I have followed the instruction but as soon as I set a static ipv6 config to my LAN, I endup in router not contactable any more even in ipv4, the led fast blinks like there is some intenal loop
What I do is the following, assuming that from the tunnel I get a routed prefix 2001:xxxx:yyyy:zzzz::/64

1) Assign an ipv6 IP to the tunnel interface, let's say 2001:xxxx:yyyy:zzzz::2
2) Assign to the LAN an ipv6 address in the same subnet (ipv6 assignment length is disabled) 2001:xxxx:yyyy:zzzz::3
3) Set gateway to the WAN Ipv6
4)IPv6 routed prefix set to: 2001:xxxx:yyyy:zzzz::/96 (this is the subnet I want to advertise in LAN)

as soon as a save and apply the router is not contactable any more and I have to restore the network config in failsafe
What am I doing wrong?
Thanks to everybody in advance

It is _not_ a good idea to subnet smaller than /64 in IPv6. There are too many assumptions (beyond just SLAAC) that subnets will be /64. You will spend a bunch of your time trying to figure out all the problems that cropped up because you used less than a /64.

If you want to do advanced stuff, like NAT64, I suggest getting a Hurricane Electric tunnel. They will give you a /48 (which is what I have at home now), which should be plenty of room to "play"

Once you get your /48 up and running, have a look at this for running an IPv6-only + NAT64 network

http://ipv6-net.blogspot.com/2016/07/tr … v6-to.html
https://github.com/cvmiller/nat64

I _know_ it is not a good idea, in fact I have started the topic with this phrase.
However it's what my ISP gives, since it's using a /32 prefix for residential users and 6in4 static tunnel, which means a total of /64 prefix.
And _yes_ so far I am using hurricane tunnel due to my subnet requirement, the problem is that they don't have a pop in Italy, where I live, which means that, apart from performances issue due extra lag to reach the closer POP (and also hurricane gives this free tunnel for network preparation, performance is not the main concern here), I get a Swiss IP so I have a lot of big problems with geolocalized services, like internet TV, etc...
And I see that it's quite common that ISP all around the world give /64, also in US. So the problem of subnetting it will get important I believe.
I'm perfectly aware of the drawbacks, but I'm prepared to address them, and I believe that a correctly configured system can work in this setup.
And, by the way, I really don't understand why OpenWRT gets uncontactable even in IPV4 with the above settings, that is my concern now.
Thanks again for the help
Bye

I think ISPs are learning, which why you see some only using /64 without PD. In North America it seems like the ISPs have got the message and either use PD to give you a /64 for your LAN, or a /56 which can then be used to subnet the LAN.

Not sure why your OpenWRT gets disconnected. I look forward to hearing what you find.

I'm actually pursuing a second path: I activate both Hurricane and mu ISP 6in4 tunnel, but I set the metric of Hurricane to 5 instead of 0. Doing so my goal is to have my ISP (fast) tunnel preferred for outgoing traffic, and use hurricane network for VPN NAT64.
It works, Netflix detect my ISP (italian) IP, but I have to make more test to check if I don't endup in strange situation

Hi
this trick doesn't work and it will never work on other clients which just get their own IPv6 address knowing nothing about the tunnels...
I have endup in this document:

http://etherealmind.com/ipv6-which-addr … selection/

The problem here is that both IPv6 are 6in4 so the according to the info from this document, both will be threated as identical, and I see that mostly i go out with the hurricane IPv6 address...
Anyone knows how handle the metric of the assigned IPv6 address?

I have not found how to adjust the metric odhcpd assigned routes (dynamic IPv6 routes). But you can adjust the metric of the HE route to be higher than the odhcpd. In /etc/config/network add:

config route6
    option interface 'lan'
    option target '2001:470:x:x::/64'
    option metric '1024'
    option mtu '1280'

I am not sure if the metric is even considered at all in ipv6 routing, in any case it will eventually work for router generated traffic but not in clients...
I don't see any way to use odhcp to push wanted IP and metric, even in only statefull config. Any how I see that traffic goes mostly through my ISP tunnel, but the traceroute6 says I go out in hurricane tunnel... I'm quite confused

The discussion might have continued from here.