08-21-2015 10:46 AM - edited 03-01-2019 04:51 AM
In troubleshooting an L3 out connection to an external router, I would like to direct a ping out a particular VRF to verify connectivity.
With most routers, you can specify a source IP or interface for the ping. With the N9K in ACI mode with an Out-of-Band address, it appears that issuing a ping command from the command line will direct it out the management interface. I can see this by issuing a traceroute from the command line.
I have issued a ping in this matter, but is does not seem to make any difference. ping 10.255.118.27 vrf common:Common-VRF
Is there a way to direct a ping out through a particular VRF ?
thanks,
Solved! Go to Solution.
08-21-2015 10:53 AM
Hi Bruce,
You can use the iping command to specify the VRF information.
Zach
08-21-2015 10:54 AM
Hi bruceclounie,
You can source a ping from a particular VRF on a Leaf using the iping command. Here's the usage:
leaf# iping -h
usage: iping [-dDFLnqRrv] [-V vrf] [-c count] [-i wait] [-p pattern] [-s packetsize] [-t timeout] [-S source ip/interface] host
In your case the command would be:
leaf# iping 10.255.118.27 -V common:Common-VRF
Hope this helps.
08-21-2015 10:53 AM
Hi Bruce,
You can use the iping command to specify the VRF information.
Zach
08-21-2015 10:54 AM
Hi bruceclounie,
You can source a ping from a particular VRF on a Leaf using the iping command. Here's the usage:
leaf# iping -h
usage: iping [-dDFLnqRrv] [-V vrf] [-c count] [-i wait] [-p pattern] [-s packetsize] [-t timeout] [-S source ip/interface] host
In your case the command would be:
leaf# iping 10.255.118.27 -V common:Common-VRF
Hope this helps.
08-21-2015 11:07 AM
Is there an equivalent command for traceroute ?
08-21-2015 11:15 AM
Yes, itraceroute and itraceroute6 both exist. In the below output, I've hit the 'ESC' key twice to list the options.
leaf2# itraceroute
A.B.C.D Enter destination IP
A:B::C:D Enter destination IPv6
external Run itraceroute with 5-Tuple
src-ip Source EP IP
leaf2# itraceroute6
A:B::C:D Enter destination IPv6
08-21-2015 11:16 AM
Example:
SYNTAX: itraceroute target_ip vrf source_tenant:ctx
leaf4# itraceroute 62.1.1.40 vrf common:deadbeef-net1
Tenant traceroute to 62.1.1.40, tenant VRF common:deadbeef-net1, source encap vlan-61, from [65.1.1.1], payload 56 bytes
Path 1 [ Complete ] [ internal ]
1: TEP 10.0.192.93 intf eth1/4 1.014 ms
2: TEP 10.0.192.90 intf unspecified 3.471 ms
Path 2 [ Complete ] [ internal ]
1: TEP 10.0.192.94 intf eth1/4 0.942 ms
2: TEP 10.0.192.90 intf unspecified 3.577 ms
08-21-2015 11:31 AM
Tomas, thank you very much !
08-21-2015 11:08 AM
Example
leaf4# show vrf
VRF-Name VRF-ID State Reason
common:deadbeef-net1 5 Up --
common:deadbeef-net2 11 Up --
common:deadbeef-net3 6 Up --
leaf4# show endpoint vrf common:deadbeef-net1
+-----------------------------------+---------------+-----------------+
VLAN/ Encap MAC Address
Domain VLAN IP Address
+-----------------------------------+---------------+-----------------+
common:deadbeef-net1 vlan-61 65.1.1.100 L
common:deadbeef-net1 vlan-60 61.1.1.100 L
common:deadbeef-net1 vlan-63 63.1.1.100 L
leaf4# show endpoint vrf common:deadbeef-net2
+-----------------------------------+---------------+-----------------+
VLAN/ Encap MAC Address
Domain VLAN IP Address
+-----------------------------------+---------------+-----------------+
common:deadbeef-net2 vlan-69 62.1.1.40 L
common:deadbeef-net2 vlan-69 62.1.1.41 L
common:deadbeef-net2 vlan-69 62.1.1.42 L
leaf4# show ip interface vrf common:deadbeef-net1
IP Interface Status for VRF "common:deadbeef-net1"
vlan9, Interface status: protocol-up/link-up/admin-up, iod: 128,
IP address: 65.1.1.1, IP subnet: 65.1.1.0/24
IP broadcast address: 255.255.255.255
IP primary address route-preference: 1, tag: 0
vlan11, Interface status: protocol-up/link-up/admin-up, iod: 136,
IP address: 61.1.1.1, IP subnet: 61.1.1.0/24
IP broadcast address: 255.255.255.255
IP primary address route-preference: 1, tag: 0
vlan12, Interface status: protocol-up/link-up/admin-up, iod: 137,
IP address: 63.1.1.1, IP subnet: 63.1.1.0/24
IP broadcast address: 255.255.255.255
IP primary address route-preference: 1, tag: 0
leaf4# iping
Vrf context to use [management] : common:deadbeef-net1
Target IP address or Hostname : 62.1.1.40
Repeat count [5] :
Datagram size [56] :
Timeout in seconds [2] :
Sending interval in seconds [2] :
Extended commands [no] : yes
Source address or interface : 63.1.1.1
Data pattern [0xabcd] :
Type of service [0] :
Set DF bit in IP header [no] :
Time to live [255] :
Sweep range of sizes [no] :
Sending 5, 56-bytes ICMP Echos to 62.1.1.40 from 63.1.1.1
Timeout is 2 seconds, data pattern is 0xABCD
64 bytes from 62.1.1.40: icmp_seq=0 ttl=63 time=0.317 ms
64 bytes from 62.1.1.40: icmp_seq=1 ttl=63 time=0.404 ms
64 bytes from 62.1.1.40: icmp_seq=2 ttl=63 time=0.32 ms
64 bytes from 62.1.1.40: icmp_seq=3 ttl=63 time=0.369 ms
64 bytes from 62.1.1.40: icmp_seq=4 ttl=63 time=0.278 ms
--- 62.1.1.40 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.278/0.337/0.404 ms
usage: iping [-dDFLnqRrv] [-V vrf] [-c count] [-i wait] [-p pattern] [-s packetsize] [-t timeout] [-S source ip/interface] host
leaf4# iping -V common:deadbeef-net1 -S 63.1.1.1 62.1.1.40
PING 62.1.1.40 (62.1.1.40) from 63.1.1.1: 56 data bytes
64 bytes from 62.1.1.40: icmp_seq=0 ttl=63 time=0.414 ms
64 bytes from 62.1.1.40: icmp_seq=1 ttl=63 time=0.365 ms
64 bytes from 62.1.1.40: icmp_seq=2 ttl=63 time=0.245 ms
64 bytes from 62.1.1.40: icmp_seq=3 ttl=63 time=0.338 ms
64 bytes from 62.1.1.40: icmp_seq=4 ttl=63 time=0.306 ms
--- 62.1.1.40 ping statistics ---
5 packets transmitted, 5 packets received, 0.00% packet loss
round-trip min/avg/max = 0.245/0.333/0.414 ms
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide