aboutsummaryrefslogtreecommitdiffstats
path: root/man/man8/bridge.8
blob: 9dcd1f0a613f10c8fa1396cac43725cb3f7aa12e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
.TH BRIDGE 8 "1 August 2012" "iproute2" "Linux"
.SH NAME
bridge \- show / manipulate bridge addresses and devices
.SH SYNOPSIS

.ad l
.in +8
.ti -8
.B bridge
.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
.BR help " }"
.sp

.ti -8
.IR OBJECT " := { "
.BR link " | " fdb " | " mdb " | " vlan " | " vni " | " monitor " }"
.sp

.ti -8
.IR OPTIONS " := { "
\fB\-V\fR[\fIersion\fR] |
\fB\-s\fR[\fItatistics\fR] |
\fB\-n\fR[\fIetns\fR] name |
\fB\-b\fR[\fIatch\fR] filename |
\fB\-c\fR[\fIolor\fR] |
\fB\-p\fR[\fIretty\fR] |
\fB\-j\fR[\fIson\fR] |
\fB\-o\fR[\fIneline\fr] }

.ti -8
.B "bridge link set"
.B dev
.IR DEV " [ "
.B cost
.IR COST " ] [ "
.B priority
.IR PRIO " ] [ "
.B state
.IR STATE " ] [ "
.BR guard " { " on " | " off " } ] [ "
.BR hairpin " { " on " | " off " } ] [ "
.BR fastleave " { " on " | " off " } ] [ "
.BR root_block " { " on " | " off " } ] [ "
.BR learning " { " on " | " off " } ] [ "
.BR learning_sync " { " on " | " off " } ] [ "
.BR flood " { " on " | " off " } ] [ "
.BR hwmode " { " vepa " | " veb " } ] [ "
.BR bcast_flood " { " on " | " off " } ] [ "
.BR mcast_flood " { " on " | " off " } ] [ "
.BR mcast_router
.IR MULTICAST_ROUTER " ] ["
.BR mcast_to_unicast " { " on " | " off " } ] [ "
.BR neigh_suppress " { " on " | " off " } ] [ "
.BR vlan_tunnel " { " on " | " off " } ] [ "
.BR isolated " { " on " | " off " } ] [ "
.BR locked " { " on " | " off " } ] [ "
.B backup_port
.IR  DEVICE " ] ["
.BR nobackup_port " ] [ "
.BR self " ] [ " master " ]"

.ti -8
.BR "bridge link" " [ " show " ] [ "
.B dev
.IR DEV " ]"

.ti -8
.BR "bridge fdb" " { " add " | " append " | " del " | " replace " } "
.I LLADDR
.B dev
.IR DEV " { "
.BR local " | " static " | " dynamic " } [ "
.BR self " ] [ " master " ] [ " router " ] [ " use " ] [ " extern_learn " ] [ " sticky " ] [ "
.B src_vni
.IR VNI " ] { ["
.B dst
.IR IPADDR " ] [ "
.B vni
.IR VNI " ] ["
.B port
.IR PORT " ] ["
.B via
.IR DEVICE " ] | "
.B nhid
.IR NHID " } "

.ti -8
.BR "bridge fdb" " [ [ " show " ] [ "
.B br
.IR BRDEV " ] [ "
.B brport
.IR DEV " ] [ "
.B vlan
.IR VID " ] [ "
.B state
.IR STATE " ] ["
.B dynamic
.IR "] ]"

.ti -8
.BR "bridge fdb get" " ["
.B to
.IR "]"
.I LLADDR "[ "
.B br
.IR BRDEV " ]"
.B { brport | dev }
.IR DEV " [ "
.B vlan
.IR VID  " ] [ "
.B vni
.IR VNI " ] ["
.BR self " ] [ " master " ] [ " dynamic " ]"

.ti -8
.BR "bridge fdb flush"
.B dev
.IR DEV " [ "
.B brport
.IR DEV " ] [ "
.B vlan
.IR VID " ] [ "
.BR self " ] [ " master " ] [ "
.BR [no]permanent " ]"

.ti -8
.BR "bridge mdb" " { " add " | " del " } "
.B dev
.I DEV
.B port
.I PORT
.B grp
.IR GROUP " [ "
.B src
.IR SOURCE " ] [ "
.BR permanent " | " temp " ] [ "
.B vid
.IR VID " ] "

