Add diagnostics

This commit is contained in:
Denys Fedoryshchenko
2023-08-31 09:36:02 +03:00
parent 70da2d0e44
commit ec72a4178d
+130 -2
View File
@@ -250,8 +250,6 @@ Then bonding itself:
}
}
```
## FBF
### EX4500, EX4550
@@ -326,3 +324,133 @@ interfaces {
```
## Diagnostics
### SFP signal monitoring
If your SFP support DDMI, you can monitor the signal strength of the SFP. This is useful to see if the SFP is working properly or not.
```
admin@CORE> show interfaces diagnostics optics xe-0/0/0
Physical interface: xe-0/0/0
Laser bias current : 8.370 mA
Laser output power : 0.6260 mW / -2.03 dBm
Module temperature : 40 degrees C / 104 degrees F
Module voltage : 3.2510 V
Receiver signal average optical power : 0.4357 mW / -3.61 dBm
Laser bias current high alarm : Off
Laser bias current low alarm : Off
Laser bias current high warning : Off
Laser bias current low warning : Off
Laser output power high alarm : Off
Laser output power low alarm : Off
Laser output power high warning : Off
Laser output power low warning : Off
Module temperature high alarm : Off
Module temperature low alarm : Off
Module temperature high warning : Off
Module temperature low warning : Off
Module voltage high alarm : Off
Module voltage low alarm : Off
Module voltage high warning : Off
Module voltage low warning : Off
Laser rx power high alarm : Off
Laser rx power low alarm : Off
Laser rx power high warning : Off
Laser rx power low warning : Off
Laser bias current high alarm threshold : 100.000 mA
Laser bias current low alarm threshold : 0.000 mA
Laser bias current high warning threshold : 90.000 mA
Laser bias current low warning threshold : 0.100 mA
Laser output power high alarm threshold : 1.2580 mW / 1.00 dBm
Laser output power low alarm threshold : 0.1990 mW / -7.01 dBm
Laser output power high warning threshold : 1.0000 mW / 0.00 dBm
Laser output power low warning threshold : 0.2510 mW / -6.00 dBm
Module temperature high alarm threshold : 90 degrees C / 194 degrees F
Module temperature low alarm threshold : -5 degrees C / 23 degrees F
Module temperature high warning threshold : 85 degrees C / 185 degrees F
Module temperature low warning threshold : 0 degrees C / 32 degrees F
Module voltage high alarm threshold : 3.800 V
Module voltage low alarm threshold : 2.700 V
Module voltage high warning threshold : 3.700 V
Module voltage low warning threshold : 2.800 V
Laser rx power high alarm threshold : 1.0000 mW / 0.00 dBm
Laser rx power low alarm threshold : 0.0501 mW / -13.00 dBm
Laser rx power high warning threshold : 0.7943 mW / -1.00 dBm
Laser rx power low warning threshold : 0.0631 mW / -12.00 dBm
```
Which means:
First quickly go thru list of alarms and warnings, if you see any of them, you have a problem with SFP or fiber.
Second check values, to have estimation.
* Receiver signal average optical power : 0.4357 mW / -3.61 dBm
Means the signal is good, and the SFP is working properly. Usually signal should vary between " Laser rx power high warning threshold : 0.7943 mW / -1.00 dBm" and
"Laser rx power low warning threshold : 0.0631 mW / -12.00 dBm". Which means if it is below -12dBm or above -1dBm, you have a problem. Too low signal usually means either problem with SFP degradation or fiber attenuation(damaged?). Too high signal usually means too much light is coming to the receiver, which can be caused by too high power SFP TX on other side + too short fiber for such type of SFP, this might cause receiver burnout.
You might also watch out for "borderline" values, which are close to the threshold, this might indicate that you have a problem, but it is not critical yet.
* Laser bias current : 8.370 mA
Similar, you need to be within bounds set by "bias current".
Watch out also for SFP temperatures, if it is too high, it might indicate that SFP is overheating, and likely will degrade soon.
### Check inventory
Usually it is used to verify list of plugged in SFPs, but it also shows other hardware.
```
admin@CORE> show chassis hardware
Hardware inventory:
Item Version Part number Serial number Description
Chassis ZZZZ EX4500-40F
Routing Engine 0 REV 08 750-035702 ZZZZ EX4500-40F
FPC 0 REV 08 750-035702 ZZZZ EX4500-40F
CPU BUILTIN BUILTIN FPC CPU
PIC 0 BUILTIN BUILTIN 40x 1/10GE
Xcvr 0 REV 01 740-021308 I0512280053 SFP+-10G-SR
Xcvr 1 NON-JNPR CI151116245 SFP-T
Xcvr 2 REV 01 740-031980 F172JU01652 SFP+-10G-SR
Xcvr 3 REV 01 740-031980 F172JU01651 SFP+-10G-SR
Xcvr 4 REV 01 740-021308 I0512280054 SFP+-10G-SR
Xcvr 5 REV 01 740-031981 F172JU02038 SFP+-10G-LR
```
### New SFP not working
This might happen on Junipers, while they work with most of SFP, some might be not compatible.
If you plugged in new SFP and it is not working, you can check if it is recognized by the switch. Check by following commands:
```
show chassis hardware
show interfaces diagnostics optics **-0/0/0
show interface **-0/0/0 extensive
** should be replaced by interface name, for example xe-0/0/0, but you need to assume sometimes 1G, 10G not detected correctly, so you might need to check all possible types, like ge and xe.
```
For last command attention on lines like this:
```
Physical interface: xe-0/0/0, Enabled, Physical link is Up
Link-level type: Ethernet, MTU: 1514, LAN-PHY mode, Speed: 10Gbps, Duplex: Full-Duplex, BPDU Error: None, MAC-REWRITE Error: None, Loopback: Disabled, Source filtering: Disabled, Flow control: Disabled, Media type: Fiber
```
If physical link is Down it might also means SFP is non-standard, not detected correctly and not working.
Check also if Speed, Media type match specification.
### Packetloss
If you suspect packetloss on some link, juniper have nice "flood" ping commands.
```
admin@CORE> ping 10.0.252.2 count 1000 rapid
PING 10.0.252.2 (10.0.252.2): 56 data bytes
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
--- 10.0.252.2 ping statistics ---
1000 packets transmitted, 1000 packets received, 0% packet loss
round-trip min/avg/max/stddev = 0.572/2.286/13.992/2.207 ms
```
This will send 1000 packets as fast as possible, and will show you packetloss and RTT. While you can ignore RTT, as control plane dont have high priority, packetloss should not be present in any case.