Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd and openrc net.x: how to get both IPv4 and IPv6 addr
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
ckonstanski1
n00b
n00b


Joined: 17 Jan 2019
Posts: 9
Location: Hailey ID

PostPosted: Thu Jan 17, 2019 4:45 am    Post subject: dhcpcd and openrc net.x: how to get both IPv4 and IPv6 addr Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jan 17, 2019 6:05 am    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jan 17, 2019 12:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Thu Jan 17, 2019 1:50 pm    Post subject: Reply with quote

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
View user's profile Send private message
ckonstanski1
n00b
n00b


Joined: 17 Jan 2019
Posts: 9
Location: Hailey ID

PostPosted: Thu Jan 17, 2019 3:51 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jan 17, 2019 4:11 pm    Post subject: Reply with quote

dhcpcd is not seeing the managed flag!
7.0.1 is an old version these days, can you try upgrading to 7.0.8?
_________________
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
ckonstanski1
n00b
n00b


Joined: 17 Jan 2019
Posts: 9
Location: Hailey ID

PostPosted: Thu Jan 17, 2019 4:44 pm    Post subject: Reply with quote

Upgraded to 7.0.8. Same issue. I will try a different DHCP client.
Back to top
View user's profile Send private message
ckonstanski1
n00b
n00b


Joined: 17 Jan 2019
Posts: 9
Location: Hailey ID

PostPosted: Thu Jan 17, 2019 5:06 pm    Post subject: Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jan 17, 2019 5:16 pm    Post subject: Reply with quote

Yay!
_________________
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
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