The key to pull away

Open a URL through the network model.

As an application layer protocol, HTTP is used to encapsulate the requested text information. Then through the presentation layer and session layer, TCP/IP as the transmission layer protocol, will request text information sent to the Internet;

  1. Application layer: The interface that provides network services to the user’s applications, such as E-mail, file transfer, and terminal emulation. Such as DNS, HTT, PFTP and so on

  2. Presentation layer: Provides data format conversion services

  3. Session layer: establishes end connections and provides access authentication and session management (session)

  4. Transport layer: Provides logical communication between application processes (e.g. establishing connections, handling packet errors, packet ordering). For example: TCP, UDP, process, port (socket)

  • Define the protocol port number (such as 80 on the WWW) that transmits the data,
  • Traffic control (Determines the appropriate sending rate based on the speed of data received by the receiver and forcibly divides the long packets according to the maximum size that the network can handle). It mainly divides and transmits the received data from the lower layer and reorganizes the data after it reaches the destination address. This layer of data is often called a segment.
  • Error checking
  1. Network layer: the main function is to translate the network address into the corresponding physical address, and determine how to route the data from the sender to the receiver

  2. Link layer: controls the communication between network layer and physical layer, establishes data link connection, logical connection, hardware address addressing, error checking and so on between the communicating entities. (The underlying network defines the protocol). For example, network adapters, Bridges, and Layer 2 switches.

Its main function is how to transmit data reliably on unreliable physical lines. To ensure transmission, the data received from the network layer is divided into specific frames that can be transmitted by the physical layer.

The data link layer provides reliable transport over unreliable physical media. The functions of this layer include: physical address addressing, data framing, flow control, data error detection, retransmission, etc.

The data link layer functions independently of the network and its nodes and the type of physical layer employed, nor does it care if you are running Word, Excel, or using the Internet.

The difference between the transmission layer and the data link layer: The functions are different. Although both have segmentation and error check, the data processed is different.

  1. Physical layer: Defines the physical device standards that provide the transmission path for the raw bitstream for the data end device. For example: network cable (this is definitely the most heard of, remember it to better understand), HUB, repeater, HUB, etc

Application Layer

The application layer is the OSI layer closest to the user. This layer provides network services for the user’s applications such as E-mail, file transfer, and terminal emulation.

Protocols include HTTP FTP TFTP SMTP SNMP DNS TELNET HTTPS POP3 DHCP.

The application layer, also known as application Entity (AE), consists of several specific application service elements (SASE) and one or more common application service elements (Cases). Each SASE provides application-specific services, such as file transport Access and Management (FTAM), electronic message processing (MHS), virtual Terminal Protocol (VAP), and so on. CASE provides a set of common application services, such as contact control Service elements (ACSE), Reliable Transportation Service elements (RTSE), and Remote Operation Service elements (ROSE). Responsible for providing interfaces to software to enable programs to use network services.

The term “application layer” does not refer to a particular application running on a network. The application layer provides services such as file transfer, file management, and information processing for E-mail.

Presentation Layer

Data representation, security, compression. Ensures that information sent by the application layer of one system can be read by the application layer of another system.

Format: JPEG, ASCll, DECOIC, encryption format.

The translator between the application and the network, at the presentation layer, the data will be formatted in a scheme that the network understands; This formatting also varies depending on the type of network used.

The presentation layer manages the decryption and encryption of data, such as system password processing. For example, when you look up your bank account on the Internet, you use a secure connection. Your account data is encrypted before being sent, and at the other end of the network, the presentation layer decrypts the received data. In addition, the presentation layer protocol decodes and encodes image and file format information.

Session Layer

Establishing, managing, and terminating sessions correspond to host processes, and refer to ongoing sessions between a local host and a remote host.

Establish a data transmission path through the transport layer (port number: transport port and receive port). Initiate or accept session requests between your systems (devices that need to know each other can be IP, MAC, or host name).

Responsible for establishing, maintaining and terminating communication between two nodes in the network. The functions of the session layer include: establishing communication links, keeping the communication links unblocked during the session, synchronizing the dialogue between two nodes, determining whether the communication is interrupted, and deciding where to resend the communication when it is interrupted.

You may often hear the session layer referred to as the “traffic police” of network communications. When a dial-up request is made to your ISP (Internet Service provider) to connect to the Internet, the session layer on the ISP server negotiates the connection with the session layer on your PC client. If your phone line accidentally falls out of a wall jack, the session layer on your terminal will detect a disconnection and re-initiate the connection. The session layer sets the communication duration by determining the priority of node communication and the length of communication time.

