-2

In command prompt when I fire the ping 10.1.1.2

Assume that I am located in Germany and the above IP address belongs to California.

How does the packet travel from my computer (Germany) to the computer in California? Does it go via London or does it go via China?

1
  • Depending on your OS, you probably have a traceroute or tracert command available that'll show the IP addresses (and maybe domain names) of the routers your packets to through on the way there. There are also third-parts programs that do this and also try to map where those routers are, so you can see roughly what path the packets take (I say roughly because e.g. the packets might go cross the ocean via a submarine cable, and the trace will show the routers at the ends of the cable, but not the actual path the cable follows) (also, router locations may be wrong). Jun 18 at 9:51
1

Each packet is routed over a number of routers. Each router uses its own, local routing table to decide which way the current packet is forwarded. There's no general rule which path a packet takes, apart from that logic.

Likely, packets from Germany to the US travel over London, but it's also possible that they're taking another path - even one that temporarily runs in the opposite direction.

Note that 10.1.1.2 is a private IP address that can only be used in non-public networks. So, the path that packet takes depends on your organization entirely.

2
  • By routers do you mean the ISP routers?
    – variable
    Jun 18 at 8:47
  • All routers - your own, the ISP's, carriers', ... The rough path is your LAN - your ISP - carrier - carrier - destination ISP - destination network, each step with one or multiple gateways.
    – Zac67
    Jun 18 at 9:22
0

So packets are forwarded or sent in the 3rd layer(Network Layer) of the OSI model as well as the TCP/IP model. Each router will have its own routing table. For an example if a packet is routed from the source IP 192.168.1.3/24 to 192.168.10.6/24 the scenario will be as follows. You can clearly understand that the source and destination are in two different networks which are 192.168.1.0 network and 192.168.10.0 network(Therefore the IP address will be divided into two parts which are the network portion and the host portion where the host is unique in each network portion).

So when the packet is sent to the router the router will look for the destination network address from its routing table. It won't check the IP. It will only check the destination network address and the packet will be sent to the interface in which has the corresponding destination address (In this case the destination address will be 192.168.10.0).

After getting into that relevant network then the IP address will be used (192.168.10.6, including the host portion) to find its destination.

You can use the tracert {IP address} or the traceroute {IP address} command to see the path of the packet. It will give you all the main ping points in the journey!!! Plus I have to state that we can't say the exact path whether it will travel through china or somewhere else cause the routers will choose the best path for the routing journey for that particular time period. Algorithms are used for that.

So basically this is how a packet will travel from its source to the destination.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.