Persistent manual DNS

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Persistent manual DNS

Post by Evoka » Thu Jun 14, 2018 10:29 pm

Hello,

I have an issue with the DNS on the wired network connection even when I have everything in auto, the DNS behaves as if it was manually set. I have deleted the network connection, and in the new one the problem persists. I have booted from a usb using the same OS and it works as expected, so it's not hardware nor the router. The DNS is set to 192.168.1.158, 8.8.8.8, 8.8.4.4

Code: Select all

Kernel: 4.4.0-128-generic x86_64 (64 bit gcc: 5.4.0)
           Desktop: Cinnamon 3.6.7 (Gtk 3.18.9-1ubuntu3.3)
           Distro: Linux Mint 18.3 Sylvia


Network:   Card: Qualcomm Atheros AR8151 v2.0 Gigabit Ethernet
           driver: atl1c v: 1.0.1.1-NAPI port: d000 bus-ID: 03:00.0
           IF: enp3s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
Thank you

User avatar
coffee412
Level 5
Level 5
Posts: 820
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Persistent manual DNS

Post by coffee412 » Fri Jun 15, 2018 7:04 am

Im not sure from your post what your problem actually is. Could you be a bit more specific?

Are you trying to manually use different DNS servers than what your ISP has? If thats the case, Set them in Network Manager. What desktop are you using? Bit more info would be helpful and then I can help you.

When you are having this issue, Issue the following command to show your DNS settings. Copy the output to your next post :

cat /etc/resolv.conf
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp * Samba AD * Mint 18.1 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36

Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka » Fri Jun 15, 2018 9:33 am

Hi, the issue is that I do not want that DNS set, I want the ones provided by the router. I only get those when booting from the USB, I have deleted the network profile several times.

Code: Select all

cat /etc/resolv.conf
# 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 local

Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka » Fri Jun 15, 2018 1:32 pm

This is booting from the live usb
Image

this is booting from the HD
Image

User avatar
coffee412
Level 5
Level 5
Posts: 820
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Persistent manual DNS

Post by coffee412 » Fri Jun 15, 2018 4:13 pm

When you connect to the router please post the output of the following commands:

cat /etc/resolv.conf

ifconfig
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp * Samba AD * Mint 18.1 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36

User avatar
Flemur
Level 15
Level 15
Posts: 5824
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Persistent manual DNS

Post by Flemur » Fri Jun 15, 2018 4:24 pm

Evoka wrote:
Thu Jun 14, 2018 10:29 pm
I have an issue with the DNS on the wired network connection even when I have everything in auto, the DNS behaves as if it was manually set. I have deleted the network connection, and in the new one the problem persists.
Deleted them ... where?
/etc/resolv.conf says "DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN"

I was doing the opposite - trying to set them manually and getting the automatic stuff, so...

Code: Select all

