Description:brctl is used to set up, maintain, and inspect the ethernet bridge configuration in the linux kernel.
描述:brctl是用于建立,维护和检查Linux内核的以太网桥配置研究。
An
ethernet bridge is a device commonly used to connect different networks
of ethernets together, so that these ethernets will appear as one
ethernet to the participants.
一个以太网是以太网桥设备以及常用的不同的网络连接,使这些以太网将作为一个以太网的参与者。
Each of the ethernets being connected corresponds to one physical interface in the bridge.目前的以太网连接各对应一个物理接口的桥梁。
These
individual ethernets are bundled into one bigger ('logical') ethernet,
this bigger ethernet corresponds to the bridge network interface.
这些个别以太网是以太网捆绑成一个更大的('逻辑')以太网,这对应于更大桥网络接口。
Instances实例
brctl addbr creates a new instance of the ethernet bridge.The network interface corresponding to the bridge will be called .
The command brctl delbr deletes the instance of the ethernet bridge.The network interface corresponding to the bridge must be down before it can be deleted!
The command brctl show shows all current instances of the ethernet bridge.命令brctl show显示当前所有的以太网桥的实例。
Ports端口
Each bridge has a number of ports attached to it.Network
traffic coming in on any of these ports will be forwarded to the other
ports transparently, so that the bridge is invisible to the rest of the
network (ie it will not show up in (8) ).
The command brctl addif will make the interface a port of the bridge .This means that all frames received on will be processed as if destined for the bridge.Also, when sending frames on , will be considered as a potential output interface.
The command brctl delif will detach the interface from the bridge .
该命令brctl delif 将分离的桥梁接口从。
The command brctl show will show some information on the bridge and its attached ports.
该命令将显示brctl show一些端口信息的桥梁及其附属。
Ageing老龄化
The bridge keeps track of ethernet addresses seen on each port.When
it needs to forward a frame, and it happens to know on which port the
destination ethernet address (specified in the frame) is located, it can
'cheat' by forwarding the frame to that port only, thus saving a lot of
redundant copies and transmits.
However, the ethernet address location data is not static data.Machines can move to other ports, network cards can be replaced (which changes the machine's ethernet address), etc.
brctl setgcint sets the garbage collection interval for the bridge to This means that the bridge will check the forwarding database for timed out entries every
Multiple
ethernet bridges can work together to create even larger networks of
ethernets using the IEEE 802.1d spanning tree protocol.This protocol is used for finding the shortest path between two ethernets, and for eliminating loops from the topology.As this protocol is a standard, linux bridges will interwork properly with other third party bridge products.Bridges communicate with eachother by sending and receiving BPDUs (Bridge Protocol Data Units).These BPDUs can be recognised by an ethernet destination address of 01:80:c2:00:00:00.
The
spanning tree protocol can also be turned off (for those situations
where it just doesn't make sense, for example when this linux box is the
only bridge on the LAN, or when you know that there are no loops in the
topology.)
brctl (8) can be used for configuring certain spanning tree protocol parameters.
brctl(8)可用于配置某些生成树协议参数。
For an explanation of these parameters, see the IEEE 802.1d specification (or send me an email).The default values should be just fine.If you don't know what these parameters mean, you probably won't feel the desire to tweak them.
brctl stp controls this bridge instance's participation in the spanning tree protocol.If is "on" or "yes" the STP will be turned on, otherwise it will be turned off.When turned off, the bridge will not send or receive BPDUs, and will thus not participate in the spanning tree protocol.If your bridge isn't the only bridge on the LAN, or if there are loops in the LAN's topology, DO NOT turn this option off.If you turn this option off, please know what you are doing.
brctl setbridgeprio sets the bridge's priority to .The priority value is an unsigned 16-bit quantity (a number between 0 and 65535), and has no dimension.Lower priority values are 'better'.The bridge with the lowest priority will be elected 'root bridge'.
brctl setfd sets the bridge's 'bridge forward delay' to
brctl setfd <时间>设置桥梁的'桥向前延迟'来<时间秒。
brctl sethello sets the bridge's 'bridge hello time' to brctl sethello <时间>设置桥梁的'桥你好时间'来<时间秒。
brctl setmaxage sets the bridge's 'maximum message age' to
brctl setmaxage <时间>设置桥梁的'年龄最大的信息'来<时间秒。
brctl setpathcost sets the port cost of the port to .
brctl setpathcost 设置端口<端口端口的成本为。This is a dimensionless metric.这是一个无量纲指标。
brctl setportprio sets the port 's priority to .The priority value is an unsigned 8-bit quantity (a number between 0 and 255), and has no dimension.This metric is used in the designated port and root port selection algorithms.