Issue with DNS resolution in resolve.conf with static IP
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
Apologies if this has been answered before, I searched and couldn't find a solution.
I have setup my ubuntu 16.04 desktop with a static IP. However on startup it is not able to resolve hostnames. Surprising if I manually restart the network service with:
sudo /etc/init.d/networking restart
It fixes my DNS issue. But I have to do this every time on startup.
I think the issue is with how my resolve.conf file is being auto-written on boot.
For example on boot up it has:
ow@ubuntu002:~$ 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
dns-nameservers 8.8.8.8 8.8.4.4
And after sudo /etc/init.d/networking restart
:
ow@ubuntu002:~$ 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 8.8.8.8
nameserver 8.8.4.4
dns-nameservers 8.8.8.8 8.8.4.4
Appreciate any help with this. I can't help but try to get to the root cause of this.
EDIT:
@Simon Sudler: yes I modified /etc/network/interfaces
as well as /etc/NetworkManager/NetworkManager.conf
. It was based on online tutorials.
Here is the content of my interfaces file:
ow@ubuntu002:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
ow@ubuntu002:~$
@oscar1919: I tried your solution and it fixed the issue!
Thank you both for your help.
networking dns display-resolution
add a comment |Â
up vote
0
down vote
favorite
Apologies if this has been answered before, I searched and couldn't find a solution.
I have setup my ubuntu 16.04 desktop with a static IP. However on startup it is not able to resolve hostnames. Surprising if I manually restart the network service with:
sudo /etc/init.d/networking restart
It fixes my DNS issue. But I have to do this every time on startup.
I think the issue is with how my resolve.conf file is being auto-written on boot.
For example on boot up it has:
ow@ubuntu002:~$ 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
dns-nameservers 8.8.8.8 8.8.4.4
And after sudo /etc/init.d/networking restart
:
ow@ubuntu002:~$ 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 8.8.8.8
nameserver 8.8.4.4
dns-nameservers 8.8.8.8 8.8.4.4
Appreciate any help with this. I can't help but try to get to the root cause of this.
EDIT:
@Simon Sudler: yes I modified /etc/network/interfaces
as well as /etc/NetworkManager/NetworkManager.conf
. It was based on online tutorials.
Here is the content of my interfaces file:
ow@ubuntu002:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
ow@ubuntu002:~$
@oscar1919: I tried your solution and it fixed the issue!
Thank you both for your help.
networking dns display-resolution
Where did you configure the static address, in/etc/network/interfaces
? Can you add the entry to your question?
â Simon Sudler
Apr 10 at 8:58
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Apologies if this has been answered before, I searched and couldn't find a solution.
I have setup my ubuntu 16.04 desktop with a static IP. However on startup it is not able to resolve hostnames. Surprising if I manually restart the network service with:
sudo /etc/init.d/networking restart
It fixes my DNS issue. But I have to do this every time on startup.
I think the issue is with how my resolve.conf file is being auto-written on boot.
For example on boot up it has:
ow@ubuntu002:~$ 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
dns-nameservers 8.8.8.8 8.8.4.4
And after sudo /etc/init.d/networking restart
:
ow@ubuntu002:~$ 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 8.8.8.8
nameserver 8.8.4.4
dns-nameservers 8.8.8.8 8.8.4.4
Appreciate any help with this. I can't help but try to get to the root cause of this.
EDIT:
@Simon Sudler: yes I modified /etc/network/interfaces
as well as /etc/NetworkManager/NetworkManager.conf
. It was based on online tutorials.
Here is the content of my interfaces file:
ow@ubuntu002:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
ow@ubuntu002:~$
@oscar1919: I tried your solution and it fixed the issue!
Thank you both for your help.
networking dns display-resolution
Apologies if this has been answered before, I searched and couldn't find a solution.
I have setup my ubuntu 16.04 desktop with a static IP. However on startup it is not able to resolve hostnames. Surprising if I manually restart the network service with:
sudo /etc/init.d/networking restart
It fixes my DNS issue. But I have to do this every time on startup.
I think the issue is with how my resolve.conf file is being auto-written on boot.
For example on boot up it has:
ow@ubuntu002:~$ 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
dns-nameservers 8.8.8.8 8.8.4.4
And after sudo /etc/init.d/networking restart
:
ow@ubuntu002:~$ 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 8.8.8.8
nameserver 8.8.4.4
dns-nameservers 8.8.8.8 8.8.4.4
Appreciate any help with this. I can't help but try to get to the root cause of this.
EDIT:
@Simon Sudler: yes I modified /etc/network/interfaces
as well as /etc/NetworkManager/NetworkManager.conf
. It was based on online tutorials.
Here is the content of my interfaces file:
ow@ubuntu002:~$ cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
auto enp0s31f6
iface enp0s31f6 inet static
address 192.168.0.101
netmask 255.255.255.0
gateway 192.168.0.1
dns-nameservers 8.8.8.8 8.8.4.4
ow@ubuntu002:~$
@oscar1919: I tried your solution and it fixed the issue!
Thank you both for your help.
networking dns display-resolution
networking dns display-resolution
edited Apr 10 at 11:01
asked Apr 10 at 8:49
![](https://lh3.googleusercontent.com/-5WsRd5NfiLc/AAAAAAAAAAI/AAAAAAAAADI/2s3L0gO_7Xs/photo.jpg?sz=32)
![](https://lh3.googleusercontent.com/-5WsRd5NfiLc/AAAAAAAAAAI/AAAAAAAAADI/2s3L0gO_7Xs/photo.jpg?sz=32)
Omer Waseem
33
33
Where did you configure the static address, in/etc/network/interfaces
? Can you add the entry to your question?
â Simon Sudler
Apr 10 at 8:58
add a comment |Â
Where did you configure the static address, in/etc/network/interfaces
? Can you add the entry to your question?
â Simon Sudler
Apr 10 at 8:58
Where did you configure the static address, in
/etc/network/interfaces
? Can you add the entry to your question?â Simon Sudler
Apr 10 at 8:58
Where did you configure the static address, in
/etc/network/interfaces
? Can you add the entry to your question?â Simon Sudler
Apr 10 at 8:58
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
You can install a package resolvconf
, which will modify the way /etc/resolv.conf
is built up at system boot.sudo apt install resolvconf
You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail
. If you put in this file a line nameserver 8.8.8.8
, this line will be added at the end of /run/resolvconf/resolv.conf
at boot. /etc/resolv.conf
will now be a symbolic link to this file.
(see also here (DNS set to systemd's 127.0.0.53 - how to change permanently?)
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
You can install a package resolvconf
, which will modify the way /etc/resolv.conf
is built up at system boot.sudo apt install resolvconf
You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail
. If you put in this file a line nameserver 8.8.8.8
, this line will be added at the end of /run/resolvconf/resolv.conf
at boot. /etc/resolv.conf
will now be a symbolic link to this file.
(see also here (DNS set to systemd's 127.0.0.53 - how to change permanently?)
add a comment |Â
up vote
0
down vote
accepted
You can install a package resolvconf
, which will modify the way /etc/resolv.conf
is built up at system boot.sudo apt install resolvconf
You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail
. If you put in this file a line nameserver 8.8.8.8
, this line will be added at the end of /run/resolvconf/resolv.conf
at boot. /etc/resolv.conf
will now be a symbolic link to this file.
(see also here (DNS set to systemd's 127.0.0.53 - how to change permanently?)
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
You can install a package resolvconf
, which will modify the way /etc/resolv.conf
is built up at system boot.sudo apt install resolvconf
You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail
. If you put in this file a line nameserver 8.8.8.8
, this line will be added at the end of /run/resolvconf/resolv.conf
at boot. /etc/resolv.conf
will now be a symbolic link to this file.
(see also here (DNS set to systemd's 127.0.0.53 - how to change permanently?)
You can install a package resolvconf
, which will modify the way /etc/resolv.conf
is built up at system boot.sudo apt install resolvconf
You can then create or modify a file /etc/resolvconf/resolv.conf.d/tail
. If you put in this file a line nameserver 8.8.8.8
, this line will be added at the end of /run/resolvconf/resolv.conf
at boot. /etc/resolv.conf
will now be a symbolic link to this file.
(see also here (DNS set to systemd's 127.0.0.53 - how to change permanently?)
answered Apr 10 at 10:04
oscar1919
27215
27215
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1023576%2fissue-with-dns-resolution-in-resolve-conf-with-static-ip%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Where did you configure the static address, in
/etc/network/interfaces
? Can you add the entry to your question?â Simon Sudler
Apr 10 at 8:58