From owner-svn-src-all@FreeBSD.ORG Tue Feb 11 13:33:03 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D507757; Tue, 11 Feb 2014 13:33:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7D40B1317; Tue, 11 Feb 2014 13:33:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1BDX3Fd005211; Tue, 11 Feb 2014 13:33:03 GMT (envelope-from brueffer@svn.freebsd.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1BDX39j005210; Tue, 11 Feb 2014 13:33:03 GMT (envelope-from brueffer@svn.freebsd.org) Message-Id: <201402111333.s1BDX39j005210@svn.freebsd.org> From: Christian Brueffer Date: Tue, 11 Feb 2014 13:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261772 - stable/10/sbin/etherswitchcfg X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Feb 2014 13:33:03 -0000 Author: brueffer Date: Tue Feb 11 13:33:03 2014 New Revision: 261772 URL: http://svnweb.freebsd.org/changeset/base/261772 Log: MFC: r261500 Add a license (1) and do some cleanup. Approved by: Stefan Bethke (original author, by private mail) (1) Modified: stable/10/sbin/etherswitchcfg/etherswitchcfg.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/etherswitchcfg/etherswitchcfg.8 ============================================================================== --- stable/10/sbin/etherswitchcfg/etherswitchcfg.8 Tue Feb 11 12:01:11 2014 (r261771) +++ stable/10/sbin/etherswitchcfg/etherswitchcfg.8 Tue Feb 11 13:33:03 2014 (r261772) @@ -1,4 +1,29 @@ +.\" Copyright (c) 2011-2012 Stefan Bethke. +.\" All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" .\" $FreeBSD$ +.\" .Dd September 20, 2013 .Dt ETHERSWITCHCFG 8 .Os @@ -35,13 +60,14 @@ The utility is used to configure an Ethernet switch built into the system. .Nm accepts a number of options: +.Pp .Bl -tag -width ".Fl f" -compact .It Fl "f control file" Specifies the .Xr etherswitch 4 control file that represents the switch to be configured. It defaults to -.Li /dev/etherswitch0 . +.Pa /dev/etherswitch0 . .It Fl m When reporting port information, also list available media options for that port. @@ -54,6 +80,7 @@ options are omitted. The config command provides access to global switch configuration parameters. It support the following commands: +.Pp .Bl -tag -width ".Ar vlan_mode mode" -compact .It Ar vlan_mode mode Sets the switch VLAN mode (depends on the hardware). @@ -74,6 +101,7 @@ To set the register value, use the form .Ss port The port command selects one of the ports of the switch. It supports the following commands: +.Pp .Bl -tag -width ".Ar pvid number" -compact .It Ar pvid number Sets the default port VID that is used to process incoming frames that are not tagged. @@ -88,8 +116,10 @@ for details on and .Ar mediaopt . .El +.Pp And the following flags (please note that not all flags -are supporterd by all switch drivers): +are supported by all switch drivers): +.Pp .Bl -tag -width ".Ar addtag" -compact .It Ar addtag Add VLAN tag to each packet sent by the port. @@ -100,7 +130,7 @@ Strip the VLAN tags from the packets sen .It Ar -striptag Disable the strip VLAN tag option. .It Ar firstlock -This options makes the switch port lock on the first MAC address it seems. +This options makes the switch port lock on the first MAC address it sees. After that, usually you need to reset the switch to learn different MAC addresses. .It Ar -firstlock @@ -125,6 +155,7 @@ The reg command provides access to the r .Ss vlangroup The vlangroup command selects one of the VLAN groups for configuration. It supports the following commands: +.Pp .Bl -tag -width ".Ar vlangroup" -compact .It Ar vlan VID Sets the VLAN ID (802.1q VID) for this VLAN group. @@ -142,13 +173,14 @@ to indicate that frames on this port are .Sh FILES .Bl -tag -width /dev/etherswitch? -compact .It Pa /dev/etherswitch? -Control file for the ethernet switch driver. +Control file for the Ethernet switch driver. .El .Sh EXAMPLES Configure VLAN group 1 with a VID of 2 and make ports 0 and 5 its members while excluding all other ports. Port 5 will send and receive tagged frames while port 0 will be untagged. Incoming untagged frames on port 0 are assigned to vlangroup1. +.Pp .Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 pvid 2 .Sh SEE ALSO .Xr etherswitch 4