James Carlson writes:
> Sowmini.Varadhan at Sun.COM writes:
> > a nit:
> >
> > > dladm show-bridge [-p] [-s [-i <interval>]] [<bridge-name>]
> >
> > should support the -o option, like the other show commands, i.e.,
> >
> > dladm show-bridge [-p] [-o field,..] [-s [-i <interval>]] [<bridge-name>]
>
> Good point. I'd modeled that one after the existing show-aggr, but I
> should have picked up the clearview/brussels change. Consider the
> proposal updated. ;-}
Your comment made me go back and update the spec in detail to show the
parameters that can be shown, and to add support for showing the
running bridging-related port status described in 802.1D, as well as
private interfaces used. The diffs against the original spec are
below, and the new spec is in the case directory as "spec.txt".
diff -r 5243e2e65184 bridging-spec.txt
--- a/bridging-spec.txt Mon Jan 28 16:55:42 2008 -0500
+++ b/bridging-spec.txt Tue Jan 29 11:04:44 2008 -0500
@@ -235,12 +235,36 @@ 1.1 New dladm subcommands
The options are the same as for the "create-bridge" subcommand.
- dladm show-bridge [-p] [-s [-i <interval>]] [<bridge-name>]
+ dladm show-bridge [-p] [-o field,...] [-s [-i <interval>]]
+ [<bridge-name>]
This subcommand shows the running status of bridges. When given
a bridge name, it shows the status of that one bridge. If no
bridge name is given, then it shows summary status of all
bridges on the system.
+
+ The '-o' option allows the user to specify a comma-separated
+ case-insensitive list of fields to display. The field name may
+ "all" to display all fields, or any combination of:
+
+ BRIDGE Assigned name of the bridge (same as
+ <bridge-name>, if provided)
+ BRIDGEID Bridge Identifier value (MAC + priority)
+ PRIORITY Configured priority value (-p)
+ BMAXAGE Configured bridge maximum age (-m)
+ BHELLOTIME Configured bridge hello time (-h)
+ BFWDDELAY Configured forwarding delay (-d)
+ FORCEPROTO Configured forced maximum protocol (-f)
+ TCTIME Time since last topology change in seconds
+ TCCOUNT Count of the number of topology changes
+ TCHANGE Topology change detected ("yes" or "no")
+ DESROOT Bridge Identifier of the root node (MAC + priority)
+ ROOTCOST Cost of the path to the root node
+ ROOTPORT Port used to reach root node
+ MAXAGE Maximum age value from root node
+ HELLOTIME Hello time value from root node
+ FWDDELAY Forward delay value from root node
+ HOLDTIME Minimum BPDU interval
Note the lack of a "-R" option here. It is not possible to list
bridge configuration information in an alternate root, in
@@ -251,7 +275,30 @@ 1.1 New dladm subcommands
but "reading" is not feasible because the repository on the
alternate root may be incompatible with the running system.
+ dladm show-bridge -P [-p] [-o field,...] [-s [-i <interval>]]
+ <bridge-name>
+
+ This variant of the show-bridge subcommand displays port-related
+ information for a single bridge instance. Note that configured
+ parameters are shown through show-linkprop. The relevant field
+ names for the "show-bridge -P" subcommand are:
+
+ PORT Link name
+ STATE "disabled", "listening", "learning",
+ "forwarding", or "blocking"
+ UPTIME Number of seconds since last reset or initialize
+ DESROOT Root Bridge Identifier (MAC + priority) seen
+ on this port
+ DESCOST Path cost to root node through designated port
+ DESBRIDGE Bridge Identifier (MAC + priority)
+ DESPORT Port ID and priority of port used to transmit
+ configuration messages for this port
+ TCACK Topology Change Acknowledge flag ("yes" or "no")
+
1.2 New dladm Link Properties
+
+ These may be used with the existing dladm set-linkprop,
+ reset-linkprop, and show-linkprop subcommands.
"stp"
@@ -590,6 +637,7 @@ 6. Interface Summary
Interface Stability Comments
--------- --------- --------
dladm *-bridge Committed
+ field names Committed dladm show-bridge -o
link properties Committed
kstats Volatile Should be raised later
/dev/bridge/ Committed Observability node
@@ -599,3 +647,6 @@ 6. Interface Summary
config/* Project Private SMF properties
bridge module Project Private Kernel bridging module
DLPI_BRIDGE Committed dlpi_open(3DLPI)
+ /var/run/bridge_door/
+ Project Private Doors interface to daemons
+ librstp.so.1 Project Private RSTP implementation
--
James Carlson, Solaris Networking <james.d.carlson at sun.com>
Sun Microsystems / 35 Network Drive 71.232W Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757 42.496N Fax +1 781 442 1677