VMware Cloud Community
prospero63
Contributor
Contributor

traceroute -i syntax

I can't find this to save my life. Does anyone know the syntax of the traceroute -i <inface> command? I've tried every vmnicX, vmkX, port group, uplink and generally interfacey thing I can think of, but I'm just missing something. TIA.

0 Kudos
7 Replies
Dave_Mishchenko
Immortal
Immortal

No luck here either.  I wouldn't expect vmnicX to work as there may not be an vmkernel IP assigned to it.   Would it be sufficient to use the -s <source_ip> option?

0 Kudos
prospero63
Contributor
Contributor

I actually tried that and it doesn't appear to work. It still sources from the directly connected interface. The actual objective here is to try to figure out which vmkernel NFS traffic can, and cannot communicate over so I'm open to other ideas and options in pursuit of that goal. TIA.

0 Kudos
Vitalyen
Contributor
Contributor

IS there an answer for this question yet? Is it bug in the vmware code?

0 Kudos
MKguy
Virtuoso
Virtuoso

I think it's just broken like you assume, I can't get it to work either.

However, you can still use the vmkping -I command which supports specifying an outgoing interface, only on ESXi 5.1 though. 5.0 or prior does not support it.

See:

http://kb.vmware.com/kb/1003728\

The actual objective here is to try to figure out which vmkernel NFS traffic can, and cannot communicate over so I'm open to other ideas and options in pursuit of that goal. TIA.

A few other options:

- Play with the routing configuration esxcfg-route to  set an alternate default interface for the specific NFS subnet.

- Disable the other vmknic like esxcli network ip interface set -i vmk1 --enabled false

- Switch the physical vmnic mapping of the vmkernel ports

-- http://alpacapowered.wordpress.com
0 Kudos
rickardnobel
Champion
Champion

prospero63 wrote:


The actual objective here is to try to figure out which vmkernel NFS traffic can, and cannot communicate over so I'm open to other ideas and options in pursuit of that goal.

You might try the nc command against port 2049 and specify different outgoing adapters to verify which paths works and which don't:

http://rickardnobel.se/troubleshoot-iscsi-tcp-connectivity-from-esxi-with-netcat

My VMware blog: www.rickardnobel.se
0 Kudos
arielsanchezmo1
Enthusiast
Enthusiast

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!

0 Kudos
CJK4428
Contributor
Contributor

tracepath ipaddress

0 Kudos