Nmcli does not find connection

# nmcli d
DEVICE             TYPE      STATE                   CONNECTION 
eth0               ethernet  connected               ethernet   
lo                 loopback  connected (externally)  lo         
docker0            bridge    connected (externally)  docker0    
enp0s31f6          ethernet  disconnected            --         
wlp0s20f3          wifi      disconnected            --         
p2p-dev-wlp0s20f3  wifi-p2p  disconnected            --         
br-00857a6274ae    bridge    unmanaged               --         
br-3175c7479c14    bridge    unmanaged               --         
br-6422941b48b4    bridge    unmanaged               --         
br-78b351b84e1e    bridge    unmanaged               --         
br-7b3bf8cf2fa7    bridge    unmanaged               --         
br-8611f60a8347    bridge    unmanaged               --         
br-be807b43e429    bridge    unmanaged               --

but

# nmcli con mod eth0 ipv6.addresses '2a01:4f8:210:512d::2/128'
Error: unknown connection 'eth0'.

Are the instructions wrong?

You should specify the connection name. Try thus:

  • nmcli con mod ethernet ipv6.addresses '2a01:4f8:210:512d::2/128'

As far I know, NetworkManager uses connections which are bound to devices. So may be you have a connection “Wired connection 1” or “Ethernet connection 1” bound to eth0. It is not forbidden to have equal connection and device name, probably the cause of confusion here.

So you have to modify this “Wired connection 1” or what it is named and not eth0.

I tried “nmcli device mod eth0 ipv6.address” and it has set the ipv6 address on the device , but not persistent because this is not stored into the connection file.

Usually yes, but the nmcli d in the original post shows that the actual connection name is ethernet:

No need IMO to change that.

Please apologize, I’ve overseen the connection column. The command you proposed should work.