Hi! I found this post through Google and thought I would answer it. I thought it was -L and that showed me the correct syntax which indeed is -i in v5.5 at least - but you have to use the vmk# format. To find that use this command
AAA.BBB is my current management network and XXX.YYY is my problem network.
~ # esxcli network ip interface ipv4 get
Name IPv4 Address IPv4 Netmask IPv4 Broadcast Address Type DHCP DNS
---- -------------- ------------- -------------- ------------ --------
vmk0 10.AAA.BBB.132 255.255.255.0 10.AAA.BBB.255 STATIC false
vmk1 10.XXX.YYY.95 255.255.255.0 10.XXX.YYY.255 STATIC false
~ # traceroute 10.XXX.YYY.1 -L vmk1 # this was a wild ass guess and it corrected me
Version 1.4a12
Usage: traceroute [-dFnrUvxX] [-f first_ttl] [-i iface] [-m max_ttl]
[-p port] [-q nqueries] [-s src_addr] [-t tos]
[-w waittime] [-z pausemsecs] host [packetlen]
Options:
-d Enable socket level debugging
-F Do not fragment packets
-f first_ttl Start from the first_ttl hop (intead of 1)
-i device Specify a VMKNIC to operate with
-m max_ttl Set the max number of hops (max TTL to be reached). Default is 30
-n Do not resolve IP addresses to their domain names
-p port Set the destination port to use.
For the default UDP method this is the initial port, incremented each probe
For the ICMP method this is the initial seq number, incremented each probe
-q nqueries Set the number of probes per each hop. Default is 3
-r Bypass the normal routing and send directly to a host on an attached network
-s src_addr Use src_addr for outgoing packets
-t tos Set the Type Of Service value for outgoing packets
-U Use UDP packets instead of ICMP ECHO for tracerouting
-v More verbose output
-w waittime Set wait time for response to a probe
-x Compute IP checksums
-X Output results in XML format
-z pausemsecs Delay to pause for before sending first probe
So in this case i'm testing vmk1. vmk0 is active, and ESXi will try that by default
~ # traceroute 10.XXX.YYY.1
traceroute: Warning: Multiple interfaces found; using 10.AAA.BBB.132 @ vmk0
traceroute to 10.XXX.YYY.1 (10.XXX.YYY.1), 30 hops max, 40 byte packets
~ # traceroute 10.XXX.YYY.1 -i vmk1
traceroute to 10.XXX.YYY.1 (10.XXX.YYY.1), 30 hops max, 40 byte packets # notice it no longer gives a warning specifying which interface it uses
1 * * *
2 *traceroute: sendto: Host is down
I know it took a while but I hope that helps people checking this post from a search engine!