Dual IPv4 & IPv6 link, disable IPv4 in NetworkManager result failed in connection

I have a issue, it is the same for Wifi or LAN cable.

The connection is provided by OpenWRT - it will auto assign IPv4 and IPv6 address to clients.

From Fedora-34, with default settings, I can get both IPv4 and IPv6 address without issues. And access to Internet using any protocol is OK.

However, once I change IPv4 from DHCP to Disable in NetworkManager, then the connection will fail - No IPv6 address is obtained at all.

Why was that?

I am not sure why you would want to do that, since there are still a LOT of sites that use only ipv4. I would guess that your provider may not be compatible with only ipv6, or that openwrt cannot handle ipv6 only. Use both and be happy it still works.

To track down the specific failure point you need someone with a lot of networking experience and the right tools.

It works for me on Fedora 34 as well as it worked before:
How ready is Fedora to be run with IPv6 only? - #2 by vgaetera

You can start troubleshooting by capturing the relevant traffic:

sudo killall tcpdump
sudo tcpdump -evni any udp port 547 &
sudo nmcli connection up id CON_NAME

So far by trial and error:

  • at OpenWrt
  • DHCP lease set to > 22m
  • Interface is IPv6 only
    Result: Fedora can got IPv6 Address assigned
  • at OpenWrt
  • DHCP lease set to minimum (2m)
  • Interface is IPv4+IPv6
    Result: Fedora can got both IP address
  • At OpenWrt
  • DHCP lease set to < 16m
  • Interface is IPv6 only
  • At Fedora
  • Use a VLAN interface insread of the ethernet interface
    Result: The VLAN interface go removed after DHCP timeout (45s at Fedora side)

The question of course, the setting from the Router need to match that Fedora can support.

So it make me ask:
Why IPv6 only will fail while IPv4+6 works, even for the same DHCP lease time (2 to 16 m) at the Router side.

ps.

I tested with two different real machine, the results are the same.

For one with LAN cable, VLAN and ethernet interface are test.
For Wifi, also cannot got IPv6 address.

As of WHY I am doing this, I just want to learn more.

1 Like

tcpdump:
https://paste.centos.org/view/97dbe828

tcpdump command :slight_smile:

tcpdump -i 224 > tcpdump-224.txt
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on 224, link-type EN10MB (Ethernet), snapshot length 262144 bytes
tcpdump: pcap_loop: The interface disappeared
147 packets captured
148 packets received by filter
0 packets dropped by kernel
[root@amdf ~]# cat tcpdump-224.txt 

nmcli command

nmcli con up vl224c
Error: Connection activation failed: IP configuration could not be reserved (no available address, timeout, etc.)
Hint: use 'journalctl -xe NM_CONNECTION=7458097f-09a3-4479-be52-f078cda7c3be + NM_DEVICE=224' to get more details.

journalctl -fu NetworkManager

$ Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.3913] agent-manager: agent[5dfedee47b82fa05,:1.333/nmcli-connect/0]: agent registered
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.3944] device (224): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.3954] device (224): carrier: link connected
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.3969] device (224): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.3990] device (224): Activation: starting connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.3996] audit: op="connection-activate" uuid="7458097f-09a3-4479-be52-f078cda7c3be" name="vl224c" pid=7531 uid=0 result="success"
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.4006] device (224): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.4021] device (224): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.4250] device (224): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:32:25 NetworkManager[6084]: <info>  [1624253545.4256] dhcp4 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:32:26 NetworkManager[6084]: <info>  [1624253546.8106] dhcp6 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:32:26 NetworkManager[6084]: <warn>  [1624253546.8132] dhcp6 (224): unhandled event -42
Jun 21 13:33:11 NetworkManager[6084]: <warn>  [1624253591.0616] dhcp4 (224): request timed out
Jun 21 13:33:11 NetworkManager[6084]: <info>  [1624253591.0617] dhcp4 (224): state changed unknown -> timeout
Jun 21 13:33:12 NetworkManager[6084]: <warn>  [1624253592.0622] dhcp6 (224): request timed out
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0623] dhcp6 (224): state changed unknown -> timeout
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0624] device (224): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <warn>  [1624253592.0651] device (224): Activation: failed for connection 'vl224c'
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0658] device (224): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0829] dhcp4 (224): canceled DHCP transaction
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0831] dhcp4 (224): state changed timeout -> terminated
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0835] dhcp6 (224): canceled DHCP transaction
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.0835] dhcp6 (224): state changed timeout -> terminated
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1172] device (224): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1185] policy: auto-activating connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1228] device (224): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1266] device (224): carrier: link connected
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1295] device (224): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1323] device (224): Activation: starting connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1346] device (224): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1362] device (224): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1535] device (224): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:12 NetworkManager[6084]: <info>  [1624253592.1542] dhcp4 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:33:13 NetworkManager[6084]: <info>  [1624253593.6284] dhcp6 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:33:13 NetworkManager[6084]: <warn>  [1624253593.6314] dhcp6 (224): unhandled event -42
Jun 21 13:33:57 NetworkManager[6084]: <warn>  [1624253637.0746] dhcp4 (224): request timed out
Jun 21 13:33:57 NetworkManager[6084]: <info>  [1624253637.0747] dhcp4 (224): state changed unknown -> timeout
Jun 21 13:33:59 NetworkManager[6084]: <warn>  [1624253639.0630] dhcp6 (224): request timed out
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0630] dhcp6 (224): state changed unknown -> timeout
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0631] device (224): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <warn>  [1624253639.0656] device (224): Activation: failed for connection 'vl224c'
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0663] device (224): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0850] dhcp4 (224): canceled DHCP transaction
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0850] dhcp4 (224): state changed timeout -> terminated
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0854] dhcp6 (224): canceled DHCP transaction
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.0854] dhcp6 (224): state changed timeout -> terminated
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1060] device (224): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1071] policy: auto-activating connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1125] device (224): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1161] device (224): carrier: link connected
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1179] device (224): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1203] device (224): Activation: starting connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1207] device (224): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1215] device (224): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1535] device (224): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:33:59 NetworkManager[6084]: <info>  [1624253639.1543] dhcp4 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:34:00 NetworkManager[6084]: <info>  [1624253640.9136] dhcp6 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:34:00 NetworkManager[6084]: <warn>  [1624253640.9158] dhcp6 (224): unhandled event -42
Jun 21 13:34:44 NetworkManager[6084]: <warn>  [1624253684.0666] dhcp4 (224): request timed out
Jun 21 13:34:44 NetworkManager[6084]: <info>  [1624253684.0667] dhcp4 (224): state changed unknown -> timeout
Jun 21 13:34:46 NetworkManager[6084]: <warn>  [1624253686.0631] dhcp6 (224): request timed out
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0632] dhcp6 (224): state changed unknown -> timeout
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0633] device (224): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <warn>  [1624253686.0659] device (224): Activation: failed for connection 'vl224c'
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0666] device (224): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0800] dhcp4 (224): canceled DHCP transaction
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0800] dhcp4 (224): state changed timeout -> terminated
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0803] dhcp6 (224): canceled DHCP transaction
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0804] dhcp6 (224): state changed timeout -> terminated
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.0989] device (224): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1003] policy: auto-activating connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1067] device (224): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1107] device (224): carrier: link connected
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1130] device (224): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1221] device (224): Activation: starting connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1225] device (224): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1279] device (224): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1420] device (224): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:34:46 NetworkManager[6084]: <info>  [1624253686.1424] dhcp4 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:34:47 NetworkManager[6084]: <info>  [1624253687.9738] dhcp6 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:34:47 NetworkManager[6084]: <warn>  [1624253687.9771] dhcp6 (224): unhandled event -42
Jun 21 13:35:31 NetworkManager[6084]: <warn>  [1624253731.0751] dhcp4 (224): request timed out
Jun 21 13:35:31 NetworkManager[6084]: <info>  [1624253731.0752] dhcp4 (224): state changed unknown -> timeout
Jun 21 13:35:33 NetworkManager[6084]: <warn>  [1624253733.0635] dhcp6 (224): request timed out
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0636] dhcp6 (224): state changed unknown -> timeout
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0637] device (224): state change: ip-config -> failed (reason 'ip-config-unavailable', sys-iface-state: 'managed')
Jun 21 13:35:33 NetworkManager[6084]: <warn>  [1624253733.0663] device (224): Activation: failed for connection 'vl224c'
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0670] device (224): state change: failed -> disconnected (reason 'none', sys-iface-state: 'managed')
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0819] dhcp4 (224): canceled DHCP transaction
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0820] dhcp4 (224): state changed timeout -> terminated
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0823] dhcp6 (224): canceled DHCP transaction
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.0823] dhcp6 (224): state changed timeout -> terminated
Jun 21 13:35:33 NetworkManager[6084]: <info>  [1624253733.1011] device (224): state change: disconnected -> unmanaged (reason 'user-requested', sys-iface-state: 'managed')