.ti -8
.BR "bridge mdb show" " [ "
.B dev
.IR DEV " ]"

.ti -8
.BR "bridge vlan" " { " add " | " del " } "
.B dev
.I DEV
.B vid
.IR VID " [ "
.B tunnel_info
.IR TUNNEL_ID " ] [ "
.BR pvid " ] [ " untagged " ] [ "
.BR self " ] [ " master " ] "

.ti -8
.BR "bridge vlan set"
.B dev
.I DEV
.B vid
.IR VID " [ "
.B state
.IR STP_STATE " ] [ "
.B mcast_router
.IR MULTICAST_ROUTER " ]"

.ti -8
.BR "bridge vlan" " [ " show " | " tunnelshow " ] [ "
.B dev
.IR DEV " ]"

.ti -8
.BR "bridge vlan global set"
.B dev
.I DEV
.B vid
.IR VID " [ "
.B mcast_snooping
.IR MULTICAST_SNOOPING " ] [ "
.B mcast_querier
.IR MULTICAST_QUERIER " ] [ "
.B mcast_igmp_version
.IR IGMP_VERSION " ] [ "
.B mcast_mld_version
.IR MLD_VERSION " ] [ "
.B mcast_last_member_count
.IR LAST_MEMBER_COUNT " ] [ "
.B mcast_last_member_interval
.IR LAST_MEMBER_INTERVAL " ] [ "
.B mcast_startup_query_count
.IR STARTUP_QUERY_COUNT " ] [ "
.B mcast_startup_query_interval
.IR STARTUP_QUERY_INTERVAL " ] [ "
.B mcast_membership_interval
.IR MEMBERSHIP_INTERVAL " ] [ "
.B mcast_querier_interval
.IR QUERIER_INTERVAL " ] [ "
.B mcast_query_interval
.IR QUERY_INTERVAL " ] [ "
.B mcast_query_response_interval
.IR QUERY_RESPONSE_INTERVAL " ]"

.ti -8
.BR "bridge vlan global" " [ " show " ] [ "
.B dev
.IR DEV " ] [ "
.B vid
.IR VID " ]"

