Results 1 to 2 of 2

Thread: NSLookup Works but Can't Ping

  1. #1
    Join Date
    Sep 2017
    Beans
    1

    NSLookup Works but Can't Ping

    Hi there,

    I'm currently using ubuntu 14.04 server. What's happening is that locally on the server, I can ping the local hostname and other places on the internet.

    From another computer I can run an NSLookup;

    Code:
    project:~$ nslookup orange
    Server:         10.10.2.1
    Address:        10.10.2.1#53
    
    
    Name:   orange
    Address: 10.10.2.11
    But when I ping I get;

    Code:
    project:~$ ping orange
    ping: orange: Name or service not known
    
    project:~$ ping 10.10.2.11
    PING 10.10.2.11 (10.10.2.11) 56(84) bytes of data.
    64 bytes from 10.10.2.11: icmp_seq=1 ttl=64 time=0.342 ms
    64 bytes from 10.10.2.11: icmp_seq=2 ttl=64 time=0.392 ms
    64 bytes from 10.10.2.11: icmp_seq=3 ttl=64 time=0.554 ms
    Now some settings on the server itself;

    Code:
    :/# cat /etc/os-release
    NAME="Ubuntu"
    VERSION="14.04.5 LTS, Trusty Tahr"
    ID=ubuntu
    ID_LIKE=debian
    PRETTY_NAME="Ubuntu 14.04.5 LTS"
    VERSION_ID="14.04"
    HOME_URL="http://www.ubuntu.com/"
    SUPPORT_URL="http://help.ubuntu.com/"
    BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
    
    
    
    
    
    root@orange:/# cat /etc/hosts
    127.0.0.1       localhost
    10.10.2.11      orange
    
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    10.10.2.11 orange
    127.0.0.1 orange # bitnami-hosts-patch
    
    
    
    root@orange:/# cat /etc/hostname
    orange
    root@orange:/# 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 10.10.2.1
    # 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 127.0.1.1

    Is there any ideas on what I can try next? Thanks!

  2. #2
    Join Date
    Feb 2009
    Location
    Dallas, TX
    Beans
    7,769
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: NSLookup Works but Can't Ping

    Hi pborm. Welcome to the forum

    There are several things happening here. The problem in the machine project is not related to orange's configuration. Even though, there are some issues with orange's configuration.

    Could you run these commands on 'project' and paste back the results?
    Code:
    ip address
    
    ip route
    
    cat /etc/network/interfaces
    
    cat /etc/resolv.conf
    
    ls /var/lib/dhcp/
    
    cat /var/lib/dhcp/*
    
    cat /etc/nsswitch.conf 
    
    nmcli device show
    
    nslookup ubuntu.com
    
    dig ubuntuforums.org
    
    ping 8.8.8.8
    Who is doing the DHCP service?
    What kind of machine/device is doing DNS (10.10.2.1)? Is it your router? Are you sure it adds DHCP leases to DNS?

    Is orange a server edition or a desktop?

    orange's /etc/host should be:
    Code:
    127.0.0.1 localhost
    127.0.1.1 orange
    
    # The following lines are desirable for IPv6 capable hosts
    ::1 ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    orange's /etc/resolv.conf looks not standard. First it should be a symlink:
    Code:
    $ ls -l /etc/resolv.conf
    lrwxrwxrwx 1 root root 29 Sep 14 12:05 /etc/resolv.conf -> ../run/resolvconf/resolv.conf
    If it's not a link. Fix it like this:
    Code:
    sudo rm resolv.conf 
    
    sudo dpkg-reconfigure resolvconf 
    
    sudo resolvconf -u
    Then reboot orange.

    Regards.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •