Measure the cable lengths on a Catalyst switch

Ken McCoy sent me a short question:

At one point someone posted an article about a command you could run on the Catalyst switch that would give you back the distance of the cable between the switch and end device, but now I can't find it.
I remembered reading the same article and after I've figured out the underlying technology is called TDR (Time Domain Reflectometer), uncle Google immediately provided a reader tip from Csaba Farkas.
This article is part of You've asked for it series.

5 comments:

  1. Hm. I just run it and came back with some funny results . . . Maybe I should try again but following the guidance at http://www.cisco.com/en/US/docs/ios/fundamentals/command/reference/cf_t1.html#wp1046637

    c3560#sh cable-diagnostics tdr inter gi0/2
    TDR test last run on: August 19 21:47:29

    Interface Speed Local pair Pair length Remote pair Pair status
    --------- ----- ---------- ------------------ ----------- --------------------
    Gi0/2 100M Pair A 1 +/- 4 meters Pair A Normal
    Pair B 1 +/- 4 meters Pair B Normal
    Pair C 2 +/- 4 meters Pair C Short
    Pair D 2 +/- 4 meters Pair D Short

    ReplyDelete
  2. How on earth can it find the cable length?! That's clever!

    ReplyDelete
  3. The underlying theory is simple: an electric pulse travels along the cable with pretty well-known speed. Furthermore, when a pulse arrives at the end of an unterminated cable (or a cable break) it's bounced back due to impedance mismatch (this is "slightly" oversimplified explanation, but not further from the truth than the flat-earth theory was in middle ages :).

    The switch (actually part of the NIC hardware) sends a pulse into the cable and measures when the pulse returns. Calculating distance based on measured travel time and (known) propagation speed in cable is trivial.

    ReplyDelete
  4. The URL for Csaba Farkas article has moved to:

    http://supportwiki.cisco.com/ViewWiki/index.php/Tech_Insights:Cool_Tool_for_Solving_Layer_1_Cable_Issues

    ReplyDelete
  5. Thanks, Steiner! Fixed the link.

    ReplyDelete

You don't have to log in to post a comment, but please do provide your real name/URL. Anonymous comments might get deleted.

Ivan Pepelnjak, CCIE#1354, is the chief technology advisor for NIL Data Communications. He has been designing and implementing large-scale data communications networks as well as teaching and writing books about advanced technologies since 1990. See his full profile, contact him or follow @ioshints on Twitter.