show arp names the port, and says when the neighbour is stale (#1253) #1254
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!1254
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/show-arp-interface"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
show arpnames the port, and says when the neighbour is staleFixes #1253.
The Interface column used to be a header over nothing — every row stopped at the MAC — so the one table that
tells you where a neighbour lives could not tell you. The engine had the same gap:
Device.arpisMap(ip → mac)and nothing recorded the port, even though the ARP handler hasinIfacein scope at allthree learning sites.
Every entry also looked identical whether its port was up, shut or uncabled, so a stale cache entry read as
evidence the address was reachable — the exact belief someone is checking when they run the command.
Now
Device.learnArp(ip, mac, portName)is the single entry point and keepsarpPorts; all three simulatorcall sites pass
inIface, so a future site cannot forget the port.show arpprints the port with the reason when it can no longer carry a frame —(administratively down),(down: no cable),(down: link down),(down: peer shut down). "down"alone sends you hunting a cable when the cable is fine and the far port is shut.
pulled, and the state is what marks it stale.
-; a port that no longerexists prints its name and
(gone).Age (min)stays-, and the docs now say why: the simulator counts steps, not minutes, and a step countin a minutes column is a number with the wrong unit.
10.0.0.9comes before10.0.0.10rather than after it.Evidence
test/show-arp.test.js— 28 checks:have caught the original defect);
one the data plane uses;
(
down: link down) — driven throughsim.setLinkState(), not by poking a field;-; a vanished port prints(gone);Reverting
engine/cli.jsfails 16 of the 28.docs/CLI.mdgains a "Readingshow arp" section.Suite: 140 suites, 6,021 assertions, 0 failed.
show arpnames the port, and says when the neighbour is stale (#1253)show lldppresents stale neighbours as current, and its columns run together #1265show lldpmarks stale neighbours, and its columns no longer run together (#1265) #1266