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
-
verbhertz Member Posts: 54 ■■□□□□□□□□The default source ip is the address of the interface that the packet exits.
If you made up a random ip, how would it ever return to the correct device? I haven't tested it, just a thought. -
networker050184 Mod Posts: 11,962 ModUse the show commands to find the exit interface and then you know the source. You can manually set the source, but IOS will not allow you set one that is not local to the router.An expert is a man who has made all the mistakes which can be made.
-
dppagc Member Posts: 293Hi, can you elaborate on "Use the show commands to find the exit interface"
Do you mean doing traceoute then using sh ip int br? -
phantasm Member Posts: 995Traceroute isn't a show command.
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."No man ever steps in the same river twice, for it's not the same river and he's not the same man." -Heraclitus -
networker050184 Mod Posts: 11,962 ModHi, can you elaborate on "Use the show commands to find the exit interface"
Do you mean doing traceoute then using sh ip int br?
What show command do you use when you want to find the way a packet routes?An expert is a man who has made all the mistakes which can be made.