Resolving hostnames without DHCP

2

We have a network of 2 computers connected to a switch without a DHCP server. We have manually set set each of out IP addresses to 192.168.1.2 and 192.168.1.3 and everything works fine.

However we are using a 3rd party program (ROS to be exact), which can establish a connection using our manual IP addresses provided to it. However due to the way ROS works, most communications are done to the other computer's hostname, i.e. not the IP address, the actual name. Which obviously won't work.

We can't change the way ROS works, so how can we configure ubuntu to resolve the hostnames?

Hannesh

Posted 2011-09-23T12:40:57.353

Reputation: 197

Answers

4

DHCP does not do hostname resolution; it just offers a method for automatic registration on a locally running DNS server.

Your choices are:

  • mDNS (avahi-daemon + nss_mdns) – names are always in the form name.local; used natively in Mac OS X and available for Windows; uses multicast.

  • NBNS (Samba nmbd + nss_wins) – used by Windows and compatible with Mac OS X; uses broadcast packets.

  • Edit /etc/hosts on each computer: 192.168.1.2 computerone

user1686

Posted 2011-09-23T12:40:57.353

Reputation: 283 655

Editing /etc/hosts worked. Thanks! – Hannesh – 2011-09-23T13:22:09.827