Difference between revisions of "Brctl"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<code>brctl</code><ref>https://linux.die.net/man/8/brctl</ref> commands allows ethernet bridge administration in [[Linux]]. It is included in <code>[[bridge-utils]]</code> package in Ubuntu.
 
<code>brctl</code><ref>https://linux.die.net/man/8/brctl</ref> commands allows ethernet bridge administration in [[Linux]]. It is included in <code>[[bridge-utils]]</code> package in Ubuntu.
  
 +
 +
* <code>[[brctl addif]]</code>
  
  
Line 6: Line 8:
  
 
  brctl show
 
  brctl show
  bridge name bridge id STP enabled interfaces
+
  bridge name bridge id [[STP]] enabled interfaces
 
  virbr0 8000.325400810bc6 yes virbr0-nic
 
  virbr0 8000.325400810bc6 yes virbr0-nic
  
 +
brctl show
 +
bridge name bridge id STP enabled interfaces
 +
docker0        8000.02424a095b68 no
 +
virbr0 8000.525400118b5a yes virbr0-nic
 
   
 
   
 
  bridge name bridge id STP enabled interfaces
 
  bridge name bridge id STP enabled interfaces
Line 14: Line 20:
 
  virbr0 8000.525400a300b0 yes virbr0-nic
 
  virbr0 8000.525400a300b0 yes virbr0-nic
 
  virbr1 8000.525400999cef yes virbr1-nic
 
  virbr1 8000.525400999cef yes virbr1-nic
vnet0
 
  
 +
<pre>
 +
brctl
 +
Usage: brctl [commands]
 +
commands:
 +
addbr    <bridge> add bridge
 +
delbr    <bridge> delete bridge
 +
addif    <bridge> <device> add interface to bridge
 +
delif    <bridge> <device> delete interface from bridge
 +
hairpin  <bridge> <port> {on|off} turn hairpin on/off
 +
setageing <bridge> <time> set ageing time
 +
setbridgeprio <bridge> <prio> set bridge priority
 +
setfd    <bridge> <time> set bridge forward delay
 +
sethello  <bridge> <time> set hello time
 +
setmaxage <bridge> <time> set max message age
 +
setpathcost <bridge> <port> <cost> set path cost
 +
setportprio <bridge> <port> <prio> set port priority
 +
show      [ <bridge> ] show a list of bridges
 +
showmacs  <bridge> show a list of mac addrs
 +
showstp  <bridge> show bridge stp info
 +
stp      <bridge> {on|off} turn stp on/off
 +
</pre>
  
 
== Related commands ==
 
== Related commands ==
 
* <code>[[virsh net-info]]</code>
 
* <code>[[virsh net-info]]</code>
 +
* <code>[[virsh net-edit]]</code>
 +
* [[virbr]], [[ens]]
 +
* [[MacVTap]] virtualized bridged networking
 +
* [[Multipass releases|Multipass]] bridged support
  
 
== See also ==
 
== See also ==
 +
* {{brctl}}
 
* [[KVM]]: <code>[[virsh net-list]]</code>
 
* [[KVM]]: <code>[[virsh net-list]]</code>
* [[STP]] [[Spanning Tree Protocol]]
+
* {{STP}}
 
+
* {{Bridge}}
 +
* {{Ethernet}}
  
 
[[Category:Linux]]
 
[[Category:Linux]]

Latest revision as of 16:13, 11 April 2021

brctl[1] commands allows ethernet bridge administration in Linux. It is included in bridge-utils package in Ubuntu.



Commands[edit]

brctl show
bridge name	bridge id		STP enabled	interfaces
virbr0		8000.325400810bc6	yes		virbr0-nic
brctl show
bridge name	bridge id		STP enabled	interfaces
docker0        8000.02424a095b68	no
virbr0		8000.525400118b5a	yes		virbr0-nic

bridge name	bridge id		STP enabled	interfaces
docker0		8000.02429250bfb7	no		
virbr0		8000.525400a300b0	yes		virbr0-nic
virbr1		8000.525400999cef	yes		virbr1-nic
brctl
Usage: brctl [commands]
commands:
	addbr     	<bridge>		add bridge
	delbr     	<bridge>		delete bridge
	addif     	<bridge> <device>	add interface to bridge
	delif     	<bridge> <device>	delete interface from bridge
	hairpin   	<bridge> <port> {on|off}	turn hairpin on/off
	setageing 	<bridge> <time>		set ageing time
	setbridgeprio	<bridge> <prio>		set bridge priority
	setfd     	<bridge> <time>		set bridge forward delay
	sethello  	<bridge> <time>		set hello time
	setmaxage 	<bridge> <time>		set max message age
	setpathcost	<bridge> <port> <cost>	set path cost
	setportprio	<bridge> <port> <prio>	set port priority
	show      	[ <bridge> ]		show a list of bridges
	showmacs  	<bridge>		show a list of mac addrs
	showstp   	<bridge>		show bridge stp info
	stp       	<bridge> {on|off}	turn stp on/off

Related commands[edit]

See also[edit]

  • https://linux.die.net/man/8/brctl
  • Advertising: