All we need to do is to create couple of files for the ethernet interface.
- To get the interface name for ethernet, type dmesg | grep ether. Let's assume that it is elxl0
- Create an empty file called /etc/hostname.<ether interface> eg., touch /etc/hostname.elxl0
Creating this file ensures that the interface gets plumbed. By plumbing, it implements the TCP/IP stack ie., the OS sets up the streams needed for TCP/IP to use the device and makes it ready for the DHCP software to do its stuff
Behind the scenes: During the boot process, the OS reads all the /etc/hostname.* files and plumbs the devices. Once plumbed, the devices are configured by reading the /etc/hosts and the /etc/netmasks file - Next step is to create /etc/dhcp.<ether interface>. eg., touch /etc/dhcp.elxl0
This file can be empty if you want to accept the defaults, but may also contain one or both of the following directives:- wait time, and
- primary
By default, ifconfig will wait for 30 sec for the DHCP server to respond and then the boot process continues, while the interface gets configured in the background. Specifying the wait directive tells ifconfig not to return until the DHCP has responded. The primary directive indicates to ifconfig that the current interface is the primary one, if you have more than one interface under DHCP control. If you have only one interface under DHCP control, then it is automatically the primary one; so primary is redundant, although it's permissible
Acknowledgements & suggested reading:
- Setting up a Solaris DHCP client by Rich Teer
- Configuring network interface cards by Lance Spitznet
- Solaris DHCP client at Sun Solaris documentation web site
0 comments:
Post a Comment