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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to easily change IP address on Solaris?

Status
Not open for further replies.

aunixguru

IS-IT--Management
Feb 2, 2001
28
US
Does anyone know of a admin utility to change it?
Do I just change it in the hosts file?
Help
 
Hi,

I would like to run "ifconfig -a" to see what's the names of the network interfaces. e.g.
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
elxl0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.2.40 netmask ffffff00 broadcast 192.168.2.255

Then execute:
ifconfig elxl0 some_new_IP_address netmask some_network_mask
e.g.
ifconfig elxl0 192.168.2.41 netmask 255.255.0.0

Regards,
Jerry.
 
If you just want to change it on the fly then:

ifconfig hme0 unplumb
ifconfig hme0 plumb
ifconfig hme0 xxx.xxx.xxx.xxx
ifconfig hme0 up

Substitute for hme0 in the above with the interface name used on your system.

Change your /etc/hosts file to make permanent change.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top