-
Notifications
You must be signed in to change notification settings - Fork 757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IPv6 not working when using 6rd with a /64 prefix #4025
Comments
|
If I remove the inet6 address from the wan_stf interface like this: the router <-> laptop communication starts working immediately (I get ping replies), so I think the wan_stf interface is interfering with the traffic what should go to the LAN interface. Maybe traffic for the LAN interface gets incorrectly routed to wan_stf? Needless to say that that the 6rd tunnel stops working when I do this, but at least we're sure that on the LAN side everything is configured correctly. |
|
I created a script in script #!/bin/sh
echo "+------------------------------+"
echo "| |"
echo "| Fixing 6rd.................. |"
echo "| |"
echo "+------------------------------+"
BAD_IP="$(/sbin/ifconfig wan_stf | /usr/bin/sed -n '/.inet6 /{s///;s/ .*//;p;}')"
RANDOM_ULA="$(echo fd`openssl rand -hex 7`: | /usr/bin/sed 's/.\{4\}/&:/g')"
/sbin/route add -inet6 default -interface wan_stf
/sbin/ifconfig wan_stf inet6 $BAD_IP -alias
/sbin/ifconfig wan_stf inet6 $RANDOM_ULA/64 alias
echo "+------------------------------+"
echo "| |"
echo "| Done fixing 6rd............. |"
echo "| |"
echo "+------------------------------+"Hope this helps and maybe Fastweb will give us more than just a single /64 some day. 😉 |
|
Thanks, that's an interesting workaround. Way better than nothing, however there has to be a better way, as it works flawlessly with pfSense 2.3.5 (the latest version supporting i386 hardware). I couldn't test with newer releases but it's not reported as broken AFAIK. |
Can confirm that it's plug and play on 2.4.5 as well, no issues. |
|
I will close this issue if off-topic discussions continue to take place. Discuss OPNsense solutions or troubleshooting or use whatever works for you. |
|
@fichtner thanks for chiming in. Please allow me to disagree: I think we have a bug here, and not a support request, and I think mentioning other solutions using the same underlying operating system but behaving differently is OPNsense troubleshooting. "Looking at differences" is probably the single most powerful debugging technique have, and is the basis of more advanced ones as bisecting, A/B testing and so on. If we are here is because we have reasons to prefer OPNsense to other solutions, and are willing to allocate some time to try to make it better. This said: yes, let's stay on topic. :) |
|
I do not disagree that it may be a bug. I spent a lot of work to make this happen remotely two years ago. The issues that I see:
I'm happy to look into it, but we run with a lot of restrictions and need help to point us to the line of code that needs to be changed. I do not believe tracking a /64 prefix through a router is going to work and prone to breakage as far as IPv6 connectivity on the router itself goes. Cheers, |
|
PS: I checked the code and I can see nothing obvious except that we're flying blind here with not a single log message attached, e.g. https://github.com/opnsense/core/blob/master/src/etc/inc/interfaces.inc#L2688 That would be an easy thing to compare... |
|
Question: if you stop tracking LAN and just add a static ULA in the configuration, then LAN should receive advertisements and if you're in luck you can reach WAN? |
|
@fichtner I can't take down my connection at the moment, I can try over the weekend. However in my (possibly flawed) understanding ULA addressed (
|
|
It looks like you are right. It works for routing and internal communication but not to reach the Internet from the client. Looking at the workaround presented it forces the IPv6 traffic out the WAN interface, which means it "solves" the issue of the routing table dilemma if it should send to WAN or LAN, but it would probably also break reaching your LAN devices from the firewall itself. If that is the approach employed by the other firewall (I am only guessing) it's not so much desirable. You can try to comment out the following, but it might need further manipulation of the system still: Line 458 in 50f0b15
The thing is this isn't portable and related to /64 usage indeed and has other implications such as not being able to delegate more than one subnet internally or may conflict with Multi-WAN setups. |
|
Changig the prefix length on the wan_stf interface to /128 might allow the router as well as hosts in the LAN to access the Internet. But I can't easily test this. |
|
This issue has been automatically timed-out (after 180 days of inactivity). For more information about the policies for this repository, If someone wants to step up and work on this issue, |
Builds upon the 6rd routing fixes discussed in https://forum.opnsense.org/index.php?topic=20260.0 Instead of setting the calculated /64 subnet length on the _stf interface, I set the original ISP provided subnet length. And change the gateway to be inside the ISP provided prefix instead of the calculated /64. wan address will still be the same but the wider subnet solves any routing issues with single /64 prefixes
Builds upon the 6rd routing fixes discussed in https://forum.opnsense.org/index.php?topic=20260.0 Instead of setting the calculated /64 subnet length on the _stf interface, I set the original ISP provided subnet length. And change the gateway to be inside the ISP provided prefix instead of the calculated /64. wan address will still be the same but the wider subnet solves any routing issues with single /64 prefixes (cherry picked from commit 866e8f2)
Describe the bug
All what follows is on OPNsense 20.1.4 (i386/OpenSSL).
My ISP supports IPv6 using 6rd but sadly only assigns a single /64. However this should be enough to have radvd/SLAAC on the LAN interface, and indeed it works fine with the router provided by the ISP. But let's proceed by steps.
I can properly set up 6rd on the WAN interface. I need to manually add
wan_stfas the IPv6 default route to workaround #3903, but then the tunnel works fine:root@net6501:~ # ifconfig wan_stf wan_stf: flags=4041 metric 0 mtu 1280 inet6 2001:b07:5d2e:58c7:: prefixlen 64 nd6 options=1 v4net 93.46.88.199/0 -> tv4br 81.208.50.214 groups: stf root@net6501:~ # route -6 get default route to: default destination: default mask: default fib: 0 interface: wan_stf flags: recvpipe sendpipe ssthresh rtt,msec mtu weight expire 0 0 0 0 1280 1 0 root@net6501:~ # ping6 -c1 ipv6.google.com PING6(56=40+8+8 bytes) 2001:b07:5d2e:58c7:: --> 2a00:1450:4002:805::200e 16 bytes from 2a00:1450:4002:805::200e, icmp_seq=0 hlim=57 time=7.416 msThe LAN interface is configured to track the WAN interface, with IPv6 prefix ID 0x0 (IIUC as I have a single /64 this is the only choice). The interface configuration looks correct: the LAN interface get assigned the
:1address of the 6rd /64:and the router advertisement also works, as my laptop on the LAN gets assigned addresses on the right /64:
3: wlp61s0: mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 48:f1:7f:b4:3e:9e brd ff:ff:ff:ff:ff:ff inet 192.168.1.138/24 brd 192.168.1.255 scope global dynamic noprefixroute wlp61s0 valid_lft 4929sec preferred_lft 4929sec inet6 2001:b07:5d2e:58c7::2000/128 scope global dynamic noprefixroute valid_lft 4932sec preferred_lft 2232sec inet6 2001:b07:5d2e:58c7:84b2:3297:aa4c:135a/64 scope global temporary dynamic valid_lft 86267sec preferred_lft 14267sec inet6 2001:b07:5d2e:58c7:f1c5:2ef7:e567:afd2/64 scope global dynamic mngtmpaddr noprefixroute valid_lft 86267sec preferred_lft 14267sec inet6 fe80::4470:3f96:5d7c:54d0/64 scope link noprefixroute valid_lft forever preferred_lft foreverHowever I can't ping the router (
2001:b07:5d2e:58c7::1) from the laptop: there is no reply to ping. This is pretty strange as there are two interfaces with IP addresses on the same network and they communicate.I am specifically blaming the fact that the 6rd assigned network is a /64 because if I misconfigure it as a /63 then router and laptop can communicate with the addresses assigned by radvd, but of course the 6rd tunnel does not work.
This is somehow similar to #2663, but a lot of things changed since OPNsense 18.7. I don't know if this ever worked with OPNsense, but it is reported working with pfSense.
The text was updated successfully, but these errors were encountered: