Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Something I've never quite understood fully:

  • I install [linux_distribution] in my office on a workstation. During the setup, it asks me to put in a host name, so I make one up. The install finishes, everything is working fine, and the system is up and running. From my laptop on the same network, I can do ping [hostname], and get a response.
  • I install [solaris-distribution] in my office on the same workstation. During the setup, it asks me to put in a host name, so I make one up. The install finishes, everything is working fine, and the system is up and running. From my laptop on the same network, I try ping [hostname] and get no response, so I try ping [ip_address] and get a response.

Questions:

  1. Why does this happen?
  2. How can I fix it?
share|improve this question
    
It would help if you specify exact OS distribution and version you are using at office workstation and on laptop –  Saurabh Barjatiya Jul 7 '09 at 12:51

3 Answers 3

up vote 4 down vote accepted

Why - your Linux distribution is registering its hostname with your DHCP provider when the DHCP provider provides an IP address to the system. The DHCP provider is in turn updating the dns records for issued ip address leases.

Fix - Besides the obvious of creating a static ip address and dns entry.

On the client system, edit the /etc/default/dhcpagent file as root.Find the keyword REQUEST_HOSTNAME in the /etc/default/dhcpagent file and modify it as follows:

REQUEST_HOSTNAME=yes

If there is a comment sign (#) in front of the keyword, remove the #. If the keyword is not present, insert it.

Edit the /etc/hostname.interface file on the client system and add the following line:

inet hostname

where hostname is the name you want the client to use.

As root, type the following commands to have the client perform a full DHCP negotiation upon rebooting:

  # pkill dhcpagent
  # rm /etc/dhcp/interface.dhc
  # reboot
share|improve this answer
    
I could have sworn I did this exactly and didn't work. I will try again later. DNS servers here run Windows. Should this work regardless? –  churnd Jul 7 '09 at 13:50
    
Based on the fact that it worked with your Linux machine, it should work with Solaris. In general this works best your DNS server is on the same system as your DHCP server. –  EasyEcho Jul 7 '09 at 16:08
    
Much outdated update... this works great. –  churnd May 28 '10 at 13:43

Many Linux distributions install Samba by default. The NMB daemon will service name resolution requests from other SMB clients on the LAN out of the box. Solaris likely is not doing that.

To fix it, you might try configuring your DHCP server and DNS server to automaticly assign DNS entries to new lease IP's based on the hostname that the client provides. I believe ISC BIND and DHCPD can do this.

share|improve this answer

Q. Why does this happen?

A. Solaris is not sending its hostname to the DHCP/DNS servers.

Q. How can I fix it?

A. Try this:

You might want to read a few of the other articles related to this. They provide more information about dynamic DNS configurations in a Sun environment. This link is a great place to start:

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.