Enhance the traceroute output

After working with MPLS Traffic Engineering lab for a few days and interpreting IP addresses from various traceroute outputs, I finally had enough and wrote a simple Perl script that parses router configurations and produces ip host configuration commands for every interface IP address it encounters. When you paste the ip host commands into the configuration of the edge router from which you do the tests, the meaningless numbers finally make sense.

Just compare the “traditional” output produced in the MPLS TE test lab

PE-A#traceroute PE-C

Type escape sequence to abort.
Tracing the route to PE-C (10.0.1.5)

  1 10.0.7.6 [MPLS: Label 1017 Exp 0] 16 msec 136 msec 52 msec
  2 10.0.7.26 [MPLS: Label 3018 Exp 0] 8 msec 20 msec 8 msec
  3 10.0.7.30 [MPLS: Label 4018 Exp 0] 16 msec 20 msec 56 msec
  4 10.0.7.33 [MPLS: Label 2017 Exp 0] 20 msec 44 msec 20 msec
  5 10.0.7.17 24 msec *  24 msec

… with this one:

PE-A#traceroute PE-C

Type escape sequence to abort.
Tracing the route to PE-C (10.0.1.5)

  1 Serial1-0.C1 (10.0.7.6) [MPLS: Label 1017 Exp 0] 56 msec
  2 Serial1-2.C3 (10.0.7.26) [MPLS: Label 3018 Exp 0] 12 msec
  3 Serial1-1.C4 (10.0.7.30) [MPLS: Label 4018 Exp 0] 48 msec
  4 Serial1-2.C2 (10.0.7.33) [MPLS: Label 2017 Exp 0] 52 msec
  5 Serial1-0.PE-C (10.0.7.17) 16 msec *  64 msec

3 comments:

  1. Hi Ivan,

    one small glitch: if you click on the title of this post, it takes you to http://wiki.nil.com/Generate_hostnames_from_router_configurations . Looks like a copy/paste error.

    ReplyDelete
  2. Sorry, my bad...

    I saw the title and then the link seemed to have nothing to do with it. It all made sense after reading it. :)

    However, I noticed that the blog entries that point to wiki articles "behave" differently than the "stand-alone" blog entries. The difference is seen when clicking on the title vs. clicking on more. In the first case, clicking on the title takes you to the wiki, so, in order to see the comments (or the rest of the blog entry, like in this case), you need to click on "More". In the second case, clicking on the title or More (obviously) takes you to the content (and comments) of the blog entry.

    Just an observation, I don't see this as a bug.

    ReplyDelete
  3. You're absolutely right. I shouldn't have mixed the partial-page format (with the "More ..." link) with the intro-text format (with the title link pointing to the target article). It's confusing.

    I've removed the title link from this article.

    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.