Quantcast
Channel: All Routing posts
Viewing all articles
Browse latest Browse all 8688

Re: Why the ping command is not complicated?

$
0
0

Hi,

 

When you run "ping 6.1.1.1", the ping is being initiated from the default instance [inet.0].

If there is a route for 6.1.1.1 in inet.0, the ping should be able to use the egress interface of that route.

In this case, there should be a direct route for 6.1.1.1 in the routing-table where the interface is configured.

 

Possible reasons why the ping does not work is when the interface is in a routing-instance.

Example:

root@PE01# run show route table inet.0 192.168.102.2    

[edit]
root@PE01# run ping 192.168.102.2 
PING 192.168.102.2 (192.168.102.2): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- 192.168.102.2 ping statistics ---
2 packets transmitted, 0 packets received, 100% packet loss

root@PE01# run ping bypass-routing interface ge-0/0/1 192.168.102.2    
PING 192.168.102.2 (192.168.102.2): 56 data bytes
64 bytes from 192.168.102.2: icmp_seq=0 ttl=64 time=3.483 ms
64 bytes from 192.168.102.2: icmp_seq=1 ttl=64 time=2.255 ms
^C
--- 192.168.102.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 2.255/2.869/3.483/0.614 ms

The interface was in a routing-instance TEST-VRF:

root@PE01# run show interfaces terse routing-instance TEST-VRF 
Interface               Admin Link Proto    Local                 Remote
ge-0/0/1.0              up    up   inet     192.168.102.1/30

Specifying the routing-instance for the ping:

root@PE01# run ping routing-instance TEST-VRF 192.168.102.2 
PING 192.168.102.2 (192.168.102.2): 56 data bytes
64 bytes from 192.168.102.2: icmp_seq=0 ttl=64 time=2.159 ms
64 bytes from 192.168.102.2: icmp_seq=1 ttl=64 time=1.366 ms
^C
--- 192.168.102.2 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max/stddev = 1.366/1.762/2.159/0.396 ms

root@PE01# run show route 192.168.102.2 

TEST-VRF.inet.0: 5 destinations, 8 routes (5 active, 0 holddown, 0 hidden)
+ = Active Route, - = Last Active, * = Both

192.168.102.0/30 *[Direct/0] 00:14:34
> via ge-0/0/1.0

Do you have a route for 6.1.1.1 in inet.0?

 

Hope this helps.

Cheers,

Ashvin


Viewing all articles
Browse latest Browse all 8688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>