How does data sent over the internet know where to go? - eviltoast

I saw a map of undersea internet cables the other day and it’s crazy how many branches there are. It got me wondering - if I’m (based in the UK) playing an online game from someone in Japan for example, how is the route worked out? Does my ISP know that to get to place X, the data has to be routed via cable 1, cable 2 etc. but to get to place Z it needs to go via cable 3, 4?

  • OmegaMouse@pawb.socialOP
    link
    fedilink
    arrow-up
    2
    ·
    8 months ago

    Oh wow, this unlocked a memory! Pretty sure I watched back in school. Quite informative, though it felt like it skipped a lot between leaving the host computer and reaching the destination - is it just the same process over and over until it reaches the right place?

    • CondorWonder@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      8 months ago

      Yes, the packet passes through routers at each stage and they direct the packet to the ‘closest’ path based on its destination, until the final router has the destination on its network. This can happen a few times (for something in your ISP network), or 10-30+ times for something further away.