Networking, Troubleshooting, tips and tricks.
A new short post today for network support technicians, engineers...
One thing that you usualy check when you manage a case regarding service disruption is packet loss! The first step is to check if you have packet loss at physical layer due to framing error (CRC). Framing errors are reported per physical interface with the following command:
show interfaces xxxx statistics detail
On loaded chassis with a lot of physical interfaces it is often boring to check if you have some framing errors on one or more links. First of all, you have to check for each interface if the counter is not equal to zero and then if this counter increments fastly or slowly. You must play with this sequence of commands:
clear interfaces statistics all
show interfaces statistics detail | match "framing|phy"
wait some times and again
show interfaces statistics detail | match "framing|phy"
But the output is not well formated and you have a lot of unuseful information (logical interface, interface in down state ....)
I developed a very simple op script that facilitate this analyse for fe, ge, xe, et interfaces. This op script perfoms these following tasks :
- Takes stats for all interfaces one time
- Waits 30 seconds
- Takes again stats for all interfaces
- Displays in a human presentation statistics for only physical interfaces in Admin/Oper state up/up : input rate in pps ; Current Framing counter value ; Framing errors reported during the waiting time (Delta) ; Framing error rate in pps.
You can download the op script here: checkcrc
Then just copy the op script within the following folder : /var/db/scripts/op
And add its reference to the configuration:
edit exclusive
set system scripts op file checkcrc.slax
commit sync comment "Add one op script" and-quit
Then you can play with it. Hereafter a sample output:
sponge@bob> op checkcrc
Sat Jan 26 17:26:10 2013
Please wait 30 seconds - during stats gathering...
+---------------------------------------------------------------+
|Interface |Input pps |CRC Counter |Delta CRC |CRC pps |
+---------------------------------------------------------------+
|xe-0/0/0 |281 |0 |0 |0 |
|xe-0/1/0 |118124 |1693457189 |40000432 |1333347 |
|xe-0/2/0 |2 |0 |0 |0 |
|xe-0/3/0 |1 |0 |0 |0 |
|ge-2/0/4 |2 |0 |0 |0 |
|xe-4/0/0 |46 |0 |0 |0 |
|xe-4/0/1 |0 |0 |0 |0 |
|xe-4/1/0 |1 |0 |0 |0 |
|xe-4/1/1 |2 |0 |0 |0 |
+---------------------------------------------------------------+
If you experience some pb with this script don't hesitate to ping me by mail or twitter... **
David