Routing – Does Reply Use Same Path as Ping Sent?

routerrouting

From the title this question looks duplicate but it's not from the content!

My question is that if all networks with proper gateways are connected to each other in a single loop through routers without static routing, each router and computer is assigned the IP of the next router in clockwise direction as a default gateway now if I send a ping from PC1(192.168.111.55) to a computer in 192.168.3.x Network(see picture) then in my understanding ping should go through Router-A then Router-B and then Router-C and at last reach to the specified computer IP. Now again in my understanding(in this simplest configuration) the pinged computer will only know that 192.168.2.254 has pinged it but in fact that ping had came from PC1 so the reply(echo) should come back to Router-C then Router-B and then Router-A and at last to original computer PC1. So here the reply path must be same as the ping path but this is my understanding of the router functionality(Router translates the IP and works like a middleman so the destination computer does not know that the ping was, in fact, came from just one router away to the right). However many people say the path of reply can be different which make me crazy as i don't understand how the destination PC come to know of the PC1(unless told in the message packet).

Can somebody please help me clear the ideas that if I am correct that the reply path would be same as the ping path unless some special manual configuration. Or how is this possible that the reply path could be different?

Please feel free to edit the question if you can clarify it more. Thanks.

NOTE: I have taken the following image from HERE, where the author claims that the reply can follow the path of Router-D which I don't understand.
(Yes if the computer from network-3 ping PC1 then , of course, the ping path should be Router-D else how can it come know of the IP of the PC1).

enter image description here

Best Answer

Just for clarity, when you say "each router and computer is assigned the IP of the next router in clockwise direction as a default gateway", that is definitely static routing.

Your computer 192.168.3.10's ping reply will definitely go to D. The basic routing algorithm when the IP stack gets a packet is

  1. Is it for me? If so I process it.
  2. Is it for something directly connected to any of my interfaces? If so send it direct
  3. Do I have a route for it? If so send it to that next hop.

A computer 192.168.3.10 sending a packet to 192.168.111.55 for any reason will send it to 3.10's default gate 192.168.3.1. "Any reason" includes "human told me to" (ping) and "I'm answering something" (ping reply).

The idea that the routers remember absolutely nothing about routes from one packet to the next is simultaneously a brilliant idea central to the internet protocol, and somewhat expensive to implement. It means the routes can change between one packet and the next and everything sorts itself out. If the router were to send things back where they came from, think about the situation where the routes change immediately after the packet arrived. Should the router follow its own, new, rule or the old, remembered, one? The simplicity of IP is exactly here: always follow your own rule for forwarding, never remember anything.

(Previous statement subject to caveats about sophisticated routing protocols, ethernet switching, and all kinds of special-case complexities. The base case is as simple as this.)

Hope that helps a bit.

Jonathan.