Solaris · Network Configuration

Solaris · Lesson 15

Network Configuration

Configure IP and routing in Solaris. netadm and dladm usage. DNS configuration. Network troubleshooting steps.

Solaris network stack: layers you must understand

Solaris network configuration is built in layers. Once you understand the difference between datalinks, IP interfaces, VNICs and IPMP groups, the commands become much easier to remember.

Core building blocks: dladm, ipadm, VNIC, IPMP

Datalinks (dladm)

Layer-2 objects representing NICs and VNICs. Use dladm show-link/show-phys to view physical state, MAC, speed and duplex.

IP interfaces (ipadm)

Layer-3 logical interfaces over datalinks (net0, vnic0, etc.). ipadm manages IP objects and addresses.

VNICs

Virtual NICs built on a physical datalink. Useful for virtualisation, isolation, and IPMP in lab or cloud-like setups.

IPMP

IP Multipathing provides link/IP redundancy and optional load spreading, monitored via ipmpstat.

Step-by-step: from discovery to VNIC and IPMP

The following flows take you from reading existing configuration, to adding a static IP, to creating VNICs and finally building an IPMP group with failover testing.

1. Discover current network configuration (ifconfig, dladm, ipadm)

Start by listing physical links, IP interfaces and addresses using ifconfig, dladm and ipadm.

terminal — network
solaris-lab
[root@solaris ~]# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
net0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
inet 192.168.131.140 netmask ffffff00 broadcast 192.168.131.255
net1: flags=1000802<BROADCAST,MULTICAST,IPv4> mtu 1500 index 3
inet 0.0.0.0 netmask 0
 
# Datalink view (layer-2)
[root@solaris ~]# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 down --
 
[root@solaris ~]# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net1 Ethernet down 0 unknown e1000g1
 
[root@solaris ~]# dladm show-phys -m
LINK SLOT ADDRESS INUSE CLIENT
net0 primary 00:25:90:aa:bb:cc yes net0
net1 primary 00:25:90:aa:bb:dd no --
 
[root@solaris ~]# dladm show-phys -L
LINK LPORT
net0 net0
net1 net1
 
# IP layer view
[root@solaris ~]# ipadm
NAME CLASS/TYPE STATE ADDR
lo0 loopback ok ---
lo0/v4 static ok 127.0.0.1/8
net0 ip ok ---
net0/v4 static ok 192.168.131.140/24
net1 ip down ---

2. Configure a static IP on an interface with ipadm

Create an IP interface over a datalink (net1), then assign a static IPv4 address. Later we’ll see how to remove it.

terminal — network
solaris-lab
# Create IP interface object on datalink net1
[root@solaris ~]# ipadm create-ip net1
 
# Assign static IPv4 address (example address)
[root@solaris ~]# ipadm create-addr -T static -a 192.168.131.142/24 net1/v4
 
[root@solaris ~]# ipadm
NAME CLASS/TYPE STATE ADDR
net1 ip ok ---
net1/v4 static ok 192.168.131.142/24
 
# Verify with ifconfig
[root@solaris ~]# ifconfig net1
net1: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
inet 192.168.131.142 netmask ffffff00 broadcast 192.168.131.255
 
# Remove the IP address and IP interface when no longer needed
[root@solaris ~]# ipadm delete-addr net1/v4
[root@solaris ~]# ipadm delete-ip net1
 
[root@solaris ~]# ipadm
NAME CLASS/TYPE STATE ADDR
net0 ip ok ---
net0/v4 static ok 192.168.131.140/24

3. Create and delete a VNIC on a physical link

A VNIC is a virtual NIC built on top of a physical datalink. It appears as a separate link to IP.

terminal — network
solaris-lab
# Check physical links
[root@solaris ~]# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
 
# Create a VNIC over net1
[root@solaris ~]# dladm create-vnic -i net1 vnic0
 
[root@solaris ~]# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
vnic0 vnic 1500 up net1
 
# Now configure IP on VNIC using ipadm
[root@solaris ~]# ipadm create-ip vnic0
[root@solaris ~]# ipadm create-addr -T static -a 192.168.131.150/24 vnic0/v4
 
[root@solaris ~]# ipadm
NAME CLASS/TYPE STATE ADDR
vnic0 ip ok ---
vnic0/v4 static ok 192.168.131.150/24
 
# Delete VNIC (after removing IP)
[root@solaris ~]# ipadm delete-addr vnic0/v4
[root@solaris ~]# ipadm delete-ip vnic0
[root@solaris ~]# dladm delete-vnic vnic0

4. Configure basic IPMP using VNICs

IPMP (IP Multipathing) provides link/IP failover and load spreading. Here we build an IPMP group out of two VNICs.

