Making a Solaris box use DHCP address
How do you configure Solaris boxes (2.6, 2.7 and 8) to use DHCP to get an IP address?
They are currently setup with static addresses, don't know how to change them over.
Security
How do you configure Solaris boxes (2.6, 2.7 and 8) to use DHCP to get an IP address?
They are currently setup with static addresses, don't know how to change them over.
by marnus
All the IP address changes in Solaris can be done by using the ifconfig command. I'm going to start off with static addressing:
For example:
To activate an interface:
#ifconfig hme0 plumb
To assign a static address:
#ifconfig hme0 10.1.0.1 netmask 255.255.255.0
To make the interface available:
#ifconfig hme0 up
To change the static address:
#ifconfig hme0 10.2.5.1 netmask 255.255.255.0
Remember to put (or change) the interface name in /etc/hostname.hme0 and to put (or change) thehostname and its IP Address in the /etc/hosts file (to keep it after rebooting!)
Personally I have not implemented DHCP on Solaris, but looking at the man pages for ifconfig (#man ifconfig), it seems that dhcp is activated by typing:
#ifconfig hme0 dhcp
You can also use additional switches like release, renew, etc.
I don't however know if you will have to remove the /etc/hostname. file to keep dhcp.
This is my penny in the pond! Hope it helped...
by madman
Sorry, not really what I am looking for. I know how to assign static addresses... Just need t oknow about DHCP, stuff like /etc/resolv.conf, /etc/defaultrouter etc......
Cheers.
by ryttinch
If you want your sun box to get a DHCP address upon boot up, type the following command:
touch /etc/dhcp.[interface-name-and-number]
so you could do the following if you were using hme0 device as your dhcp interface:
touch /etc/dhcp.hme0Then each time you boot the machine, you will get an address from the dhcp pool for that interface.
Hope this helps,
Chad Rytting
by madman
by madman
This discussion is closed to new replies.
Sort by Trending