.ti -8
.BR "bridge vlan" " show " [ "
.B dev
.IR DEV " ]"

.ti -8
.BR "bridge vni" " { " add " | " del " } "
.B dev
.I DEV
.B vni
.IR VNI " [ { "
.B group | remote "} "
.IR IPADDR " ] "

.ti -8
.BR "bridge vni" " show " [ "
.B dev
.IR DEV " ]"

.ti -8
.BR "bridge monitor" " [ " all " | " neigh " | " link " | " mdb " | " vlan " ]"

.SH OPTIONS

.TP
.BR "\-V" , " -Version"
print the version of the
.B bridge
utility and exit.

.TP
.BR "\-s" , " \-stats", " \-statistics"
output more information. If this option
is given multiple times, the amount of information increases.
As a rule, the information is statistics or some time values.

.TP
.BR "\-d" , " \-details"
print detailed information about bridge vlan filter entries or MDB router ports.

.TP
.BR "\-n" , " \-net" , " \-netns " <NETNS>
switches
.B bridge
to the specified network namespace
.IR NETNS .
Actually it just simplifies executing of:

.B ip netns exec
.I NETNS
.B bridge
.RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
.BR help " }"

to

.B bridge
.RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
.BR help " }"

.TP
.BR "\-b", " \-batch " <FILENAME>
Read commands from provided file or standard input and invoke them.
First failure will cause termination of bridge command.

.TP
.B "\-force"
Don't terminate bridge command on errors in batch mode.
If there were any errors during execution of the commands, the application
return code will be non zero.

.TP
.BR \-c [ color ][ = { always | auto | never }
Configure color output. If parameter is omitted or
.BR always ,
color output is enabled regardless of stdout state. If parameter is
.BR auto ,
stdout is checked to be a terminal before enabling color output. If parameter is
.BR never ,
color output is disabled. If specified multiple times, the last one takes
precedence. This flag is ignored if
.B \-json
is also given.

.TP
.BR "\-j", " \-json"
Output results in JavaScript Object Notation (JSON).

.TP
.BR "\-p", " \-pretty"
When combined with -j generate a pretty JSON output.

.TP
.BR "\-o", " \-oneline"
output each record on a single line, replacing line feeds
with the
.B '\e'
character. This is convenient when you want to count records
with
.BR wc (1)
or to
.BR grep (1)
the output.


.SH BRIDGE - COMMAND SYNTAX

.SS
.I OBJECT

.TP
.B link
- Bridge port.

.TP
.B fdb
- Forwarding Database entry.

.TP
.B mdb
- Multicast group database entry.

.TP
.B vlan
- VLAN filter list.

.TP
.B vni
- VNI filter list.

.SS
.I COMMAND

Specifies the action to perform on the object.
The set of possible actions depends on the object type.
As a rule, it is possible to
.BR "add" , " delete"
and
.B show
(or
.B list
) objects, but some objects do not allow all of these operations
or have some additional commands. The
.B help
command is available for all objects. It prints
out a list of available commands and argument syntax conventions.
.sp
If no command is given, some default command is assumed.
Usually it is
.B list
or, if the objects of this class cannot be listed,
.BR "help" .

.SH bridge link - bridge port

.B link
objects correspond to the port devices of the bridge.

.P
The corresponding commands set and display port status and bridge specific
attributes.

.SS bridge link set - set bridge specific attributes on a port

.TP
.BI dev " NAME "
interface name of the bridge port

.TP
.BI cost " COST "
the STP path cost of the specified port.

.TP
.BI priority " PRIO "
the STP port priority. The priority value is an unsigned 8-bit quantity
(number between 0 and 255). This metric is used in the designated port an
droot port selection algorithms.

.TP
.BI state " STATE "
the operation state of the port. Except state 0 (disable STP or BPDU filter feature),
this is primarily used by user space STP/RSTP
implementation. One may enter port state name (case insensitive), or one of the
numbers below. Negative inputs are ignored, and unrecognized names return an
error.

.B 0
- port is in STP
.B DISABLED
state. Make this port completely inactive for STP. This is also called
BPDU filter and could be used to disable STP on an untrusted port, like
a leaf virtual devices.
.sp

.B 1
- port is in STP
.B LISTENING
state. Only valid if STP is enabled on the bridge. In this
state the port listens for STP BPDUs and drops all other traffic frames.
.sp

.B 2
- port is in STP
.B LEARNING
state. Only valid if STP is enabled on the bridge. In this
state the port will accept traffic only for the purpose of updating MAC
address tables.
.sp

.B 3
- port is in STP
.B FORWARDING
state. Port is fully active.
.sp

.B 4
- port is in STP
.B BLOCKING
state. Only valid if STP is enabled on the bridge. This state
is used during the STP election process. In this state, port will only process
STP BPDUs.
.sp

.TP
.BR "guard on " or " guard off "
Controls whether STP BPDUs will be processed by the bridge port. By default,
the flag is turned off allowed BPDU processing. Turning this flag on will
disables
the bridge port if a STP BPDU packet is received.

If running Spanning Tree on bridge, hostile devices on the network
may send BPDU on a port and cause network failure. Setting
.B guard on
will detect and stop this by disabling the port.
The port will be restarted if link is brought down, or
removed and reattached.  For example if guard is enable on
eth0:

.B ip link set dev eth0 down; ip link set dev eth0 up

.TP
.BR "hairpin on " or " hairpin off "
Controls whether traffic may be send back out of the port on which it was
received. This option is also called reflective relay mode, and is used to support
basic VEPA (Virtual Ethernet Port Aggregator) capabilities.
By default, this flag is turned off and the bridge will not forward
traffic back out of the receiving port.

.TP
.BR "fastleave on " or " fastleave off "
This flag allows the bridge to immediately stop multicast traffic on a port
that receives IGMP Leave message. It is only used with IGMP snooping is
enabled on the bridge. By default the flag is off.

.TP
.BR "root_block on " or " root_block off "
Controls whether a given port is allowed to become root port or not. Only used
when STP is enabled on the bridge. By default the flag is off.

This feature is also called root port guard.
If BPDU is received from a leaf (edge) port, it should not
be elected as root port. This could be used if using STP on a bridge and the downstream bridges are not fully
trusted; this prevents a hostile guest from rerouting traffic.

.TP
.BR "learning on " or " learning off "
Controls whether a given port will learn MAC addresses from received traffic or
not. If learning if off, the bridge will end up flooding any traffic for which
it has no FDB entry. By default this flag is on.

.TP
.BR "learning_sync on " or " learning_sync off "
Controls whether a given port will sync MAC addresses learned on device port to
bridge FDB.

.TP
.BR "flood on " or " flood off "
Controls whether unicast traffic for which there is no FDB entry will be
flooded towards this given port. By default this flag is on.

.TP
.B hwmode
Some network interface cards support HW bridge functionality and they may be
configured in different modes. Currently support modes are:

.B vepa
- Data sent between HW ports is sent on the wire to the external
switch.

.B veb
- bridging happens in hardware.

.TP
.BR "bcast_flood on " or " bcast_flood off "
Controls flooding of broadcast traffic on the given port.
By default this flag is on.

.TP
.BR "mcast_flood on " or " mcast_flood off "
Controls whether multicast traffic for which there is no MDB entry will be
flooded towards this given port. By default this flag is on.

.TP
.BI mcast_router " MULTICAST_ROUTER "
This flag is almost the same as the per-VLAN flag, see below, except its
value can only be set in the range 0-2.  The default is
.B 1
where the bridge figures out automatically where an IGMP/MLD querier,
MRDISC capable device, or PIM router, is located.  Setting this flag to
.B 2
is useful in cases where the multicast router does not indicate its
presence in any meaningful way (e.g. older versions of SMCRoute, or
mrouted), or when there is a need for forwarding both known and unknown
IP multicast to a secondary/backup router.

.TP
.BR "mcast_to_unicast on " or " mcast_to_unicast off "
Controls whether a given port will replicate packets using unicast
instead of multicast. By default this flag is off.

This is done by copying the packet per host and
changing the multicast destination MAC to a unicast one accordingly.

.B mcast_to_unicast
works on top of the multicast snooping feature of
the bridge. Which means unicast copies are only delivered to hosts which
are interested in it and signalized this via IGMP/MLD reports
previously.

This feature is intended for interface types which have a more reliable
and/or efficient way to deliver unicast packets than broadcast ones
(e.g. WiFi).

However, it should only be enabled on interfaces where no IGMPv2/MLDv1
report suppression takes place. IGMP/MLD report suppression issue is usually
overcome by the network daemon (supplicant) enabling AP isolation and
by that separating all STAs.

Delivery of STA-to-STA IP multicast is made possible again by
enabling and utilizing the bridge hairpin mode, which considers the
incoming port as a potential outgoing port, too (see
.B hairpin
option).
Hairpin mode is performed after multicast snooping, therefore leading to
only deliver reports to STAs running a multicast router.

.TP
.BR "neigh_suppress on " or " neigh_suppress off "
Controls whether neigh discovery (arp and nd) proxy and suppression is
enabled on the port. By default this flag is off.

.TP
.BR "vlan_tunnel on " or " vlan_tunnel off "
Controls whether vlan to tunnel mapping is enabled on the port. By
default this flag is off.

.TP
.BR "isolated on " or " isolated off "
Controls whether a given port will be isolated, which means it will be
able to communicate with non-isolated ports only.  By default this
flag is off.

.TP
.BR "locked on " or " locked off "
Controls whether a port will be locked, meaning that hosts behind the
port will not be able to communicate through the port unless an FDB
entry with the units MAC address is in the FDB.
The common use is that hosts are allowed access through authentication
with the IEEE 802.1X protocol or based on whitelists or like setups.
By default this flag is off.


.TP
.BI backup_port " DEVICE"
If the port loses carrier all traffic will be redirected to the
configured backup port

.TP
.B nobackup_port
Removes the currently configured backup port

.TP
.B self
link setting is configured on specified physical device

.TP
.B master
link setting is configured on the software bridge (default)

.TP
.BR "\-t" , " \-timestamp"
display current time when using monitor option.

.SS bridge link show - list ports configuration for all bridges.

This command displays port configuration and flags for all bridges.

To display port configuration and flags for a specific bridge, use the
"ip link show master <bridge_device>" command.

.SH bridge fdb - forwarding database management

.B fdb
objects contain known Ethernet addresses on a link.

.P
The corresponding commands display fdb entries, add new entries,
append entries,
and delete old ones.

.SS bridge fdb add - add a new fdb entry

This command creates a new fdb entry.

.TP
.B LLADDR
the Ethernet MAC address.

.TP
.BI dev " DEV"
the interface to which this address is associated.

.B local
- is a local permanent fdb entry, which means that the bridge will not forward
frames with this destination MAC address and VLAN ID, but terminate them
locally. This flag is default unless "static" or "dynamic" are explicitly
specified.
.sp

.B permanent
- this is a synonym for "local"
.sp

.B static
- is a static (no arp) fdb entry
.sp

.B dynamic
- is a dynamic reachable age-able fdb entry
.sp

.B self
- the operation is fulfilled directly by the driver for the specified network
device. If the network device belongs to a master like a bridge, then the
bridge is bypassed and not notified of this operation (and if the device does
notify the bridge, it is driver-specific behavior and not mandated by this
flag, check the driver for more details). The "bridge fdb add" command can also
be used on the bridge device itself, and in this case, the added fdb entries
will be locally terminated (not forwarded). In the latter case, the "self" flag
is mandatory. The flag is set by default if "master" is not specified.
.sp

.B master
- if the specified network device is a port that belongs to a master device
such as a bridge, the operation is fulfilled by the master device's driver,
which may in turn notify the port driver too of the address. If the specified
device is a master itself, such as a bridge, this flag is invalid.
.sp

.B router
- the destination address is associated with a router.
Valid if the referenced device is a VXLAN type device and has
route short circuit enabled.
.sp

.B use
- the address is in use. User space can use this option to
indicate to the kernel that the fdb entry is in use.
.sp

.B extern_learn
- this entry was learned externally. This option can be used to
indicate to the kernel that an entry was hardware or user-space
controller learnt dynamic entry. Kernel will not age such an entry.
.sp

.B sticky
- this entry will not change its port due to learning.
.sp

.in -8
The next command line parameters apply only
when the specified device
.I DEV
is of type VXLAN.
.TP
.BI dst " IPADDR"
the IP address of the destination
VXLAN tunnel endpoint where the Ethernet MAC ADDRESS resides.

.TP
.BI src_vni " VNI"
the src VNI Network Identifier (or VXLAN Segment ID)
this entry belongs to. Used only when the vxlan device is in
external or collect metadata mode. If omitted the value specified at
vxlan device creation will be used.

.TP
.BI vni " VNI"
the VXLAN VNI Network Identifier (or VXLAN Segment ID)
to use to connect to the remote VXLAN tunnel endpoint.
If omitted the value specified at vxlan device creation
will be used.

.TP
.BI port " PORT"
the UDP destination PORT number to use to connect to the
remote VXLAN tunnel endpoint.
If omitted the default value is used.

.TP
.BI via " DEVICE"
device name of the outgoing interface for the
VXLAN device driver to reach the
remote VXLAN tunnel endpoint.

.TP
.BI nhid " NHID "
ecmp nexthop group for the VXLAN device driver
to reach remote VXLAN tunnel endpoints.

.SS bridge fdb append - append a forwarding database entry
This command adds a new fdb entry with an already known
.IR LLADDR .
Valid only for multicast link layer addresses.
The command adds support for broadcast and multicast
Ethernet MAC addresses.
The Ethernet MAC address is added multiple times into
the forwarding database and the vxlan device driver
sends a copy of the data packet to each entry found.

.PP
The arguments are the same as with
.BR "bridge fdb add" .

.SS bridge fdb delete - delete a forwarding database entry
This command removes an existing fdb entry.

.PP
The arguments are the same as with
.BR "bridge fdb add" .

.SS bridge fdb replace - replace a forwarding database entry
If no matching entry is found, a new one will be created instead.

.PP
The arguments are the same as with
.BR "bridge fdb add" .

.SS bridge fdb show - list forwarding entries.

This command displays the current forwarding table.

.PP
With the
.B -statistics
option, the command becomes verbose. It prints out the last updated
and last used time for each entry.

.SS bridge fdb get - get bridge forwarding entry.

lookup a bridge forwarding table entry.

.TP
.B LLADDR
the Ethernet MAC address.

.TP
.BI dev " DEV"
the interface to which this address is associated.

.TP
.BI brport " DEV"
the bridge port to which this address is associated. same as dev above.

.TP
.BI br " DEV"
the bridge to which this address is associated.

.TP
.B self
- the address is associated with the port drivers fdb. Usually hardware.

.TP
.B master
- the address is associated with master devices fdb. Usually software (default).

.SS bridge fdb flush - flush bridge forwarding table entries.

flush the matching bridge forwarding table entries. Some options below have a negated
form when "no" is prepended to them (e.g. permanent and nopermanent).

.TP
.BI dev " DEV"
the target device for the operation. If the device is a bridge port and "master"
is set then the operation will be fulfilled by its master device's driver and
all entries pointing to that port will be deleted.

.TP
.BI brport " DEV"
the target bridge port for the operation. If the bridge device is specified then only
entries pointing to the bridge itself will be deleted. Note that the target device
specified by this option will override the one specified by dev above.

.TP
.BI vlan " VID"
the target VLAN ID for the operation. Match forwarding table entries only with the
specified VLAN ID.

.TP
.B self
the operation is fulfilled directly by the driver for the specified network
device. If the network device belongs to a master like a bridge, then the
bridge is bypassed and not notified of this operation. The "bridge fdb flush"
command can also be used on the bridge device itself. The flag is set by default if
"master" is not specified.

.TP
.B master
if the specified network device is a port that belongs to a master device
such as a bridge, the operation is fulfilled by the master device's driver.

.TP
.B [no]permanent
if specified then only permanent entries will be deleted or respectively if "no"
is prepended then only non-permanent entries will be deleted.
.sp

.SH bridge mdb - multicast group database management

.B mdb
objects contain known IP or L2 multicast group addresses on a link.

.P
The corresponding commands display mdb entries, add new entries,
and delete old ones.

.SS bridge mdb add - add a new multicast group database entry

This command creates a new mdb entry.

.TP
.BI dev " DEV"
the interface where this group address is associated.

.TP
.BI port " PORT"
the port whose link is known to have members of this multicast group.

.TP
.BI grp " GROUP"
the multicast group address (IPv4, IPv6 or L2 multicast) whose members reside
on the link connected to the port.

.B permanent
- the mdb entry is permanent. Optional for IPv4 and IPv6, mandatory for L2.
.sp

.B temp
- the mdb entry is temporary (default)
.sp

.TP
.BI src " SOURCE"
optional source IP address of a sender for this multicast group. If IGMPv3 for IPv4, or
MLDv2 for IPv6 respectively, are enabled it will be included in the lookup when
forwarding multicast traffic.

.TP
.BI vid " VID"
the VLAN ID which is known to have members of this multicast group.

.in -8
.SS bridge mdb delete - delete a multicast group database entry
This command removes an existing mdb entry.

.PP
The arguments are the same as with
.BR "bridge mdb add" .

.SS bridge mdb show - list multicast group database entries

This command displays the current multicast group membership table. The table
is populated by IGMP and MLD snooping in the bridge driver automatically. It
can be altered by
.B bridge mdb add
and
.B bridge mdb del
commands manually too.

.TP
.BI dev " DEV"
the interface only whose entries should be listed. Default is to list all
bridge interfaces.

.PP
With the
.B -details
option, the command becomes verbose. It prints out the ports known to have
a connected router.

.PP
With the
.B -statistics
option, the command displays timer values for mdb and router port entries.

.SH bridge vlan - VLAN filter list

.B vlan
objects contain known VLAN IDs for a link.

.P
The corresponding commands display vlan filter entries, add new entries,
and delete old ones.

.SS bridge vlan add - add a new vlan filter entry

This command creates a new vlan filter entry.

.TP
.BI dev " NAME"
the interface with which this vlan is associated.

.TP
.BI vid " VID"
the VLAN ID that identifies the vlan.

.TP
.BI tunnel_info " TUNNEL_ID"
the TUNNEL ID that maps to this vlan. The tunnel id is set in
dst_metadata for every packet that belongs to this vlan (applicable to
bridge ports with vlan_tunnel flag set).

.TP
.B pvid
the vlan specified is to be considered a PVID at ingress.
Any untagged frames will be assigned to this VLAN.

.TP
.B untagged
the vlan specified is to be treated as untagged on egress.

.TP
.B self
the vlan is configured on the specified physical device. Required if the
device is the bridge device.

.TP
.B master
the vlan is configured on the software bridge (default).

.SS bridge vlan delete - delete a vlan filter entry
This command removes an existing vlan filter entry.

.PP
The arguments are the same as with
.BR "bridge vlan add".
The
.BR "pvid " and " untagged"
flags are ignored.

.SS bridge vlan set - change vlan filter entry's options

This command changes vlan filter entry's options.

.TP
.BI dev " NAME"
the interface with which this vlan is associated.

.TP
.BI vid " VID"
the VLAN ID that identifies the vlan.

.TP
.BI state " STP_STATE "
the operation state of the vlan. One may enter STP state name (case insensitive), or one of the
numbers below. Negative inputs are ignored, and unrecognized names return an
error. Note that the state is set only for the vlan of the specified device, e.g. if it is
a bridge port then the state will be set only for the vlan of the port.

.B 0
- vlan is in STP
.B DISABLED
state. Make this vlan completely inactive for STP. This is also called
BPDU filter and could be used to disable STP on an untrusted vlan.
.sp

.B 1
- vlan is in STP
.B LISTENING
state. Only valid if STP is enabled on the bridge. In this
state the vlan listens for STP BPDUs and drops all other traffic frames.
.sp

.B 2
- vlan is in STP
.B LEARNING
state. Only valid if STP is enabled on the bridge. In this
state the vlan will accept traffic only for the purpose of updating MAC
address tables.
.sp

.B 3
- vlan is in STP
.B FORWARDING
state. This is the default vlan state.
.sp

.B 4
- vlan is in STP
.B BLOCKING
state. Only valid if STP is enabled on the bridge. This state
is used during the STP election process. In this state, the vlan will only process
STP BPDUs.
.sp

.TP
.BI mcast_router " MULTICAST_ROUTER "
configure this vlan and interface's multicast router mode, note that only modes
0 - 2 are available for bridge devices.
A vlan and interface with a multicast router will receive all multicast traffic.
.I MULTICAST_ROUTER
may be either
.sp
.B 0
- to disable multicast router.
.sp

.B 1
- to let the system detect the presence of routers (default).
.sp

.B 2
- to permanently enable multicast traffic forwarding on this vlan and interface.
.sp

.B 3
- to temporarily mark this vlan and port as having a multicast router, i.e.
enable multicast traffic forwarding. This mode is available only for ports.
.sp

.SS bridge vlan show - list vlan configuration.

This command displays the current VLAN filter table.

.PP
With the
.B -details
option, the command becomes verbose. It displays the per-vlan options.

.PP
With the
.B -statistics
option, the command displays per-vlan traffic statistics.

.SS bridge vlan tunnelshow - list vlan tunnel mapping.

This command displays the current vlan tunnel info mapping.

.SS bridge vlan global set - change vlan filter entry's global options

This command changes vlan filter entry's global options.

.TP
.BI dev " NAME"
the interface with which this vlan is associated. Only bridge devices are
supported for global options.

.TP
.BI vid " VID"
the VLAN ID that identifies the vlan.

.TP
.BI mcast_snooping " MULTICAST_SNOOPING "
turn multicast snooping for VLAN entry with VLAN ID on
.RI ( MULTICAST_SNOOPING " > 0) "
or off
.RI ( MULTICAST_SNOOPING " == 0). Default is on. "

.TP
.BI mcast_querier " MULTICAST_QUERIER "
enable
.RI ( MULTICAST_QUERIER " > 0) "
or disable
.RI ( MULTICAST_QUERIER " == 0) "
IGMP/MLD querier, ie sending of multicast queries by the bridge. Default is disabled.

.TP
.BI mcast_igmp_version " IGMP_VERSION "
set the IGMP version. Default is 2.

.TP
.BI mcast_mld_version " MLD_VERSION "
set the MLD version. Default is 1.

.TP
.BI mcast_last_member_count " LAST_MEMBER_COUNT "
set multicast last member count, ie the number of queries the bridge
will send before stopping forwarding a multicast group after a "leave"
message has been received. Default is 2.

.TP
.BI mcast_last_member_interval " LAST_MEMBER_INTERVAL "
interval between queries to find remaining members of a group,
after a "leave" message is received.

.TP
.BI mcast_startup_query_count " STARTUP_QUERY_COUNT "
set the number of queries to send during startup phase. Default is 2.

.TP
.BI mcast_startup_query_interval " STARTUP_QUERY_INTERVAL "
interval between queries in the startup phase.

.TP
.BI mcast_membership_interval " MEMBERSHIP_INTERVAL "
delay after which the bridge will leave a group,
if no membership reports for this group are received.

.TP
.BI mcast_querier_interval " QUERIER_INTERVAL "
interval between queries sent by other routers. If no queries are seen
after this delay has passed, the bridge will start to send its own queries
(as if
.BI mcast_querier
was enabled).

.TP
.BI mcast_query_interval " QUERY_INTERVAL "
interval between queries sent by the bridge after the end of the
startup phase.

.TP
.BI mcast_query_response_interval " QUERY_RESPONSE_INTERVAL "
set the Max Response Time/Maximum Response Delay for IGMP/MLD
queries sent by the bridge.

.SS bridge vlan global show - list global vlan options.

This command displays the global VLAN options for each VLAN entry.

.TP
.BI dev " DEV"
the interface only whose VLAN global options should be listed. Default is to list
all bridge interfaces.

.TP
.BI vid " VID"
the VLAN ID only whose global options should be listed. Default is to list
all vlans.

.SH bridge vni - VNI filter list

.B vni
objects contain known VNI IDs for a dst metadata vxlan link.

.P
The corresponding commands display vni filter entries, add new entries,
and delete old ones.

.SS bridge vni add - add a new vni filter entry

This command creates a new vni filter entry.

.TP
.BI dev " NAME"
the interface with which this vni is associated.

.TP
.BI vni " VNI"
the VNI ID that identifies the vni.

.TP
.BI remote " IPADDR"
specifies the unicast destination IP address to use in outgoing packets
when the destination link layer address is not known in the VXLAN device
forwarding database. This parameter cannot be specified with the group.

.TP
.BI group " IPADDR"
specifies the multicast IP address to join for this VNI

.SS bridge vni del - delete a new vni filter entry

This command removes an existing vni filter entry.

.PP
The arguments are the same as with
.BR "bridge vni add".

.SS bridge vni show - list vni filtering configuration.

This command displays the current vni filter table.

.PP
With the
.B -statistics
option, the command displays per-vni traffic statistics.

.TP
.BI dev " NAME"
shows vni filtering table associated with the vxlan device

.SH bridge monitor - state monitoring

The
.B bridge
utility can monitor the state of devices and addresses
continuously. This option has a slightly different format.
Namely, the
.B monitor
command is the first in the command line and then the object list follows:

.BR "bridge monitor" " [ " all " |"
.IR OBJECT-LIST " ]"

.I OBJECT-LIST
is the list of object types that we want to monitor.
It may contain
.BR link ", " fdb ", " vlan " and " mdb "."
If no
.B file
argument is given,
.B bridge
opens RTNETLINK, listens on it and dumps state changes in the format
described in previous sections.

.P
If a file name is given, it does not listen on RTNETLINK,
but opens the file containing RTNETLINK messages saved in binary format
and dumps them.

.SH NOTES
This command uses facilities added in Linux 3.0.

Although the forwarding table is maintained on a per-bridge device basis
the bridge device is not part of the syntax. This is a limitation of the
underlying netlink neighbour message protocol. When displaying the
forwarding table, entries for all bridges are displayed.
Add/delete/modify commands determine the underlying bridge device
based on the bridge to which the corresponding ethernet device is attached.


.SH SEE ALSO
.BR ip (8)
.SH BUGS
.RB "Please direct bugreports and patches to: " <netdev@vger.kernel.org>

.SH AUTHOR
Original Manpage by Stephen Hemminger