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
Dragon0x40Asked:
Who is Participating?
 
Istvan KalmarHead of IT Security Division Commented:
Hi,

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

0
 
eeRootCommented:
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.
0
 
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?

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
eeRootCommented:
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.
0
 
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.

0
 
eeRootCommented:
correct
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.