show access-lists cannot say which rule is denying #1267

Closed
opened 2026-11-09 20:23:34 +00:00 by jaylouisw · 0 comments
Owner

What happens

show access-lists prints the rules and tells you nothing about them:

Extended IP access list 101
  1 deny icmp any any
  2 permit ip any any
    applied IN on Gi0

Meanwhile show interfaces reports that five packets were thrown away by that list:

  5 drops (ACL 101 denied (in) x5)

So the console can tell you an ACL is denying, and never which line is doing it — which is the whole
reason this table is opened. The information exists: aclLib.evaluate() already returns matchedIndex and
whether the implicit deny matched; the only consumer was a yes/no, and the index was discarded.

And the drop summary cannot answer the follow-up either, because it reports the list, not the rule.

Expected

  • each rule prints how many packets it has matched — permits as well as denies, because "is anything even
    reaching rule 2" is the question that follows "why is rule 2 not firing";
  • a rule that has matched nothing prints no count at all, rather than (0 matches) on every line of a
    twenty-line list;
  • the implicit deny is reported with its own count once it has fired — it is a real rule and it is what throws
    away the traffic that matched nothing;
  • the count is tallied at the one place every frame is tested, both directions, so a rule added later is
    counted by construction;
  • the number agrees with show interfaces' drop figure for the same list;
  • counters are keyed by the rule itself, not its position: rewriting a list must not credit a brand-new rule
    with the old rule's traffic;
  • with no run the table says counters: not measured (no simulation run), and with a run but no traffic
    through the list it says so — neither is "zero".

Scope

The existing show access-lists output and the existing ACL evaluation path. No new commands.

## What happens `show access-lists` prints the rules and tells you nothing about them: ``` Extended IP access list 101 1 deny icmp any any 2 permit ip any any applied IN on Gi0 ``` Meanwhile `show interfaces` reports that five packets were thrown away by that list: ``` 5 drops (ACL 101 denied (in) x5) ``` So the console can tell you an ACL is denying, and never **which line** is doing it — which is the whole reason this table is opened. The information exists: `aclLib.evaluate()` already returns `matchedIndex` and whether the implicit deny matched; the only consumer was a yes/no, and the index was discarded. And the drop summary cannot answer the follow-up either, because it reports the list, not the rule. ## Expected * each rule prints how many packets it has matched — **permits as well as denies**, because "is anything even reaching rule 2" is the question that follows "why is rule 2 not firing"; * a rule that has matched nothing prints no count at all, rather than `(0 matches)` on every line of a twenty-line list; * the implicit deny is reported with its own count once it has fired — it is a real rule and it is what throws away the traffic that matched nothing; * the count is tallied at the one place every frame is tested, both directions, so a rule added later is counted by construction; * the number agrees with `show interfaces`' drop figure for the same list; * counters are keyed by the rule itself, not its position: rewriting a list must not credit a brand-new rule with the old rule's traffic; * with no run the table says `counters: not measured (no simulation run)`, and with a run but no traffic through the list it says so — neither is "zero". ## Scope The existing `show access-lists` output and the existing ACL evaluation path. No new commands.
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#1267
No description provided.