Getting started with Linux: how to display the MAC learning table of Linux Bridge

Source: Internet
Author: User

Getting started with Linux: how to display the MAC learning table of Linux Bridge

Q: I want to check the MAC address learning status of the Linux bridge I created using brctl. How can I view the MAC learning table (or forwarding table) of the Linux bridge )?

Linux bridge is the software implementation of the bridge, which is the kernel part of the Linux kernel. Similar to the hardware bridge, the Linux bridge maintains a layer-2 Forwarding Table (also known as MAC learning table, forwarding database, or FDB ), it tracks the correspondence between MAC addresses and ports. When a bridge receives a packet on port N (the source MAC address is X), it records MAC address X in FDB and can arrive from Port N. In this case, when the bridge needs to forward a packet to address X, it can query from FDB to know where the packet is forwarded. Building an FDB is often called "MAC learning" or "learning.

You can use the following command to check the current forwarding table or MAC learning table of the Linux bridge.

  1. $ Sudo brctl showmacs <bridge-name>

This command displays a list of learned MAC addresses and associated ports. Each entry has a related aging timer attached to it. Therefore, the forwarding entries can be refreshed after a certain period of time to update the MAC learning table to the latest version.

This article permanently updates the link address:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.