I can ping Web, but not browse it — why are my DNS settings failing?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I can ping Web, but not browse it — why are my DNS settings failing?
Update 6 @ 2:56p on Nov 21
I am working on a creating a small network of virtual machines and containers. So far, I am stuck configuring the host though. There is no virtual machine involved in this connection. Though there are two bridges in place.
Just to clarify, this is on bare-metal in a data center. There is no ISP or modem. The hypervisor is not implicated in the path to the Internet. I am running Ubuntu 17.10.
What works and what does not:
- ping 8.8.8.8 - succeeds
- ping 213.133.98.98 - succeeds
- google.com - failure in name resolution
- web browsing – no internet connection
- web browsing with firewall disabled - no internet connection
- host google.com – no servers could be reached
- NoMachine, remoting into host using - succeeds
- antivirus - none
ifconfig -a returns:
lxdbr0 broadcast = 0.0.0.0
enp7s0 broadcast = 0.0.0.0
enp7s0 netmask = 255.255.255.255
My conclusion was that netmask = 255.255.255.255 was the immediate problem as it had enp7s0 on a single-address subnet, with no room for a gateway, etc. This was preventing access to DNS services, thus the pattern of failures. But adding static routing to cure that did not restore Internet/WAN access.
I think the contents of /etc/network/interfaces provides most of the other necessary context. Oh, and the fact that netmask on enp7s0 shows as 255.255.255.255 when I run ifconfig -a.
Gateway and broadcast were assigned by my vendor re enp7s0. Using Ubuntu 17.10. I believe I disabled Network Manager.
# This is /etc/network/interfaces for use on Host
# The loopback network interface
auto lo
iface lo inet loopback
# This is the WAN port
auto enp7s0
iface enp7s0 inet static
address 78.46.80.146
netmask 255.255.255.224
network 78.46.80.128
broadcast 78.46.80.159
gateway 78.46.80.129
# static route entry follows, wherein x.x.0.0 is a wildcard
up ip route add 78.46.0.0/27 via 78.46.80.129 || true
dns-nameserver 213.133.98.98
dns-nameserver 8.8.8.8
# Virtual bridge on enp6s0 for virtual machine use
auto br0
iface br0 inet static
address 192.168.122.2
netmask 255.255.255.0
network 192.168.122.0
broadcast 192.168.122.255
# gateway 192.168.122.1
up ip route add 192.168.0.0/16 via 78.46.80.129 || true
bridge_ports enp6s0
bridge_stp on
bridge_maxwait 0
bridge_fd 0
# Virtual bridge for container use
auto lxdbr0
iface lxdbr0 inet static
address 10.36.109.2
netmask 255.255.255.0
network 10.36.109.0
broadcast 10.36.109.255
# gateway 10.36.109.1
up ip route add 192.168.0.0/16 via 78.46.80.129 || true
bridge_ports
bridge_stp on
bridge_maxwait 0
bridge_fd 0
That is not true, as stated. If you can ping internet sites by address then you have internet, just not name resolution. Check that resolv.conf again. My bet is that something (network manager?) is rebuilding it on reboot and it is again blank now. You will have to add the nameserver settings into the settings in the interface definition, or in the network settings for your system so that resolv.conf is built correctly on boot.
In the case of a container (openvz or virtuozzo) you would set it in the network definition for the container on node0 (the host). It is unclear to me if you have a hardware node, virtual machine, or container to deal with in this case.
This is a physical host. I have the nameservers listed in /etc/network/interfaces. That seems to be in accord with your advice. I disabled Network Manager.
This is a physical host. I have the nameservers listed in /etc/network/interfaces. That seems to be in accord with your advice. I disabled Network Manager.
Did you check /etc/resolv.conf to see if it is, as I suspected, blank?
IF it is blank, then your entry in /etc/network/interfaces was not sufficient.
If it is NOT blank, that will indicate something entirely different.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.