terminal — network
solaris-lab
# Assume net1 is our underlying physical link
[root@solaris ~]# dladm create-vnic -i net1 vnic0
[root@solaris ~]# dladm create-vnic -i net1 vnic1
 
[root@solaris ~]# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
vnic0 vnic 1500 up net1
vnic1 vnic 1500 up net1
 
# Create IPMP interface
[root@solaris ~]# ipadm create-ipmp ipmp1
 
# Add VNICs as IPMP data links
[root@solaris ~]# ipadm add-ipmp -i vnic0 -i vnic1 ipmp1
 
# Assign a static IP address to the IPMP interface
[root@solaris ~]# ipadm create-addr -T static -a 192.168.131.200/24 ipmp1/v4
 
[root@solaris ~]# ipadm
NAME CLASS/TYPE STATE ADDR
ipmp1 ipmp ok ---
ipmp1/v4 static ok 192.168.131.200/24
vnic0 ip ok ---
vnic1 ip ok ---

5. Monitor IPMP with ipmpstat and test failover

Use ipmpstat to see group status and interfaces, and if_mpadm to simulate failure and recovery.

terminal — network
solaris-lab
# Group-level view
[root@solaris ~]# ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
ipmp1 ipmp1 ok -- vnic0 vnic1
 
# Interface-level view
[root@solaris ~]# ipmpstat -i
INTERFACE GROUP STATE SEND RECV CMD RUNNING
vnic0 ipmp1 up 10/10 10/10 default yes
vnic1 ipmp1 up 10/10 10/10 default yes
 
# Simulate taking vnic0 offline for maintenance
[root@solaris ~]# if_mpadm -d vnic0
 
[root@solaris ~]# ipmpstat -i
INTERFACE GROUP STATE SEND RECV CMD RUNNING
vnic0 ipmp1 down 0/10 0/10 default no
vnic1 ipmp1 up 10/10 10/10 default yes
 
# Bring vnic0 back
[root@solaris ~]# if_mpadm -r vnic0
 
[root@solaris ~]# ipmpstat -i
INTERFACE GROUP STATE SEND RECV CMD RUNNING
vnic0 ipmp1 up 10/10 10/10 default yes
vnic1 ipmp1 up 10/10 10/10 default yes

6. Tear down IPMP configuration cleanly

When lab testing is done, remove addresses, detach links from IPMP, then delete the group and VNICs.

terminal — network
solaris-lab
# Remove the IP address on the IPMP interface
[root@solaris ~]# ipadm delete-addr ipmp1/v4
 
# Remove a VNIC from the IPMP group
[root@solaris ~]# ipadm remove-ipmp -i vnic1 ipmp1
 
# Remove the IPMP interface
[root@solaris ~]# ipadm delete-ipmp ipmp1
 
# Delete IP configuration on VNICs (if present) and remove VNICs
[root@solaris ~]# ipadm delete-ip vnic0
ipadm: cannot delete vnic0: object does not exist (if you only used it for IPMP, there may be no ipadm object)
 
[root@solaris ~]# dladm delete-vnic vnic0
[root@solaris ~]# dladm delete-vnic vnic1
 
[root@solaris ~]# ipadm
NAME CLASS/TYPE STATE ADDR
net0 ip ok ---
net0/v4 static ok 192.168.131.140/24

Theory recap: where each command fits

Command roles

  • ifconfig -a → legacy view, still useful for quick checks.
  • dladm show-link/show-phys → layer-2 state, media, MAC, speed, link status.
  • dladm show-phys -m / -L → MAC addresses and logical port info.
  • ipadm → layer-3 configuration (create-ip, create-addr, delete-addr, delete-ip).
  • dladm create-vnic/delete-vnic → manage VNICs over physical links.

IPMP & failover

  • ipadm create-ipmp ipmpX → create IPMP interface.
  • ipadm add-ipmp -i vnic0 -i vnic1 ipmpX → add interfaces to IPMP group.
  • ipadm create-addr -T static -a <IP> ipmpX → assign IP to the IPMP interface.
  • ipmpstat -g/-i → check group and interface health.
  • if_mpadm -d/-r vnic → simulate or perform offline/online actions for maintenance.

Network configuration safety tips

  • When working on remote servers over SSH, be very careful while changing the IP of the interface you are currently using.
  • Prefer testing new network configurations on a console session (ILO/ALOM/IPMI) or in a lab first.
  • For IPMP, always test failover with ipmpstat and if_mpadm before assuming redundancy is working.
  • Document IP schemes, VNIC mappings and IPMP groups so that future admins can understand your design quickly.

Once you’re comfortable with these tools, networking on Solaris (even with zones and virtualisation) becomes much easier to reason about.