Ping Question
I know this question may sound a little stupid.
Q1 When I do a ping, how do I know what is the default source interface and default source ip address?
I realized that when I am studying bgp and you have to change the source ip to the loopback to make it pingable.
e.g. ping 10.1.1.1 source lo0
Q2. When I ping, can I use a source ip address that doesnt originate from the router itself?
Can I magically conjure up an ip address from somewhere else?
What will happen?
Q1 When I do a ping, how do I know what is the default source interface and default source ip address?
I realized that when I am studying bgp and you have to change the source ip to the loopback to make it pingable.
e.g. ping 10.1.1.1 source lo0
Q2. When I ping, can I use a source ip address that doesnt originate from the router itself?
Can I magically conjure up an ip address from somewhere else?
What will happen?
Comments
If you made up a random ip, how would it ever return to the correct device? I haven't tested it, just a thought.
what I mean is that is there a show command or something like that?
Do you mean doing traceoute then using sh ip int br?
You could look at 'sh ip int br' and 'sh cdp neigh' to see which interface connects to the upstream device. When performing a ping test from a Router or Multi-layer Switch I prefer to set my source to the source interface for the network I am trouble shooting for. This provides better results.
What show command do you use when you want to find the way a packet routes?