Solaris 11 Basic Networking

Solaris 11 comes with profile-based network configurations which contains manual (Fixed Network configuration profile – NCP) and Automatic (reactive-Network Configuration profile – NCP) modes. Also introduced Network Auto-Magic (NWAM) features.

Automatic NCP : Uses DHCP which get basic network configuration as like IP Address, route, and DNS server from any of the NIC cards. IP multipathing will not works.

Manual NCP : If we enable DefaultFixed NCP, then network interface to be configured manually with using ipadm and dladm commands. DefaultFixed NCP should be used where the system will be reconfigured using Oracle Solaris Dynamic Reconfiguration or whenever hot-swappable interface are in use or when we required IP multipathing.

We can find which NCP is active through “netadm” command, from the below output we can see Automatic NCP is enabled and active.

root@hans-karri:~# netadm list
TYPE PROFILE STATE
ncp Automatic online
ncu:phys net0 online
ncu:phys net1 online
ncu:phys net3 online
ncu:phys net2 online
ncu:ip net0 online
ncu:ip net1 online
ncu:ip net3 online
ncu:ip net2 online
ncp DefaultFixed disabled
loc DefaultFixed offline
loc Automatic online
loc NoNet offline

Before changing the Automatic to Manual NCP, Let’s familiar with some basic Network administration commands in Solaris 11.
Showing the phyiscal interface

root@hans-karri:~# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net1 Ethernet up 1000 full e1000g1
net3 Ethernet up 1000 full e1000g3
net2 Ethernet up 1000 full e1000g2

Showing the Link status of the physical interface

root@hans-karri:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net3 phys 1500 up --
net2 phys 1500 up --

checking existing interface on the system

root@hans-karri:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip ok yes --
net1 ip ok yes --
net2 ip ok yes --
net3 ip ok yes --

checking MAC address and IP address

root@hans-karri:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4 dhcp ok 192.168.113.139/24
net1/v4 dhcp ok 192.168.113.141/24
net2/v4 dhcp ok 192.168.113.143/24
net3/v4 dhcp ok 192.168.113.142/24
lo0/v6 static ok ::1/128
net0/v6 addrconf ok fe80::20c:29ff:febf:ac5b/10
net1/v6 addrconf ok fe80::20c:29ff:febf:ac65/10
net2/v6 addrconf ok fe80::20c:29ff:febf:ac6f/10
net3/v6 addrconf ok fe80::20c:29ff:febf:ac79/10

Trying to switch to manual NCP (excute from console) and checking the network configurations changes

root@hans-karri:~# netadm enable -p ncp DefaultFixed
Enabling ncp 'DefaultFixed'
root@hans-karri:~#
root@hans-karri:~# netadm list
TYPE PROFILE STATE
ncp Automatic disabled
ncp DefaultFixed online
loc DefaultFixed online
loc Automatic online
loc NoNet offline
root@hans-karri:~#
root@hans-karri:~# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet UNKNOWN 1000 full e1000g0
net1 Ethernet UNKNOWN 1000 full e1000g1
net3 Ethernet UNKNOWN 1000 full e1000g3
net2 Ethernet UNKNOWN 1000 full e1000g2
root@hans-karri:~#
root@hans-karri:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 UNKNOWN --
net1 phys 1500 UNKNOWN --
net3 phys 1500 UNKNOWN --
net2 phys 1500 UNKNOWN --
root@hans-karri:~#
root@hans-karri:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
root@hans-karri:~#
root@hans-karri:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
lo0/v6 static ok ::1/128
root@hans-karri:~#

After changing to DefaultFixed (manaul mode),None of the interface has not configured now in system. Lets we start configure the interface with using “ipadm” commands manual mode.

root@hans-karri:~# dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet UNKNOWN 1000 full e1000g0
net1 Ethernet UNKNOWN 1000 full e1000g1
net3 Ethernet UNKNOWN 1000 full e1000g3
net2 Ethernet UNKNOWN 1000 full e1000g2
root@hans-karri:~#
root@hans-karri:~# ipadm create-ip net0
root@hans-karri:~# 
root@hans-karri:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip down no -- 
root@hans-karri:~#

Asssing IP Address to the net0 interface

root@hans-karri:~# ipadm create-addr -T static -a 192.168.113.139/24 net0/v4test
root@hans-karri:~#
root@hans-karri:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip ok yes --
root@hans-karri:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8)
net0/v4test static ok 192.168.113.139/24
lo0/v6 static ok ::1/128
root@hans-karri:~#

NOTE : “T” – option can be used for three specify interface mode statis, DHCP and addrconf (auto configured IPV6 address) Trying DHCP for another interface net1

root@hans-karri:~#
root@hans-karri:~# ipadm create-ip net1
root@hans-karri:~# ipadm create-addr -T dhcp net1/v4test2
root@hans-karri:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
net0 ip ok yes --
net1 ip ok yes --
root@hans-karri:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4test static ok 192.168.113.139/24
net1/v4test2 dhcp ok 192.168.113.141/24
lo0/v6 static ok ::1/128
root@hans-karri:~#

If you want to change the IP, then we need to delete and recreate the interface with new IP. Let we change the IP address

root@hans-karri:~# ipadm delete-ip net2
root@hans-karri:~# ipadm create-ip net2
root@hans-karri:~# ipadm create-addr -T static -a 192.168.113.140 net2/v4test1
root@hans-karri:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
net0/v4test static ok 192.168.113.139/24
net1/v4test2 dhcp ok 192.168.113.141/24
net2/v4test1 static ok 192.168.113.140/24
lo0/v6 static ok ::1/128
root@hans-karri:~#