~ $ lsb_release -a
No LSB modules are available.
Distributor ID: LinuxMint
Description:    Linux Mint 18 Sarah
Release:        18
Codename:       sarah
~ $ uname -r
~ $ nmcli -v
nmcli tool, version 1.2.0

Connected to wifi network using profile 'Auto JinJiangHotels':

~ $ nmcli device
DEVICE   TYPE      STATE        CONNECTION          
docker0  bridge    connected    docker0             
wlan0    wifi      connected    Auto JinJiangHotels 
eth0     ethernet  unavailable  --                  
eth1     ethernet  unavailable  --                  
lo       loopback  unmanaged    --  

I wanted to change the DNS server due to the default one not being reachable. So I set the ipv4.dns property to .

But now I discovered that dns settings seem to appear twice:

~ $ nmcli connection show Auto\ JinJiangHotels | grep -i dns
ipv4.dns-options:                       (default)
ipv4.ignore-auto-dns:                   no
ipv6.dns-options:                       (default)
ipv6.ignore-auto-dns:                   no

Question: What is the difference between ipv4.dns and IP4.DNS[*] ?

dns lookup still fails:

~ $ host maps.google.com
;; connection timed out; no servers could be reached

So I assume is still not being used although nmcli con show command shows ipv4.dns being set to

dns lookup works as expected if I specify directly:

~ $ host maps.google.com
Using domain server:

maps.google.com has address
maps.google.com has IPv6 address 2404:6800:4005:804::200e
  • Setting ipv4.ignore-auto-dns to TRUE does not make any difference. – canochordo Aug 28 '16 at 7:09
  • ~ $ nmcli con modify Auto\ JinJiangHotels ipv4.ignore-auto-dns TRUE – canochordo Aug 28 '16 at 7:12

The lower-case properties are properties of your connection... A "connection" is a profile, a bunch of settings that are used during activation of the connection. These are the properties that are set by nmcli connection modify and nm-connection-editor.

The upper-case properties are shown because this connection is currently active on a device. They are properties from the device, that is, the stuff that is currently configured in the system.

The upper case DNS servers were received from DHCP. You can disable that with the ignore-auto-dns.

After you added, did you re-activate the connection? When modifying a connection, those changes do not automatically update the device's configuration. You need to do an explicit nmcli connection up or nmcli device reapply for the changes to take effect.

  • nmcli connection up did the job. Thank you! – canochordo Aug 29 '16 at 23:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.