0

I know there's plenty of posts/threads/questions/tutorials regarding ubuntu's DNS, network manager innards, and changes in the like between versions ~12 to 14-15+. I'm on ubuntu 12.04, and looking to upgrade soon, but first I need to verify some back up data, etc. and would also like to figure out this issue with NM.

In fact, I initially used one of the tutorials out there which did all the jumping-through-hoops with manually editing /etc/network/interfaces, etc., but it ultimately did not work. Some tutorials simply point to using the GUI, and that mostly worked (was able to browse the web; not so with the manual approach) so that's where I've ended up, with this DNS issue as an exception.

My DHCP works with with our internal dns, allowing me to use a name rather than an ip addr for example with an ssh command. However, once I switch to the Static connection I setup through the NM gui tool, this no longer works. I don't know why. I've used linux for several years but I am a network newbie, and am trying to learn more about this stuff. Here's some output I have for as far as I've been able to get trouble shooting this thing (Note: 'serverA' and 'serverB' are machine names on our local network):

$ cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=12.04 DISTRIB_CODENAME=precise DISTRIB_DESCRIPTION="Ubuntu 12.04.5 LTS"

On DHCP eth0: $ ping serverA PING serverA.MY.local (192.168.1.16) 56(84) bytes of data. --- serverA.MY.local ping statistics --- ... $ ping serverB PING serverB.MY.local (192.168.1.15) 56(84) bytes of data. --- serverB.MY.local ping statistics --- ...

$ nmcli dev list iface eth0 GENERAL.DEVICE: eth0 GENERAL.TYPE: 802-3-ethernet GENERAL.VENDOR: Broadcom Corporation GENERAL.PRODUCT: NetLink BCM57781 Gigabit Ethernet PCIe GENERAL.DRIVER: tg3 GENERAL.HWADDR: BC:5F:F4:55:73:B3 GENERAL.STATE: 100 (connected) GENERAL.REASON: 0 (No reason given) GENERAL.UDI: /sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.0/net/eth0 GENERAL.IP-IFACE: eth0 GENERAL.NM-MANAGED: yes GENERAL.FIRMWARE-MISSING: no GENERAL.CONNECTION: /org/freedesktop/NetworkManager/ActiveConnection/1 CAPABILITIES.CARRIER-DETECT: yes CAPABILITIES.SPEED: 1000 Mb/s WIRED-PROPERTIES.CARRIER: on IP4.ADDRESS[1]: ip = 192.168.1.146/24, gw = 192.168.1.1 IP4.DNS[1]: 192.168.1.10 IP4.DNS[2]: 192.168.1.11 IP4.DOMAIN[1]: MY.local DHCP4.OPTION[1]: domain_name = MY.local DHCP4.OPTION[2]: expiry = 1445191770 DHCP4.OPTION[3]: broadcast_address = 192.168.1.255 DHCP4.OPTION[4]: dhcp_message_type = 5 DHCP4.OPTION[5]: dhcp_lease_time = 518400 DHCP4.OPTION[6]: ip_address = 192.168.1.146 DHCP4.OPTION[7]: routers = 192.168.1.1 DHCP4.OPTION[8]: subnet_mask = 255.255.255.0 DHCP4.OPTION[9]: dhcp_renewal_time = 259200 DHCP4.OPTION[10]: domain_name_servers = 192.168.1.10 192.168.1.11 DHCP4.OPTION[11]: dhcp_rebinding_time = 453600 DHCP4.OPTION[12]: network_number = 192.168.1.0 DHCP4.OPTION[13]: dhcp_server_identifier = 192.168.1.11

On Static eth0: $ ping serverA ping: unknown host serverA $ ping serverB ping: unknown host serverB

$ nmcli dev list iface eth0 GENERAL.DEVICE: eth0 GENERAL.TYPE: 802-3-ethernet GENERAL.VENDOR: Broadcom Corporation GENERAL.PRODUCT: NetLink BCM57781 Gigabit Ethernet PCIe GENERAL.DRIVER: tg3 GENERAL.HWADDR: BC:5F:F4:55:73:B3 GENERAL.STATE: 100 (connected) GENERAL.REASON: 0 (No reason given) GENERAL.UDI: /sys/devices/pci0000:00/0000:00:1c.4/0000:08:00.0/net/eth0 GENERAL.IP-IFACE: eth0 GENERAL.NM-MANAGED: yes GENERAL.FIRMWARE-MISSING: no GENERAL.CONNECTION: /org/freedesktop/NetworkManager/ActiveConnection/0 CAPABILITIES.CARRIER-DETECT: yes CAPABILITIES.SPEED: 1000 Mb/s WIRED-PROPERTIES.CARRIER: on IP4.ADDRESS[1]: ip = 192.168.1.17/24, gw = 192.168.1.1 IP4.DNS[1]: 192.168.1.10 IP4.DNS[2]: 192.168.1.11

Now here's the interesting thing: that is indeed the entire output of the nmcli command for the static connection. Notice the IP4.DOMAIN is missing. I suspect this is exactly the issue, but not being overly familiar with NM innerworkings I don't know how to proceed. I did try editing the connection (via the NM gui) and adding the MY.local to the "Search domains" field under the "IPv4 Settings" tab. Even after a reboot, this did not seem to make a difference.

What am I missing? Does anyone have suggestions as to where to go from here? I would be happy to provide some output from dig given a specific incantation (still learning dig, not sure which output would be most helpful). I feel like this is very close to working (at least relative to my DHCP connection), but this issue stands in the way still. Any help troubleshooting is greatly appreciated.

0

Wow, okay. I got it to work. Here's what I found: from thrashing around trying to get the manual method to work, I had left the dns=dnsmasq line commented out in /etc/NetworkManager/NetworkManager.conf. By re-enabling that line, the issue was fixed, no reboot necessary. Ping now resolves the names correctly, although the nmcli output did not change at all, which is interesting.

Does anyone know: is this expected behavior? I had the impression that the dnsmasq was accessory to NM utilities, but apparently not. Also: explain why the nmcli output did not change.

I made this post an answer, in case no one else comes along to explain things (but of course would prefer some insight if others were to contribute). Thanks.

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.