запрос поступает с моего компьютера -> коммутатор -> шлюзы по умолчанию (я полагаю, это маршрутизаторы) -> DNS-серверы -> Центры обработки данных -> веб-сервер. Я прав?
Нет.
PC -> Ethernet broadcast: ARP-request:
"what is ethernet address for IP-address of DNS server?"
DNS-Server: ARP-response: "My Ethernet address is a:b:c:d:e:f"
PC -> DNS: "What is the IP-address of www.google.com?"
DNS-Server -> ISP DNS: "What is the IP-address of www.google.com?"
ISP-DNS -> DNS server
"I don't do recursive, do your own work, google.com DNS at 2.3.4.5, 4.5.6.7"
DNS-Server -> 2.3.4.5 "What is the IP-address of www.google.com?"
2.3.4.5 -> DNS-Server "I refuse your connection attempt!"
DNS-Server -> 4.5.6.7 "What is the IP-address of www.google.com?"
4.5.6.7 -> DNS Server
"www.google.com is 1.2.3.4; google.com DNS at 4.5.6.7, 3.2.1.3"
DNS-server -> PC "www.google.com is 1.2.3.4"
PC -> Ethernet broadcast: ARP request:
"what is ethernet address for IP-address of router?"
Router -> PC: "my ethernet address is d:e:a:d:b:e"
PC -> Router: IP to 1.2.3.4 "get / HTTP1.1; host: www.google.com"
Router -> PC: ICMP redirect: "for 1.2.3.x use router2.internal at 192.168.0.253"
PC -> Ethernet broadcast: ARP-Request:
"what is ethernet address for 192.168.0.253?"
Router2 -> PC: "my ethernet address is b:e:e:f:f:o"
PC -> Router2: IP packet for 1.2.3.4 ("get / HTTP1.1; host: www.google.com")
Router2 -> Router3 "1 IP packet for 1.2.3.4 (...)"
Router3 -> Router4 "3 IP packets for 1.2.3.4 (...)" (he split em)
Router4 -> Router5 "3 IP packets for 1.2.3.4 (...)"
Router3 -> Router2 "Routing change, line to Router 4 outage, find new route!"
Router5 -> Akamai mirror
"{external IP of Router2} sent you 'get / HTTP1.1; host: www.google.com'"
...
etc etc etc etc etc etc etc
(thousands of packets later)
PC .... { hmm, I still need 4 images and two CSS files, can't display page yet ... }
(hundreds of packets later)
Я пропустил сведения о коммутаторе, коллизиях, задержках, дросселировании, повторных передачах, связующем дереве, тайм-аутах, NAT, трехсторонних квитированиях, одновременных постоянных HTTP-соединениях и сотнях других вещей, которые происходят постоянно. Заполнение всех шагов займет тысячи строк (если не десятки или сотни тысяч), как описано выше.