Take you to know OSI, network depends on it

First understand the OSI seven-layer model:
physical layer:
use physical signals 1 and 0 to represent [binary]
interface [network cable interface]
establishment and disconnection of communication between the two parties [software disconnection]
data transmission can be carried out at the same time [network cable]

Data link layer:
data frame, sort out the
source of data 1 and 0 and the physical address sent to the destination [MAC address]
Self-monitoring to check whether the data frame is lost

Network layer:
Data packets are sorted and packaged. The
source and destination logical addresses of the data frames, such as IP addresses
, are routed according to the logical addresses of the packet headers.

Transport layer:
for the software or program communication you use [data segment] a
link between the previous and the next

Conversation layer:
the dialogue relationship between software and software

Presentation layer:
defines the language for passing information

Application layer:
provides the user's use

Just a brief introduction to the OSI seven-layer model. For the network, you only need to pay attention to the OSI five-layer, because the session layer and the presentation layer have almost nothing to do with us.
First introduce
1 physical layer:
physical layer transmission medium
1 wired medium:
twisted pair optical fiber
2 wireless medium:
radio microwave laser infrared

HDMI digital signal
strong anti-interference long-
distance transmission to ensure quality

VGA analog signal

Active equipment: network cable, twisted pair [100-150 meters]
unshielded twisted pair UTP
shielded twisted pair STP
twisted pair type
cat5 transmission rate 100Mbps
cat5e transmission rate 100Mbps
cat6 transmission rate 1000Mbps
cat7 transmission rate 10000Mbps
T568A: white Green, Green, White Orange, Blue, White Blue, Orange, White Brown, Brown
T568B: White Orange, Orange, White Green, Blue, White Blue, Green, White Brown, Brown
Interface Model: RJ-45
Passive Equipment: Optical Fiber [5km]
high transmission bandwidth, long
transmission distance
, strong anti-interference
fiber: 1 single-mode fiber [10 microns]
long distance use [laser light source]
2 multimode fiber [50 microns
[LED light source] short distance use

Straight line,
crossover line
, reverse line:
console line [control line]

2 Functions of the data link layer
1 Establishment, maintenance and teardown of the data link
2 Frame packing, transmission and synchronization
3 Frame error recovery
4 Flow control

Ethernet
1 Conflict problem: CSMA-CD: Multiple access with monitoring and monitoring conflict
[avoiding signal conflict, equivalent to traffic lights]
Working principle: 1. Before sending, monitor whether the channel is idle
and then send data
. 2. When sending, send at the same time Monitor
3 Listen to the conflict, stop sending immediately
4 Wait for a while [Avoid]
2 Address problem: MAC address [unique in the world]
The first 24 bits are the manufacturer's code, and the last 24 bits are the device sorting code.
The MAC address identifies a single device or a group of devices
. Hexadecimal = 4 binary
0s = physical address - unicast address
1 = logical address - multicast address
FF-FF-FF-FF-FF-FF-FF [broadcast address, all are
1
] The PDU format of each layer is written

Ethernet type
btye byte bit bit
such as mac address:
6 bytes 8 times 48 bits
ip address:
4 bytes 8 times 32 bits

Ethernet frame format:
[preamble frame start delimiter [destination address source address type/length data check]]
7 bytes 1 byte 6 bytes 6 bytes 2 bytes 46-1500 4 bytes
[data Link layer encapsulation at least 64 bytes - at most 1518 bytes] [Physical layer encapsulation at least 72 bytes - at most 1526 bytes]

Ethernet nomenclature:
N-Signal-Physical Medium
N: Data rate in megabytes, such as 100.100
Signal: Baseband or Broadband
Physical Medium: Indicates the type of medium
Example: 100BASE-TX-FX
100 The data rate is 100
BASE:Baseband: It is only used for the network alone [but data transmission]
Broadband: can only be used for the network, telephone lines, etc. [transmit a variety of data]
TX: twisted pair UTP STP
FX: optical fiber

Sublayer of the data link layer
Media Access Control [MAC] sublayer
encapsulates and decapsulates the physical layer
Logical Link Control [LLC] sublayer
establishes a connection to the network layer

3 The function of the network layer
defines the logical address based on the IP protocol.
Connecting different devices on the same network segment
Selecting the best route for the data packet to pass through the network
Format
version of the IP header length priority and service type total length
identifier flag segment offset
TTL protocol number header checksum
source address
destination address
optional
data
splitting
sorting
order

The TTL lifetime is up to 255 and decreases by a little each time it passes through a router

4 Transport layer
port number 0--65535

TCP
Transmission Control Protocol:
Reliable, connection-oriented protocol
with low transmission efficiency

TCP encapsulation format
source port number destination port number
32-bit serial number
32-bit confirmation number
first length
reserved
[1 valid 0 invalid]
SYN establish a connection
ACK confirm the connection
FIN disconnect the
URG emergency pointer [priority send]
RST reconnect [reset]
PSH application layer urgent transmission
window size
16-bit checksum and
16-bit urgent pointer
optional
data

TCP disconnection and connection
three-way handshake
four disconnects

TCP flow control and differential control
TCP flow control mechanism-flow window
TCP flow control mechanism-congestion control
TCP error control 3 Mode
1 Checksum
2 Confirmation
3 Timeout
TCP application
port number:
21 FTP File Transfer Protocol [download Instructions]
20 Data transmission
23 Telnet remote
25 SMTP sending mail
110 POP3 receiving mail
53 DNS domain name resolution
80 HTTP Hypertext transmission
Realize hypertext transmission on the network through http
443 HTTPS [Secure Hypertext Transmission Protocol] Provide encryption
based on HTTP development ,
Can ensure message privacy and integrity

UDP
user datagram protocol is
unreliable, connectionless service
transmission speed is fast , UDP
flow control and error control UDP
has no flow control mechanism Port number: 69 TFTP Trivial File Transfer Protocol 53 DNS Domain Name Resolution 123 NTP Network Time Protocol 111 RPC Remote Procedure Call







5 The role of the application layer works in
conjunction with the application to utilize data specific to the application of the underlying network switch

Common application layer protocols
DNS
SMTP and POP3
HTTP and HTTPS
Telnet
FTP and TFTP

这是OSI五层模型,希望可以帮到需要的朋友。

Guess you like

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