]> git.proxmox.com Git - mirror_iproute2.git/blame - man/man8/bridge.8
bridge: fdb: add support for src_vni option
[mirror_iproute2.git] / man / man8 / bridge.8
CommitLineData
d04bc300
SH
1.TH BRIDGE 8 "1 August 2012" "iproute2" "Linux"
2.SH NAME
3bridge \- show / manipulate bridge addresses and devices
4.SH SYNOPSIS
5
6.ad l
7.in +8
8.ti -8
9.B bridge
10.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
11.BR help " }"
12.sp
13
14.ti -8
15.IR OBJECT " := { "
54e9c3a3 16.BR link " | " fdb " | " mdb " | " vlan " | " monitor " }"
d04bc300
SH
17.sp
18
19.ti -8
20.IR OPTIONS " := { "
21\fB\-V\fR[\fIersion\fR] |
527910c8 22\fB\-s\fR[\fItatistics\fR] |
db726379
RP
23\fB\-n\fR[\fIetns\fR] name |
24\fB\-b\fR[\fIatch\fR] filename |
3a1ca9a5 25\fB\-c\fR[\folor\fR] |
01842eb5 26\fB\-p\fR[\fIretty\fR] |
05758f5c
PS
27\fB\-j\fR[\fIson\fR] |
28\fB\-o\fR[\fIneline\fr] }
aa2f1335
VY
29
30.ti -8
31.BR "bridge link set"
fc31817d 32.B dev
aa2f1335
VY
33.IR DEV
34.IR " [ "
fc31817d 35.B cost
aa2f1335 36.IR COST " ] [ "
fc31817d
PS
37.B priority
38.IR PRIO " ] [ "
39.B state
d13d52d0 40.IR STATE " ] [ "
aa2f1335
VY
41.BR guard " { " on " | " off " } ] [ "
42.BR hairpin " { " on " | " off " } ] [ "
43.BR fastleave " { " on " | " off " } ] [ "
44.BR root_block " { " on " | " off " } ] [ "
f0f4ab60 45.BR learning " { " on " | " off " } ] [ "
674bb438 46.BR learning_sync " { " on " | " off " } ] [ "
f0f4ab60 47.BR flood " { " on " | " off " } ] [ "
22a98f51 48.BR hwmode " { " vepa " | " veb " } ] [ "
9208b4e7 49.BR mcast_flood " { " on " | " off " } ] [ "
8cfde5c9
RP
50.BR neigh_suppress " { " on " | " off " } ] [ "
51.BR vlan_tunnel " { " on " | " off " } ] [ "
05001bcf 52.BR isolated " { " on " | " off " } ] [ "
d13d52d0
NA
53.B backup_port
54.IR DEVICE " ] ["
55.BR nobackup_port " ] [ "
9208b4e7 56.BR self " ] [ " master " ]"
aa2f1335
VY
57
58.ti -8
59.BR "bridge link" " [ " show " ] [ "
fc31817d 60.B dev
aa2f1335 61.IR DEV " ]"
d04bc300
SH
62
63.ti -8
6e2e2cf0 64.BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
d04bc300 65.I LLADDR
fc31817d 66.B dev
d04bc300 67.IR DEV " { "
c6d0cfb5 68.BR local " | " static " | " dynamic " } [ "
c3ded6e4 69.BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ " sticky " ] [ "
fc31817d 70.B dst
7578ae88 71.IR IPADDR " ] [ "
c5b176e5
RP
72.B src_vni
73.IR SRC_VNI " ] ["
7578ae88
TR
74.B vni
75.IR VNI " ] ["
76.B port
77.IR PORT " ] ["
78.B via
79.IR DEVICE " ]"
d04bc300
SH
80
81.ti -8
82.BR "bridge fdb" " [ " show " ] [ "
fc31817d 83.B dev
7f10090b
NA
84.IR DEV " ] [ "
85.B br
86.IR BRDEV " ] [ "
87.B brport
88.IR DEV " ] [ "
89.B vlan
90.IR VID " ] [ "
91.B state
92.IR STATE " ]"
d04bc300 93
54e9c3a3
PP
94.ti -8
95.BR "bridge mdb" " { " add " | " del " } "
fc31817d 96.B dev
54e9c3a3
PP
97.IR DEV
98.B port
99.IR PORT
100.B grp
101.IR GROUP " [ "
6aac8617
NA
102.BR permanent " | " temp " ] [ "
103.B vid
104.IR VID " ] "
54e9c3a3
PP
105
106.ti -8
107.BR "bridge mdb show " [ "
fc31817d 108.B dev
54e9c3a3
PP
109.IR DEV " ]"
110
ab938710
VY
111.ti -8
112.BR "bridge vlan" " { " add " | " del " } "
fc31817d 113.B dev
ab938710 114.IR DEV
fc31817d 115.B vid
ab938710 116.IR VID " [ "
8652eeb3
RP
117.BR tunnel_info
118.IR TUNNEL_ID " ] [ "
fc31817d
PS
119.BR pvid " ] [ " untagged " ] [ "
120.BR self " ] [ " master " ] "
ab938710
VY
121
122.ti -8
8652eeb3 123.BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
fc31817d 124.B dev
ab938710
VY
125.IR DEV " ]"
126
d04bc300 127.ti -8
54e9c3a3 128.BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " ]"
d04bc300
SH
129
130.SH OPTIONS
131
132.TP
133.BR "\-V" , " -Version"
134print the version of the
135.B bridge
136utility and exit.
137
138.TP
139.BR "\-s" , " \-stats", " \-statistics"
a89d5329 140output more information. If this option
49572501 141is given multiple times, the amount of information increases.
d04bc300
SH
142As a rule, the information is statistics or some time values.
143
ba037267
NA
144.TP
145.BR "\-d" , " \-details"
146print detailed information about MDB router ports.
147
527910c8
VK
148.TP
149.BR "\-n" , " \-net" , " \-netns " <NETNS>
150switches
151.B bridge
152to the specified network namespace
153.IR NETNS .
154Actually it just simplifies executing of:
155
156.B ip netns exec
157.IR NETNS
158.B bridge
159.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
160.BR help " }"
161
162to
163
164.B bridge
165.RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
166.BR help " }"
167
9de8c6d9
WK
168.TP
169.BR "\-b", " \-batch " <FILENAME>
170Read commands from provided file or standard input and invoke them.
171First failure will cause termination of bridge command.
172
173.TP
174.BR "\-force"
175Don't terminate bridge command on errors in batch mode.
176If there were any errors during execution of the commands, the application
177return code will be non zero.
d04bc300 178
db726379 179.TP
ff1ab8ed
PS
180.BR \-c [ color ][ = { always | auto | never }
181Configure color output. If parameter is omitted or
182.BR always ,
183color output is enabled regardless of stdout state. If parameter is
184.BR auto ,
185stdout is checked to be a terminal before enabling color output. If parameter is
186.BR never ,
187color output is disabled. If specified multiple times, the last one takes
188precedence. This flag is ignored if
189.B \-json
190is also given.
db726379 191
01842eb5 192.TP
3a1ca9a5
SH
193.BR "\-j", " \-json"
194Output results in JavaScript Object Notation (JSON).
195
196.TP
197.BR "\-p", " \-pretty"
01842eb5
SH
198When combined with -j generate a pretty JSON output.
199
05758f5c
PS
200.TP
201.BR "\-o", " \-oneline"
202output each record on a single line, replacing line feeds
203with the
204.B '\e'
205character. This is convenient when you want to count records
206with
207.BR wc (1)
208or to
209.BR grep (1)
210the output.
211
01842eb5 212
d04bc300
SH
213.SH BRIDGE - COMMAND SYNTAX
214
215.SS
216.I OBJECT
217
aa2f1335
VY
218.TP
219.B link
220- Bridge port.
221
d04bc300 222.TP
5699275b 223.B fdb
d04bc300
SH
224- Forwarding Database entry.
225
54e9c3a3
PP
226.TP
227.B mdb
228- Multicast group database entry.
229
ab938710
VY
230.TP
231.B vlan
232- VLAN filter list.
233
d04bc300
SH
234.SS
235.I COMMAND
236
237Specifies the action to perform on the object.
238The set of possible actions depends on the object type.
239As a rule, it is possible to
240.BR "add" , " delete"
241and
242.B show
243(or
244.B list
245) objects, but some objects do not allow all of these operations
a89d5329 246or have some additional commands. The
d04bc300 247.B help
a89d5329 248command is available for all objects. It prints
d04bc300
SH
249out a list of available commands and argument syntax conventions.
250.sp
251If no command is given, some default command is assumed.
252Usually it is
253.B list
254or, if the objects of this class cannot be listed,
255.BR "help" .
256
aa2f1335
VY
257.SH bridge link - bridge port
258
259.B link
260objects correspond to the port devices of the bridge.
261
262.P
263The corresponding commands set and display port status and bridge specific
264attributes.
265
266.SS bridge link set - set bridge specific attributes on a port
267
268.TP
269.BI dev " NAME "
270interface name of the bridge port
271
272.TP
273.BI cost " COST "
274the STP path cost of the specified port.
275
276.TP
277.BI priority " PRIO "
a89d5329
278the STP port priority. The priority value is an unsigned 8-bit quantity
279(number between 0 and 255). This metric is used in the designated port an
aa2f1335
VY
280droot port selectio algorithms.
281
282.TP
283.BI state " STATE "
a89d5329
284the operation state of the port. This is primarily used by user space STP/RSTP
285implementation. One may enter a lowercased port state name, or one of the
286numbers below. Negative inputs are ignored, and unrecognized names return an
6b8c871d 287error.
aa2f1335
VY
288
289.B 0
a89d5329 290- port is DISABLED. Make this port completely inactive.
aa2f1335
VY
291.sp
292
293.B 1
7fab22ab 294- STP LISTENING state. Only valid if STP is enabled on the bridge. In this
3aa8f8cb 295state the port listens for STP BPDUs and drops all other traffic frames.
aa2f1335
VY
296.sp
297
298.B 2
a89d5329 299- STP LEARNING state. Only valid if STP is enabled on the bridge. In this
aa2f1335 300state the port will accept traffic only for the purpose of updating MAC
ac0817ef 301address tables.
aa2f1335
VY
302.sp
303
304.B 3
a89d5329 305- STP FORWARDING state. Port is fully active.
aa2f1335
VY
306.sp
307
308.B 4
a89d5329
309- STP BLOCKING state. Only valid if STP is enabled on the bridge. This state
310is used during the STP election process. In this state, port will only process
aa2f1335
VY
311STP BPDUs.
312.sp
313
314.TP
315.BR "guard on " or " guard off "
400b5404 316Controls whether STP BPDUs will be processed by the bridge port. By default,
a89d5329 317the flag is turned off allowed BPDU processing. Turning this flag on will
aa2f1335
VY
318cause the port to stop processing STP BPDUs.
319
320.TP
321.BR "hairpin on " or " hairpin off "
322Controls whether traffic may be send back out of the port on which it was
a89d5329 323received. By default, this flag is turned off and the bridge will not forward
aa2f1335
VY
324traffic back out of the receiving port.
325
326.TP
327.BR "fastleave on " or " fastleave off "
328This flag allows the bridge to immediately stop multicast traffic on a port
a89d5329
329that receives IGMP Leave message. It is only used with IGMP snooping is
330enabled on the bridge. By default the flag is off.
aa2f1335
VY
331
332.TP
333.BR "root_block on " or " root_block off "
a89d5329
334Controls whether a given port is allowed to become root port or not. Only used
335when STP is enabled on the bridge. By default the flag is off.
aa2f1335 336
f0f4ab60
VY
337.TP
338.BR "learning on " or " learning off "
339Controls whether a given port will learn MAC addresses from received traffic or
a89d5329
340not. If learning if off, the bridge will end up flooding any traffic for which
341it has no FDB entry. By default this flag is on.
f0f4ab60 342
674bb438
SF
343.TP
344.BR "learning_sync on " or " learning_sync off "
345Controls whether a given port will sync MAC addresses learned on device port to
346bridge FDB.
347
f0f4ab60 348.TP
02723cf2 349.BR "flood on " or " flood off "
a89d5329 350Controls whether a given port will flood unicast traffic for which there is no FDB entry. By default this flag is on.
f0f4ab60 351
aa2f1335
VY
352.TP
353.BI hwmode
354Some network interface cards support HW bridge functionality and they may be
a89d5329 355configured in different modes. Currently support modes are:
aa2f1335
VY
356
357.B vepa
358- Data sent between HW ports is sent on the wire to the external
359switch.
360
361.B veb
362- bridging happens in hardware.
363
9208b4e7
NA
364.TP
365.BR "mcast_flood on " or " mcast_flood off "
02723cf2 366Controls whether a given port will flood multicast traffic for which there is no MDB entry. By default this flag is on.
9208b4e7 367
41973a47
RP
368.TP
369.BR "neigh_suppress on " or " neigh_suppress off "
370Controls whether neigh discovery (arp and nd) proxy and suppression is enabled on the port. By default this flag is off.
371
8cfde5c9
RP
372.TP
373.BR "vlan_tunnel on " or " vlan_tunnel off "
374Controls whether vlan to tunnel mapping is enabled on the port. By default this flag is off.
375
05001bcf
NA
376.TP
377.BR "isolated on " or " isolated off "
378Controls whether a given port will be isolated, which means it will be able to communicate with non-isolated ports only.
379By default this flag is off.
380
d13d52d0
NA
381.TP
382.BI backup_port " DEVICE"
383If the port loses carrier all traffic will be redirected to the configured backup port
384
385.TP
386.BR nobackup_port
387Removes the currently configured backup port
388
22a98f51
RP
389.TP
390.BI self
391link setting is configured on specified physical device
392
393.TP
394.BI master
395link setting is configured on the software bridge (default)
396
25bc3d3d
SA
397.TP
398.BR "\-t" , " \-timestamp"
399display current time when using monitor option.
22a98f51 400
aa2f1335
VY
401.SS bridge link show - list bridge port configuration.
402
403This command displays the current bridge port configuration and flags.
404
d04bc300
SH
405.SH bridge fdb - forwarding database management
406
407.B fdb
fc31817d 408objects contain known Ethernet addresses on a link.
d04bc300
SH
409
410.P
411The corresponding commands display fdb entries, add new entries,
7578ae88 412append entries,
d04bc300
SH
413and delete old ones.
414
d611682a 415.SS bridge fdb add - add a new fdb entry
d04bc300 416
d611682a 417This command creates a new fdb entry.
d04bc300
SH
418
419.TP
7578ae88 420.BI "LLADDR"
d04bc300
SH
421the Ethernet MAC address.
422
423.TP
7578ae88 424.BI dev " DEV"
d04bc300
SH
425the interface to which this address is associated.
426
c6d0cfb5
RP
427.B local
428- is a local permanent fdb entry
429.sp
430
431.B static
432- is a static (no arp) fdb entry
433.sp
434
435.B dynamic
436- is a dynamic reachable age-able fdb entry
437.sp
438
d611682a 439.B self
cd8df30b
RP
440- the address is associated with the port drivers fdb. Usually hardware.
441.sp
442
443.B master
444- the address is associated with master devices fdb. Usually software (default).
d611682a
JF
445.sp
446
7578ae88
TR
447.B router
448- the destination address is associated with a router.
449Valid if the referenced device is a VXLAN type device and has
450route shortcircuit enabled.
451.sp
452
cd8df30b
RP
453.B use
454- the address is in use. User space can use this option to
455indicate to the kernel that the fdb entry is in use.
456.sp
457
b4f84bf8
RP
458.B extern_learn
459- this entry was learned externally. This option can be used to
460indicate to the kernel that an entry was hardware or user-space
461controller learnt dynamic entry. Kernel will not age such an entry.
462.sp
463
c3ded6e4
NA
464.B sticky
465- this entry will not change its port due to learning.
466.sp
467
d04bc300 468.in -8
7578ae88
TR
469The next command line parameters apply only
470when the specified device
471.I DEV
472is of type VXLAN.
473.TP
474.BI dst " IPADDR"
475the IP address of the destination
476VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.
477
c5b176e5
RP
478.TP
479.BI src_vni " SRC VNI"
480the src VNI Network Identifier (or VXLAN Segment ID)
481this entry belongs to. Used only when the vxlan device is in
482external or collect metadata mode. If omitted the value specified at
483vxlan device creation will be used.
484
7578ae88
TR
485.TP
486.BI vni " VNI"
487the VXLAN VNI Network Identifier (or VXLAN Segment ID)
488to use to connect to the remote VXLAN tunnel endpoint.
489If omitted the value specified at vxlan device creation
490will be used.
491
492.TP
493.BI port " PORT"
494the UDP destination PORT number to use to connect to the
495remote VXLAN tunnel endpoint.
496If omitted the default value is used.
497
498.TP
499.BI via " DEVICE"
500device name of the outgoing interface for the
501VXLAN device driver to reach the
5699275b 502remote VXLAN tunnel endpoint.
7578ae88
TR
503
504.SS bridge fdb append - append a forwarding database entry
505This command adds a new fdb entry with an already known
506.IR LLADDR .
507Valid only for multicast link layer addresses.
508The command adds support for broadcast and multicast
509Ethernet MAC addresses.
510The Ethernet MAC address is added multiple times into
511the forwarding database and the vxlan device driver
512sends a copy of the data packet to each entry found.
513
514.PP
515The arguments are the same as with
fc31817d 516.BR "bridge fdb add" .
d04bc300
SH
517
518.SS bridge fdb delete - delete a forwarding database entry
519This command removes an existing fdb entry.
520
521.PP
522The arguments are the same as with
fc31817d 523.BR "bridge fdb add" .
d04bc300 524
6e2e2cf0
PS
525.SS bridge fdb replace - replace a forwarding database entry
526If no matching entry is found, a new one will be created instead.
527
528.PP
529The arguments are the same as with
fc31817d 530.BR "bridge fdb add" .
6e2e2cf0 531
d04bc300
SH
532.SS bridge fdb show - list forwarding entries.
533
49572501 534This command displays the current forwarding table.
d04bc300
SH
535
536.PP
537With the
538.B -statistics
a89d5329 539option, the command becomes verbose. It prints out the last updated
d04bc300
SH
540and last used time for each entry.
541
54e9c3a3
PP
542.SH bridge mdb - multicast group database management
543
544.B mdb
545objects contain known IP multicast group addresses on a link.
546
547.P
548The corresponding commands display mdb entries, add new entries,
549and delete old ones.
550
551.SS bridge mdb add - add a new multicast group database entry
552
553This command creates a new mdb entry.
554
555.TP
556.BI dev " DEV"
557the interface where this group address is associated.
558
559.TP
560.BI port " PORT"
561the port whose link is known to have members of this multicast group.
562
563.TP
564.BI grp " GROUP"
565the IP multicast group address whose members reside on the link connected to
566the port.
567
568.B permanent
569- the mdb entry is permanent
570.sp
571
572.B temp
573- the mdb entry is temporary (default)
574.sp
575
6aac8617
NA
576.TP
577.BI vid " VID"
578the VLAN ID which is known to have members of this multicast group.
579
54e9c3a3
PP
580.in -8
581.SS bridge mdb delete - delete a multicast group database entry
582This command removes an existing mdb entry.
583
584.PP
585The arguments are the same as with
586.BR "bridge mdb add" .
587
588.SS bridge mdb show - list multicast group database entries
589
590This command displays the current multicast group membership table. The table
591is populated by IGMP and MLD snooping in the bridge driver automatically. It
592can be altered by
593.B bridge mdb add
594and
595.B bridge mdb del
596commands manually too.
597
598.TP
599.BI dev " DEV"
600the interface only whose entries should be listed. Default is to list all
601bridge interfaces.
602
603.PP
604With the
605.B -details
a89d5329 606option, the command becomes verbose. It prints out the ports known to have
54e9c3a3
PP
607a connected router.
608
05d4f64d
NA
609.PP
610With the
611.B -statistics
ba037267 612option, the command displays timer values for mdb and router port entries.
05d4f64d 613
ab938710
VY
614.SH bridge vlan - VLAN filter list
615
616.B vlan
617objects contain known VLAN IDs for a link.
618
619.P
620The corresponding commands display vlan filter entries, add new entries,
621and delete old ones.
622
623.SS bridge vlan add - add a new vlan filter entry
624
625This command creates a new vlan filter entry.
626
627.TP
628.BI dev " NAME"
629the interface with which this vlan is associated.
630
631.TP
632.BI vid " VID"
633the VLAN ID that identifies the vlan.
634
8652eeb3
RP
635.TP
636.BI tunnel_info " TUNNEL_ID"
637the TUNNEL ID that maps to this vlan. The tunnel id is set in dst_metadata for
638every packet that belongs to this vlan (applicable to bridge ports with vlan_tunnel
639flag set).
640
ab938710
VY
641.TP
642.BI pvid
643the vlan specified is to be considered a PVID at ingress.
644Any untagged frames will be assigned to this VLAN.
645
646.TP
647.BI untagged
648the vlan specified is to be treated as untagged on egress.
649
650.TP
651.BI self
a89d5329 652the vlan is configured on the specified physical device. Required if the
ab938710
VY
653device is the bridge device.
654
655.TP
656.BI master
6274b0b7 657the vlan is configured on the software bridge (default).
ab938710 658
296cee6f
VD
659.SS bridge vlan delete - delete a vlan filter entry
660This command removes an existing vlan filter entry.
ab938710
VY
661
662.PP
663The arguments are the same as with
664.BR "bridge vlan add".
665The
666.BR "pvid " and " untagged"
667flags are ignored.
668
669.SS bridge vlan show - list vlan configuration.
670
671This command displays the current VLAN filter table.
672
7abf5de6
NA
673.PP
674With the
675.B -statistics
676option, the command displays per-vlan traffic statistics.
677
8652eeb3
RP
678.SS bridge vlan tunnelshow - list vlan tunnel mapping.
679
680This command displays the current vlan tunnel info mapping.
681
d04bc300
SH
682.SH bridge monitor - state monitoring
683
684The
685.B bridge
fc31817d 686utility can monitor the state of devices and addresses
a89d5329 687continuously. This option has a slightly different format.
d04bc300
SH
688Namely, the
689.B monitor
690command is the first in the command line and then the object list follows:
691
692.BR "bridge monitor" " [ " all " |"
49572501 693.IR OBJECT-LIST " ]"
d04bc300
SH
694
695.I OBJECT-LIST
696is the list of object types that we want to monitor.
697It may contain
fc31817d 698.BR link ", " fdb ", and " mdb "."
d04bc300
SH
699If no
700.B file
701argument is given,
702.B bridge
703opens RTNETLINK, listens on it and dumps state changes in the format
704described in previous sections.
705
706.P
707If a file name is given, it does not listen on RTNETLINK,
708but opens the file containing RTNETLINK messages saved in binary format
efb16971 709and dumps them.
d04bc300
SH
710
711.SH NOTES
712This command uses facilities added in Linux 3.0.
713
714Although the forwarding table is maintained on a per-bridge device basis
715the bridge device is not part of the syntax. This is a limitation of the
716underlying netlink neighbour message protocol. When displaying the
717forwarding table, entries for all bridges are displayed.
718Add/delete/modify commands determine the underlying bridge device
6274b0b7 719based on the bridge to which the corresponding ethernet device is attached.
d04bc300
SH
720
721
722.SH SEE ALSO
723.BR ip (8)
49572501 724.SH BUGS
d04bc300
SH
725.RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>
726
727.SH AUTHOR
728Original Manpage by Stephen Hemminger