IT猫扑网:您身边最放心的安全下载站! 最新更新|软件分类|软件专题|手机版|论坛转贴|软件发布

您当前所在位置:首页操作系统LINUX → linux下实现双网卡桥接

linux下实现双网卡桥接

时间:2015/6/28来源:IT猫扑网作者:网管联盟我要评论(0)

  Name名称

  brctl - ethernet bridge administration brctl - 以太网桥管理

  Synopsis简介

  brctl [command] brctl [命令]

  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实例

  The command brctl addbr <name> creates a new instance of the ethernet bridge.该命令brctl addbr <名称创建一个新的以太网桥的实例。 The network interface corresponding to the bridge will be called <name>.该网络接口对应的桥梁将被称为<名称。

  The command brctl delbr <name> deletes the instance <name> of the ethernet bridge. <名称>命令brctl delbr删除以太网桥的实例<名称。 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显示显示当前所有的以太网桥的实例。

  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 traceroute <linux.die.net/man/8/traceroute&rurl=translate.google.com.hk&usg=ALkJrhgJakROF--e1An0sDTvEZMCZO7DQA">https://translate.googleusercontent.com/translate_c?hl=zh-CN&langpair=en%7Czh-CN&u=https://linux.die.net/man/8/traceroute&rurl=translate.google.com.hk&usg=ALkJrhgJakROF--e1An0sDTvEZMCZO7DQA> (8) ).未来的网络流量在这些港口的任何会被转发到其他港口透明,使无形的桥梁,是网络的其余部分的(即它不会出现在了的traceroute <https://translate.googleusercontent.com/translate_c?hl=zh-CN&langpair=en%7Czh-CN&u=https://linux.die.net/man/8/traceroute&rurl=translate.google.com.hk&usg=ALkJrhgJakROF--e1An0sDTvEZMCZO7DQA> (8))。

  The command brctl addif <brname> <ifname> will make the interface <ifname> a port of the bridge <brname>.该命令brctl addif <brname> <ifname>将使接口<ifname> 1 <brname>港口桥。 This means that all frames received on <ifname> will be processed as if destined for the bridge.这意味着在<ifname>收到的所有帧将被处理,好像注定了桥梁。 Also, when sending frames on <brname>, <ifname> will be considered as a potential output interface.此外,在发送<brname>框架上,<ifname>将被视为一个潜在的输出接口。

  The command brctl delif <brname> <ifname> will detach the interface <ifname> from the bridge <brname>.该命令brctl delif <brname> <ifname>将分离的桥梁<brname>接口<ifname>从。

  The command brctl show <brname> will show some information on the bridge and its attached ports.该命令将显示brctl显示<brname>一些端口信息的桥梁及其附属。

  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 showmacs <brname> shows a list of learned MAC addresses for this bridge. showmacs <brname> brctl显示的MAC地址列表获悉此桥。

  brctl setageingtime <brname> <time> sets the ethernet (MAC) address ageing time, in seconds. brctl setageingtime <brname> <时间>设置MAC)地址老化时间,以秒以太网(。 After <time> seconds of not having seen a frame coming from a certain address, the bridge will time out (delete) that address from the Forwarding DataBase (fdb).经过一定的地址<时间秒没有看到一帧来自,桥梁将超时(删除),解决从转发数据库(fdb)。

  brctl setgcint <brname> <time> sets the garbage collection interval for the bridge <brname> to <time> seconds. brctl setgcint <brname> <时间>设置为<时间间隔为秒的垃圾收集桥梁<brname>。 This means that the bridge will check the forwarding database for timed out entries every <time> seconds.这意味着,大桥将检查<时间秒转发数据库超时每一个条目。

  Spanning Tree Protocol生成树协议

  Multiple ethernet bridges can work together to create even larger networks of ethernets using the IEEE 802.1d spanning tree protocol.多个以太网桥可以共同创造更大的网络,以太网使用IEEE 802.1D生成树协议。 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.由于此协议是一个标准,Linux的桥梁将妥善互通的桥梁与其他第三方产品。 Bridges communicate with eachother by sending and receiving BPDUs (Bridge Protocol Data Units).桥梁沟通海誓山盟通过发送和接收BPDUs讯息(桥协议数据单元)。 These BPDUs can be recognised by an ethernet destination address of 01:80:c2:00:00:00.这些BPDUs讯息可识别以太网目标地址的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.)生成树协议还可以关闭意识(对于那些情况下它只是不作,例如在Linux机器这是唯一的桥梁,或当在局域网上,你知道,有没有循环中的拓扑。)

  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).对于这些参数的解释,看到了IEEE 802.1d的规格(或向我发送电子邮件)。 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 <bridge> <state> controls this bridge instance's participation in the spanning tree protocol. brctl污水处理厂<bridge> <state>控制此桥实例的协议参与生成树。 If <state> is "on" or "yes" the STP will be turned on, otherwise it will be turned off.如果<state>是"开"或"是"的污水处理厂将被打开,否则将被关闭。 When turned off, the bridge will not send or receive BPDUs, and wi

关键词标签:linux,双网卡桥接

相关阅读

文章评论
发表评论

热门文章 安装红帽子RedHat Linux9.0操作系统教程安装红帽子RedHat Linux9.0操作系统教程使用screen管理你的远程会话使用screen管理你的远程会话GNU/Linux安装vmwareGNU/Linux安装vmware如何登录linux vps图形界面 Linux远程桌面连如何登录linux vps图形界面 Linux远程桌面连

相关下载

人气排行 Linux下获取CPUID、硬盘序列号与MAC地址linux tc实现ip流量限制dmidecode命令查看内存型号linux下解压rar文件安装红帽子RedHat Linux9.0操作系统教程Ubuntu linux 关机、重启、注销 命令lcx.exe、nc.exe、sc.exe入侵中的使用方法查看linux服务器硬盘IO读写负载