- •Alexandre Borges
- •Credits
- •Introduction 74
- •Chapter 3: Networking 159
- •Free access for Packt account holders
- •Instant updates on new Packt books
- •Table of Contents Preface 1 Chapter 1: ips and Boot Environments 7
- •Introduction 8
- •Installing a package, verifying its content, and fixing the package corruption 13
- •In an inactive boot environment 64
- •Chapter 2: zfs 73
- •Chapter 4: Zones 235
- •Preface
- •Questions
- •Ips and Boot
- •In this chapter, we will cover the following topics:
- •Introduction
- •Determining the current package publisher
- •Getting ready
- •Installing a package, verifying its content, and fixing the package corruption
- •Getting ready
- •Interface
- •Getting ready
- •Listing and renaming a boot environment
- •Getting ready
- •Configuring an ips local repository
- •Getting ready
- •Configuring a secondary ips local repository
- •Getting ready
- •Publishing packages into a repository
- •Getting ready
- •Adding big applications into a repository
- •Getting ready
- •Creating your own package and publishing it
- •Getting ready
- •Managing an ips publisher on Solaris 11
- •Getting ready
- •Pinning publishers
- •Getting ready
- •Getting ready
- •Creating a mirror repository
- •Getting ready
- •Getting ready
- •Listing and creating a boot environment
- •Getting ready
- •Getting ready
- •Activating a boot environment
- •Getting ready
- •Getting ready
- •References
- •Introduction
- •Creating zfs storage pools and filesystems
- •Getting ready
- •Playing with zfs faults and properties
- •Getting ready
- •Creating a zfs snapshot and clone
- •Getting ready
- •Performing a backup in a zfs filesystem
- •Getting ready
- •Handling logs and caches
- •Getting ready
- •Managing devices in storage pools
- •Getting ready
- •Configuring spare disks
- •Getting ready
- •Handling zfs snapshots and clones
- •Getting ready
- •Playing with comstar
- •Getting ready
- •Mirroring the root pool
- •Getting ready
- •Zfs shadowing
- •Getting ready
- •Configuring zfs sharing with the smb share
- •Getting ready
- •Setting and getting other zfs properties
- •Getting ready
- •Playing with the zfs swap
- •Getting ready
- •References
- •Networking
- •Introduction
- •Playing with Reactive Network Configuration
- •Getting ready
- •Internet Protocol Multipathing
- •Getting ready
- •Setting the link aggregation
- •Getting ready
- •Configuring network bridging
- •Getting ready
- •Getting ready
- •Configuring the dhcp server
- •Getting ready
- •Configuring Integrated Load Balancer
- •Getting ready
- •IPv4 forwarding enabled enabled
- •References
- •Introduction
- •Getting ready
- •Id name status path brand ip
- •Getting ready
- •Value is basic (only the owner can modify it).
- •22:52:06 5849 Rcapd
- •Implementing a flow control
- •Getting ready
- •Getting ready
- •Installing: This may take several minutes...
- •References
- •Playing with Oracle
- •Introduction
- •Reviewing smf operations
- •Getting ready
- •Its dependencies
- •Handling manifests and profiles
- •Getting ready
- •Creating smf services
- •Getting ready
- •Getting ready
- •Troubleshooting Oracle Solaris 11 services
- •Getting ready
- •References
- •Configuring and
- •Introduction
- •Getting ready
- •References
- •Configuring and
- •Introduction
- •Configuring and using rbac
- •Getting ready
- •Playing with least privileges
- •Getting ready
- •References
- •Administering and
- •Introduction
- •Monitoring and handling process execution
- •Getting ready
- •2014 May 4 19:25:10, load average: 0.38, 0.30, 0.28 syscalls: 12648
- •Managing processes' priority on Solaris 11
- •Getting ready
- •Configuring fss and applying it to projects
- •Getting ready
- •References
- •Isbn-13: 978-0131568198
- •Configuring the
- •Introduction
- •Configuring the syslog
- •Getting ready
- •Getting ready
- •References
- •Aggregation 191
- •Identifier (fmri) 294 faults, zfs
- •(Trill) 198
- •Values, l4 (Communication)
- •Virtual ip address (vip address) 228 virtual memory size (vsz) 396 virtual network interface (vnic) 238 virtual network, zone
- •Virtual to virtual (v2v) migration 280
- •About Packt Enterprise
- •Writing for Packt
Getting ready
To follow this recipe, you must have two virtual machines (VirtualBox or VMware) with Oracle Solaris 11 installed and have 4 GB RAM and four network interfaces in the first virtual machine. The second machine can have just one network interface.
How to do it…
Let's see what we have in the system by executing the following command:
root@solaris11-1:~# 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 --
root@solaris11-1:~# ipadm show-addr| grep v4
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.168.1.108/24 net1/v4 dhcp ok 192.168.1.106/24 net2/v4 dhcp ok 192.168.1.109/24 net3/v4 dhcp ok 192.168.1.107/24
There are four interfaces that get their IP address from a local DHCP service. Therefore, to configure the link aggregation, it's necessary to delete all IP object addresses from all interfaces and verify their status by running the following commands:
root@solaris11-1:~#
ipadm
delete-ip net0 root@solaris11-1:~#
ipadm
delete-ip net1 root@solaris11-1:~#
ipadm
delete-ip net2 root@solaris11-1:~#
ipadm
delete-ip net3 root@solaris11-1:~#
ipadm
show-addr | grep v4
Chapter 3
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8 root@solaris11-1:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes -- root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net2 phys 1500 up --
net3 phys 1500 up --
Nice. Everything is working. This time, the link aggregation (the trunk link aggregation) can be set up. Let's take all of the interfaces to create the aggregation by running the following command:
root@solaris11-1:~# dladm create-aggr -l net0 -l net1 -l net2 -l net3 super_aggr_0
To check whether the aggregation was created, execute the following command:
root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net2 phys 1500 up --
net3 phys 1500 up --
LINK |
MODE POLICY |
ADDRPOLICY |
LACPACTIVITY LACPTIMER |
super_aggr_0 |
trunk L4 |
auto |
off short |
super_aggr_0 aggr 1500 up net0 net1 net2 net3 More details about the aggregation can be gathered by executing the following command: root@solaris11-1:~# dladm show-aggr
The super_aggr_0 aggregation was created, and it works like a single network interface.
As we mentioned previously, the default aggregation type is trunk and the default policy is L4 (Communication). For curiosity, if we wanted to create a DMLP link aggregation, the command would be as follows:
root@solaris11-1:~# dladm create-aggr –m dlmp -l net0 -l net1 -l net2 -l net3 super_aggr_0
Networking
Now, it's time to create an IP object on it:
root@solaris11-1:~# ipadm create-ip super_aggr_0 root@solaris11-1:~# ipadm show-addr | grep v4 ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
The super_aggr_0 aggregation is still down because no IP address is assigned to it:
root@solaris11-1:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes --
super_aggr_0 ip down no --
However, everything is ok at the layer 2 level (Datalink):
root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net2 phys 1500 up --
net3 phys 1500 up --
super_aggr_0 aggr 1500 up net0 net1 net2 net3
Great! The definitive step is to assign an IP address to the aggregation object, which is
super_aggr_0:
root@solaris11-1:~# ipadm create-addr -T static -a 192.168.1.166/24 super_aggr_0/v4
root@solaris11-1:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
lo0 loopback ok yes -- super_aggr_0 ip ok yes --
As we've learned previously, all interfaces are hidden and only the link aggregation interface is shown and presented to an external network. To collect more information about the aggregation, run the following command:
root@solaris11-1:~# dladm show-aggr
LINK MODE POLICY ADDRPOLICY LACPACTIVITY LACPTIMER
super_aggr_0 trunk L4 auto off short root@solaris11-1:~# ipadm show-addr | grep v4
-
Chapter 3
ADDROBJ
TYPE
STATE
ADDR
lo0/v4
static
ok
127.0.0.1/8
super_aggr_0/v4
static
ok
192.168.1.166/24
A recommended way to verify whether everything is working is to try to send and receive packets:
root@solaris11-1:~# ping 192.168.1.1
192.168.1.1 is alive
We can also monitor the link aggregation activity by using the netstat command:
root@solaris11-1:~# netstat -i -I super_aggr_0 -f inet
Name Mtu Net/Dest Address Ipkts Ierrs Opkts Oerrs Collis Queue
super_aggr_0 1500 192.168.1.0 192.168.1.166 32745 0 243 0
0 0
root@solaris11-1:~# netstat -rn -f inet
Routing Table: IPv4
Destination Gateway Flags Ref Use Interface
------------------ ----------------- ------ ------- ------- --------- 127.0.0.1 127.0.0.1 UH 2 8066 lo0
192.168.1.0 192.168.1.166 U 3 28 super_aggr_0
We have almost finished our learning (not yet!). To change the link aggregation policy (for example, from L4 to L2), we execute the following command:
root@solaris11-1:~# dladm show-aggr
LINK MODE POLICY ADDRPOLICY LACPACTIVITY LACPTIMER
super_aggr_0 trunk L4 auto off short root@solaris11-1:~# dladm modify-aggr --policy=L2 super_aggr_0 root@solaris11-1:~# dladm show-aggr
LINK MODE POLICY ADDRPOLICY LACPACTIVITY LACPTIMER
super_aggr_0 trunk L2 auto off short
Our example of link aggregation was created using four interfaces. However, an interface can be either inserted or removed anytime. First, we have to know which interfaces are part of the aggregation by running the following command:
root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
-
Networking
net2
phys
1500
up
--
net3
phys
1500
up
--
super_aggr_0
aggr
1500
up
net0 net1 net2 net3
Now, it's easy to remove an interface from aggregation by executing the following command:
root@solaris11-1:~# dladm remove-aggr -l net3 super_aggr_0
To confirm that the previous command worked, run the following command:
root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net2 phys 1500 up --
net3 phys 1500 up --
super_aggr_0 aggr 1500 up net0 net1 net2
Adding an interface follows almost the same syntax, as follows:
root@solaris11-1:~# dladm add-aggr -l net3 super_aggr_0
root@solaris11-1:~# dladm show-link
-
LINK
CLASS
MTU
STATE
OVER
net0
phys
1500
up
--
net1
phys
1500
up
--
net2
phys
1500
up
--
net3
phys
1500
up
--
super_aggr_0
aggr
1500
up
net0 net1 net2
net3
root@solaris11-1:~#
Finally, we can remove the aggregation in order to prepare our environment for the next section:
root@solaris11-1:~# ipadm show-if
IFNAME CLASS STATE ACTIVE OVER
IFNAME |
CLASS |
STATE |
ACTIVE |
OVER |
lo0 |
loopback |
ok |
yes |
-- |
lo0 loopback ok yes -- super_aggr_0 ip ok yes -- root@solaris11-1:~# ipadm delete-ip super_aggr_0 root@solaris11-1:~# ipadm show-if
Chapter 3
root@solaris11-1:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
lo0/v6 static ok ::1/128 root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net2 phys 1500 up --
net3 phys 1500 up --
super_aggr_0 aggr 1500 up net0 net1 net2 net3 root@solaris11-1:~# dladm delete-aggr super_aggr_0
root@solaris11-1:~# dladm show-link
LINK CLASS MTU STATE OVER
net0 phys 1500 up --
net1 phys 1500 up --
net2 phys 1500 up --
net3 phys 1500 up -- root@solaris11-1:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
lo0/v6 static ok ::1/128 root@solaris11-1:~#
root@solaris11-1:~# ipadm create-ip net0 root@solaris11-1:~# ipadm create-ip net1 root@solaris11-1:~# ipadm create-ip net2 root@solaris11-1:~# ipadm create-ip net3 root@solaris11-1:~# ipadm show-addr
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8
lo0/v6 static ok ::1/128 root@solaris11-1:~# ipadm create-addr -T dhcp net0 net0/v4
root@solaris11-1:~# ipadm create-addr -T dhcp net1
net1/v4
root@solaris11-1:~# ipadm create-addr -T dhcp net2
Networking
net2/v4
root@solaris11-1:~# ipadm create-addr -T dhcp net3
net3/v4
root@solaris11-1:~# ipadm show-addr | grep v4
ADDROBJ TYPE STATE ADDR
lo0/v4 static ok 127.0.0.1/8 net0/v4 dhcp ok 192.168.1.108/24 net1/v4 dhcp ok 192.168.1.106/24 net2/v4 dhcp ok 192.168.1.109/24 net3/v4 dhcp ok 192.168.1.107/24 root@solaris11-1:~#
Excellent! We've completed our study of link aggregation.
An overview of the recipe
In this section, we learned about both types of link aggregation. The main advantage is the performance because it puts all interfaces together, hides them, and presents only the final logical object: the link aggregation object. For external hosts, this works as there was only a single interface on the system. Furthermore, we saw how to monitor, modify, and delete aggregations.
