mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-01-10 22:21:11 +08:00
Translated:2014825 Linux FAQs with Answers--How to show a MAC learning table of Linux bridge.md
This commit is contained in:
parent
097f80fb4a
commit
9368af255a
@ -1,23 +0,0 @@
|
||||
Translating by GOLinux ...
|
||||
Linux FAQs with Answers--How to show a MAC learning table of Linux bridge
|
||||
================================================================================
|
||||
> **Question**: I would like to check MAC address learning status of a Linux bridge that I created with brctl tool. How can I view the MAC learning table (or forwarding table) of a Linux bridge?
|
||||
|
||||
A Linux bridge is software implementation of a network bridge, which is part of Linux kernel. Similar to hardware bridge, Linux bridge maintains a layer-2 forwarding table (also known as MAC learning table, forwarding database, or just FDB), which keeps track of what MAC addresses are associated with which ports. When a bridge receives a packet (with source MAC address X) at port N, it records in FDB that MAC address X is reachable from port N. That way, later when a bridge needs to forward a packet destined to address X, it knows where to forward the packet from FDB lookup. Building a FDB is often called "MAC learning" or just "learning" process.
|
||||
|
||||
You can check the current forwarding table or MAC learning table of a Linux bridge using the following command.
|
||||
|
||||
$ sudo brctl showmacs <bridge-name>
|
||||
|
||||
![](https://farm4.staticflickr.com/3856/14963353726_8971873948_z.jpg)
|
||||
|
||||
This command will show a list of all learned MAC addresses along with their associated port number. Each entry has a corresponding aging timer attached to it, so that the forwarding entries get refreshed after some time, making the MAC learning table up-to-date.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/show-mac-learning-table-linux-bridge.html
|
||||
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
@ -0,0 +1,23 @@
|
||||
Linux有问必答——如何显示Linux网桥的MAC学习表
|
||||
================================================================================
|
||||
|
||||
> **问题**:我想要检查一下我用brctl工具创建的Linux网桥的MAC地址学习状态。请问,我要怎样才能查看Linux网桥的MAC学习表(或者转发表)?
|
||||
|
||||
Linux网桥是网桥的软件实现,这是Linux内核的内核部分。与硬件网桥相类似,Linux网桥维护了一个2层转发表(也称为MAC学习表,转发数据库,或者仅仅称为FDB),它跟踪记录了MAC地址与端口的对应关系。当一个网桥在端口N收到一个包时(源MAC地址为X),它在FDB中记录为MAC地址X可以从端口N到达。这样的话,以后当网桥需要转发一个包到地址X时,它就可以从FDB查询知道转发到哪里。构建一个FDB常常称之为“MAC学习”或仅仅称为“学习”过程。
|
||||
|
||||
你可以使用以下命令来检查Linux网桥当前转发表或MAC学习表。
|
||||
|
||||
$ sudo brctl showmacs <bridge-name>
|
||||
|
||||
![](https://farm4.staticflickr.com/3856/14963353726_8971873948_z.jpg)
|
||||
|
||||
该命令将显示一个学习到的MAC地址与关联端口的列表。各个条目都有一个相关的附于其上的老化计时器,因此转发条目可以在一定时间后刷新,以使MAC学习表更新到最新。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: http://ask.xmodulo.com/show-mac-learning-table-linux-bridge.html
|
||||
|
||||
译者:[GOLinux](https://github.com/GOLinux)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创翻译,[Linux中国](http://linux.cn/) 荣誉推出
|
Loading…
Reference in New Issue
Block a user