본문 바로가기
Computer Science/network

6. Web request senario

by yongmin.Lee 2020. 7. 26.

상황 : host A가 www.google.com에 접속하려고 함.

 

1. host A는 LAN에 접속 (no IP)

2. host A는 DHCP request 메세지를 flooding 기법으로 broadcast (UDP)
-> switch는 호스트의 MAC address와 inteface를 learning

3. DHCP 서버는 UDP demux로 request 메세지를 이해

4. DHCP 서버는 DHCP ACK 메시지 전송 ( yiaddr, ip addr of first hop router, DNS server name & id 포함)
-> 2번에서 host의 MAC address와 inteface를 learning했으므로 uni cast 가능

5. host A는 ip 할당 받음 , www.google.com에 접속하기 위해 ip 필요 => LAN에 없으면 DNS query

6. DNS query송신시, 

    source ip            : A's IP

    destination ip      : DNS ip

    source MAC        : A's MAC addr

    destination MAC  : router's MAC addr

query메세지를 전송함으로써 router가 LAN외부로 나가는 메세지임을 확인 => ARP

7. router는 DNS IP를 보고 해당 메세지를 DNS 서버가 있는 곳 routing (RIP, OSPF, BGP) 및 forwarding

8. DNS query를 수신한 DNS 서버는 DNS 계층을 거치면서 www.google.com의 주소를 알아내고 host A에게 알려줌

9. host A는 www.google.com의 ip를 가지고 3-way handshaking으로 tcp connection 설정  

10. host A는 http request로 원하는 객체 요구 및 google 서버는 http response로 host A에게 해당 파일 전송



'Computer Science > network' 카테고리의 다른 글

5. link layer 2계층  (0) 2020.07.18
4. Network layer 3계층  (0) 2020.07.18
3. Transport layer 4계층  (0) 2020.07.18
2. Application layer 5계층  (0) 2020.07.18
1. 컴퓨터 네트워크와 인터넷  (0) 2020.07.18