Tracking NFS problems down to the SFP level
news.sherlock.stanford.edu
news.sherlock.stanford.edu
The key insight is that LACP is almost always configured to use do a hash of { Source IP, Dest IP, Protocol, Source Port, Dest Port } so that packets from each TCP and UDP flow will always be sent on the same individual link. (this is directional though, so it may go from peer A to peer B on cable X and from B to A on cable Y).
So the way to confirm a broken link is to connect a bunch of UDP flows (on different ports) between peer A and peer B, send data, and measure loss (and/or delay!). If you see zero loss / uniform delay, either none of your flows cross the broken link or the problem isn't a broken link or the rate of issues is too low to detect. Once you've found a broken flow, you can use a 'paris traceroute' tool to confirm the IP routers it's between. Paris traceroute holds the UDP source and destination ports fixed, so the route on LACP should say the same. I contributed support for this in mtr, but I'm not sure if it still works; if you see 100% packet loss with mtr in fixed udp port mode, send me an email (address in profile) and I'll ask you for data and try to debug.
Once you narrow down to the two routers the link is between, it should be easy enough to confirm. Usually through link quality counters, if not, through just pulling links and seeing if things get better or worse.
If you have a long network path, and most links are LACP, the total number of possible paths between two peers gets large, and there's a chance that you might not be able to survey them all from a pair of servers; so you may have to try a few different hosts.
You can find packet loss, but also congestion/buffering this way. In an ideal world, all the link error counters would be collected and anomalies would be addressed, but it seems that doesn't always happen.
For some reason, they wouldn't let me have access to router link stats ;)
https://bugs.debian.org/957663 https://bugs.debian.org/970290
I think that's why Stack Overflow websites focused on shallow conditions flourish -- the deep dives are usually specific to a given situation.
2) If both sides have the same tcpdump, it's not a network problem. Find the software problem. truss or strace can help
3) If the sides differ; figure out if the network is broken, or the os/network card is lying.
4) If the network is broken, fix it ;)
5) if the os/network card is lying, turn off the lying (mostly offloads, like segmentation, large receive, and checksum) and go back to step 1
This is basically common pattern debugging. I'm not getting the results that I expect; find a way to observe when/where the data in progress changes from what I expect to something else; along the way, being as explicit as needed about what data is expected. The closer you can narrow down where the failure occurs, the more likely you are to be able to find the failure, or a person responsible for fixing the failure who you can give your investigation results to and they can fix the failure.
Ideally you would be able to spot a large amount of link errors on a port/switch/host, and fix it before it becomes a problem.
Brian Brazil (one of the co-authors of Prometheus) wrote an snmp polling tool to use along Prometheus (snmp_exporter). You'll have to find the snmp index file that matches your switch. If one doesn't exist... You're in for a hellscape of snmp probing and determine what is where. On top of that, switch manufacturers regularly do not test snmp values upon firmware releases, so bugs crop up at the counter level regularly between firmware versions. At my last job dealing with this, we when back-to-back with firmware snmp bugs with juniper qfx10ks where counters were regularly off by 1 terabit (easy to work around) to interface data not being exposed via snmp so all reported values were zero...
The bright side is once you have SNMP polling working for networking gear, it's not too hard to extend to power equipment and other data center devices.