DNS error?

Issues related to configuring your network
Post Reply
rakulase
Posts: 1
Joined: 2021/02/16 11:40:21

DNS error?

Post by rakulase » 2021/02/16 12:01:48

I had a DNS error with my Centos OS (CentOS Linux release 7.9.2009)
infconfig -a returns the following
<ifconfig -a>

ens192: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.xxx.xx.xx netmask 255.255.255.0 broadcast 10.xxx.xx.xxx
inet6 fe80::250:56ff:fe82:15cd prefixlen 64 scopeid 0x20<link>
ether 00:50:56:82:15:cd txqueuelen 1000 (Ethernet)
RX packets 227125 bytes 75155670 (71.6 MiB)
RX errors 0 dropped 27 overruns 0 frame 0
TX packets 194089 bytes 24759428 (23.6 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1197 bytes 151862 (148.3 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1197 bytes 151862 (148.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
inet 192.xxx.xxx.x netmask 255.255.255.0 broadcast 192.xxx.xxx.xxx
ether 52:54:00:37:56:5f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

virbr0-nic: flags=4098<BROADCAST,MULTICAST> mtu 1500
ether 52:54:00:37:56:5f txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

I am able to ping 8.8.8.8
<ping -c 4 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=116 time=3.09 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=116 time=3.09 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=116 time=3.28 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=116 time=3.43 ms

--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 3.090/3.227/3.437/0.149 ms

however when I ping google.com
<ping google.com>
ping: google.com: Name or service not known

I tried resolving the issue yesterday disabling the Network manager and I currently do not have one.
/etc/resolv.conf still has a nameserver listed.

</etc/resolv.conf>

# Generated by NetworkManager
nameserver 10.xxx.xxx.xxx

Any ideas on how I can fix this issue?

User avatar
TrevorH
Forum Moderator
Posts: 30314
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DNS error?

Post by TrevorH » 2021/02/16 14:03:05

Simplest answer given the info you provided: nameserver 10.xxx.xxx.xxx is not a valid nameserver. Does it work if you run host www.google.com 10.xxx.xxx.xxx where 10.xxx.xxx.xxx is the ip you have in resolv.conf?
CentOS 6 died in November 2020 - migrate to a new version!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

User avatar
jlehtone
Posts: 3335
Joined: 2007/12/11 08:17:33
Location: Finland

Re: DNS error?

Post by jlehtone » 2021/02/16 14:49:47

Note:
10.0.0.0/8 is a private subnet and contains IP addresses: 10.0.0.0 -- 10.255.255.255.
Libvirt creates virtual network (virbr0) within private 192.168.0.0/16 subnet.
In practice it is unnecessary to obfuscate neither, because attacker has to break through your NAT-firewall anyway.

ifconfig (route, and netstat) are old commands.
ip li, ip ad, ip ro, and ss are more recent and capable.
If using NetworkManager.service (which is default), there is also nmcli, nmcli d s, and nmcli c s

Post Reply

Return to “CentOS 7 - Networking Support”