Transport Layer

Defines the protocol port numbers for transmitting data, as well as flow control and error-checking.

The protocols include TCP and UDP. Once the packets leave the network adapter, they enter the network transport layer.

Some protocols and port numbers (WWW port 80, etc.) for transmitting data are defined, such as: TCP (transmission control protocol, low transmission efficiency, high reliability, used for transmission of high reliability, large amount of data), UDP (user datagram protocol, and TCP features are the opposite, used for transmission of low reliability, small amount of data, such as QQ chat data is transmitted in this way). The data received from the lower layer is segmented and transmitted, and then reassembled after arriving at the destination address. This layer of data is often called a segment.

The most important layer in the OSI model. The transport protocol also controls traffic or determines the appropriate transmission rate based on how fast the receiver can receive the data. In addition, the transport layer forces long packets to be segmented according to the largest size the network can handle. For example, Ethernet cannot receive packets larger than 1500 bytes. The transport layer of the sender node divides the data into smaller pieces and assigns a sequence number to each piece so that the data can be reassembled in the correct order when it reaches the transport layer of the receiver node. This process is called sorting. One service that works at the transport layer is T C P (Transmission control Protocol) in the T C P/I P protocol suite, and another transport layer service is S P X (Sequence packet switching) in the I P X/S P X protocol suite.

Network Layer

Logical address addressing to realize the path selection between different networks.

The protocols are ICMP IGMP IP (IPV4 IPV6) ARP RARP.

Provides connectivity and path selection between two host systems on a geographically different network. The growth of the Internet has led to a huge increase in the number of users accessing information from sites around the world, and the network layer is the layer that manages this connection.

The third layer of the OSI model, whose main function is to translate network addresses into their physical counterparts and determine how to route data from the sender to the receiver.

The network layer determines the best path from node A in one network to node B in another network by taking into account the transmission priority, network congestion, quality of service, and the cost of alternative routes. Routers belong to the network layer because the network layer handles and intelligently directs data transfer, and routers connect to each segment of the network. In networks, “routing” directs the delivery of data based on addressing schemes, usage patterns, and reachability. The network layer is responsible for establishing the routes used by the source and target machines. This layer does not have any error detection or correction mechanism of its own, so the network layer must rely on reliable transport services provided between the two ends.

The network layer is used to establish communication between computer systems on the local LAN segment, and it can do so because it has its own routing address structure that is separate and independent from the layer-2 machine address. This protocol is called a routing or routable protocol. Routing protocols include IP, Novell’s IPX, and Apple Talk.

The network layer is optional and is only used when two computer systems are in different network segments separated by routers, or when a communication application requires a service, feature, or capability provided by the network layer or transport layer. For example, when two hosts are directly connected to each other on the same LAN segment, only the LAN communication mechanism (i.e., layer 1 and layer 2 of the OSI reference model) is used to communicate between them.

Datalink Layer

Establish logical connection, hardware address addressing, error checking and other functions. (Protocols defined by the underlying network)

Combine bits into bytes and then into frames, access media with MAC addresses, error found but not corrected.

Data link layer protocols include SDLC, HDLC, PPP, STP, frame relay, etc.

Defines how to format data for transmission and how to control access to physical media. This layer also typically provides error detection and correction to ensure reliable transmission of data.

The second layer of the OSI model, which controls communication between the network layer and the physical layer. Its main function is how to transmit data reliably on unreliable physical lines. To ensure transmission, the data received from the network layer is divided into specific frames that can be transmitted by the physical layer. A frame is a structural packet used to move data, which includes not only the raw data, but also the physical addresses of the sender and receiver as well as error detection and control information. The address determines where the frame will be sent, and error correction and control information ensures that the frame arrives error-free. If, during transmission, the receiving point detects an error in the transmitted data, the sender is notified to resend the frame. The data link layer functions independently of the network and its nodes and the type of physical layer employed, nor does it care if you are running Word, Excel, or using the Internet. Some connected devices, such as switches, work at the data link layer because they decode frames and use frame information to send data to the correct recipient.

DataLinkLayer: on the basis of bitstream service provided by the physical layer, the data link between adjacent nodes is established, the error-free transmission of data frames on the channel is provided through error control, and the action series of each circuit is carried out. The data link layer provides reliable transport over unreliable physical media. The functions of this layer include: physical address addressing, data framing, flow control, data error detection, retransmission, etc.

Physical Layer

Establish, maintain, and disconnect physical connections. (Protocols defined by the underlying network)

It defines physical device standards, such as the interface types of network cables, optical fibers, and transmission rates of various transmission media. Its main role is the transmission of bitstream (that is, by 1, 0 into the strength of the current to transmit, after arriving at the destination into 1, 0, that is, we often say digital to analog conversion and analog to digital conversion). This layer of data is called a bit.

The lowest or first layer of the OSI model, which includes a physical networking medium, such as a cable connection connector. Protocols at the physical layer generate and detect voltages in order to send and receive signals carrying data. Plug a network interface card into your desktop PC and you have the foundation for computer networking. In other words, you provide a physical layer. Although the physical layer does not provide error correction services, it can set data transfer rates and monitor data error rates. Network physics problems, such as wire disconnections, will affect the physical layer.

Users will use some physical media to convey information, such as twisted pair, coaxial cable, etc., but the specific physical media is not within the seven layers of the OSI, someone put physical media as 0 layer, physical layer of the task is to provide it a layer with a physical connection, and their mechanical, electrical, function and process characteristics. For example, the type of cable and joint used, the voltage of signal transmission, etc. At this level, the data is not yet organized and is only treated as raw bitstreams or electrical voltages in bits.

Pay attention to

The difference between transport layer and data link layer:

Supplement knowledge

The key to which layer a device works depends on which data header it works with. When a bridge works, it is the MAC header that determines the forwarding port, so it is clearly a device at the data link layer.

Specifically:

  • Physical layer: network card, network cable, hub, repeater, modem
  • Data link layer: bridge, switch
  • Network layer: router
  • Gateways operate at and above the fourth transport layer.

Hubs are physical layer devices that transmit information in the form of broadcasts.

A switch is a machine for exchanging messages. Most link layer devices (Layer 2 switches) can learn IP addresses and exchange packets in store-and-forward mode.

One function of a router is to connect different networks; another is to select the route through which information is sent. Choosing the unobstructed shortcut can greatly improve the communication speed, reduce the communication load of the network system, save the resources of the network system and improve the unimpeded rate of the network system.

What are the functional differences between hubs, switches and routers?

Let’s start with a HUB, a HUB. The function can be simply understood as connecting some machines together to form a local area network.

A switch (also known as a switched hub) functions in much the same way as a hub.

Hubs and switches differ in performance: hubs share bandwidth while switches share bandwidth. In this way, when there are many machines or a large amount of data, the two will be more obvious. The router is obviously different from the above two. Its function is to connect different network segments and find the most suitable path for data transmission in the network.

The router comes after the switch, just as the switch comes after the hub, so the router and the switch are related to each other rather than completely separate devices. The router overcomes the switch’s inability to route and forward packets.

In general, the main differences between routers and switches are as follows:

(1) Different levels of work

While switches were originally designed to work at the data link layer, routers were originally designed to work at the network layer. Because the switch works at the data link layer, its working principle is relatively simple, while the router works at the network layer, so it can get more protocol information and make more intelligent forwarding decisions.

(2) Data forwarding is based on different objects

A switch uses a physical address or MAC address to determine the destination address for forwarding data. Routers use IP addresses to determine where data is forwarded. IP addresses are implemented in software and describe the network on which the device resides. MAC addresses are usually embedded in the hardware, assigned by the network adapter manufacturer, and have been solidified into the network adapter. Generally speaking, they cannot be changed. IP addresses are usually assigned automatically by network administrators or systems.

(3) Traditional switches can only split conflict domains, but not broadcast domains; Routers can split broadcast domains

The network segments connected by the switch still belong to the same broadcast domain. Broadcast packets are transmitted on all the network segments connected by the switch, causing traffic congestion and security vulnerabilities in some cases. Network segments connected to routers are assigned different broadcast domains, and broadcast data does not pass through routers. Although switches above layer 3 have the VLAN function and can split broadcast domains, they cannot communicate with each other. Routers are still needed for communication between them.

(4) Router provides the service of firewall

A router can prevent broadcast storms by forwarding only packets to specific addresses, not packets that do not support routing protocols and packets from unknown network destinations.

Blog.csdn.net/a369189453/…

Juejin. Cn/post / 686707…