xref: /freebsd/sbin/etherswitchcfg/etherswitchcfg.8 (revision 955c8cbb4960e6cf3602de144b1b9154a5092968)
1.\" $FreeBSD$
2.Dd December 15, 2011
3.Dt ETHERSWITCHCFG 8
4.Os
5.Sh NAME
6.Nm etherswitchcfg
7.Nd configure a built-in Ethernet switch
8.Sh SYNOPSIS
9.Nm
10.Op Fl "f control file"
11.Ar info
12.Nm
13.Op Fl "f control file"
14.Ar phy
15.Ar phy.register[=value]
16.Nm
17.Op Fl "f control file"
18.Ar port%d
19.Ar command parameter
20.Nm
21.Op Fl "f control file"
22.Ar reg
23.Ar register[=value]
24.Nm
25.Op Fl "f control file"
26.Ar vlangroup%d
27.Ar command parameter
28.Sh DESCRIPTION
29The
30.Nm
31utility is used to configure an Ethernet switch built into the system.
32.Nm
33accepts a number of options:
34.Bl -tag -width ".Fl f" -compact
35.It Fl "f control file"
36Specifies the
37.Xr etherswitch 4
38control file that represents the switch to be configured.
39It defaults to
40.Li /dev/etherswitch0 .
41.It Fl m
42When reporting port information, also list available media options for
43that port.
44.It Fl v
45Produce more verbose output.
46Without this flag, lines that represent inactive or empty configuration
47options are omitted.
48.El
49.Ss phy
50The phy command provides access to the registers of the PHYs attached
51to or integrated into the switch controller.
52PHY registers are specified as phy.register,
53where
54.Ar phy
55is usually the port number, and
56.Ar register
57is the register number.
58Both can be provided as decimal, octal or hexadecimal numbers in any of the formats
59understood by
60.Xr strtol 4 .
61To set the register value, use the form instance.register=value.
62.Ss port
63The port command selects one of the ports of the switch.
64It supports the following commands:
65.Bl -tag -width ".Ar vlangroup number" -compact
66.It Ar vlangroup number
67Sets the VLAN group number that is used to process incoming frames that are not tagged.
68.It Ar media mediaspec
69Specifies the physical media configuration to be configured for a port.
70.It Ar mediaopt mediaoption
71Specifies a list of media options for a port. See
72.Xr ifconfig 8
73for details on
74.Ar media
75and
76.Ar mediaopt .
77.El
78.Ss reg
79The reg command provides access to the registers of the switch controller.
80.Ss vlangroup
81The vlangroup command selects one of the VLAN groups for configuration.
82It supports the following commands:
83.Bl -tag -width ".Ar vlangroup" -compact
84.It Ar vlan VID
85Sets the VLAN ID (802.1q VID) for this VLAN group.
86Frames transmitted on tagged member ports of this group will be tagged
87with this VID.
88Incoming frames carrying this tag will be forwarded according to the
89configuration of this VLAN group.
90.It Ar members port,...
91Configures which ports are to be a member of this VLAN group.
92The port numbers are given as a comma-separated list.
93Each port can optionally be followed by
94.Dq t
95to indicate that frames on this port are tagged.
96.El
97.Sh FILES
98.Bl -tag -width /dev/etherswitch? -compact
99.It Pa /dev/etherswitch?
100Control file for the ethernet switch driver.
101.El
102.Sh EXAMPLES
103Configure VLAN group 1 with a VID of 2 and makes ports 0 and 5 members,
104while excluding all other ports.
105Port 5 will send and receive tagged frames, while port 0 will be untagged.
106Incoming untagged frames on port 0 are assigned to vlangroup1.
107.Dl # etherswitchcfg vlangroup1 vlan 2 members 0,5t port0 vlangroup 1
108.Sh SEE ALSO
109.Xr etherswitch 4
110.Sh HISTORY
111.Nm
112first appeared in
113.Fx 10.0 .
114.Sh AUTHORS
115.An Stefan Bethke
116