How To Configure Network Interfaces in Solaris
July 19, 2011 Leave a comment
I will discuss how to change existing interface by another one.
I have interface ce0 and want it to change with ce5.
1. Stop the interface
# ifconfig ce0 down
2. Unplumb the interface
# ifconfig ce0 unplumb
3. Plumb another interface
# ifconfig ce5 plumb
4. Configure the interface
# ifconfig ce5 10.0.0.7 netmask 255.255.255.0
5. Start the interface
# ifconfig ce5 up
This changes are not permanent, it will be lost after reboot. To make it permanent:
1. Edit the file /etc/hosts and enter IPs for each interface, but include different names.
For example,
hostname 10.0.0.7 hostname_ce5 10.0.0.6
In my case I have just one(because, I am not adding interface but changing)
hostname 10.0.0.7
2. edit the file(s) /etc/hostname.<interface>
# cat /etc/hostname.ce0 hostname # cat /etc/hostname.ce5 hostname_ce5
In my case I have just the last one.