Glam Prestige Journal

Bright entertainment trends with youth appeal.

I can ping my machine by IP and access all service or applications like ssh etc; but I can't using hostname. i used ifconfig to check the current DNS servers but they don't appear:

ens33 Link encap:Ethernet HWaddr 00:0c:29:86:b6:cd inet addr:192.168.3.16 Bcast:192.168.3.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe86:b6cd/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:74632 errors:0 dropped:0 overruns:0 frame:0 TX packets:5759 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:17811269 (17.8 MB) TX bytes:429420 (429.4 KB) Interrupt:19 Base address:0x2000

i tried to use nslookup in the IP server (192.168.3.16) but it shows this :

 Server: 192.168.3.1 Address: 192.168.3.1#53
** server can't find 16.3.168.192.in-addr.arpa: NXDOMAIN

it's an Ubuntu server, 14.04 on vmware work station 12.

2

2 Answers

Open up the /etc/hosts file and place your host name entries there like this:

192.168.0.1 lenovo-laptop
192.168.0.2 hp-laptop

Save it. And try to ping them by host name now:

$ ping -i 1 -c 4 -a lenovo-laptop
3

It's most likely a DNS problem. Which DNS server is your current system (where you are pinging from) is using? And does the DNS server have records of other nodes? You might need to create PTR records on DNS server. You can modify local host file but it is better to update/modify records on DNS server. I would start by looking at your DNS servers.

cat /etc/resolv.conf

This will tell you which DNS servers your local system is using. Then check these DNS servers for appropriate records.

3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy