Test a network cable using an Ethernet switch

Craig BeckNetwork Architect and EE TA
CERTIFIED EXPERT
Over 15 years' experience in enterprise network design and implementation focused on routing, switching, Wi-Fi and Cisco ISE.
Published:
So, you're experiencing issues on your network and you've decided that you need to perform some tests to determine whether your cabling is good.  You're likely thinking that you may need to spend money which you probably don't have on hiring/purchasing a cable test tool, or even a cabling tech if you're not sure where the issue lies.  That can be expensive, especially if you have to get someone to site quickly to help diagnose an issue.

Did you know that if you have a Cisco switch-based network you may well have a cable-test function already to hand?

Pretty-much any Enterprise-level Cisco switch made since the 2960 family includes a feature called the TDR test, and even some switches before (such as the 3560G) support this function.  It's only available for copper-based connections though as it's only a TDR and not an OTDR, so you can't test fiber-based links using this functionality.

This test will enable you to verify the length of a cable right from the switch to the other end, using the TDR (time-domain reflectometer) function.  This is essential in diagnosing faults as a break in the cable can be easily identified on a single wire within the cable, as well as shorts and crossed-pairs.

To use this test, simply issue the following command in privileged exec mode...

test cable-diagnostics tdr interface gi0/1
                      

Open in new window

(substitute the gi0/1 interface with whichever one you need to test)

Note: Cisco recommend performing the test with the far-end device disconnected, however you can test with devices connected and on newer switches the traffic will remain uninterrupted.  Older switches may disrupt traffic-flow momentarily during the test.


If your switch supports the command you'll see something similar to the following:

TDR test started on interface gi0/1

After a few seconds you will be able to view the result of the TDR test using the following...

show cable-diagnostics tdr interface gi0/1
                      

Open in new window



This should produce something similar to the following output:

TestSwitch#show cable-diagnostics tdr interface gi0/1
TDR test last run on: Dec 14 20:00:10

Interface    Speed    Local pair    Pair length    Remote pair    Pair status
---------        ------      ----------        -----------        -----------         -----------
Gi0/1           auto        Pair A        15 +/- 2 m          N/A                Open
                                   Pair B        14 +/- 2 m          N/A                Open
                                   Pair C        9 +/- 2 m            N/A                Open
                                   Pair D       14 +/- 2 m           N/A               Open


To decipher what this means you should look particularly at the Pair Length and Pair Status fields.  These will quickly show you if there's an issue with your cable, and what.

As you can see in the example above, Pair C has a shorter length than the other pairs, so this indicates a break in the cable somewhere as it's shorter than the others and the Pair Status is Open.  The result is very accurate, so you can be sure that the break is ~9m from the switch.  The +/- figure of 2m is the tolerance, so the break could be anywhere between 7m and 11m in theory.

This will help you determine not only how far away the break is, but also which cable is faulty.  For example, if you have a 2m patch cable between the switch and patch-panel, and a 2m cable at the other end of the cable-run at the device-end (attached to the far-end patch-panel) you can likely assume that the break is not in either of your patch cables.  Therefore you can deduce that the structured cabling between patch-panels is likely faulty - approximately 3m from the end of the cable).

The following values are typically reported for Pair Status, depending on the result of the test or fault, and the hardware you're running the test on:

Normal—The pair of wires is properly connected.
Not completed—The test is running and is not completed.
Not supported—The interface does not support TDR.
Open—The pair of wires is open.
Shorted—The pair of wires is shorted.
ImpedanceMis—The impedance is mismatched.
Short/Impedance Mismatched—The impedance mismatched or the cable is short.
InProgress—The diagnostic test is in progress

These values are as per the 3750 12.2(55)SE command reference at:
http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750/software/release/12-2_55_se/commmand/reference/3750cr/cli2.html#wp8241183


Once you've tested your cabling (and found the fault) you can clear the TDR test results using the following command:

clear cable-diagnostics tdr
                      

Open in new window


If you're testing using 10/100 interfaces you will see N/A in the length field for pairs C and D as they're not used for communication.  This is somewhat of a caveat in my opinion as those pairs can be used for PoE, but in terms of Ethernet or FastEthernet they're not required.

Obviously this isn't an absolute alternative to a proper cable diagnostic tool such as a Fluke, but it is a simple and free way to help find faults which can be easily fixed or worked-around quickly.
10
16,096 Views
Craig BeckNetwork Architect and EE TA
CERTIFIED EXPERT
Over 15 years' experience in enterprise network design and implementation focused on routing, switching, Wi-Fi and Cisco ISE.

Comments (1)

Rich SeyfertComputer Engineer

Commented:
Very good to know and a complete explanation.  Thanks.  I will try this out on some of our wiring, just to see what normal looks like. 

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.