0

I have written Linux network drivers for a new device. I expect the new interface to get IPv6 link-local address when I insmod the drivers. This works fine on Debian10, CentOS8 and various Ubuntu machines. But RHEL7 doesn't seem to assign IPv6 address to the interface.

See new_interface0 in the output below.

So far I have googled "How to disable IPv6 on RHEL7" and checked if any of the settings were applied on the machine - everything seems fine. I have greped for ipv6 on /etc and everything seems fine. Some of the interfaces do get an IPv6 LL address which makes this strange.

[root@midgar ~]# ip -6 a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 state UNKNOWN qlen 1000
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 state UP qlen 1000
    inet6 fe80::4bd5:baeb:2ac7:c94a/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
[root@midgar ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether a0:8c:fd:c1:37:d8 brd ff:ff:ff:ff:ff:ff
    inet 172.17.78.82/24 brd 172.17.78.255 scope global noprefixroute eno1
       valid_lft forever preferred_lft forever
    inet6 fe80::4bd5:baeb:2ac7:c94a/64 scope link noprefixroute
       valid_lft forever preferred_lft forever
8: new_interface0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 06:2f:9c:75:46:d4 brd ff:ff:ff:ff:ff:ff
    inet 169.254.9.3/16 brd 169.254.255.255 scope link new_interface0:avahi
       valid_lft forever preferred_lft forever
[root@midgar ~]# modprobe ipv6
[root@midgar ~]# echo $?
0

Here are the network configuration for the device from /proc/sys/net/ipv6/conf/new_interface0/:

accept_dad 1
accept_ra 0
accept_ra_defrtr 0
accept_ra_pinfo 0
accept_ra_rt_info_max_plen 0
accept_ra_rtr_pref 0
accept_redirects 1
accept_source_route 0
autoconf 1
dad_transmits 1
disable_ipv6 0
enhanced_dad 1
force_mld_version 0
force_tllao 0
forwarding 0
hop_limit 64
keep_addr_on_down 0
max_addresses 16
max_desync_factor 600
mc_forwarding 0
mldv1_unsolicited_report_interval 10000
mldv2_unsolicited_report_interval 1000
mtu 1500
ndisc_notify 0
optimistic_dad 0
proxy_ndp 0
regen_max_retry 3
router_probe_interval 60
router_solicitation_delay 1
router_solicitation_interval 4
router_solicitations 3
temp_prefered_lft 86400
temp_valid_lft 604800
use_optimistic 0
use_tempaddr 0

I suspect there are two possibilities:

  • I haven't set some flag in the driver code that RHEL7 expects to be able to assign an IPv6 link local address automatically
  • There is some config in RHEL7 that stops the new interfaces from getting an IPv6 address. I haven't had any luck with google searches so far.

Note that if I manually assign an IPv6 link local, it works fine. I only see this on this vanilla RHEL7 machine.

2
  • Does ip -d link report an 'addrgenmode' for this interface? Oct 19, 2020 at 5:24
  • Yes. It seems to have identical config as another interface which does get IPv6 LL address. 7: new_interface0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000 link/ether a0:8c:fd:c1:38:dd brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode none numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
    – Lokesh
    Oct 19, 2020 at 8:19

1 Answer 1

0

After a lot of investigation a colleague has kind of found a solution. It was some issue with NetworkManager that was stopping the interface from getting a link-local IPv6 address. The workaround was to do:

nmcli --wait 0 device connect new_interface0

This has to be run only once, which creates /etc/NetworkManager/system-connections/new_interface0 file and from then on the system can automatically assign a link-local IPv6 address to this new interface. This persists reinstalls and reboots.

You must log in to answer this question.

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