gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

Time:2020-8-5

preface

The basis of computer network isR & D / O & M EngineerBoth need to master the knowledge, but often overlooked.

Today, I’m going to present a detailed & clear learning guide to the basics of computer network, covering TCP / UDP protocol, HTTP protocol, socket and so on. I hope you will like it.

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

1. Computer network architecture

1.1 INTRODUCTION

  • definition
    The layers of a computer network + a collection of its protocols.
  • effect
    Define the functions that the computer network can perform.

1.2 structure introduction

There are three kinds of computer network architecture: OSI architecture, TCP / IP architecture and five layer architecture.

  • OSI architecture: clear concept & complete concept, but complex & not practical;
  • TCP / IP architecture: it contains a series of network protocols which constitute the basis of Internet, and is the core protocol of Internet, which is widely used in LAN and WAN;
  • Five layer architecture: the architecture that integrates OSI and TCP / IP, with the purpose of learning and explaining computer principles.

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

The lower layer 3 is the communication subnet, which is responsible for data transmission;
The third layer is the resource subnet, which is equivalent to the computer system to complete data processing;
The transport layer connects the preceding with the following.

  • TCP / IP architecture in detail
    Because of the wide range of TCP / IP architecture, it mainly explains.

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

-Click on the picture to view the larger picture-

  • The architecture of OSI is introduced in detail

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

-Click on the picture to view the larger picture-

2. TCP protocol

Transmission control protocol

  1. Belongs to the transport layer communication protocol
  2. The application layer protocols based on TCP include HTTP, SMTP, FTP, telnet and POP3.

About TCP’s other knowledge: such as three handshakes, four wave, error free control principle, etc., please see article: computer network: This is a comprehensive and detailed TCP protocol strategy

3. UDP protocol

3.1 definition

User datagram protocol is the user datagram protocol

  1. Belongs to the transport layer communication protocol
  2. UDP based application layer protocols include TFTP, SNMP and DNS

3.2 features

Connectionless, unreliable, message oriented and congestion free control are introduced as follows:

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

3.3 advantages and disadvantages

  • Advantages: fast speed
  • Disadvantages: messages are easy to lose (especially when the network is poor)

3.4 application scenario (corresponding to application layer protocol)

High communication speed is required

For example:
Domain name translation: DNS protocol
File transfer: FTP protocol
Network management: SNMP protocol
Remote file server: NFS protocol

3.5 message segment format

UDP message segment has two fields: data field and header field
The first part (8 bytes, 4 fields) is introduced below

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

3.6 differences between TCP and UDP

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

4. HTTP protocol

  • brief introduction

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

5. Socket

5.1 introduction

Socket is the intermediate software abstraction layer between application layer and TCP / IP protocol family, which is represented as a programming interface (API) encapsulating TCP / IP protocol family

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

  1. Socket is not a protocol, but a programming call interface (API), belonging to the transport layer (mainly to solve how to transmit data in the network)
  2. That is: through socket, we can develop through TCP / IP protocol on andorid platform
  3. For users, they only need to call socket to organize data to meet the specified protocol, and then they can communicate.
  • In pairs, a pair of sockets:

Socket = {(IP address 1: port port port number), (IP address 2: port port port number)}

  • A socket instance uniquely represents the communication link of an application on a host

6. Other knowledge

6.1 process of entering URL address in browser – > > displaying home page

What protocols will be used in the whole process of opening a web page

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

6.2 IP address (IPv4 address)

  • definition
    A globally unique identifier for each host (or router) connected to the Internet
  • form
    IP address = 32 bits = network number + host number; that is, IP address: = {< network number >, < host number >}

Among them:

Network number: indicates the network to which the host (or router) is connected. A network number must be unique across the Internet.
Host number: marks the host (or router). A host number must have a unique network range specified by the network number in front of it.

Different types of IP address have different host number and network number;Therefore: an IP address is unique throughout the network.

  • classification
    The traditional IP address is classified into five categories: A, B, C, D, e

The difference is that the number of bytes occupied by network number and host number is different

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

  • Special note: among all kinds of IP addresses, some IP addresses are used for special purposes and cannot be used as host IP addresses

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

6.3 ICMP Protocol

  • definition
    Internet control message protocol is the Internet control message protocol
  1. It belongs to IP layer protocol
  2. Note: ICMP message is not a high-level protocol, but as the data of IP layer datagram, together with the header of datagram, constitutes IP datagram to be sent out
  • effect
    Forwarding IP packets more efficiently & improving delivery success

Also allow hosts / routers to report errors & exceptions

  • classification
    ICMP error report message & ICMP inquiry message
  • Main applications
    Ping (packet network probing), traceroute (tracking the path of a packet from the source to the destination, principle = sending a series of IP datagrams from the source host to the destination host)

Next, we will mainly introduce the process of Ping.

6.4 ping process

  • definition
    Packet Internet groper (packet Internet groper)
  1. It is an important application of ICMP message: it uses ipcm to send back request and reply message
  2. It is an example of application layer using ICMP directly, TCP and UDP without passing through transport layer
  • effect
    Test connectivity of 2 hosts
  • principle
  1. Send multiple ICMP echo request messages to the destination host
  2. According to the time stamp in ICMP reply message returned by the destination host, the round trip time is calculated
  3. The final results: the IP address sent to the destination host, the number of packets sent & received & lost, the minimum, maximum & average of round-trip time
  • process
    Suppose you have two hosts:
    (destination host) PC1: IP = 192.168.1.1
    (source host) PC2: IP = 192.168.1.2

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

6.5 difference between router and switch

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

6.6 cookie and session

  • brief introduction

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

  • Difference & contrast

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

6.7 cookie and token

  • brief introduction

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

  • Cookie based authentication & verification process

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

  • Token based authentication & verification process

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

gaining new knowledge! Please keep this detailed and clear learning guide of computer network foundation

Author: Carson_ Ho
Link: https://www.jianshu.com/p/45d…

Welcome to my official account of WeChat, the latest technology of the brother.2TBTechnical dry goods: includingArchitect practice course, big data, docker container, system operation and maintenance, database, redis, mogodb, e-book, java basic course, Java practical project, elk stack, machine learning, bat interview intensive lecture videoEtc. You just need to「 Migrant workers’ technology road “WeChat official account dialog box replies to key words:1024All information can be obtained.