Network virtualization and resource control introduces tools for observing traffic on a per-interface or per-flow basis. The next tasks show how to use options of the dladm and flowadm commands to obtain statistics on packet traffic. For full details on each command, refer to the following man pages:
VNIC statistics are useful for provisioning purposes, such as determining whether a system needs additional VNICs or possibly additional interfaces. You can also use VNIC traffic statistics to determine how well network consolidation onto a virtual network is working.
The task assumes that you have a working virtual network, such as the network configured in Configuring a Basic Virtual Network.
On the system where you create the virtual network, become superuser or assume the equivalent root role in the global zone.
To create and assign the root role, see How to Make root User Into a Role in System Administration Guide: Security Services.
Observe traffic flow over network interfaces
Before checking the flow usage on individual VNICs, you might want to view overall usage of the VNIC's underlying interface.
where link-name is the name of a currently plumbed interface, for example internal0.
# dladm show-link -s -i 5 internal0 LINK IPACKETS RBYTES IERRORS OPACKETS OBYTES OERRORS internal0 5315127 400738164 0 169526 29260024 0 LINK IPACKETS RBYTES IERRORS OPACKETS OBYTES OERRORS internal0 1 60 0 2 340 0 LINK IPACKETS RBYTES IERRORS OPACKETS OBYTES OERRORS internal0 17 1020 0 4 456 0 ^C |
To halt the display, press Ctrl-C.
Observe traffic flow over configured VNICs.
Use the following syntax for each VNIC in the virtual network. You must run this command in the global zone for all VNICs configured on the system.
# dladm show-link -s -i 5 vnic-link-name |
where vnic-name is the name of the VNIC whose traffic you want to observe.
You should receive output similar to the following:
# dladm show-link -s -i 5 vnic0 ipackets rbytes ierrors opackets obytes oerrors vnic0 537001 48104701 0 5 210 0 ipackets rbytes ierrors opackets obytes oerrors vnic0 3 270 0 0 0 0 ^C |
The output indicates that vnic0 has had both incoming packet (ipackets) and outgoing packet (opackets) traffic.
To halt the display, press Ctrl-C.
Flow statistics help you evaluate packet traffic on your network before assigning bandwidth and priorities to already configured flows. Like VNIC statistical information, flow statistics are also useful for provisioning and, possibly, for billing purposes.
This procedure assumes that you have configured flows, as described in Chapter 13, Configuring Resource Management on an Interface.
On the system where you configure flow control, become superuser or assume the equivalent root role in the global zone.
To create and assign the root role, see How to Make root User Into a Role in System Administration Guide: Security Services.
Observe packet flow statistics for a system that is configured with interface-based flow control.
The following example shows output for a system with two network interfaces that uses traditional bandwidth control. The system does not have a virtual network configured.
# flowadm show-flow -s FLOW IPACKETS RBYTES IERRORS OPACKETS OBYTES OERRORS net20 0 0 0 1723 72366 0 httpsflow 0 0 0 32932 3225851 0 httpflow 29 3982 0 42 20799 0 |
where
is a flow for all UDP traffic across interface 10.10.3.20/24 on the internal network.
is a flow for all secure HTTP traffic over interface 192.168.3.25 , which is connected to the external network
is a flow for all HTTP traffic over interface 192.168.3.25.
To halt the display, press Ctrl-C.