0

A question about how network data traverses through the internet.

I'm wondering whether the encapsulation/de-capsulation process happens at each hop while a request is being sent through the internet. (Reference https://afteracademy.com/blog/what-is-data-encapsulation-and-de-encapsulation-in-networking)

For example, I send a HTTP/S request from my private laptop to www.google.com. When the Google web server receives my request, it prepares its response. I understand the steps are as follow.

  1. Google web server puts HTML data into a HTTP (layer 7) data stream.
  2. Data stream to be encapsulated into Transport layer (layer 4)
  3. and so on.... (until layer 1)

When the Google response traverses through the internet, it passes multiple hops (like routers from the Internet Service Provider)

Question: Does each hop conduct the de-capsulation (to lookup information) and encapsulation (to forward the response) process again? e.g. I would expect a router (layer 3) to de-capsulate the response package up to layer 3, where it reads the relevant information, and capsulate it again - so the router wouldn't de-capsulate all the way to layer 7?

Thanks in advance!

Mze
  • 13
  • 1
  • Routers strip off the data-link frame, do a lookup of the packet destination network address in the routing table, route the packet to the next interface, build a new frame for the data-link protocol of the next interface, and forward the new frame containing the packet out the next interface. Routers care nothing about the packet payload. – Ron Maupin Jun 08 '22 at 12:41
  • So does it mean if I send a HTTP/S request over a layer 4 proxy, the layer 4 proxy strip off the data segment (layer 4) and forward the HTTP/S request? – Mze Jun 09 '22 at 06:57

1 Answers1

0

Routers only operate at L2/L3 and they look at the destination IP-address of the packet. They don't care about the packet payload. Each hop will look up its routing table to forward the packet to the destination address.