How to Configure an IP address on a Network Interface in Solaris 11

Creating a static IP address is a two-step process, and it involves creating an IP interface and an IP address. There can be multiple IP addresses associated with an IP interface. IP address objects have names in the form interface/description.

On a machine with multiple physical networks, you can use dladm to determine how network interface names are mapped to physical interfaces.

root@solaris:~# dladm show-phys
LINK              MEDIA                STATE      SPEED  DUPLEX    DEVICE
net0              Ethernet             up         1000   full      e1000g0
net1              Ethernet             unknown    0      unknown   pcn0

In the example, we use unixnetwork as the description.

root@solaris:~# ipadm create-ip net0
root@solaris:~# ipadm show-if
IFNAME     CLASS      STATE      ACTIVE      OVER
lo0        loopback   ok         yes         —
net0       ip         down       no          —
root@solaris:~# ipadm create-addr -T static -a 10.163.198.20/24 net0/unixnetwork
root@solaris:~# ipadm show-if
IFNAME      CLASS     STATE      ACTIVE      OVER
lo0         loopback  ok         yes         —
net0        ip        ok         yes         —
root@solaris:~# ipadm show-addr
ADDROBJ     TYPE      STATIC     ADDR
lo0/v4      static    ok         127.0.0.1/8
net0/unixnetwork static    ok         10.163.198.20/24
lo0/v6      static    ok         ::1/128

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us