nm-applet 
(I think that starts automatically for normal installs...it's the Wifi/Ethernet icon in your task bar).

nm-applet (=wifi icon) -> rt-click -> edit connections -> (pick connection) -> Edit -> IpV4 settings (tab):
"Method = Automatic (DHCP)" for NO MANUAL settings - you can enter them and they just go away.

"Method = Automatic (DHCP) addresses only." will use the DNS values entered, and they end up in /etc/resolv.conf
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka » Fri Jun 15, 2018 4:42 pm

Code: Select all

$ cat /etc/resolv.conf
# 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 local

$ ifconfig
enp3s0    Link encap:Ethernet  direcciónHW 90:2b:34:37:e9:8f  
          Direc. inet:192.168.1.179  Difus.:192.168.1.255  Másc:255.255.255.0
          Dirección inet6: fe80::afb6:79e0:5913:5049/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:85001 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:103052 errores:0 perdidos:0 overruns:0 carrier:1
          colisiones:0 long.colaTX:1000 
          Bytes RX:18471384 (18.4 MB)  TX bytes:50198832 (50.1 MB)

lo        Link encap:Bucle local  
          Direc. inet:127.0.0.1  Másc:255.0.0.0
          Dirección inet6: ::1/128 Alcance:Anfitrión
          ACTIVO BUCLE FUNCIONANDO  MTU:65536  Métrica:1
          Paquetes RX:8551 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:8551 errores:0 perdidos:0 overruns:0 carrier:0
          colisiones:0 long.colaTX:1 
          Bytes RX:696704 (696.7 KB)  TX bytes:696704 (696.7 KB)

Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka » Fri Jun 15, 2018 4:50 pm

Flemur wrote:
Fri Jun 15, 2018 4:24 pm
Deleted them ... where?
In the network connections applet, I have deleted the connection, and still the same issue.


This is the network connection as it is now.
Image

User avatar
coffee412
Level 5
Level 5
Posts: 820
Joined: Mon Nov 12, 2012 7:38 pm
Location: Indiana, USA
Contact:

Re: Persistent manual DNS

Post by coffee412 » Fri Jun 15, 2018 5:17 pm

Evoka wrote:
Fri Jun 15, 2018 4:42 pm

Code: Select all

nameserver 127.0.1.1
search local

$ ifconfig
enp3s0    Link encap:Ethernet  direcciónHW 90:2b:34:37:e9:8f  
          Direc. inet:[b]192.168.1.179[/b]  Difus.:192.168.1.255  Másc:255.255.255.0
          Dirección inet6: fe80::afb6:79e0:5913:5049/64 Alcance:Enlace
          ACTIVO DIFUSIÓN FUNCIONANDO MULTICAST  MTU:1500  Métrica:1
          Paquetes RX:85001 errores:0 perdidos:0 overruns:0 frame:0
          Paquetes TX:103052 errores:0 perdidos:0 overruns:0 carrier:1
          colisiones:0 long.colaTX:1000 
          Bytes RX:18471384 (18.4 MB)  TX bytes:50198832 (50.1 MB)
It appears you are not getting your DNS info from the router. Some routers if you have issues getting an I.P address then your network card will default to a private address one. To see which is the case can you connect to the internet and then in a term window run a ping test:

ping 8.8.8.8

If you get replies then your problem is only related to DNS settings and might actually be an issue with the router. You can manually go into network manager (right click panel applet for network and choose edit connections. Edit the IPV4 and see if you can enter your own DNS entries. Use 8.8.8.8 and 1.1.1.1 . If you do not use IPV6 you can go in and disable that.

Lets see if all that works :)
Ryzen x1800 Asus Prime x370-Pro 32 gigs Ram RX480 graphics
IceWarp * Samba AD * Mint 18.1 * RAID 1/5 * OpenVPN * Linux since kernel 2.0.36

Pippin
Level 3
Level 3
Posts: 121
Joined: Wed Dec 13, 2017 11:14 am
Location: NL/DE/TH

Re: Persistent manual DNS

Post by Pippin » Fri Jun 15, 2018 5:28 pm

What does

Code: Select all

nmcli dev show | grep DNS
look like with default network settings?

If the DNS is shown handed out by your router through DHCP, I would think there is no problem.
"One good thing about music, when it hits you feel no pain.”
B.M.

User avatar
Flemur
Level 15
Level 15
Posts: 5824
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Persistent manual DNS

Post by Flemur » Fri Jun 15, 2018 8:14 pm

Evoka wrote:
Fri Jun 15, 2018 4:50 pm
This is the network connection as it is now.
Well, I'm stumped.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
Mint 18.3 Xfce/fluxbox/pulse-less
Xubuntu 17.10/fluxbox/pulse-less

Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka » Fri Jun 15, 2018 9:08 pm

Code: Select all

nmcli dev show | grep DNS
IP4.DNS[1]:                             192.168.1.158
IP4.DNS[2]:                             8.8.8.8
IP4.DNS[3]:                             8.8.4.4
Sorry, I did not understood this:
Pippin wrote:
Fri Jun 15, 2018 5:28 pm
If the DNS is shown handed out by your router through DHCP, I would think there is no problem.

Pippin
Level 3
Level 3
Posts: 121
Joined: Wed Dec 13, 2017 11:14 am
Location: NL/DE/TH

Re: Persistent manual DNS

Post by Pippin » Sat Jun 16, 2018 9:37 am

It means that those are in use:
192.168.1.158
8.8.8.8
8.8.4.4
You set those in your router?
If yes, then i would think it works as intended.

dhclient will apply the settings provided by your router.
The DNS servers provided are then used by dnsmasq, which acts as a proxy.
That`s why you see 127.0.1.1 in resolv.conf as that is where dnsmasq listens.
You can check that with

Code: Select all

netstat -atunp
"One good thing about music, when it hits you feel no pain.”
B.M.

Evoka
Level 1
Level 1
Posts: 19
Joined: Fri Jul 10, 2015 10:10 am

Re: Persistent manual DNS

Post by Evoka » Sat Jun 16, 2018 9:48 am

Pippin wrote:
Sat Jun 16, 2018 9:37 am
You set those in your router?
That is exactly the issue here, it should be 192.168.1.18, same as when I boot from the live USB.

Post Reply

Return to “Ethernet”