Sun Jul 19 14:43:35 2020 UTC ()
Remove unused Pp. Sort SEE ALSO.


(wiz)
diff -r1.19 -r1.20 src/sbin/brconfig/brconfig.8

cvs diff -r1.19 -r1.20 src/sbin/brconfig/brconfig.8 (switch to unified diff)

--- src/sbin/brconfig/brconfig.8 2020/07/19 14:39:42 1.19
+++ src/sbin/brconfig/brconfig.8 2020/07/19 14:43:35 1.20
@@ -1,282 +1,281 @@ @@ -1,282 +1,281 @@
1.\" $NetBSD: brconfig.8,v 1.19 2020/07/19 14:39:42 maxv Exp $ 1.\" $NetBSD: brconfig.8,v 1.20 2020/07/19 14:43:35 wiz Exp $
2.\" 2.\"
3.\" Copyright 2001 Wasabi Systems, Inc. 3.\" Copyright 2001 Wasabi Systems, Inc.
4.\" All rights reserved. 4.\" All rights reserved.
5.\" 5.\"
6.\" Written by Jason R. Thorpe for Wasabi Systems, Inc. 6.\" Written by Jason R. Thorpe for Wasabi Systems, Inc.
7.\" 7.\"
8.\" Redistribution and use in source and binary forms, with or without 8.\" Redistribution and use in source and binary forms, with or without
9.\" modification, are permitted provided that the following conditions 9.\" modification, are permitted provided that the following conditions
10.\" are met: 10.\" are met:
11.\" 1. Redistributions of source code must retain the above copyright 11.\" 1. Redistributions of source code must retain the above copyright
12.\" notice, this list of conditions and the following disclaimer. 12.\" notice, this list of conditions and the following disclaimer.
13.\" 2. Redistributions in binary form must reproduce the above copyright 13.\" 2. Redistributions in binary form must reproduce the above copyright
14.\" notice, this list of conditions and the following disclaimer in the 14.\" notice, this list of conditions and the following disclaimer in the
15.\" documentation and/or other materials provided with the distribution. 15.\" documentation and/or other materials provided with the distribution.
16.\" 3. All advertising materials mentioning features or use of this software 16.\" 3. All advertising materials mentioning features or use of this software
17.\" must display the following acknowledgement: 17.\" must display the following acknowledgement:
18.\" This product includes software developed for the NetBSD Project by 18.\" This product includes software developed for the NetBSD Project by
19.\" Wasabi Systems, Inc. 19.\" Wasabi Systems, Inc.
20.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse 20.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse
21.\" or promote products derived from this software without specific prior 21.\" or promote products derived from this software without specific prior
22.\" written permission. 22.\" written permission.
23.\" 23.\"
24.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 24.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
25.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 25.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
26.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 26.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
27.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 27.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC
28.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 28.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
29.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 29.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
30.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 30.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
31.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 31.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
32.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 32.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
33.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 33.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
34.\" POSSIBILITY OF SUCH DAMAGE. 34.\" POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.Dd July 19, 2020 36.Dd July 19, 2020
37.Dt BRCONFIG 8 37.Dt BRCONFIG 8
38.Os 38.Os
39.Sh NAME 39.Sh NAME
40.Nm brconfig 40.Nm brconfig
41.Nd configure network bridge parameters 41.Nd configure network bridge parameters
42.Sh SYNOPSIS 42.Sh SYNOPSIS
43.Nm 43.Nm
44.Fl a 44.Fl a
45.Nm 45.Nm
46.Ar bridge 46.Ar bridge
47.Nm 47.Nm
48.Ar bridge 48.Ar bridge
49.Ar command 49.Ar command
50.Op Ar args ... 50.Op Ar args ...
51.Sh DESCRIPTION 51.Sh DESCRIPTION
52The 52The
53.Nm 53.Nm
54utility is used to configure network bridge parameters and retrieve 54utility is used to configure network bridge parameters and retrieve
55network bridge parameters and status from the kernel. 55network bridge parameters and status from the kernel.
56The bridging function is implemented by the 56The bridging function is implemented by the
57.Xr bridge 4 57.Xr bridge 4
58driver. 58driver.
59.Pp 59.Pp
60A network bridge creates a logical link between two or more 60A network bridge creates a logical link between two or more
61IEEE 802 networks that use the same (or 61IEEE 802 networks that use the same (or
62.Dq similar enough ) 62.Dq similar enough )
63framing format. 63framing format.
64For example, it is possible to bridge Ethernet 64For example, it is possible to bridge Ethernet
65and 802.11 networks together, but it is not possible to bridge 65and 802.11 networks together, but it is not possible to bridge
66Ethernet and Token Ring together. 66Ethernet and Token Ring together.
67.Pp 67.Pp
68Bridge interfaces are created using the 68Bridge interfaces are created using the
69.Xr ifconfig 8 69.Xr ifconfig 8
70command's 70command's
71.Dq create 71.Dq create
72sub-command. 72sub-command.
73All other bridge configuration is performed using 73All other bridge configuration is performed using
74.Nm . 74.Nm .
75.Pp 75.Pp
76The options are as follows: 76The options are as follows:
77.Bl -tag -width indent 77.Bl -tag -width indent
78.It Fl a 78.It Fl a
79Display the status of all bridge devices present on the system. 79Display the status of all bridge devices present on the system.
80This flag is mutually exclusive with all other sub-commands. 80This flag is mutually exclusive with all other sub-commands.
81.El 81.El
82.Pp 82.Pp
83All other operations require that a bridge be specified. 83All other operations require that a bridge be specified.
84If a bridge is specified with no sub-commands, 84If a bridge is specified with no sub-commands,
85the status of that bridge is displayed. 85the status of that bridge is displayed.
86The following sub-commands are available: 86The following sub-commands are available:
87.Pp 
88.Bl -tag -width indent 87.Bl -tag -width indent
89.It Cm up 88.It Cm up
90Start forwarding packets on the bridge. 89Start forwarding packets on the bridge.
91.It Cm down 90.It Cm down
92Stop forwarding packets on the bridge. 91Stop forwarding packets on the bridge.
93.It Cm add Ar interface 92.It Cm add Ar interface
94Add the interface named by 93Add the interface named by
95.Ar interface 94.Ar interface
96as a member of the bridge. 95as a member of the bridge.
97The interface is put into promiscuous mode 96The interface is put into promiscuous mode
98so that it can receive every packet sent on the network. 97so that it can receive every packet sent on the network.
99.It Cm delete Ar interface 98.It Cm delete Ar interface
100Remove the interface named by 99Remove the interface named by
101.Ar interface 100.Ar interface
102from the bridge. 101from the bridge.
103Promiscuous mode is disabled on the interface when 102Promiscuous mode is disabled on the interface when
104it is removed from the bridge. 103it is removed from the bridge.
105.It Cm addr 104.It Cm addr
106Display the addresses that have been learned by the bridge. 105Display the addresses that have been learned by the bridge.
107.It Cm maxaddr Ar size 106.It Cm maxaddr Ar size
108Set the size of the bridge address cache to 107Set the size of the bridge address cache to
109.Ar size . 108.Ar size .
110The default is 100 entries. 109The default is 100 entries.
111.It Cm timeout Ar seconds 110.It Cm timeout Ar seconds
112Set the timeout of address cache entries to 111Set the timeout of address cache entries to
113.Ar seconds 112.Ar seconds
114seconds. 113seconds.
115If 114If
116.Ar seconds 115.Ar seconds
117is zero, then address cache entries will not be expired. 116is zero, then address cache entries will not be expired.
118The default is 1200 seconds. 117The default is 1200 seconds.
119.It Cm deladdr Ar address 118.It Cm deladdr Ar address
120Delete 119Delete
121.Ar address 120.Ar address
122from the address cache. 121from the address cache.
123.It Cm flush 122.It Cm flush
124Delete all dynamically-learned addresses from the address cache. 123Delete all dynamically-learned addresses from the address cache.
125.It Cm flushall 124.It Cm flushall
126Delete all addresses, including static addresses, from the address cache. 125Delete all addresses, including static addresses, from the address cache.
127.It Cm discover Ar interface 126.It Cm discover Ar interface
128Mark an interface as a 127Mark an interface as a
129.Dq discovering 128.Dq discovering
130interface. 129interface.
131When the bridge has no address cache entry 130When the bridge has no address cache entry
132(either dynamic or static) 131(either dynamic or static)
133for the destination address of a packet, 132for the destination address of a packet,
134the bridge will forward the packet to all 133the bridge will forward the packet to all
135member interfaces marked as 134member interfaces marked as
136.Dq discovering . 135.Dq discovering .
137This is the default for all interfaces added to a bridge. 136This is the default for all interfaces added to a bridge.
138.It Cm -discover Ar interface 137.It Cm -discover Ar interface
139Clear the 138Clear the
140.Dq discovering 139.Dq discovering
141attribute on a member interface. 140attribute on a member interface.
142For packets without the 141For packets without the
143.Dq discovering 142.Dq discovering
144attribute, the only packets forwarded on the interface are broadcast 143attribute, the only packets forwarded on the interface are broadcast
145or multicast packets and packets for which the destination address 144or multicast packets and packets for which the destination address
146is known to be on the interface's segment. 145is known to be on the interface's segment.
147.It Cm ipf 146.It Cm ipf
148Enable packet filtering with 147Enable packet filtering with
149.Xr pfil 9 148.Xr pfil 9
150on the bridge. 149on the bridge.
151The current implementation passes 150The current implementation passes
152all ARP and RARP packets through the bridge 151all ARP and RARP packets through the bridge
153while filtering IP and IPv6 packets through the configured packet 152while filtering IP and IPv6 packets through the configured packet
154filter, such as 153filter, such as
155.Xr npf 7 . 154.Xr npf 7 .
156Other packet types are blocked. 155Other packet types are blocked.
157.It Cm learn Ar interface 156.It Cm learn Ar interface
158Mark an interface as a 157Mark an interface as a
159.Dq learning 158.Dq learning
160interface. 159interface.
161When a packet arrives on such an interface, the source 160When a packet arrives on such an interface, the source
162address of the packet is entered into the address cache as being a 161address of the packet is entered into the address cache as being a
163destination address on the interface's segment. 162destination address on the interface's segment.
164This is the default for all interfaces added to a bridge. 163This is the default for all interfaces added to a bridge.
165.It Cm -learn Ar interface 164.It Cm -learn Ar interface
166Clear the 165Clear the
167.Dq learning 166.Dq learning
168attribute on a member interface. 167attribute on a member interface.
169.It Cm static Ar interface address 168.It Cm static Ar interface address
170Add a static entry into the address cache pointing to 169Add a static entry into the address cache pointing to
171.Ar interface . 170.Ar interface .
172Static entries are never aged out of the cache or replaced, even if the address 171Static entries are never aged out of the cache or replaced, even if the address
173is seen on a different interface. 172is seen on a different interface.
174.It Cm stp Ar interface 173.It Cm stp Ar interface
175Enable Spanning Tree protocol on 174Enable Spanning Tree protocol on
176.Ar interface . 175.Ar interface .
177The 176The
178.Xr bridge 4 177.Xr bridge 4
179driver has support for the IEEE 802.1D Spanning Tree protocol (STP). 178driver has support for the IEEE 802.1D Spanning Tree protocol (STP).
180Spanning Tree is used to detect and remove loops in a network topology. 179Spanning Tree is used to detect and remove loops in a network topology.
181.It Cm -stp Ar interface 180.It Cm -stp Ar interface
182Disable Spanning Tree protocol on 181Disable Spanning Tree protocol on
183.Ar interface . 182.Ar interface .
184This is the default for all interfaces added to a bridge. 183This is the default for all interfaces added to a bridge.
185.It Cm maxage Ar seconds 184.It Cm maxage Ar seconds
186Set the time that a Spanning Tree protocol configuration is valid. 185Set the time that a Spanning Tree protocol configuration is valid.
187The default is 20 seconds. 186The default is 20 seconds.
188The minimum is 1 second and the maximum is 255 seconds. 187The minimum is 1 second and the maximum is 255 seconds.
189.It Cm fwddelay Ar seconds 188.It Cm fwddelay Ar seconds
190Set the time that must pass before an interface begins forwarding 189Set the time that must pass before an interface begins forwarding
191packets when Spanning Tree is enabled. 190packets when Spanning Tree is enabled.
192The default is 15 seconds. 191The default is 15 seconds.
193The minimum is 1 second and the maximum is 255 seconds. 192The minimum is 1 second and the maximum is 255 seconds.
194.It Cm hellotime Ar seconds 193.It Cm hellotime Ar seconds
195Set the time between broadcasting of Spanning Tree protocol 194Set the time between broadcasting of Spanning Tree protocol
196configuration messages. 195configuration messages.
197The default is 2 seconds. 196The default is 2 seconds.
198The minimum is 1 second and the maximum is 255 seconds. 197The minimum is 1 second and the maximum is 255 seconds.
199.It Cm priority Ar value 198.It Cm priority Ar value
200Set the bridge priority for Spanning Tree. 199Set the bridge priority for Spanning Tree.
201The default is 32768. 200The default is 32768.
202Allowed numerical values range from 0 (highest priority) to 65535 201Allowed numerical values range from 0 (highest priority) to 65535
203(lowest priority). 202(lowest priority).
204.It Cm ifpriority Ar interface Ar value 203.It Cm ifpriority Ar interface Ar value
205Set the Spanning Tree priority of 204Set the Spanning Tree priority of
206.Ar interface 205.Ar interface
207to 206to
208.Ar value . 207.Ar value .
209The default is 128. 208The default is 128.
210The minimum is 0 and the maximum is 255. 209The minimum is 0 and the maximum is 255.
211.It Cm ifpathcost Ar interface Ar value 210.It Cm ifpathcost Ar interface Ar value
212Set the Spanning Tree path cost of 211Set the Spanning Tree path cost of
213.Ar interface 212.Ar interface
214to 213to
215.Ar value . 214.Ar value .
216The default is 55. 215The default is 55.
217The minimum is 0 and the maximum is 65535. 216The minimum is 0 and the maximum is 65535.
218.El 217.El
219.Sh EXAMPLES 218.Sh EXAMPLES
220The following, when placed in the file 219The following, when placed in the file
221.Pa /etc/ifconfig.bridge0 , 220.Pa /etc/ifconfig.bridge0 ,
222will cause a bridge called 221will cause a bridge called
223.Sq bridge0 222.Sq bridge0
224to be created, add the interfaces 223to be created, add the interfaces
225.Sq ray0 224.Sq ray0
226and 225and
227.Sq fxp0 226.Sq fxp0
228to the bridge, and then enable packet forwarding. 227to the bridge, and then enable packet forwarding.
229Such a configuration could be used to implement a simple 228Such a configuration could be used to implement a simple
230802.11-to-Ethernet bridge (assuming the 802.11 interface is 229802.11-to-Ethernet bridge (assuming the 802.11 interface is
231in ad-hoc mode). 230in ad-hoc mode).
232.Bd -literal -offset indent 231.Bd -literal -offset indent
233create 232create
234!brconfig $int add ray0 add fxp0 up 233!brconfig $int add ray0 add fxp0 up
235.Ed 234.Ed
236.Pp 235.Pp
237Consider a system with two 4-port Ethernet boards. 236Consider a system with two 4-port Ethernet boards.
238The following placed in the file 237The following placed in the file
239.Pa /etc/ifconfig.bridge0 238.Pa /etc/ifconfig.bridge0
240will cause a bridge consisting of all 8 ports with Spanning Tree 239will cause a bridge consisting of all 8 ports with Spanning Tree
241enabled to be created: 240enabled to be created:
242.Bd -literal -offset indent 241.Bd -literal -offset indent
243create 242create
244!brconfig $int \e 243!brconfig $int \e
245 add tlp0 stp tlp0 \e 244 add tlp0 stp tlp0 \e
246 add tlp1 stp tlp1 \e 245 add tlp1 stp tlp1 \e
247 add tlp2 stp tlp2 \e 246 add tlp2 stp tlp2 \e
248 add tlp3 stp tlp3 \e 247 add tlp3 stp tlp3 \e
249 add tlp4 stp tlp4 \e 248 add tlp4 stp tlp4 \e
250 add tlp5 stp tlp5 \e 249 add tlp5 stp tlp5 \e
251 add tlp6 stp tlp6 \e 250 add tlp6 stp tlp6 \e
252 add tlp7 stp tlp7 \e 251 add tlp7 stp tlp7 \e
253 up 252 up
254.Ed 253.Ed
255.Sh SEE ALSO 254.Sh SEE ALSO
256.Xr bridge 4 , 255.Xr bridge 4 ,
257.Xr pf 4 , 256.Xr pf 4 ,
258.Xr ifconfig.if 5 , 257.Xr ifconfig.if 5 ,
259.Xr ifconfig 8 , 
260.Xr npf 7 , 258.Xr npf 7 ,
 259.Xr ifconfig 8 ,
261.Xr pfil 9 260.Xr pfil 9
262.Sh HISTORY 261.Sh HISTORY
263The 262The
264.Nm 263.Nm
265utility first appeared in 264utility first appeared in
266.Nx 1.6 . 265.Nx 1.6 .
267.Sh AUTHORS 266.Sh AUTHORS
268The 267The
269.Xr bridge 4 268.Xr bridge 4
270driver and 269driver and
271.Nm 270.Nm
272utility were originally written by 271utility were originally written by
273.An Jason L. Wright 272.An Jason L. Wright
274.Aq jason@thought.net 273.Aq jason@thought.net
275as part of an undergraduate independent study at the 274as part of an undergraduate independent study at the
276University of North Carolina at Greensboro. 275University of North Carolina at Greensboro.
277.Pp 276.Pp
278This version of the 277This version of the
279.Nm 278.Nm
280utility was written from scratch by 279utility was written from scratch by
281.An Jason R. Thorpe 280.An Jason R. Thorpe
282.Aq thorpej@wasabisystems.com . 281.Aq thorpej@wasabisystems.com .