2

I have a test server that is running Ubuntu Server in a windows network.

Networking is configured as follows

auto eth0
iface eth0 inet dhcp
hostname ca

the command cat /etc/hostname returns ca.

But when I use the command host 10.49.156.196 (its current IP address) from another machine on the network, it returns as follows:

196.156.49.10.in-addr.arpa domain name pointer owner-pc.xxxxx.xxx

I can access the machine via SSH and browser using IP address, but not by name ca

Any suggestions? I tried installing samba/nmbd as suggested in another post, but to no avail.

Eric Truett
  • 1,067

2 Answers2

1

You have to have the other machines on the network referring to a shared authority, whether it is DNS, synchronized host files, or some other method (e.g., avahi).

The command you are running on the other systems, host, is a DNS utility :

host is a simple utility for performing DNS lookups. It is normally used to convert names to IP addresses and vice versa. When no arguments
or options are given, host prints a short summary of its command line
arguments and options.

As far as the other machines on the network are concerned, it doesn't matter what your machine is referred to locally. You have to have the host/IP registered to a common system.

belacqua
  • 23,540
0

If you have a small number of other hosts that need to access the server by name, you can simply add a line to each of their /etc/hosts files:

10.49.156.196 ca 

This is really just setting up an alias on each of those machines, but it's far quicker than learning to manage a DNS server and will work on OSX or windows clients as well (\windows\system32\drivers\etc\hosts).