This section contains uses cases that show different ways that you can use VLAN technology.
This sample case shows how you can combine link aggregations and VLANs for your network to provide high availability to the VLANs. At the end of the process, the system has 8 operational VLANs configured on a link aggregation.
$ 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 -- $ ipadm delete-ip net0 $ ipadm delete-ip net1 $ ipadm delete-ip net2 $ ipadm delete-ip net3 $ dladm create-aggr -P L2,L3 -l net0 -l net1 -l net2 -l net3 default0 $ dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- net1 phys 1500 up -- net2 phys 1500 up -- net3 phys 1500 up -- default0 aggr 1500 up net0 net1 net2 net3 $ ipadm create-ip default0 $ ipadm create-addr -a 203.0.113.4/24 default0 $ dladm create-vlan -v 2 -l default0 orange0 $ dladm create-vlan -v 3 -l default0 green0 $ dladm create-vlan -v 4 -l default0 blue0 $ dladm create-vlan -v 5 -l default0 white0 $ dladm create-vlan -v 6 -l default0 yellow0 $ dladm create-vlan -v 7 -l default0 red0 $ dladm create-vlan -v 8 -l default0 cyan0 $ dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- net1 phys 1500 up -- net2 phys 1500 up -- net3 phys 1500 up -- default0 aggr 1500 up net0 net1 net2 net3 orange0 vlan 1500 up default0 green0 vlan 1500 up default0 blue0 vlan 1500 up default0 white0 vlan 1500 up default0 yellow0 vlan 1500 up default0 red0 vlan 1500 up default0 cyan0 vlan 1500 up default0 $ dladm show-vlan LINK VID SVID PVLAN-TYPE FLAGS OVER orange0 2 -- -- ----- default0 green0 3 -- -- ----- default0 blue0 4 -- -- ----- default0 white0 5 -- -- ----- default0 yellow0 6 -- -- ----- default0 red0 7 -- -- ----- default0 cyan0 8 -- -- ----- default0 $ ipadm create-ip orange0 $ ipadm create-ip green0 $ ipadm create-ip blue0 $ ipadm create-ip white0 $ ipadm create-ip yellow0 $ ipadm create-ip red0 $ ipadm create-ip cyan0 $ ipadm create-addr -a 203.0.113.5/24 orange0 $ ipadm create-addr -a 203.0.113.6/24 green0 $ ipadm create-addr -a 203.0.113.7/24 blue0 $ ipadm create-addr -a 203.0.113.8/24 white0 $ ipadm create-addr -a 203.0.113.9/24 yellow0 $ ipadm create-addr -a 203.0.113.10/24 red0 $ ipadm create-addr -a 203.0.113.11/24 cyan0
This case shows how to configure flows for a VLAN that is assigned to a non-global zone. The zone has multiple services such as production, replication, and backup running over the same VLAN link. Flows are configured to provision the link's bandwidth among these services. In this virtualization setup, a VNIC is used and configured as a VLAN.
solaris:~$ dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- net1 phys 1500 up -- net2 phys 1500 up -- solaris:~$ dladm create-vnic -v 101 -l net0 vnic1 solaris$ zonecfg -z zone1 Use 'create' to begin configuring a new zone. zonecfg:zone1> create -t SYSsolaris zonecfg:zone1> add net zonecfg:zone1:net> set physical=vnic1 zonecfg:zone1:net> end zonecfg:zone1> verify zonecfg:zone1> commit zonecfg:zone1> exit solaris$ zoneadm -z zone1 boot solaris$ zlogin zone1 zone1$ ipadm create-ip vnic1 zone1:~$ ipadm create-addr -a 192.0.2.1 vnic1 zone1:~$ flowadm add-flow -a local_ip=192.0.2.1,local_port=80 \ -p max-bw=500M,priority=high -l vnic1 flow_prod zone1:~$ flowadm add-flow -a local_ip=192.0.2.1,local_port=138 \ -p max-bw=250M,priority=medium -l vnic1 flow_repl zone1:~$ flowadm add-flow -a local_ip=192.0.2.1,local_port=21 \ -p max-bw=250M,priority=low -l vnic1 flow_bkup zone1:~$ flowadm FLOW LINK PROTO LADDR LPORT RADDR RPORT DSFLD flow_prod vnic1 -- 192.0.2.1 80 -- -- -- flow_repl vnic1 -- 192.0.2.1 138 -- -- -- flow_bkup vnic1 -- 192.0.2.1 21 -- -- -- zone1:~$ flowadm show-flowprop FLOW PROPERTY PERM VALUE DEFAULT POSSIBLE flow_prod max-bw rw 500 -- -- flow_prod priority rw high medium low,medium,high flow_prod hwflow r- off -- on,off flow_repl max-bw rw 250 -- -- flow_repl priority rw medium medium low,medium,high flow_repl hwflow r- off -- on,off flow_bkup max-bw rw 250 -- -- flow_bkup priority rw low medium low,medium,high flow_bkup hwflow r- off -- on,off
This example shows how to configure bandwidth limit on the VLAN VNICs to provision the bandwidth of the physical link among the VLAN VNICs.
Three services run in different zones that share the same physical link. One VLAN VNIC is assigned for each service in the zones. The bandwidth of the VNIC is configured to provision the bandwidth of the physical link. This ensures that the available network resources are efficiently used.
solaris$ dladm show-link LINK CLASS MTU STATE OVER net0 phys 1500 up -- solaris$ dladm create-vnic -v 10 -l net0 vnic_prod solaris$ dladm create-vnic -v 11 -l net0 vnic_repl solaris$ dladm create-vnic -v 12 -l net0 vnic_bkup solaris$ dladm show-vnic LINK OVER SPEED MACADDRESS MACADDRTYPE IDS vnic_prod net0 1000 2:8:20:35:b:9a random VID:10 vnic_repl net0 1000 2:8:20:fa:94:57 random VID:11 vnic_bkup net0 1000 2:8:20:51:1c:4a random VID:12 solaris$ dladm set-linkprop -p max-bw=1G vnic_prod solaris$ dladm set-linkprop -p max-bw=500M vnic_repl solaris$ dladm set-linkprop -p max-bw=200M vnic_bkup solaris$ zonecfg -z zone1 Use 'create' to begin configuring a new zone. zonecfg:zone1> create -t SYSsolaris zonecfg:zone1> add net zonecfg:zone1:net> set physical=vnic_prod zonecfg:zone1:net> end zonecfg:zone1> verify zonecfg:zone1> commit zonecfg:zone1> exit solaris$ zoneadm -z zone1 boot solaris$ zlogin zone1 zone1$ ipadm create-ip vnic_prod zone1:~$ ipadm create-addr -a 192.0.2.1 vnic_prod vnic_prod/v4 solaris$ zoneadm -z zone1 reboot solaris$ zonecfg -z zone2 Use 'create' to begin configuring a new zone. zonecfg:zone2> create -t SYSsolaris zonecfg:zone2> add net zonecfg:zone2:net> set physical=vnic_repl zonecfg:zone2:net> end zonecfg:zone2> verify zonecfg:zone2> commit zonecfg:zone2> exit solaris$ zoneadm -z zone2 boot solaris$ zlogin zone2 zone2$ ipadm create-ip vnic_repl zone2:~$ ipadm create-addr -a 192.0.2.1 vnic_repl/v4 solaris$ zonecfg -z zone3 Use 'create' to begin configuring a new zone. zonecfg:zone3> create -t SYSsolaris zonecfg:zone3> add net zonecfg:zone3:net> set physical=vnic_bkup zonecfg:zone3:net> end zonecfg:zone3> verify zonecfg:zone3> commit zonecfg:zone3> exit solaris$ zoneadm -z zone3 boot solaris$ zlogin zone3 zone3$ ipadm create-ip vnic_bkup zone3:~$ ipadm create-addr -a 192.0.2.1 vnic_bkup/v4