Operations 3 min read

Configuring Traffic Statistics on SwitchA and SwitchB

This guide shows how to configure traffic statistics on two switches by creating ACLs, traffic classifiers, behaviors, and policies, applying them to specific GigabitEthernet interfaces, and finally displaying the traffic policy statistics from the command line.

Practical DevOps Architecture
Practical DevOps Architecture
Practical DevOps Architecture
Configuring Traffic Statistics on SwitchA and SwitchB

This document provides step‑by‑step commands to enable traffic statistics on two network switches (SwitchA and SwitchB).

On each switch, create an ACL named 3000 and add a rule to permit ICMP traffic from source 192.168.1.10 0 to destination 192.168.1.1000 :

[SwitchA]
acl 3000
[SwitchA-acl-adv-3000]
rule permit icmp source 192.168.1.10 0 destination 192.168.1.1000
quit

Define a traffic classifier that matches the ACL:

[SwitchA]
trafficclassifier c1
[SwitchA-classifier-c1]
if-match acl 3000
quit

Create a traffic behavior to enable statistics collection:

[SwitchA]
trafficbehavior b1
[SwitchA-behavior-b1]
statistic enable
quit

Bind the classifier and behavior together in a traffic policy and apply it to the desired interfaces:

[SwitchA]
trafficpolicy p1
[SwitchA-trafficpolicy-p1]
classifier c1 behavior b1
quit
[SwitchA]
interface gigabitethernet 0/0/1
traffic-policy p1 inbound
quit
[SwitchA]
interface gigabitethernet 0/0/2
traffic-policy p1 outbound
quit

Repeat the same set of commands on SwitchB, substituting the switch name accordingly.

[SwitchB]
... (same ACL, classifier, behavior, policy, and interface commands as above) ...

Finally, from a PC, ping the server and use the display traffic policy statistics command on each switch to view the collected traffic statistics:

[SwitchA]
display traffic policy statistics
interface gigabitethernet 0/0/1
OperationsNetworkACLswitch-configurationtraffic-statistics
Practical DevOps Architecture
Written by

Practical DevOps Architecture

Hands‑on DevOps operations using Docker, K8s, Jenkins, and Ansible—empowering ops professionals to grow together through sharing, discussion, knowledge consolidation, and continuous improvement.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.