Go to main content

Managing Network Datalinks in Oracle® Solaris 11.3

Exit Print View

Updated: December 2017
 
 

Use Case: Configuring Bandwidth for VLAN VNICs

This section shows an example to show how to configure bandwidth limit on the VLAN VNICs to provision the bandwidth of the physical link among the VLAN VNICs. In this example, there are three services running in different zones, which share the same physical link.

  1. Check the available links and create the VNIC VLANs over a specific link.

    root@solaris# dladm show-link
    LINK     CLASS     MTU     STATE     OVER
    net0     phys      1500    up        --         
    root@solaris# dladm create-vnic -v 10 -l net0 vnic_prod
    root@solaris# dladm create-vnic -v 11 -l net0 vnic_repl
    root@solaris# dladm create-vnic -v 12 -l net0 vnic_bkup
    root@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
  2. Assign bandwidth to all the VNICs.

    root@solaris# dladm set-linkprop -p maxbw=1G vnic_prod
    root@solaris# dladm set-linkprop -p maxbw=500M vnic_repl
    root@solaris# dladm set-linkprop -p maxbw=200M vnic_bkup
  3. Create a zone named zone1 and assign a VLAN VNIC to it.

    root@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
    root@solaris# zoneadm -z zone1 boot
  4. Log in to zone1 and configure the VNIC with an IP address.

    root@solaris# zlogin zone1
    root@zone1# ipadm create-ip vnic_prod
    root@zone1:~# ipadm create-addr -a 192.0.2.1 vnic_prod
    vnic_prod/v4
    root@solaris# zoneadm -z zone1 reboot
  5. Create a zone named zone2 and assign a VLAN VNIC to it.

    root@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
    root@solaris# zoneadm -z zone2 boot
  6. Log in to zone2 and configure the VNIC with an IP address.

    root@solaris# zlogin zone2
    root@zone2# ipadm create-ip vnic_repl
    root@zone2:~# ipadm create-addr -a 192.0.2.1 vnic_repl
    vnic_repl/v4
  7. Create a zone named zone3 and assign a VLAN VNIC to it.

    root@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
    root@solaris# zoneadm -z zone3 boot
  8. Log in to zone3 and configure the VNIC with an IP address.

    root@solaris# zlogin zone3
    root@zone3# ipadm create-ip vnic_bkup
    root@zone3:~# ipadm create-addr -a 192.0.2.1 vnic_bkup
    vnic_bkup/v4

In the example, 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.