Solaris 11 Express was recently installed on a system of mine and initially configured to boot up with DHCP during the installation. After the system was online I tried manually changing the IP address to a static one by visiting the files under /etc/ and issuing a reboot with ‘init 6’, but unfortunately the static IP did not persist.
After some reading on oracle’s site and tinkering around, I realized it would be easier to accomplish my task using the new ipadmin tool for interface configuration. Apparently ipadmin will eventually replace ‘ifconfig’ in the near future on Solaris. Using svcadm and ipadm I was able to successfully configure a static IP that persisted on reboots. Here is what I did:
- Disable the auto-magic network daemon
# svcadm disable physical:nwam
Define in /etc/hosts, if not already, an entry for this host. For example:
then, enable the default physical service with svcadm and configure the interface:
- Enable manual mode for the default physical service via SMF
# svcadm enable physical:default
- Configure interface with ipadm
# ipadm create-addr -T static -a local=192.168.1.1/24 bge0/v4static
You cannot just specify the interface ‘bge0’, but must also include a ‘user_specified_string’ like ‘/v4static’ or ‘/ipv4static’.
Note: According to Oracle, you should not manually start and stop the dhcpagent daemon directly. Instead, as superuser on the client system, you can use the ipadm command to affect dhcpagent’s management of the network interface, if necessary .