Feb 172009
 

By default, OpenSol­ar­is does­n’t broad­cast the host­name on the loc­al net­work, just the IP address. To rec­ti­fy this, find out what net­work inter­face you have (often nge0) by run­ning ifconfig -a. It’ll be the one with the IP address giv­en by the router (i.e., not 127.0.0.1).

Then, as root, edit the file /etc/default/dhcpagent. Find the line # CLIENT_ID=, delete the # to uncom­ment the line, and append your host­name. Find the line # REQUEST_HOSTNAME=no and change to REQUEST_HOSTNAME=yes. As doc­u­mented in that file, you also need to edit your /etc/hostname.<if> file, where <if> is your net­work inter­face (often nge0), adding the line inet hostname.

You can then either reboot the machine, or renew the DHCP lease on a con­sole on the machine (since it will dis­con­nect you from any SSH ses­sions). As root, first execute ifconfig <if> dhcp release to dis­card the cur­rent lease, then ifconfig <if> dhcp start to start DHCP on the inter­face again. Com­plete doc­u­ment­a­tion can be found through the man ifconfig and man dhcpagent pages.

Res­ult: I can see the host­name through the DHCP serv­er now, which I could­n’t before, but I still can­’t see it from the Win­dows box. So that’s anoth­er piece of the puzzle to track down.

Mind you, I need to give the Sol­ar­is box a stat­ic IP address for serving web­sites, so the DHCP nam­ing thing is moot. It would be nice to be able to ssh <hostname> from oth­er machines on the net­work rather than using the IP address though.

/* ]]> */