This is when DHCP lease = 24m, which IPv6 address is obtained.

https://paste.centos.org/view/2e96bec2

con up vl224c
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/21)
 tcpdump -i 224 > tcpdump-224.txt
dropped privs to tcpdump
tcpdump: verbose output suppressed, use -v[v]... for full protocol decode
listening on 224, link-type EN10MB (Ethernet), snapshot length 262144 bytes

^C407 packets captured
408 packets received by filter
1 packet dropped by kernel
$ Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3424] agent-manager: agent[9d726e5f2ffa7299,:1.335/nmcli-connect/0]: agent registered
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3458] device (224): state change: unmanaged -> unavailable (reason 'managed', sys-iface-state: 'external')
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3478] device (224): carrier: link connected
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3531] device (224): state change: unavailable -> disconnected (reason 'user-requested', sys-iface-state: 'managed')
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3604] device (224): Activation: starting connection 'vl224c' (7458097f-09a3-4479-be52-f078cda7c3be)
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3605] audit: op="connection-activate" uuid="7458097f-09a3-4479-be52-f078cda7c3be" name="vl224c" pid=7802 uid=0 result="success"
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3614] device (224): state change: disconnected -> prepare (reason 'none', sys-iface-state: 'managed')
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3635] device (224): state change: prepare -> config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3804] device (224): state change: config -> ip-config (reason 'none', sys-iface-state: 'managed')
Jun 21 13:39:43 NetworkManager[6084]: <info>  [1624253983.3809] dhcp4 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:39:44 NetworkManager[6084]: <info>  [1624253984.6285] dhcp6 (224): activation: beginning transaction (timeout in 45 seconds)
Jun 21 13:39:44 NetworkManager[6084]: <info>  [1624253984.6329] dhcp6 (224): state changed unknown -> bound, address=fd44:102:204::d3d 2404:c804:9b5:2a00::d3d
Jun 21 13:39:46 NetworkManager[6084]: <info>  [1624253986.2033] device (224): state change: ip-config -> ip-check (reason 'none', sys-iface-state: 'managed')
Jun 21 13:39:46 NetworkManager[6084]: <info>  [1624253986.2087] device (224): state change: ip-check -> secondaries (reason 'none', sys-iface-state: 'managed')
Jun 21 13:39:46 NetworkManager[6084]: <info>  [1624253986.2092] device (224): state change: secondaries -> activated (reason 'none', sys-iface-state: 'managed')
Jun 21 13:39:46 NetworkManager[6084]: <info>  [1624253986.2123] policy: set 'vl224c' (224) as default for IPv6 routing and DNS
Jun 21 13:39:46 NetworkManager[6084]: <info>  [1624253986.2145] device (224): Activation: successful, device activated.
Jun 21 13:40:29 NetworkManager[6084]: <warn>  [1624254029.0636] dhcp4 (224): request timed out
Jun 21 13:40:29 NetworkManager[6084]: <info>  [1624254029.0637] dhcp4 (224): state changed unknown -> timeout

Perhaps there’s an issue with custom lease time as I tested only the default one.
The tcpdump output is weird since nothing matches 546-547/UDP aka DHCPv6.