Using Solaris 10 as DHCP client

May 1, 2009 · Filed Under General Solaris topics 

Today I just wanted to document here the quickest and easiest way of setting your Solaris box as a DHCP client.

1. Create the /etc/hostname. file

For instance:

solaris# touch /etc/hostname.skge0

2. Create the /etc/dhcp. file

It can be an empty file, but you can also use it to specify how long ifconfig should be waiting for a DHCP-server reply before giving up and continuing with Solaris boot.

solaris# cat /etc/dhcp.skge0
wait 60

3. Specify your  system name

It has to be specified in /etc/nodename. This name is going to be used as your hostname in case your DHCP-server does not return your hostname in reply to your DHCP-request.

THat’s all. Reboot your system, and it all should work! Enjoy! :)

  • Steven Gelsie

    Here is the process of setting up a Solaris 10 DHCP client

    1) Find you what network interface you are using

    ifconifg -a

    2) Create a /etc/dhcp.[network interface_name] file

    ex:touch /etc/dhcp.e1000g0

    3) Edit the /etc/hostname.[network_interface]

    This should be one line either just host name if your NOT using
    dynamic DNS update or “inet host name” if you are using dynamic DNS.

    [host name]

    or

    inet [host name]

    4) Create of edit the /etc/nodename file

    This should have your host name

    5) Edit the /etc/host file

    This should NOT for your host name. DHCP will put an
    entry in for you host.

    6) If you are using dynamic DNS to with DHCP you have to edit the
    /etc/default/dhcpagent file. Set

    REQUEST_HOSTNAME=yes

    7) Configure your network interface to use DHCP

    ifconfig [network interface] dhcp start

  • Mike Stewart

    Absolutely perfect! Many thanks.

  • Pete

    To set the hostname and make it stick and register during dhcp, add the wanted hostname to /etc/hostname. as below:

    inet hostname

    Then it’ll do the right thing under Solaris 10