Cannot PING public DN, but able to PING public IP

Hi!
is anyone encountered problem on PING to public domain name like google.com but fine when ping public IP? This server is freshly installed with DHCP configured and does not have restriction on internet. I can’t figure out what wrong in the network interface or settings and how to fix this?

image

Please don’t post screenshots, when you could have simply copied/pasted the console text. Screenshots are a nightmare to read. There is no reason to post it.

That said, sounds like if it doesn’t ping, then you have DNS configuration issues - most likely network not configured correctly with the appropriate DNS entries.

Hi iWalker,

Thanks for the reply and this is noted as I am not aware of posting screenshot could give unreadable to the reader or much like don’t wanna see the sample image. Anyways going to the subject.

For DNS issue, what part or where should I see that DNS entries that I must configure correctly? Because I installed this Linux in default way, DHCP provided by simple router and plain internet access as example, thus I haven’t expected issue will arise like this. Can you help me further?

You can look at these two:

nmcli
cat /etc/resolv.conf

Both should reveal the relevant configuration.

Thanks @jlehtone, as checked, both configs are relevant and I can’t see any error or missing in the example below.

[admin@localhost ~]$ nmcli
ens224: connected to Profile 1
“VMware VMXNET3”
ethernet (vmxnet3), 00:50:56:A2:FB:FC, hw, mtu 1500
ip4 default
inet4 192.168.52.60/24
route4 192.168.52.0/24 metric 100
route4 default via 192.168.52.1 metric 100
inet6 fe80::5a4c:3ec9:e5ba:cf98/64
route6 fe80::/64 metric 1024

ens192: connected to ens192
“VMware VMXNET3”
ethernet (vmxnet3), 00:50:56:A2:8A:53, hw, mtu 1500
inet4 10.10.10.30/24
route4 10.10.10.0/24 metric 101
inet6 fe80::250:56ff:fea2:8a53/64
route6 fe80::/64 metric 1024

lo: connected (externally) to lo
“lo”
loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536
inet4 127.0.0.1/8
inet6 ::1/128
route6 ::1/128 metric 256

DNS configuration:
servers: 192.168.52.2
interface: ens224

    servers: 10.10.10.11
    interface: ens192

Use “nmcli device show” to get complete information about known devices and
“nmcli connection show” to get an overview on active connection profiles.

Consult nmcli(1) and nmcli-examples(7) manual pages for complete usage details.

[admin@localhost ~]$ cat /etc/resolv.conf

Generated by NetworkManager

nameserver 192.168.52.2
nameserver 10.10.10.11

Thanks everyone whose gave their thought about my concern. I found the fixed, and reconfigured the network profile. Now I can able to ping the google.com, I followed the guide below.

https://docs.rockylinux.org/guides/network/basic_network_configuration/

What was wrong in your network config?


We could see that the machine was member of two subnets: 192.168.52.0/24 and 10.10.10.0/24,
there was a DNS server in each: 192.168.52.2 and 10.10.10.11, respectively
and the 192.168.52.0/24 had router 192.168.52.1 to other subnets.

The only bit peculiar bit in that was that the router (192.168.52.1) and DSN server (192.168.52.2) were different machines. Typically, a “home router” has both DHCP server and DNS server (as does libvirtd/KVM). Perhaps VMware has different practice.


The 192.168.52.2 was before 10.10.10.11 in resolv.conf, so 192.168.52.2 is queried first every time. Only if it is down, will the query be repeated to 10.10.10.11.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.