Configure interface automatically with DHCP

Solaris can request IP address and other networking information dynamically with DHCP.


To permanently make an interface, for example hme0, obtain its IP address through DHCP, use the touch command to create the following two empty files as root:

touch /etc/dhcp.hme0
touch /etc/hostname.hme0

When you reboot, the interface will be dynamically configured. To bring up the interface using DHCP without rebooting, use the following command:

ifconfig hme0 dhcp start

The following commands can be used to display the DHCP lease information and release the DHCP lease, respectively:

ifconfig hme0 dhcp status
ifconfig hme0 dhcp release

 

About Quinn McHenry

Quinn was one of the original co-founders of Tech-Recipes. He is currently crafting iOS applications as a senior developer at Small Planet Digital in Brooklyn, New York.
View more articles by Quinn McHenry

The Conversation

Follow the reactions below and share your own thoughts.

One Response to “Configure interface automatically with DHCP”

  1. October 12, 2009 at 9:59 am, jester said:

    that was really very useful and thank for the good work

    Reply

Leave a Reply