Tuesday, May 6, 2008

Changing IP Address in Solaris & Linux

Steps to change IP address of any interface in Solaris:
1) Change IP address in /etc/hosts for the particular interface
2) Change IP address in /etc/inet/ipnodes
3) [OPTIONAL] If need to change the subnet mask, make an entry in /etc/netmasks
4) If the new IP address needs to be changed without a reboot, the following command should be entered:

# ifconfig [IP-ADDRESS-VALUE] net [NETMASKS-VALUE] up


Steps to change IP address of any interface in (RHEL) Linux:
1) Change the IP address in /etc/hosts
2) Change the IP address for interface specific file (/etc/sysconfig/network-scripts/ifcfg-[ethernet-interface])
3) If the new IP address needs to be changed without a reboot, the following command should be entered:

# ifconfig [IP-ADDRESS-VALUE] net [NETMASKS-VALUE] up

No comments: