People use the network everywhere.
Today, I learned about the scenario in real world network.
This picture shows us how network make us use the internet in daily life.
- Connecting laptop needs to get its own IP address, address of first-hop router, address of DNS server.
- DNS server: use DHCP
- DHCP request encapsulated in UDP, encapsulated in IP, encapsulated in 802.3 Ethernet
- Ethernet frame broadcast(destination: FFFFFFFFFFFF) on LAN received at router running DHCP server
- Ethernet demuxed to IP demuxed, UDP demuxed to DHCP
- DHCP server formulates DHCP ACK
- DHCP ACK containing client's IP address, IP address of first-hop router for client
- Name & IP address of DNS server
- Encapsulation at DHCP server, frame forwarded (switch learning) through LAN, demultiplexing at client
- DHCP client receives DHCP ACK reply
- --> Client now has IP address, knows name & address of DNS server, IP address of its first-hop router.
- Before sending HTTP request, need IP address of www.~: DNS
- DNS query created, encapsulated in UDP, encapsulated in IP, encapsulated in Eth
- To send frame to router, need MAC address of router interface: APR
- APR query broadcast, received by router, which replies with APR reply giving MAC address of router interface
- Client now knows MAC address of first hop router, so can now send frame containing DNS query
- IP datagram containing DNS query forwarded via LAN switch from client to first hop router
- IP datagram forwarded from campus network into Comcast network, routed (tables created by RIP, OSPF, IS-IS and/or BGP routing protocols) to DNS server.
- Demuxed to DNS server
- DNS server replies to client with IP address of www.~.com.
- To send HTTP request client first opens TCP socket to web server
- TCP SYN segment (step 1 in 3-way handshake) inter-domain routed to web server
- Web server responds with TCP SYNACK (step 2 in 3-way handshake)
- TCP connection established!
- HTTP request sent into TCP socket
- IP datagram containing HTTP request routed to www.~.com
- Web server responds with HTTP reply (containing web page)
- IP datagram containing HTTP reply routed back to client
'Computer Science π > Network Programming π°οΈ' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
UDP (0) | 2023.04.27 |
---|---|
Data Center Network (0) | 2023.04.27 |
VLAN (0) | 2023.04.25 |
Switch (0) | 2023.04.25 |
Ethernet (0) | 2023.04.20 |