]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - sbin/etherswitchcfg/etherswitchcfg.8
Merge ACPICA 20120711.
[FreeBSD/FreeBSD.git] / sbin / etherswitchcfg / etherswitchcfg.8
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
29 The
30 .Nm
31 utility is used to configure an Ethernet switch built into the system.
32 .Nm
33 accepts a number of options:
34 .Bl -tag -width ".Fl f" -compact
35 .It Fl "f control file"
36 Specifies the
37 .Xr etherswitch 4
38 control file that represents the switch to be configured.
39 It defaults to
40 .Li /dev/etherswitch0 .
41 .It Fl m
42 When reporting port information, also list available media options for
43 that port.
44 .It Fl v
45 Produce more verbose output.
46 Without this flag, lines that represent inactive or empty configuration
47 options are omitted.
48 .El
49 .Ss phy
50 The phy command provides access to the registers of the PHYs attached
51 to or integrated into the switch controller.
52 PHY registers are specified as phy.register,
53 where
54 .Ar phy
55 is usually the port number, and
56 .Ar register
57 is the register number.
58 Both can be provided as decimal, octal or hexadecimal numbers in any of the formats
59 understood by
60 .Xr strtol 4 .
61 To set the register value, use the form instance.register=value.
62 .Ss port
63 The port command selects one of the ports of the switch.
64 It supports the following commands:
65 .Bl -tag -width ".Ar vlangroup number" -compact
66 .It Ar vlangroup number
67 Sets the VLAN group number that is used to process incoming frames that are not tagged.
68 .It Ar media mediaspec
69 Specifies the physical media configuration to be configured for a port.
70 .It Ar mediaopt mediaoption
71 Specifies a list of media options for a port. See
72 .Xr ifconfig 8
73 for details on
74 .Ar media
75 and
76 .Ar mediaopt .
77 .El
78 .Ss reg
79 The reg command provides access to the registers of the switch controller.
80 .Ss vlangroup
81 The vlangroup command selects one of the VLAN groups for configuration.
82 It supports the following commands:
83 .Bl -tag -width ".Ar vlangroup" -compact
84 .It Ar vlan VID
85 Sets the VLAN ID (802.1q VID) for this VLAN group.
86 Frames transmitted on tagged member ports of this group will be tagged
87 with this VID.
88 Incoming frames carrying this tag will be forwarded according to the
89 configuration of this VLAN group.
90 .It Ar members port,...
91 Configures which ports are to be a member of this VLAN group.
92 The port numbers are given as a comma-separated list.
93 Each port can optionally be followed by
94 .Dq t
95 to 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?
100 Control file for the ethernet switch driver.
101 .El
102 .Sh EXAMPLES
103 Configure VLAN group 1 with a VID of 2 and makes ports 0 and 5 members,
104 while excluding all other ports.
105 Port 5 will send and receive tagged frames, while port 0 will be untagged.
106 Incoming 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
112 first appeared in
113 .Fx 10.0 .
114 .Sh AUTHORS
115 .An Stefan Bethke