2

I am trying to set both a static ipv4 address and a static ipv6 address on a home hosted Debian 11 server (it's actually just a PC).

Here is my /etc/network/interfaces :

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eno1
iface eno1 inet static
    address 192.168.1.149
    netmask 24
    gateway 192.168.1.1

iface eno1 inet6 static
    address 2a01:xxxx:xxxx:xxxx::1234
    netmask 56
    gateway fe80::712a:e39b:d35a:3ea4

After restarting networking service with `sudo service netowrking restart" Here is the result (exactyly what i want):

sept. 15 00:07:56 omen-debian systemd[1]: Starting Raise network interfaces...
sept. 15 00:08:07 omen-debian ifup[785]: Waiting for DAD... Timed out
sept. 15 00:08:07 omen-debian ifup[637]: ifup: failed to bring up eno1
sept. 15 00:08:07 omen-debian systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
sept. 15 00:08:07 omen-debian systemd[1]: networking.service: Failed with result 'exit-code'.
sept. 15 00:08:07 omen-debian systemd[1]: Failed to start Raise network interfaces.
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether c8:d3:ff:e6:b5:59 brd ff:ff:ff:ff:ff:ff
    altname enp5s0
    inet 192.168.1.149/24 brd 192.168.1.255 scope global eno1
       valid_lft forever preferred_lft forever
    inet6 2a01:xxxx:xxxx:xxxx::1234/56 scope global 
       valid_lft forever preferred_lft forever
    inet6 fe80::cad3:ffff:fee6:b559/64 scope link 
       valid_lft forever preferred_lft forever

As you see my networking service produces an error. What am i doing wrong ?

2
  • 1
    try to disable IPv6 DAD (Duplicate Address Detection) net.ipv6.conf.<interface name>.accept_dad = 0
    – asktyagi
    Sep 15, 2022 at 4:41
  • @asktyagi Solved it for me, looks like the DAD timeout is too long for systemd to wait?
    – Ale
    Nov 18, 2022 at 15:56

1 Answer 1

1

this is @asktyagi answer but I added here to be clear to others

On Debian 11 , after booting, systemctl status networking.service would show failure to add ipv6 addr to an interface that had ipv4 addr.
Even it was set to /etc/network/interface that interface did not have ipv6 address

Jan 30 14:07:48 debian11 systemd[1]: Starting Raise network interfaces...
Jan 30 14:07:48 debian11 ifup[543]: RTNETLINK answers: Permission denied
Jan 30 14:07:48 debian11 ifup[478]: ifup: failed to bring up ens192

so the error is RTNETLINK answers: Permission denied

none of these worked

ip -6 addr add IPv6/64  dev ens192 metric 1

and showed permission denied

then

route -A inet6 add IPv6/64  dev ens192

was also showed permission denied

changing /etc/sysctl.conf with these options did not solved link

net.ipv6.conf.all.autoconf=0
net.ipv6.conf.all.accept_ra=0
net.ipv6.conf.default.autoconf=0
net.ipv6.conf.default.accept_ra=0

# and
net.ipv6.conf.all.disable_ipv6=1

or reordering the configuration did not help either link

worked

net.ipv6.conf.<interface name>.accept_dad = 0

and reboot.
After reboot there was no error on networking and ipv6 was added to the interface.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .