To configure a Solaris workstation as a DHCP client, you need only start the DHCP daemon. Setting up DHCP and rebooting is not necessary.
To start the DHCP daemon at the prompt, type: /sbin/dhcpagentTo enable DHCP on interface le0, at the prompt, type: ifconfig le0 dhcp startTo get or release an IP address from the DHCP server, use the appropriate ipconfig command:
To view the current IP address: ifconfig -aTo release the current IP address: ifconfig le0 dhcp releaseTo renew the current IP address or request a new IP address: ifconfig le0 dhcpSetting Up the Solaris OS as DHCP client.
Introduction:This tip is written to help you configure a machine running the Solaris OS as DHCP client to work with DSL cable modem Dynamic Host Configuration Protocol (DHCP). DHCP provides the IP address, default route, and name servers. You need Solaris 2.6 or higher for DHCP.Setup ProcedureThe following steps are required as root:
1.touch /etc/dhcp.hme0Replace the .hme0 with whatever the Ethernet interface for your system might be, as shown by ifconfig -a.
2. cp /dev/null /etc/hostname.hme0 or > /etc/hostname.hme0Important note: You need to make sure that this file is empty -- otherwise, the 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. Any other lines will be ignored, and any additional necessary lines will be added by the DHCP client at boot time.
4. touch /etc/notrouterThis creates a file to tell the Solaris OS that your system will not be performing routing or packet-forwarding duties. If this file is already there, leave it the way it is.
5. cp /dev/null /etc/defaultrouter
Since the DHCP client software will automatically put the needed entries in this file, we just need to make sure that it exists as an empty file. If it already exists, rename it and create the empty file in its place.
6. cp /dev/null /etc/resolv.conf
The DHCP client will add the necessary entries. If you already have this file, rename it and create an empty file in its place.
7. Check the file /etc/nsswitch.conf and look at the hosts: line. Make sure that it reads hosts: files dns.
This will enable your machine to resolve addresses using DNS, the Domain Name System. Reboot your machine. While booting, you will see status messages about the DHCP client; this is normal.
Once the machine is booted, type the ifconfig -a command.You will see output similar to this: lo0: flags=1000849 mtu 8232 index 1 inet 127.0.0.1 netmask ff000000hme0: flags=1000843 mtu 1500 index inet 192.168.1.35 netmask ffffff80 broadcast 192.168.1.255 ether 8:0:20:d2:15:2f
Conclusion If you have followed all my instructions, the Solaris machine is ready to get its networking information by means of DHCP.
No comments:
Post a Comment