Changing the IP address in Solaris 10Changing the IP address of a system in Solaris 10 is not quite the same as other unix/linux variants. I'm a Debian linux user and so this method seemed quite odd to me. Anyways, here's how I figured out how to change the system IP address, if someone knows of a better way, please post a comment using the system below. So changing the IP address itself it done using the usual ifconfig command. ifconfig xl0 inet 192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255 You then need to change the IP in the hosts file. vi /etc/hosts So I'm normally used to having some sort of network configuration file with the ip, netmask, broadcast, gateway, etc. But it seems that in Solaris 10, the IP in your hosts file is matched up with your hostname and that IP is set on boot, so as long as it is set in the hosts file, that's the IP you get. The hostname it looks for is stored in /etc/hostname.<interface>. So then I thought, but then how does it figure out the subnet? I found that answer in /etc/netmasks. So, to break it down, here is where everything is set: UPDATE: It seems that Solaris 10 now checks the /etc/inet/ipnodes file first before the /etc/hosts file to set the IP. So, if the IP is currently set in /etc/inet/ipnodes, you will have to change it there as well.
And that's that! You now have your IP information set. I'm assuming this means if you have multiple interfaces you have to have different hostnames for each interface... does anyone know this for sure? Author: DPAK Created: Nov 3 2005 (last modified Jan 24 2006) Categories: Solaris TechByte #77 Warning: By visiting this site and/or by using any information contained herein, you agree to the Techbytes.ca terms of use.
Add a comment about this TechByteIf you wish to add a comment regarding this TechByte, please use the form below. Please note that by submitting comments using this form you are allowing all of the information submitted to be visible on this website. Any comments submitted using this form will only be shown on the website if they are approved by the administrators of this site. IF APPROVED, COMMENTS MAY TAKE SEVERAL DAYS TO BE POSTED. Other TechBytes: |
|

