Setting Static IP Address on Solaris 11

Solaris 11 coming with new feature and enhancement, one of it is NWAM (Network automagic) with NWAM you can create and save the network profile. In this post, I’ll blogging about how to configure your Solaris 11 Systems to used static IP Address.

Ok let’s start :
1. Switch From Automatic Network Configuration Mode to Manual Network Configuration Mode

# netadm enable -p ncp DefaultFixed

2. Verify that DefaultFixed profile is applied

# netadm list
netadm: DefaultFixed NCP is enabled;
automatic network management is not available.
'netadm list' is only supported when automatic network management is active.

3. Determine the interface that you want to configure

# dladm show-phys

4. I’ll configure the net0 interface

# ipadm create-ip net0
# ipadm create-addr -T static -a net0/v4

5. Verify

# ipadm show-addr
ADDROBJ           TYPE     STATE        ADDR
lo0/v4            static   ok 
net0/v4           static   ok 
lo0/v6            static   ok           ::1/128
root@solaris:~# dladm show-link
LINK                CLASS     MTU    STATE    OVER
net0                phys      1500   up       --
net1                phys      1500   unknown  --

6. Add default route

# route -p add default

7. Add DNS Name Server

root@solaris:~# svccfg -s dns/client
svc:/network/dns/client> setprop config/nameserver = (
svc:/network/dns/client> listprop config
config                      application
config/value_authorization astring
config/nameserver          net_address
svc:/network/dns/client> exit
root@solaris:~# svcadm refresh dns/client
root@solaris:~# svcadm restart dns/client

8. Set name service switch

root@solaris:~# svccfg -s name-service/switch
svc:/system/name-service/switch> setprop config/host = "files dns"
svc:/system/name-service/switch> listprop config
config                      application
config/default             astring     files
config/value_authorization astring
config/printer             astring     "user files"
config/host                astring     "files dns"
svc:/system/name-service/switch> exit

9. Testing

root@solaris:~# ping is alive

That’s it..
In the next post I’ll blogging about how to configure IPMP on Solaris 11.


7 thoughts on “Setting Static IP Address on Solaris 11

  1. Please update with information on how to set the default gateway and DNS settings. I’m finding that many static IP articles are lacking this information or that are missing steps to make the settings persist after rebooting!

    Thanks for the article.

  2. Hi,

    I can’t figure out how to set the Default Domain. I’ve never set up a static IP and need to do so at work on Solaris.

    • Your default domain is whatever your resolver attempts to use first. This is part of smf dns/client, or you can edit /etc/resolve.conf yourself. “domain” is only allowed to have one value, but you can also use a “search” line instead of domain. The first entry on the search line will be your default domain. Going the other route, the only entry on the domain line would also be your default domain.

  3. You may want to add a:

    root@solaris:~# svcadm refresh name-service/switch

    at the end of step 8. I needed to run it.

Leave a Reply

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

You are commenting using your 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