You are not logged in.
I'd like to configure systemd-networkd to assign a pure ipv4 address to my PC. From this wiki article, one should configure it like this:
/etc/systemd/network/dhcp.network
[Match]
Name=enp4s0
[Network]
DHCP=ipv4
LinkLocalAddressing=no
IPv6AcceptRA=no
I still seem to be getting an ipv6 address assigned and am wondering why:
% ip a
...
2: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 6c:f0:49:0a:0d:12 brd ff:ff:ff:ff:ff:ff
inet 10.1.10.102/24 brd 10.1.10.255 scope global dynamic enp4s0
valid_lft 43199sec preferred_lft 43199sec
inet6 fe80::6ef0:49ff:fe0a:d12/64 scope link
valid_lft forever preferred_lft forever
Last edited by graysky (2018-08-29 19:55:15)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I think that is ipv6 autoconf, which can be disabled via sysctl.
Offline
@brebs - I have been doing that but feel that it might be the nuclear option... seems like systemd-networkd should honor some how, no? Perhaps I am mistaken. I will say that running with the following causes a delay in my nfs share start up.
% cat /etc/sysctl.d/99-ip6.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
Last edited by graysky (2018-08-29 19:31:59)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
If you want to ignore ipv6, then just use e.g.:
# grep ipv6 /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable_ipv6=1"
... and run "update-grub".
Or do you want something more subtle?
Sysctl entries are for the kernel, whereas systemd is userland.
Offline
systemd-networkd should be able to set this setting to disabled as well
https://jlk.fjfi.cvut.cz/arch/manpages/ … ESCRIPTION
Note that an interface without any static IPv6 addresses configured,
and neither DHCPv6 nor IPv6LL enabled, shall be considered to have no
IPv6 support. IPv6 will be automatically disabled for that interface by
writing "1" to /proc/sys/net/ipv6/conf/ifname/disable_ipv6.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
@progandy - Eureka! That did the trick and without the delay to my nfs server. Thanks!
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
I would say that is not systemd's fault. As long as you have ipv6 enabled (and don't tweak anything) I suppose you will get a link local address, see [1].
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline