Computing.Net > Forums > Solaris > DHCP client & hostname

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

DHCP client & hostname

Reply to Message Icon

Name: Dino Pablo Collufio
Date: September 13, 2002 at 03:28:11 Pacific
OS: Solaris 8
CPU/Ram: Sparc
Comment:

To set DHCP client for Solaris, follow these steps, as root:

1. touch /etc/dhcp.hme0
replace the ".hme0" with whatever the ethernet interface for your system might be, as shown by ifconfig -a

2. cp /dev/null /etc/hostname.hme0
You need to make SURE that this file is EMPTY - otherwise, DHCP
configuration won't work.

3. Make sure that /etc/inet/hosts only has one line in it, the one containing
127.0.0.1 localhost loghost
Any other lines will be deleted and any additional necessary
lines will be added by the DHCP client at boot time.

4. delete /etc/defaultrouter file.
Since the DHCP client software will manage automatically we don't need it.

5. edit /etc/resolv.conf and put your DNS configuration as usual.

6. Edit the file /etc/nsswitch.conf and look at the hosts: line. By default, it reads files ; change
it to read hosts: files dns. This will enable your
machine to resolve addresses using DNS, the Domain Name System.

Okay if you have followed all my Instructions, Solaris machine is ready to get its networking information via DHCP.

Reboot your machine. You will see status messages during boot about the DHCP client, this is normal. Once the machine is booted
type the "ifconfig -a" command. You will see output similar to this:

$ ifconfig -a
hme0: flags=849 mtu 8232
inet 127.0.0.1 netmask ff000000
eth0: flags=4843 mtu 1500
inet 66.65.63.238 netmask ffffff00 broadcast 66.65.63.255
ether 8:0:20:9f:37:f1

Type "hostname" to see if it says "unknown." If so, DHCP did not provide a hostname. One
workaround is to edit /etc/init.d/network file and comment the line:
#hostname="unknown"
and I replace by
hostname='cat /etc/nodename'
In this way the "real hostname" must to be written in /etc/nodename as usual (without DHCP) and we can change it easyly in a future.



Sponsored Link
Ads by Google

Response Number 1
Name: Michael
Date: September 18, 2002 at 07:57:01 Pacific
Reply:

Go to the following link and all of your questions will be answered:

http://www.rite-group.com/consulting/solaris_dhcp.html

Mike


0

Response Number 2
Name: Dino Pablo Collufio
Date: September 26, 2002 at 06:18:44 Pacific
Reply:

Michael, I've already red your article but didn't work at all for me.
With my method you don't need to add any special startup script and you can change in the future the name machine as you do it normaly without DHCP installed, that's it: just changing /etc/nodename file.
The same problem of "unknouwn" name is present after install Solaris 9.
Don't ask me why Sun didn't resolve this problem in the new OS (Solaris9)

Dino


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Solaris Forum Home


Sponsored links

Ads by Google


Results for: DHCP client & hostname

Setting up DHCP client on Solaris 8 www.computing.net/answers/solaris/setting-up-dhcp-client-on-solaris-8/468.html

Installing USB DSL on Solaris8 www.computing.net/answers/solaris/installing-usb-dsl-on-solaris8/3149.html

Help with Solaris 8 regarding Internet www.computing.net/answers/solaris/help-with-solaris-8-regarding-internet/1312.html