[Solaris 11 Express] Configuring a static IP

Oracle 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:

  1. Disable the auto-magic network daemon
               # svcadm disable physical:nwam
              

    Define in /etc/hosts, if not already, an entry for this host. For example:

            192.168.1.1 solexpress 
            

    then, enable the default physical service with svcadm and configure the interface:

  2. Enable manual mode for the default physical service via SMF
               # svcadm enable physical:default
              
  3. 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 [1].

Advertisements
This entry was posted in *Nix. Bookmark the permalink.

5 Responses to [Solaris 11 Express] Configuring a static IP

  1. Harry Putnam says:

    Can you flesh out how ipadm may be used to control the dhcpagents management of network interface?

  2. anjalis says:

    Hi,

    i have problem with setting static ip address to an interface, i had dhcp configured interface net0, i wanted to do static ip address. So i’ve done this:
    ipadm delete-addr net0/_b (this was ipv4)
    ipadm delete-addr net0/_a (this was ipv6)
    then i did this:
    ipadm create-ip net0
    ipadm create-addr -T static -a IPaddress net0/v4static
    i checked ifconfig -a and all seemed ok but when i issued
    ifconfig net0 up it responded
    duplicate address detected and also in ipadm show-addr in status was duplicate…
    But how??? in ifconfig -a i see just net0 configured with my ip address…

  3. Anonymous says:

    other host take this address, try free address first

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s