Network Basics

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

猜你喜欢

转载自oywl2008.iteye.com/blog/2309556