DNS servers not used for 4G/LTE connection

Asked by MrMEEE

Hi

After upgrading to yakkety (16.10), I'm having issues using my builtin 4G modem... But it's only DNS that's not working.. I get an ip address, and if I do a manual DNS lookup, everything works fine.. Also, the connection do have DNS servers assigned:

mj@falcon ~ $ nmcli -t -f IP4.DNS connection show Telia
IP4.DNS[1]:8.8.8.8
IP4.DNS[2]:8.8.4.4

mj@falcon ~ $ dig @8.8.8.8 dr.dk

; <<>> DiG 9.10.3-P4-Ubuntu <<>> @8.8.8.8 dr.dk
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34662
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 512
;; QUESTION SECTION:
;dr.dk. IN A

;; ANSWER SECTION:
dr.dk. 17 IN A 159.20.6.38

;; Query time: 48 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Nov 12 10:58:38 CET 2016
;; MSG SIZE rcvd: 50

But for some reason the system doesn't use these DNS servers...

mj@falcon ~ $ LANG=EN ping google.com
ping: google.com: Temporary failure in name resolution

Please advice

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu network-manager Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you run:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null

Do you get web access OK?

Revision history for this message
MrMEEE (mj-casalogic) said :
#2

Yeah.. works perfectly...

So it must be something in internal DNS...

falcon mj # ls -la /etc/resolv.conf
lrwxrwxrwx 1 root root 27 nov 12 10:48 /etc/resolv.conf -> /run/resolvconf/resolv.conf
falcon mj # ping google.com
ping: google.com: Temporary failure in name resolution
falcon mj # rm /etc/resolv.conf
falcon mj # echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf > /dev/null
falcon mj # ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=54 time=31.0 ms
^C
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 31.086/31.086/31.086/0.000 ms
falcon mj # ping google.com
PING google.com (216.58.209.110) 56(84) bytes of data.
64 bytes from arn06s07-in-f110.1e100.net (216.58.209.110): icmp_seq=1 ttl=52 time=28.3 ms
^C
--- google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 28.344/28.344/28.344/0.000 ms

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Then run:

echo "nameserver 8.8.8.8" | sudo tee -a /etc/resolvconf/resolv.conf.d/head > /dev/null

Reboot to test

Revision history for this message
MrMEEE (mj-casalogic) said :
#4

It's working...

But it's not a solution, as this means I will always use the google nameserver.. also when i'm not on 4G.....

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

you will always use that nameserver on any connection.

Tht file (if you cat it out) is used to put the warning text at the top of /etc/resolv.conf

If you add text to it then it will always be added, we are just happening to add configuration lines but the OS doesn't know this.

Revision history for this message
MrMEEE (mj-casalogic) said :
#6

But I don't want to always be using the google nameserver.. I want to be using my own or my company's nameserver, when connected by wifi or cable...

Revision history for this message
MrMEEE (mj-casalogic) said :
#7

BTW. This used to work i 16.04....

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#8

you will get the ones you normally get via DHCP, the google ones will just be used first.

Revision history for this message
MrMEEE (mj-casalogic) said :
#9

But then I won't be able to lookup local hostnames???

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 8.8.8.8
nameserver 127.0.1.1
search casalogic.lan

falcon mj # ping pixie.casalogic.lan
ping: pixie.casalogic.lan: Name or service not known

# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 127.0.1.1
search casalogic.lan

falcon mj # ping pixie.casalogic.lan
PING pixie.casalogic.lan (192.168.20.32) 56(84) bytes of data.
64 bytes from pixie.casalogic.lan (192.168.20.32): icmp_seq=1 ttl=64 time=0.863 ms
^C
--- pixie.casalogic.lan ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.863/0.863/0.863/0.000 m

Revision history for this message
Launchpad Janitor (janitor) said :
#10

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
MrMEEE (mj-casalogic) said :
#11

This wasn't solved??

Revision history for this message
Launchpad Janitor (janitor) said :
#12

This question was expired because it remained in the 'Open' state without activity for the last 15 days.