Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ipv6 dual-stack [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
jpsollie
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2013
Posts: 106

PostPosted: Sat Nov 21, 2020 2:08 pm    Post subject: ipv6 dual-stack [SOLVED] Reply with quote

Hi everyone,

To customize my ISP's settings, I moved the DHCP function out my ISPs router and set it onto a separate linux server.
So far, for IPv4, no issue.
For IPv6, however, the setup doesn't seem to work:
- I want the config to be stateless, as this allows the DHCP server to provide DNS info + NTP server etc.
- The ISP server provides router advertisement functionality
When requesting IP addresses, I do not see any query to the DHCP server in the server log. For the IPv4 server, no problem, but IPv6 seems a no-go.
My config file for IPv6 (this one is running as a separate instance using the -6 switch):
Code:

pid-file-name "/var/run/dhcpdv6.pid";

# option definitions common to all supported networks...
option dhcp6.domain-search "costadelsollie.local";
option dhcp6.name-servers fe80::2c0:8ff:fe9d:6460, fe80::e2d5:5eff:fe2a:d63c;

default-lease-time 60;
max-lease-time 120;

# Use this to enble / disable dynamic dns updates globally.
ddns-update-style standard;
ddns-dual-stack-mixed;
ddns-domainname "costadelsollie.local";
authoritative;
update-optimization false;
update-static-leases on;
ignore client-updates;

#subnet6 fe80::/10 {
#option dhcp6.name-servers fe80::2c0:8ff:fe9d:6460, fe80::e2d5:5eff:fe2a:d63c;
#option dhcp6.domain-search "costadelsollie.local";
#option dhcp6.sntp-servers fe80::2c0:8ff:fe9d:6460;
#}
subnet6 2a02:578:8538:b00::/56 {
range6 2a02:578:8538:b00::/64;
        option dhcp6.name-servers 2a02:578:8538:b00:e2d5:5eff:fe2a:d63c, 2a02:578:8538:b00:2c0:8ff:fe9d:6460;
        option dhcp6.domain-search "costadelsollie.local";
option dhcp6.sntp-servers 2a02:578:8538:b00:e2d5:5eff:fe2a:d63c;
}


any clues?
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...


Last edited by jpsollie on Tue Nov 24, 2020 8:02 pm; edited 1 time in total
Back to top
View user's profile Send private message
pa4wdh
Guru
Guru


Joined: 16 Dec 2005
Posts: 410

PostPosted: Sat Nov 21, 2020 2:33 pm    Post subject: Reply with quote

In IPv6 clients usually don't do DHCP inless they are told so in router advertisement, so the router has to instruct the clients to do DHCPv6.

On linux radvd is the deamon that sends these router advertisements, these are the options you are looking for (quote from man radvd.conf):
Quote:

AdvManagedFlag on|off
When set, hosts use the administered (stateful) protocol for address autoconfiguration in addition to any addresses autoconfigured using stateless address autoconfiguration. The use of this flag is described in RFC 4862.
Default: off

AdvOtherConfigFlag on|off
When set, hosts use the administered (stateful) protocol for autoconfiguration of other (non-address) information. The use of this flag is described in RFC 4862.
Default: off

I think you'll have to find out how to set these options on your ISP's router.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

Free as in Freedom is not limited to software only:
Music: http://www.jamendo.com
Recipes: http://www.opensourcefood.com
Back to top
View user's profile Send private message
jpsollie
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2013
Posts: 106

PostPosted: Sat Nov 21, 2020 3:14 pm    Post subject: Reply with quote

I selected the following option in my isp's router:
Quote:

1 Enable the O flag in the router advertisement messages of the FRITZ!Box

Devices in the home network should obtain all information other than their IP address (DNS server, for instance) from another DHCPv6 server in the home network.


this should work, no?
an alternative for my isp's router is:

Quote:

2. Enable the M and the O flags in the router advertisement messages of the FRITZ!Box (SLAAC possible)

Devices in the home network can obtain their IPv6 address from another DHCPv6 server in the home network. They can also obtain other relevant information such as DNS servers from this DHCPv6 server. Devices that do not support DHCPv6 can use SLAAC (Stateless Address Autoconfiguration).

3. Enable the M and the O flags in the router advertisement messages of the FRITZ!Box (SLAAC not possible)

Devices in the home network can obtain their IPv6 address from another DHCPv6 server in the home network. They can also obtain other relevant information such as DNS servers from this DHCPv6 server. In this mode SLAAC is not supported.

_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
pa4wdh
Guru
Guru


Joined: 16 Dec 2005
Posts: 410

PostPosted: Sat Nov 21, 2020 3:23 pm    Post subject: Reply with quote

The first option indeed seems to be the right one for you. The O-flag means to have the stateless address via the router advertisements and other configuration (DNS, NTP, etc.) via DHCPv6.
_________________
The gentoo way of bringing peace to the world:
USE="-war" emerge --newuse @world

Free as in Freedom is not limited to software only:
Music: http://www.jamendo.com
Recipes: http://www.opensourcefood.com
Back to top
View user's profile Send private message
jpsollie
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2013
Posts: 106

PostPosted: Sat Nov 21, 2020 5:42 pm    Post subject: Reply with quote

pa4wdh wrote:
The first option indeed seems to be the right one for you. The O-flag means to have the stateless address via the router advertisements and other configuration (DNS, NTP, etc.) via DHCPv6.


Exactly. So how do you explain this behaviour?
The dhcpd logs both show the PID files are different, and I can see the -4 and the -6 server have been started, however, the dhcpv6 server reports nothing into the log. Nothing...
I tried to turn off the DHCPv4 server, but the DHCPv6 server still couldn't register a V6 query.

Any ideas are welcome :s
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6801
Location: Blighty

PostPosted: Sun Nov 22, 2020 3:39 pm    Post subject: Reply with quote

Why not try forcing a DHCP6 request from a client and run `tcpdump -vvvv port dhcpv6-client` at the client and the same at the server but dhcpv6-server?

You can force a DHCP6 request with dhcpcd like so:
1) Ensure that no dhcpcd is currently running so you can debug
`pkill dhcpcd`
2) Force a DHCPv6 request for an address
`dhcpcd -dB6 --noipv6rs --ia_na eth0`

Even if there is no address available, the DHCPv6 server should still respond telling you this.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
jpsollie
Tux's lil' helper
Tux's lil' helper


Joined: 17 Aug 2013
Posts: 106

PostPosted: Tue Nov 24, 2020 7:37 pm    Post subject: Reply with quote

That works ... for my linux PC :(
for win10 and android devices, this doesn't work.
I'll see whether I can install a win10 VM on my PC and get a pcap. Maybe it shows something

*EDIT*:
I am soooooo stupid: my win10 PC had its IPv6 turned off ^^
Android: I do not know, a reboot seems to work, though not sure whether DNS search list and / or sntp are applied, as the DNS search list is the same as IPv4, and it doesn't seem to use DNS servers on IPv6 at all.
So, I suppose it's OK, sorry for disturbing guys, keep up the good work!
_________________
I am using gentoo for over 10 years now. yet seen its possibilities, I still feel like a n00b...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum