Linux network programming learning (1) ----- Introduction and Linux model

1. What is a computer network and what is the communication method?

A computer network is a collection of computers connected to each other through communication lines, mainly through tangible transmission media such as twisted pair, coaxial cable, telephone line or optical cable, and wireless communication through lasers, microwaves, satellites, etc.

 

2, WAN sum LAN

Wide Area Networks and Local Area Networks, local area networks usually have higher communication rates, have a limited geographic area, and are owned by one department

 

3. The basic idea of ​​TCP/IP protocol

Through the network connector, that is, the gateway, various different networks are connected, and a virtual large network is constructed in the low-level protocol IQ of each network, so that the communication between users and other networks is as convenient as communication with the host of this network.

 

4. OSI's seven-layer protocol

Physical layer: bit information, hardware connection interface

Data link layer: error-free transmission of communication channels, providing data framing, error control, flow control, link control

Network layer: getting data from source host to destination host correctly and quickly, addressing and related flow control and congestion control

------The first three layers constitute the communication subnet layer, which is related to hardware and provides communication services for the upper layer (resource subnet) of the network

Transport layer: Covers the details of the underlying structure for the upper layer processing process to ensure that the information of the session layer is effectively transmitted to the session layer of the other party

Session layer: Provides communication between service requesters and providers, realizes session management between hosts at both ends, transmission synchronization and activity management, etc.

Presentation layer: implements information transformation, including information compression, encryption, code conversion, and inverse operations of the above operations

Application layer: Provide users with common applications, such as e-mail, file transfer, web browsing, etc.

 

5. Network architecture of TCP/IP

SMTP DNS HTTP FTP TELNET
TCP UDP NVP
IP ICMP ARP RARP (Reverse ARP)
Ethernet   PDN (Public Data Network) other
telephone line coaxial cable fiber optic cable

 

 

 

 

 

 

6. Three basic types of IP addresses

  • Class A address W has high-order bits of 0, and there are 126 class A addresses assigned to networks with a large number of hosts
  • Class B address The network ID is represented by WX, and the first 2 bits of the high-end are binary 10. A medium-sized network is allocated, and there are 16384 class B addresses.
  • The first 3 bits of the class C address are 110, there are about 2 million class C addresses, and each network has only 254 hosts, which are used for small local area networks
Types of   IP address website address host ID
A WXYZ W X.Y.Z
B WXYZ W.X YZ
C WXYZ W.X.Y WITH

 

 

 

 

7. Network service

  • File service Effectively store, restore and move data files, perform data read, write, access control and data management operations, and can realize file transfer, file dump, file update and file archiving between computers
  • Printing Services Network services for controlling and managing network printers and fax devices, enabling printer hardware resource sharing
  • Information service Dynamically process the communication between computer users and application programs in each node of the network, and provide communication tools
  • Application Services Coordinate hardware and software resources between networks to build the most suitable platform to run application software
  • Database service Storage, query, management and recovery of shared data, etc.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324592916&siteId=291194637