Crossbow Administration via Webmin
Crossbow beta bits can be now obtained from Download. The new features in this release are listed in What's New.
In the previous entry I touched upon additions to Webmin to work with crossbow components - VNIC and Flow. In this entry I am going to walk through the different crossbow-related administrative tasks that can be carried out using Webmin. Note that the modules that have been added to Webmin are prototype modules and are not available in the Webmin packages that are installed with any Solaris release (including OpenSolaris) or obtained from other sources. The Crossbow-aware Webmin packages are only available from the Crossbow download site
Starting Webmin
For detailed instructions refer to Webmin URL above. Briefly, you can start webmin as:
# cd /usr/sfw/lib/webmin
# ./setup.sh
This starts up webmin on port 10000 by default. It also uses root as the admin login and also root's passwd. You can check that the service is online using:
# svcs -a | grep webmin
online 21:47:30 svc:/application/management/webmin:default
Login to the webmin server from a browser using http://hostname:10000 (remotely) or http://localhost:10000 (locally), where hostname or localhost is the crossbow system being administered.
From the main menu select Network Virtualization and Resource Management - Project Crossbow from the Networking section. The following screen show up:
(To view the images clearly, you should be able to right-click on the image, select View Image and click on the resulting image to magnify. If I can update the images to a better resolution, I'll follow-up.)

Crossbow Introduction
Clicking on the crossbow icon provides a summary of the features provided by Crossbow and pointers for obtaining further information. The screen looks like

Crossbow Virtual NIC (VNIC)
Clicking on the VNIC icon from the main page provides a list of devices and VNICs on the system, e.g.

Creating a Virtual NIC (VNIC)
Click on the device on which the VNIC needs to be created. A VNIC creation screen is brought up which prompts for information that can be specified for the new VNIC. The following screen shows an example of creating a VNIC on bge1 with a bandwidth of 500 Mbps

Clicking on Create creates the VNIC on bge1 with an automatically generated MAC address and the specified bandwidth as

Modifying VNIC property
Click on the bandwidth value for the VNIC which brings up the following screen that prompts for a new value

Clicking on Update after entering the new value updates the VNIC's bandwidth, in this case to 200 Mbps

CPU bindings for a VNIC can be modified in the same manner (i.e. by clicking on the value and providing a new one.)
Displaying a VNIC information
Once a VNIC is created it can be plumbed using ifconfig(1M) just as configuring a NIC. In this example we plumb and assign an address to vnic1
# ifconfig vnic1 plumb 10.10.11.1/24 broadcast + up
Clicking on vnic1 from the VNIC main page will show this information as:

Creating an Etherstub
Clicking on Create Ethernet Stub creates an etherstub as

A VNIC can be created on this etherstub by clicking on the etherstub and providing information for the new VNIC, in this example we create a VNIC on etherstub1without specifying any properties

Clicking on Create creates the VNIC and adds it to the list of VNICs anchored by etherstub1 as

Deleting a Virtual NIC (VNIC)
Click on the VNIC that needs to be deleted (only a VNIC that is not plumbed can be deleted). In this example clicking on vnic2 brings up

Clicking on Delete deletes vnic2 as seen in

Deleting an Etherstub
Once all the VNICs that are anchored on an etherstub are deleted, the etherstub can be deleted by clicking on it. Since we have deleted vnic2, clicking on etherstub1 brings up

Clicking on Delete Ethernet Stub deletes etherstub1 as seen in

Flows
Clicking on Flows from the main page lists all the links on the system along with any existing flows

Adding a Flow
Clicking on the link on which a flow needs to be created shows up the following to collect information about the flow, i.e. attributes and properties, if any . Clicking on bge0 to add a TCP flow

Clicking on vnic1 to add a UDP flow

As a result we have two flows as seen in

Modifying properties for a Flow
This is similar to modifying properties for a VNIC, click on the value and input the new value in the resulting screen and Update.
Displaying and Deleting a Flow
Clicking on a flow name displays its attributes and properties. Additionally, it also provides the option to delete the flow. In this example clicking on udp_flow shows

Clicking on Delete Flow deletes udp_flow as seen in

Statistics and Logging
Clicking on Logging from the main page displays current cumulative statistics for all the links and flows, e.g

Enable Logging
Logging statistics for links and flows can be enabled by clicking on Enable Logging. This prompts for the log file to be used

In this example we are providing /var/tmp/lfile as the log file.
Displaying historical statistics
By clicking on a link or flow we can see historical information gathered in a log file for that entity. E.g if we select bge0 we are prompted for the log file which we need to look at (by default it is the log file we specified when enabling logging as mentioned above),

Having selected the log file we then can specify the date (from a drop down list) we are interested in, i.e

following this we can specify a time range (start time and end time from drop down lists) available for the selected date from

After selecting the time range, a graph will be plotted (in this example we select information about bge0 on 3/20/2008 from 21:38:08 to 21:57:46) such as:

Similarly, graphs can be plotted for VNICs and Flows. The graph is plotted using gnuplot and pnmtojpeg. By default, the plotting scripts look for gnuplot in /opt/sfw/bin and for pnmtojpeg in /opt/sfw/netpbm/bin, if you have these in a different location, update /usr/sfw/lib/webmin/netvirt/netvirt.conf to modify the path. If you don't have these utilities, you can get them by adding SFWgplot and SFWnpbm packages (these two also require SFWgcmn and SFWgcc34l). These additional packages should be available from Sun's freeware site or from the iso images available from the crossbow download site.
Disable Logging
Logging statistics for links and flows can be disabled by clicking on Disable Logging from the main logging page, which disables logging after confirming with

Future Work
This is just to demonstrate the use of Webmin to administer crossbow. Apart from integrating these modules to the Webmin package (after productizing the modules), there is a lot that can be done in this space including graphical interface (with click and drop) to create vnics (virtual machines, in general), flows etc. and integrating statistics for VNICs and flows into monitoring tools among others. If folks are interested in contributing towards this please send ideas, proposals etc. to crossbow-discuss@opensolaris.org