Testing cables from a Cisco IOS-XE Switch

It's the nature of the running a network in a physical world, sometimes your cables are going to be bad. You have the cabling vendor test and send you verifications but you're still going to end up with a few cables with a mis-punched connector or a bad patch cable. So how can we identify these and get to fixing them?

Well, I'm happy to say that Cisco includes a handy TDR test that can be ran directly from the IOS-XE CLI!

We could do this test from a handheld device such as a LinkRunner or PocketEthernet but these both require us to disconnect the cable and be physically at the cable to run the test.

But first, what is TDR? Time-delay reflectometer is a test that sends a signal down the cable and listens for the reflected signal. By calculating the time that this signal takes to return, the tester can determine the length of the wire. By measuring all 8 wires in a UTP cable, we can determine if one pair of the 4 is shorter than the rest, indicating that there might be an issue with the cable.

I used to work for a University, and we had an in-house built network management tool that ran a report for use giving every wireless access point on campus that was connected at less than 1 gig. Some of these were easy to remedy because they were connected to 100-megabit ports and could quickly be moved to gig ports, but others weren't so easy. I spent about a day running TDR tests on cables all over campus and cut tickets to our cabling technicians to go replace patch cables or re-punch the cable. The best part of this test is that I could tell the technicians whether the fault was in the closet or on the far end of the cable. I think the grand total was about 100 AP with partially broken cables that we were able to fix.

I'm happy to report that I was able to drastically improve the wireless speeds across campus!

How do we run this TDR test?

Run the test with:

test cable-diagnostics tdr int gi0/<Interface ID>

While this will return immediately, the test will take a few moments to actually run.

View the test results with:

show cable-diagnostics tdr int gi0/<Interface ID>

This is the output from a working port:

Interface Speed Local pair Pair length        Remote pair Pair status
--------- ----- ---------- ------------------ ----------- -----------
Gi0/11    1000M Pair A     28   +/- 0  meters Pair A      Normal
                Pair B     28   +/- 0  meters Pair B      Normal
                Pair C     29   +/- 0  meters Pair C      Normal
                Pair D     27   +/- 0  meters Pair D      Normal

Note that the exact length of each pair will be slightly off from one another because each pair has a slightly different number of twists per inch from one another to help prevent against crosstalk.

Another thing to note is that this only works on gigabit Ethernet ports. Fast Ethernet ports cannot run these tests.

There’s a really good write up on this on the Cisco Support Forums that goes into further detail.

Ryan Harris

I’m Ryan and I’m a Senior Network Engineer for BlueAlly (formerly NetCraftsmen) in North Carolina doing routing, switching, and security. I’m very interested in IPv6 adoption, SD-Access, and Network Optimization. Multi-vendor with the majority of my work being with Cisco and Palo Alto.

Previous
Previous

My Interview Mistakes and What I've Learned From Them

Next
Next

Upgrading your Cisco IOS Password Hashes