Detailed explanation of network basics and OSI seven-layer reference model

Network basics:
OSI Open System Interconnection Reference Model
Application layer Abstract language (natural language) --> Encoding the interface between users and applications, including protocols, mainly providing services required by specific applications) including: HTTP, FTP, SMTP implementation numbers Data communication
Presentation layer Encoding -->Binary
Session layerProvide session address – application provided, no format
Transport layer – provide port number + segmentation using TCP/UDP to perform specific work (end-to-end transmission)
data link layer)ospf, ripv2(- IP — ip address is the layer that uses the internet protocol -RouterNetwork layer – Switch (ARP) LLC–Logical link control sublayer data verification HDLC (Advanced Data Link Control protocol) MAC media access control sublayer controls physical hardware – MAC addressPhysical layer – electronic hardware, physical hardware , processing optical signals ()



Network growth:

  1. Increase in nodes – HUB hub, increase in the number of terminals
  2. Transmission distance – repeater (amplifier)

Hub issues:

  1. Security 2. Low forwarding efficiency – large amount of spam 3. Address 4. Conflict

Address problem: Use the serial number of the network card chip as the address
Conflict problem: CSMA/CD carrier sense multiple access/conflict detection – queuing logic – continue to reduce forwarding efficiency – and Conflicts are not completely eliminated
The serial number of the network card chip - MAC address - consists of 48-bit binary and is displayed in hexadecimal format
It is factory-burned into the chip and is unique in the world a>
Requirements in the process of network expansion: — Bridge----Switch

  1. unlimited transmission distance
  2. There is no conflict at all, and all nodes can send and receive their own data at the same time
  3. Unicast – one-to-one forwarding;

The switch works on layer 2;

  1. Can identify electrical signals and then rewrite and forward them to achieve physically unlimited transmission distance
  2. It can identify electrical signals, so currents can be recognized as data on all interfaces, stored and then forwarded (cached); to completely avoid the physical encounter of currents, completely solve the conflict problem, and achieve simultaneous data sending and receiving on all interfaces;
  3. The switch realizes one-to-one forwarding by identifying and recording the MAC address in the data frame and its corresponding interface;

If there is no corresponding mac address record, the data will be flooded;
Flooding: Except for the entry interface, the traffic will be copied and forwarded on all other interfaces;
IPV4 address—a dotted decimal identifier composed of 32 bits
ARP—Address Resolution Protocol—obtains another address of the peer through one address of the peer
AARP -- Forward ARP – Known peer's IP address, obtain the peer's MAC address through broadcast
Large-->Infinite distance, no conflict, unicast-> switch -->MAC–>Flooding–>Flooding range–>Router–>IP address–>ARP -->Broadcast–>Broadcast domain (flooding domain);
Segmentation: The upper three layers are only responsible for data processing. However, very large individual data packets cannot be used during data transmission, otherwise the network bandwidth will not be shared normally; therefore, the data will be segmented at the transport layer. ;Limited by MTU
MTU: Maximum transmission unit – this value is the upper limit of a packet size; the default is 1500 bytes
Port number: 0-65535 1-1023 are noted ports, static ports; fixedly assigned to various network services by default
1024-65535 are dynamic random ports randomly assigned to applications started on the terminal
For example, when PC1 accesses the server, the source port number is in the range of 1024-65535, which is randomly assigned when the application is started; and the target port number is 1-1023, which is determined by the specific service being accessed; the inevitable access is http server, then the target port is 80;
UDP: User Datagram Protocol
Non-connection-oriented and unreliable transmission protocol; - only completes the basics of the transport layer Working; port number + segmentation
UDP header

TCP: Transmission Control Protocol
Connection-oriented Reliable Transport Protocol Noun supplement: IPV4 header: Reliable transmission - 4 transmission guarantee mechanisms confirmation, retransmission, sorting, sliding window (flow control)
Connection-oriented - a three-way handshake will be performed before transmitting data to establish an end-to-end virtual Link; In addition to completing the basic work of the transport layer, it is also necessary to ensure the reliability of the transmission;




  1. TCP/IP and OSI

OSI 7-layer model TCP/IP protocol stack - also a model

2. A data processing process that encapsulates the upper layer to the lower layer; during the process, the data packet will continue to become larger;
3. The process of decapsulating the data from the lower layer to the higher layer, during which the data packets are continuously reduced;
4. The unit of data for each layer of the PDU protocol data unit< /span> records the domain name and IP address of each server; the corresponding IP address is obtained by sending the domain name to the DNS server; 5. DNS – Domain name resolution service resolves to IP address service Physical layer –>Bit stream Data link layer –>Frame Network layer—> Packet Transport layer—> Segment
Application layer – > Datagram





Guess you like

Origin blog.csdn.net/m0_50816276/article/details/131979969