Solaris 11.x network intro

In this post I’ll mainly cover basic network topics from Solaris 11.x, I will cover the following:

  • Identifying the network interfaces
  • Setting up a static IP
  • Define IPMP, Link-Based and transitive probes

If you are new to Solaris 11, then do not be afraid with the nomenclature of the network interfaces, what I mean is that by default all the interfaces are net0…X.
This was done to simplify the system administrators life’s when compared to the previous version of Solaris.

Moving on to the main topics.

To identify and see what network interfaces we have available, we need to use the dladm command.

bitsnix@solaris:~$ dladm show-phys
LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net1 Ethernet up 1000 full e1000g1
net2 Ethernet up 1000 full e1000g2

If we need to MAC-ADDR we should use dladm show-phys -m, old good ifconfig is still there but dladm provide this information in a clear way.

bitsnix@solaris:~$ dladm show-phys -m
LINK SLOT ADDRESS INUSE CLIENT
net0 primary 8:0:27:8c:c9:28 yes net0
net1 primary 8:0:27:11:c:4f yes net1
net2 primary 8:0:27:ce:e7:77 no --

In this case, I have three network interfaces that use the same driver, e1000g, but from the output of dladm,I can see that only net0 and net1 are in use.
Using ipadm will in fact confirm this:

bitsnix@solaris:~$ ipadm
NAME CLASS/TYPE STATE UNDER ADDR
lo0 loopback ok -- --
lo0/v4 static ok -- 127.0.0.1/8
lo0/v6 static ok -- ::1/128
net0 ip ok -- --
net0/v4 static ok -- 10.0.2.200/24
net1 ip ok -- --
net1/v4 static ok -- 192.168.56.200/24

So let’s define a new ip for net2, but first, I want to associate this interface with the network that it will be used for.

bitsnix@solaris:~$ pfexec dladm rename-link net2 backup0

Now let’s give a IP to this link:

bitsnix@solaris:~$ pfexec ipadm create-ip backup0
bitsnix@solaris:~$ ipadm
NAME CLASS/TYPE STATE UNDER ADDR
backup0 ip ok -- --
backup0/if0 static ok - 192.168.100.200/24

3. Creating IPMP
Initial steps

bitsnix@solaris:~$ pfexec ipadm create-ip net1
bitsnix@solaris:~$ pfexec ipadm create-ip net2
bitsnix@solaris:~$ pfexec ipadm create-ipmp -i net1 -i net2 backup_ipmp0
bitsnix@solaris:~$ ipadm
NAME CLASS/TYPE STATE UNDER ADDR
backup_ipmp0 ipmp down -- --
net1 ip ok backup_ipmp0 --
net2 ip ok backup_ipmp0 --

The initial state is down. This happens because we don’t have yet a ip address for it.
So .. let’s give it an ip address:

bitsnix@solaris:~$ pfexec ipadm create-addr -T static -a local=192.168.56.210/24 backup_ipmp0/n0
bitsnix@solaris:~$ ipadm
NAME CLASS/TYPE STATE UNDER ADDR
backup_ipmp0 ipmp ok -- --
backup_ipmp0/n0 static ok -- 192.168.56.210/24
net1 ip ok backup_ipmp0 --
net2 ip ok backup_ipmp0 --

The default value when creating a IPMP is active-active mode. we can confirm this by using ipmpstat command

bitsnix@solaris:~$ ipmpstat -i
INTERFACE ACTIVE GROUP FLAGS LINK PROBE STATE
net2 yes backup_ipmp0 ------- up disabled ok
net1 yes backup_ipmp0 --mbM-- up disabled ok
bitsnix@solaris:~$ ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
backup_ipmp0 backup_ipmp0 ok -- net2 net1

If we want to enable active-passive:

bitsnix@solaris:~$ pfexec ipadm set-ifprop -p standby=on -m ip net2

Can be confirmed now, by using ipmpstat command. Note that when using the option -g, the interfaces between “()” are standby, “[]” failed, nothing are active.

bitsnix@solaris:~$ ipmpstat -g
GROUP GROUPNAME STATE FDT INTERFACES
backup_ipmp0 backup_ipmp0 ok -- net1 (net2)
bitsnix@solaris:~$ ipmpstat -i
INTERFACE ACTIVE GROUP FLAGS LINK PROBE STATE
net2 no backup_ipmp0 is----- up disabled ok
net1 yes backup_ipmp0 --mbM-- up disabled ok

To enable transitive probes:

bitsnix@solaris:~$ svccfg -s ipmp setprop config/transitive-probing=true
bitsnix@solaris:~$ svcadm refresh ipmp
bitsnix@solaris:~$ svcadm restart ipmp

You can confirm now using ipmpstat -t

bitsnix@solaris:~$ ipmpstat -t
INTERFACE MODE TESTADDR TARGETS
net2 transitive <net2> <net1>
net1 multicast 192.168.56.210 --

I really advice you to read the official docs and also the man pages for dladm, ipadm and ipmpstat to have a better understanding of this intro.
A few set of commands useful are really the following:

- ipadm set-ifprop/show-ifprop
- dladm create-aggr/show-aggr
- dladm show-phys -L -p -o <fields>
Advertisements

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 )

Google+ photo

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

w

Connecting to %s