View previous topic :: View next topic |
Author |
Message |
ckonstanski1 n00b
Joined: 17 Jan 2019 Posts: 9 Location: Hailey ID
|
Posted: Thu Jan 17, 2019 4:45 am Post subject: dhcpcd and openrc net.x: how to get both IPv4 and IPv6 addr |
|
|
I am adding IPv6 to my home network (in addition to the IPv4 already present). I got dhcpd working for both IPv4 and IPv6 on the server end:
- Gave the router a static IPv6 address
- Set up radvd to advertise the IPv6 subnet in managed mode (for stateful addressing)
- Symlinked /etc/init.d/dhcpd to /etc/init.d/dhcpdv6
- Created /etc/conf.d/dhcpdv6
- Configured it with DHCPD_OPTS="-6"
- Created /etc/dhcp/dhcpdv6.conf with a subnet6
- rc-update add dhcpdv6 default
Now I have both dhcp v4 and v6 running. I know it's working because my printer is getting an IPv6 address. It's even the correct address that I made a reservation for. I can see the DUID in /var/log/messages.
The problem: the gentoo clients are not even trying dhcpv6. They're only doing IPv4. I can't figure out how to make them request both types of addresses. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Jan 17, 2019 6:05 am Post subject: |
|
|
You haven't mentioned which DHCP client you're using on the Gentoo machines. What do you have installed and does it generate any errors? |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Jan 17, 2019 12:07 pm Post subject: |
|
|
He mentions dhcpcd in the topic title, so lets assume it's that.
If you have changed /etc/dhcpcd.conf, please post that here.
Then issue this:
Code: | dhcpcd -k
dhcpcd -dB6 |
This will go through the IPv6 setup process only (such as not to muddy output with IPv4 setup).
Ctrl-C to stop.
Paste results here.
To capture same results to a log file, add this to dhcpcd.conf
Code: | debug
logfile /var/log/dhcpcd.log |
_________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Thu Jan 17, 2019 1:50 pm Post subject: |
|
|
UberLord wrote: | He mentions dhcpcd in the topic title, so lets assume it's that. |
My bad, I misread it as "dhcpd" after reading the post. The names *are* a little close together... |
|
Back to top |
|
|
ckonstanski1 n00b
Joined: 17 Jan 2019 Posts: 9 Location: Hailey ID
|
Posted: Thu Jan 17, 2019 3:51 pm Post subject: |
|
|
Confirmed: I am using dhcpcd. I had not made any modifications to dhcpcd.conf prior to posting to this forum.
I added the debug statements to the config file and ran the commands. Here is the output:
https://paste.pound-python.org/show/BWN91bdcKvkLgQbZXhtH/
We are talking about the wlan0 interface. This looks like the most interesting line:
Code: | wlan0: No DHCPv6 instruction in RA |
I don't know if that's meaningful or just a red herring. By that point the IPv6 address is already assigned. It looks like a stateless radvd IP. Perhaps I have radvd configured wrong?
My radvd.conf on the router:
https://paste.pound-python.org/show/u8pHTrlV9kHoj3rAYC3F/ |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
ckonstanski1 n00b
Joined: 17 Jan 2019 Posts: 9 Location: Hailey ID
|
Posted: Thu Jan 17, 2019 4:44 pm Post subject: |
|
|
Upgraded to 7.0.8. Same issue. I will try a different DHCP client. |
|
Back to top |
|
|
ckonstanski1 n00b
Joined: 17 Jan 2019 Posts: 9 Location: Hailey ID
|
Posted: Thu Jan 17, 2019 5:06 pm Post subject: |
|
|
Solved. dhcpcd is still the best option for a DHCP client. The problem was the radvd config. I think that advertising the subnet caused it to override the managed mode setting. So I removed the prefix entirely.
Code: | interface enp3s0 {
AdvManagedFlag on;
AdvSendAdvert on;
AdvOtherConfigFlag on;
MinRtrAdvInterval 3;
MaxRtrAdvInterval 60;
}; |
Thanks for the help! |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
|