default interface for ping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 08:54 AM - edited 03-08-2019 12:23 PM
from router 1, i am ping switch 1. not successful, but if i use source lo1, i am able to ping,
when we use ping command, which default source interface from router 1 is used to ping other host?
- Labels:
-
Other Switching
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 08:58 AM
The interface ping will use as the source interface is the one the routing table says is the interface used to reach the destination IP.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 09:00 AM
then why adding souce lo1 succeed and without source command failed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 09:06 AM
Don't know without seeing configurations etc.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 09:07 AM
I would guess the switch does not have a route for the interface IP but it does for the loopback IP.
Jon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 09:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2018 09:35 AM
Hello
@Mary wrote:
then why adding souce lo1 succeed and without source command failed?
Because most probably the destination devcie you pinged had a valid route back your lo0.
If you do a trace route back from your destination to the each of the connected interfaces on the source device you may find out the reason reason why?
Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.
Kind Regards
Paul

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2017 10:10 AM
his behaviour usually occurs when the destination device does not have a route back to the subnet where it was ping'd from.
So lets say you ping 10.1.1.1 from your source interface VLAN whic is 10.1.2.1.
1. The 10.1.1.1 host does not have a Default Gateway configured (the destination is in another subnet).
2. The 10.1.1.1 is not an end host but a router or a switch and it does not have a route to 10.1.2.0/x subnet.
Regards!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2018 09:10 AM
In Cisco routing, the default source interface is the IP of the connected interface used to exit the source device. Routing must work both ways; R1 must be able to reach SW1, and SW1 must be able to reach R1. Your ping from R1 to SW1 works when using lo0 because SW1 only knows how to reach the IP of R1's lo0, and not the IP of the connected interface used to exit R1.
