Skip to content
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

slaac ... temporary usage #416

Open
biloute02 opened this issue Dec 1, 2024 · 0 comments
Open

slaac ... temporary usage #416

biloute02 opened this issue Dec 1, 2024 · 0 comments

Comments

@biloute02
Copy link

Hello,

I don't understand the usage of the directive temporary in /etc/dhcpcd.conf:

slaac private
slaac private temp

My testing workflow was:

sysctl net.ipv6.conf.eth0.use_tempaddr=1
ip link set dev eth0 down && ip link set dev eth0 up
vim /etc/dhcpcd.conf
dhcpc --rebind eth0
ip -6 a show dev eth0

Initially, the kernel parameter use_tempaddr=0. I get the same ip addresses with or without temp:

# grep "^slaac" /etc/dhcpcd.conf
slaac private
# dhcpc --rebind eth0
sending commands to dhcpcd process
# ip -6 a show dev eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet6 --public_stable--:31d7/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86379sec preferred_lft 86379sec
    inet6 --local--:bedb/64 scope link
       valid_lft forever preferred_lft forever
# grep "^slaac" /etc/dhcpcd.conf
slaac private temp
# dhcpc --rebind eth0
sending commands to dhcpcd process
# ip -6 a show dev eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet6 --public_stable--:31d7/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86385sec preferred_lft 86385sec
    inet6 --local--:bedb/64 scope link
       valid_lft forever preferred_lft forever

Then I set the kernel parameter use_tempaddr=1. I get temporary addresses, but changing temp does nothing etiher:

# grep "^slaac" /etc/dhcpcd.conf
slaac private
# dhcpc --rebind eth0
sending commands to dhcpcd process
# ip -6 a show dev eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet6 --temp1--:3c8c/64 scope global temporary dynamic
       valid_lft 86399sec preferred_lft 85884sec
    inet6 --public_stable--:31d7/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86399sec preferred_lft 86399sec
    inet6 --local--:bedb/64 scope link
       valid_lft forever preferred_lft forever
# grep "^slaac" /etc/dhcpcd.conf
slaac private temp
# dhcpc --rebind eth0
sending commands to dhcpcd process
# ip -6 a show dev eth0
4: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    inet6 --temp2--:2117/64 scope global temporary dynamic
       valid_lft 86394sec preferred_lft 85871sec
    inet6 --public_stable--:31d7/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 86394sec preferred_lft 86394sec
    inet6 --temp1--:3c8c/64 scope global temporary dynamic
       valid_lft 86233sec preferred_lft 85718sec
    inet6 --local--:bedb/64 scope link
       valid_lft forever preferred_lft forever

Is the temp directive only working on certain conditions (Linux kernel version)?

Does, under normal operating conditions, the temp directive replace the kernel setting use_tempaddr and a temporary address is created even if it set to 0?

Or temp is used internally by dhcpcd (e.g. to know that temporay addresses are being used) but effectively does nothing?

I have read the dhcpcd.conf manual but could not find any information on this.

My system is Void Linux:

$ uname -a
Linux berry 6.6.42_1 #1 SMP PREEMPT Sat Jul 27 03:30:00 UTC 2024 aarch64 GNU/Linux

Thank you for your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant