Pinging Difference.

Hi,

PING 10.10.10.10

AND

PING 10.10.10.10 source Lo0

what is the difference ?  Can 2nd one be used of connectivity testing purpose?

 

Comments

  • First one will ping with the source address of the outgoing interface to reach 10.10.10.10. The router will recurse until it finds the outgoing interface. Maybe 10.10.10.10 is reachable via 192.168.0.1 and 192.168.0.1 is reachable via directly connected interface S0/0 with IP 100.100.100.1.

    The second one will set the source address to whatever the address of Lo0 is.

  • the  difference comes down to the source IP address of the ICMP echo (ping) packets

     

    PING 10.10.10.10 , the source IP address is whatever interface the router to use to get to 10.10.10.10 based on the recursive lookup in the routing table

     

    PING 10.10.10.10 source Lo0  ,  the source IP address is the Loopback0 interface on the router.

    both can be used for testing purposes.

    In an environment where you mostly use loopbacks to establish your peerings (BGP, LDP peerings etc...), you want to make sure that you have basic IP reachability to those loopback addresses before starting to add any more complex configurations, so the second one (PING 10.10.10.10 source Lo0) is a good example of a connectivity test that can be used where 10.10.10.10 is the loopback address on your remote router, and you want to make sure that both routers (local and remote) have connectivity to each other's loopbacks

     

    I hope this helps

     

    Cheers

  • You may also want to specify a different source interface if you want to test any filters along the path that you might have implemented. It is a very useful tool.

  • So in other words

    If i want to check connectivity through IPV4

    PING 10.10.10.10

    connectivity through source ip.

    PING 10.10.10.10 source lo0

  • So in other words

    If i want to check connectivity through IPV4

    PING 10.10.10.10

    connectivity through source ip.

    PING 10.10.10.10 source lo0

    I would like to explain based on this topology R1(12.12.12.1, Lo1.1.1.1)-(12.12.12.2, Lo 2.2.2.2)R2(23.23.23.2)-(23.23.23.3,Lo 3.3.3.3)R3

    If you ping from R2 to R3 without source, the default source IP will be the interface IP packet exiting from means source is 23.23.23.2. If you would like to check the connectivity from the Loopback of R2 to R3 use source with ping or telnet or traceroute.

    See here:

    1. R2#ping 3.3.3.3
    R3#debug ip icmp
    ICMP packet debugging is on
    R3#
    *Mar  1 00:07:30.555: ICMP: echo reply sent, src 3.3.3.3, dst 23.23.23.2 -- Now 23.23.23.2 is the destination on R3 means request came from 23.23.23.2 which is outgoing interface to R3.

    2. R2#ping 1.1.1.1
    R1#debug ip icmp
    ICMP packet debugging is on
    R1#
    *Mar  1 00:09:08.655: ICMP: echo reply sent, src 1.1.1.1, dst 12.12.12.2 -- Now 12.12.12.2 is the destination on R1 means request came from 12.12.12.12 which is outgoing interface to R1.

    If you would like to check connectivity from different interfaces (to troubleshoot routing, specific routing path) use source:

    R2#ping 1.1.1.1 so lo0
    R1#
    *Mar  1 00:12:05.175: ICMP: echo reply sent, src 1.1.1.1, dst 2.2.2.2 -- Now 2.2.2.2 is the source from 2.2.2.2.

    Some useful commnds:

    R2#telnet 3.3.3.3 /source-interface lo0
    Trying 3.3.3.3 ... Open


    User Access Verification

    Password:
    !

    R2#traceroute 3.3.3.3 source lo0

    HAPPY STUDY

    [:D]

     

Sign In or Register to comment.