The MAC table never ages, so show mac address-table prints a row it can only describe as possibly stale #1395

Closed
opened 2026-11-10 23:12:51 +00:00 by jaylouisw · 0 comments
Owner

The switch table has no timestamps at all. An entry stays until its port changes VLAN or the lab is reloaded — which
is why show mac address-table has to append a note saying the row might be stale, and why the source says "real
switches age entries out, this one does not"
.

The simulator has had an instant in milliseconds since convergence was modelled, so an entry can be stamped with when
it was heard and aged against the question being asked:

learned at t=60 s     present at 200 s (140 s silent)     gone at 400 s (340 s silent)
heard again at 250 s  present at 500 s                    the age is silence, not a lifetime

What must be true instead

  • MAC_AGE_MS (300 s) names the age once; learnMac stamps an entry, macLookup answers nothing for an aged one;
  • the forwarding decision uses the aged lookup, so a frame is never sent to a port the table only remembers —
    when the lookup answers nothing the frame floods, as it does for an address never seen;
  • show mac address-table prints an Age column, and rows leave when they age out;
  • an entry with no timestamp — a fixture's, an imported lab's — is never aged and reports -, because nothing
    recorded when it was seen;
  • the timeline's "forward or flood" reading asks the same lookup, so the record and the decision cannot disagree.
The switch table has no timestamps at all. An entry stays until its port changes VLAN or the lab is reloaded — which is why `show mac address-table` has to append a note saying the row might be stale, and why the source says *"real switches age entries out, this one does not"*. The simulator has had an instant in milliseconds since convergence was modelled, so an entry can be stamped with when it was heard and aged against the question being asked: ``` learned at t=60 s present at 200 s (140 s silent) gone at 400 s (340 s silent) heard again at 250 s present at 500 s the age is silence, not a lifetime ``` ## What must be true instead * `MAC_AGE_MS` (300 s) names the age once; `learnMac` stamps an entry, `macLookup` answers nothing for an aged one; * the **forwarding decision** uses the aged lookup, so a frame is never sent to a port the table only remembers — when the lookup answers nothing the frame floods, as it does for an address never seen; * `show mac address-table` prints an `Age` column, and rows leave when they age out; * an entry with **no timestamp** — a fixture's, an imported lab's — is never aged and reports `-`, because nothing recorded when it was seen; * the timeline's "forward or flood" reading asks the same lookup, so the record and the decision cannot disagree.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
jaylouisw/packetforge#1395
No description provided.