Go to main content

Managing Network Datalinks in Oracle® Solaris 11.3

Exit Print View

Updated: December 2017
 
 

Use Case: Configuring Flows for a VLAN

This section provides an example to show how to configure flows for a VLAN that is assigned to a zone. The zone has multiple services such as production, replication, and backup running over the same VLAN link. This example shows provisioning of the link's bandwidth among these services by using flows.

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

    root@solaris:~# dladm show-link
    LINK     CLASS     MTU     STATE     OVER
    net0     phys      1500    up        --         
    net1     phys      1500    up        --        
    net2     phys      1500    up        --
    root@solaris:~# dladm create-vnic -v 101 -l net0 vnic1
  2. Create a zone named zone1 and assign the 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=vnic1
    zonecfg:zone1:net> end
    zonecfg:zone1> verify
    zonecfg:zone1> commit
    zonecfg:zone1> exit
    root@solaris# zoneadm -z zone1 boot
  3. Log in to the zone and assign IP address for the VLAN VNIC.

    root@solaris# zlogin zone1
    root@zone1# ipadm create-ip vnic1
    root@zone1:~# ipadm create-addr -a 192.0.2.1 vnic1
  4. Configure flows for different services on the zone.

    root@zone1:~# flowadm add-flow -a local_ip=192.0.2.1,local_port=80  \
    -p maxbw=500M,priority=high -l vnic1 flow_prod
    root@zone1:~# flowadm add-flow -a local_ip=192.0.2.1,local_port=138 \
    -p maxbw=250M,priority=medium -l vnic1 flow_repl
    root@zone1:~# flowadm add-flow -a local_ip=192.0.2.1,local_port=21 \
    -p maxbw=250M,priority=low -l vnic1 flow_bkup

    Since multiple services are running over the same VLAN, provisioning the bandwidth by using flows helps to manage the network resources efficiently.

  5. Display the flows that are configured.

    root@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     --       --     -- 
  6. Display the properties that are set for the flows.

    root@zone1:~# flowadm show-flowprop
    FLOW        PROPERTY       PERM VALUE          DEFAULT        POSSIBLE
    flow_prod   maxbw          rw   500            --             --
    flow_prod   priority       rw   high           medium         low,medium,high
    flow_prod   hwflow         r-   off            --             on,off
    flow_repl   maxbw          rw   250            --             --
    flow_repl   priority       rw   medium         medium         low,medium,high
    flow_repl   hwflow         r-   off            --             on,off
    flow_bkup   maxbw          rw   250            --             --
    flow_bkup   priority       rw   low            medium         low,medium,high
    flow_bkup   hwflow         r-   off            --             on,off