Ping is unable to resolve hostname to IP address while nslookup is working fine

Solution Verified - Updated -

Issue

  • Ping is unable to resolve hostname to IP address while nslookup is working fine.

Ping throws the following error

    ping testlab.redhat.com
    ping: unknown host testlab.redhat.com

Nslookup works fine as below.

   [root@test ~]# nslookup testlab.redhat.com
   Server:      10.65.255.201
   Address:         10.65.255.201#53

   Non-authoritative answer:
   Name:    testlab.redhat.com
   Address: 10.65.208.53
  [root@test ~]#

Environment

  • Red Hat Enterprise Linux

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content