Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Ip address in solaris

Status
Not open for further replies.

Jonathan777

Technical User
Aug 23, 2001
26
US
Hi,

Can someone tell me how to change the Ip address in a unix box running sun solaris 2.6.

Thanks,

Jonathan
 
If it's a different address but on the same network, then just use the ifconfig command:

ifconfig -a to get the existing details (interface name, inet & netmask) then (assuming interface is le0 - may be hme0)

ifconfig le0 ipaddress netmask netmask

If it's a totally different address, then you're probably better off running /usr/sbin/sys-unconfig which will re-set all your network settings (hostname, NIS domain name, LDAP, timezone, IP address, IP subnet mask, root password) & ask for the new values when you reboot. TandA

Day by day, the penguins steal my sanity.
 
Hi,

If you want the chamge to be permanent change the defualt entry in /etc/hosts

Remember to change the entries in the file /etc/defaultrouter & /etc/routes files if you change subnets

later
jb
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top