Description

This article explains an issue where the traceroute command when run with port number option in the CLI does not work.

Symptoms

​​When the traceroute command is run from the CLI it gives the following output:

root@device> traceroute 8.8.8.8 port 50000
Version 1.4a12+FreeBSD
Usage: traceroute [-ASdfnrv] [-w wait] [-i initial_ttl] [-m max_ttl]
         [-p port#] [-q nqueries] [-t tos] [-s src_addr] [-g gateway]
         [-J 4|6|r|I interface_name|U routing_instance|Llogical_router|P]
         host [data_size]

However, the traceroute option without "port" option works fine:

root@device> traceroute 8.8.8.8        
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 40 byte packets
 1  10.85.151.131 (10.85.151.131)  15.671 ms  14.694 ms  20.731 ms
 2  10.85.128.129 (10.85.128.129)  1.136 ms  2.665 ms  0.971 ms
^C​

In some releases, the "port" option is available but it does not work:

{master:0}
root@Device> traceroute 8.8.8.8 ?
Possible completions:
  <[Enter]>            Execute this command
  as-number-lookup     Look up AS numbers for each hop
  bypass-routing       Bypass routing table, use specified interface
  gateway              Address of router gateway to route through
  inet                 Force traceroute to IPv4 destination
  inet6                Force traceroute to IPv6 destination
  interface            Name of interface to use for outgoing traffic
  no-resolve           Don't attempt to print addresses symbolically
  port                 Port for ssh connection (default is 22)
  propagate-ttl        Enable propagate-ttl for locally sourced RE traffic
  routing-instance     Name of routing instance for traceroute attempt
  source               Source address to use in outgoing traceroute packets
  tos                  IP type-of-service field (IPv4) (0..255)
  ttl                  IP maximum time-to-live value (or IPv6 maximum hop-limit value)
  wait                 Number of seconds to wait for response (seconds)
  |                    Pipe through a command​

Solution

This problem is resolved in the following Junos releases:

  • 17.4R2-S3
  • 17.4R3
  • 18.1R3-S4
  • 18.2R3
  • 18.2X75-D40
  • 18.3R2
  • 18.4R2
  • 19.1R2
  • 19.2R1