mac-address-table command

I have never seen the mac table explained in depth.

What do all the heading mean?

* primary? as opposed to secondary?

vlan is the port the vlan is in that learned the mac but what if it is a static mac?

type and learn: how can you learn a static mac?

age: counts up or down to 300 seconds?

Ports: port that the mac was learned on? what about when it says switch or router?

what good is *  ---  xxxx.xxxx.xxxx    static  No           -   Router?

sh mac-address-table
Legend: * - primary entry
        age - seconds since last seen
        n/a - not available

  vlan   mac address     type    learn     age              ports
*  720  xxxx.xxxx.xxxx   dynamic  Yes          5   Gi3/24
*  888  xxxx.xxxx.xxxx   dynamic  Yes         30   Gi3/7
*  836  xxxx.xxxx.xxxx    static  Yes          -   Switch
*  639  xxxx.xxxx.xxxx    static  Yes          -   Switch
*  720  xxxx.xxxx.xxxx   dynamic  Yes         75   Gi3/7
*  720  xxxx.xxxx.xxxx   dynamic  Yes         25   Gi3/24
*   12  xxxx.xxxx.xxxx   dynamic  Yes         70   Gi3/24
*  720  xxxx.xxxx.xxxx   dynamic  Yes        105   Gi3/7
*  836  xxxx.xxxx.xxxx   dynamic  Yes          0   Gi3/24
*  639  xxxx.xxxx.xxxx   dynamic  Yes          0   Gi3/24
*  ---  xxxx.xxxx.xxxx    static  No           -   Router
*  720  xxxx.xxxx.xxxx   dynamic  Yes          0   Gi3/7
*  888  xxxx.xxxx.xxxx    static  Yes          -   Switch
*   12  xxxx.xxxx.xxxx   dynamic  Yes          0   Gi3/24
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Istvan KalmarHead of IT Security Division Commented:

It is learned from the connected pc:

*  720  xxxx.xxxx.xxxx   dynamic  Yes          5   Gi3/24
It is your switch, it has MAC address all interested VLAN
*  888  xxxx.xxxx.xxxx    static  Yes          -   Switch


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
The primary/secondary option is for redundant connections from different ports or devices that are set to use the same MAC.  HSRP, for example.

All address are in a VLAN, even if it's the default VLAN 1.  This is true for static & dynamic MAC's

Switches and routers learn static MAC's because the devices using those MAC's are advertising their presence via ARP.  If a network device is set to use a static MAC for routing traffic, it will advertise that MAC to neighboring network devices.

A MAC address will age out of the table after 300 seconds of no traffic.  So you can think of it as a countdown that resets to 300 every time a packet, with a given MAC address, goes through the switch.

The port is the physical port the MAC address is located on, the difference between switch and router is based on whetherr layer 2 protocols or layer 3 protocols are detected on that port.

I can't say for sure what "*  ---  xxxx.xxxx.xxxx    static  No           -   Router" is.  I suspect it a MAC used by the device you got this list from.
Dragon0x40Author Commented:
The age appears to be counting up from 0? If not wouldn't the entries with age 0 be gone? Everytime the mac communicates the timer is reset to 0?

I thought static mac entry meant that the mac was associated with a specific physcial port?

Layer 2 or 3 protocol detected on which port? No port is listed?

Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

The timeout age for a MAC address is set with the "mac-address-table aging-time xx" command.  When it hits this number, the MAC address ages out of the list.

Static MAC's can be associated with a VLAN and physical port

I'm still not sure where the static swtich and static router entries are coming from.
Dragon0x40Author Commented:
So age of 0 means it has 300 more seconds before timing out?

Age of 105 means it 195 more seconds before it ages out of the mac-address-table?

Assuming the default aging time of 300 seconds is still in effect.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.