Introduction to network technology (1): Basic understanding of network technology

A series of articles on "Introduction to Network Technology" explain the network transmission process from the perspective of macro hardware and micro data transmission. Please look forward to the subsequent series of articles.
This chapter is mainly of a summary nature , so that everyone has a basic concept and idea, and subsequent series of articles will bring detailed process explanations.

Recommend an easy-to-understand book on the Internet, Japanese author Hu Genqin's "How the Internet Connects" is well worth a look.

1. OSI seven-layer model

OSI seven-layer model TCP / IP conceptual layer model Features TCP / IP protocol cluster relative devices
Application layer Application layer File transfer, email, virtual terminal HTTP、FTP、SMTP、DNS…
Presentation layer Data formatting, code conversion, data encryption LPP…
Session layer Disconnect or establish contact with other contacts SSL、TLS
Transport layer Transport layer Provide end-to-end interface TCP、UDP
Network layer Network layer Route packets IP、ICMP、RIP… router
data link layer Link layer Addressed frames and error detection function ARP、SLIP、CSLIP… Switch, network card, network bridge
Physical layer Transfer data on physical media in binary form Hub, network cable, repeater

The following provides a network communication diagram
https://blog.csdn.net/qq_27096221/article/details/105600485

Second, the network request icon flow

This chapter explains the network request process from the macro (Figure 1), TCP / IP transmission perspective (Figure 2) and HTTP transmission perspective (Figure 3)

1 Macro picture of network request

Insert picture description here

2 TCP / IP communication transport stream

Insert picture description here

3 Http request process

Insert picture description here

3. Concepts

1 Local area network (subnet) and wide area network (Internet, extranet)

Local Area Network (Local Area Network), referred to as LAN, refers to a group of computers interconnected by multiple computers in a certain area.
Wide Area Network (Wide Area Network), referred to as WAN for short, is a collection of computer networks that span large, regional areas, usually across provinces, cities, or even a country. The WAN includes subnets of different sizes. The subnet can be a local area network or a small WAN.

The WAN can be called an extranet, and the LAN can be called a subnet

2 Routers, switches and hubs

Insert picture description here

router switch
Working level Network layer data link layer
Basis for forwarding IP address MAC address
Features Connect to different networks in the Internet (connect to different LANs in the Internet) Connect to different hosts in the LAN
Broadband impact Shared broadband Exclusive broadband
switch Hub
Working level data link layer Physical layer
Broadband impact Exclusive shared
data transmission Purposeful delivery Broadcast transmission
Transmission mode Full duplex or half duplex Half duplex

Hub : Responsible for communication between hosts in the same sub-network (Local Area Network), only broadcast. Connect the host device
switch in the local area network : responsible for the communication between the hosts in the same subnet (local area network), through the Mac address communication, it can be broadcast or unicast. Connect to the host device
router in the local area network : responsible for communication between different networks (Internet), through the IP address.

Summary:
Routers are connected to different subnets in the Internet.
Switches and hubs are connected to different hosts in the LAN.

3 Network address (IP and port number), MAC address function

Each computer has two types of addresses. There is no connection between the two types of addresses. The MAC address is bound to the network card, and the network address is assigned by the administrator.

IP address MAC address The port number
How to allocate Administrator assignment Write on the network card BIOS Operating system allocation
Working level Network layer data link layer Transport layer
effect Router addressing Switch broadcast in subnet Locate the specified process (service) in the computer
Explanation Ability to find the subnet on the Internet where the target computer is located Ability to find the target network card (host) in the subnet Find the target program in the computer where the target network card is located

As long as the host and port are determined, we can achieve communication between the programs. Therefore, Unix systems refer to the host + port as a "socket". With it, you can develop web applications.

Summary
IP address : able to find the subnet
MAC address of the target computer in the Internet : able to find the target network card (host)
port number in the subnet : find the target program in the computer where the target network card is located
through the IP address, MAC address and port number can be accurate Locate the specified process (service) in the calculation

To be added later ...

Published 14 original articles · won 10 · views 120,000 +

Guess you like

Origin blog.csdn.net/qq_27096221/article/details/105599444