General discussion

Locked

Making a Solaris box use DHCP address

By madman ·
How do you configure Solaris boxes (2.6, 2.7 and to use DHCP to get an IP address?
They are currently setup with static addresses, don't know how to change them over.

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
Thread display: Collapse - | Expand +

All Comments

Collapse -

Making a Solaris box use DHCP address

by Marnus In reply to Making a Solaris box use ...

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.<int> file to keep dhcp.

This is my penny in the pond! Hope it helped...

Collapse -

Making a Solaris box use DHCP address

by madman In reply to Making a Solaris box use ...

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.

Collapse -

Making a Solaris box use DHCP address

by ryttinch In reply to Making a Solaris box use ...

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

Collapse -

Making a Solaris box use DHCP address

by madman In reply to Making a Solaris box use ...

Figured it out already.... sorry!!

Collapse -

Making a Solaris box use DHCP address

by madman In reply to Making a Solaris box use ...

This question was closed by the author

Back to Security Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums