Network Basics

本文解析了浏览器从输入URL到页面展示的全过程,包括DNS解析、TCP连接建立与HTTP请求响应流程。详细介绍了DNS递归与迭代查询机制,TCP的可靠传输特性及三次握手过程,并对比了TCP与UDP的不同。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1. What happens after you typing an URL into your browser

  1. Browser contacts with the DNS server to find out the IP address of URL
  2. DNS server return the requested IP address
  3. Browser builds up and connects with web server by TCP at port 80
  4. Browser send the http request to the server and server return the html code to browser
  5. Browser renders the display result of html code
  6. Browser terminates the connection when window is closed

2. DNS 

  1. Check if the URL has already been cached. If so just return the result (local Resolver)
  2. Preferred DNS server will query other DNS server RECURSIVELY / ITERATIVELY

3. TCP & UDP

Transmission Control Protocol is a connection-oriented network protocol
  1. Reliable: When you send a message by TCP you will know it will get there. If it or some parts of it lost on the way the server will re-request the lost part.
  2. The order is guaranteed by the sequence number
  3. HeavyWeighted: all the out of order parts will be re sent
User Datagram Protocol is a connectless network protocol
  1. You don't know whether you message is delivered
  2. You don't know the order of your sent message
  3. Light Weighted: No ordering information, no tracing information. It's faster
TCP Handshake Process
  1. Client sends a SYN to server with a segment sequence number
  2. Server replies client a SYN-ACK with the client sequence number + 1 and its sequence number
  3. Client send ACK to server with server sequence number + 1
Now both client and server receive an acknowledgement of connection. The communication is established.
 
Reliable Delivery 
For each TCP packet receiver must send acknowledgement to show it is delivered. If the sender doesn't receive the acknowledgement sender will resend the packet until acknowledgement received.
 
Flow Control (TCP sender's/Receiver's Window)
A TCP window is the number of data that sender can send before it gets the acknowledgement.
 
Congestion Control
congestion window
 

4. IPv4 & IPv6

128 bits and 256 bits ip address
 

5. Basics about common internet protocol suite

Like IGMP, ICMP, HTTP, FTP, BGP, DHCP etc..
https://www.princeton.edu/~achaney/tmve/wiki100k/docs/Internet_Protocol_Suite.html

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值