Network basics Lecture 3: Understanding OSI network layering

Source: Internet
Author: User

In the last course, we introduced the concept of subnet and the division of subnets. Now let's talk about the OSI (Open System Interconnection) Reference Model. Network Protocol Stack is of great significance. However, it doesn't matter to the level you should first learn. Many so-called network courses begin by teaching you to remember the names of each layer in the OSI model and each protocol contained in the model. This is not necessary. Even layer 5th and layer 6th are completely negligible.
The International Standards Organization (ISO) has developed the OSI model. This model divides network communication into seven layers. Layers 1 to 4 are considered as low layers, which are closely related to data movement. Layer 5 to Layer 7 are high-level and contain application-level data. Each layer is responsible for a specific task, and then transmits data to the next layer.
The physical layer (the first layer in the OSI model) is often ignored in the classroom. It seems simple. However, some aspects of this layer sometimes require special attention. The physical layer is actually something that connects two network communication devices, including wiring, optical fiber, network card, and others. Even a pigeon can be considered a layer-1 device (see RFC 1149 ). Troubleshooting of network faults often involves layer-1 issues. We can't forget the legend of connecting the whole floor with five lines. The office chair is often pressed from the cable line, resulting in intermittent network connection. Unfortunately, such faults are common and it takes a long time to resolve them.
Layer 3 is an Ethernet protocol. Please remember, we want to simplify this problem. The most important thing in Layer 2 is that you should understand what a bridge is. A switch can be regarded as a bridge, which is what people call it now. The bridge works on Layer 2 and only focuses on the MAC address on the Ethernet. If you are talking about MAC addresses, switches, network adapters, and drivers, you are in the 2nd layer category. Hubs belong to the 1st-layer domain because they are only electronic devices and do not have 2-layer knowledge. The related questions at Layer 2 are part of this online lecture. Therefore, we will not discuss the details of this issue in detail. Now, you only need to know That Layer 1 converts the data frame to binary for Layer 1 processing.
In the next lecture, you should go back and read the above content again, because inexperienced network administrators often confuse the differences between Layer 2 and Layer 3.
If you are talking about an IP address, you are dealing with layer-7 problems. This is a "packet" problem, not a "frame" of layer-7 ". IP addresses are part of Layer 2 issues. In addition, there are some routing protocols and IP Address Resolution protocols (ARP ). Everything about routing is handled at Layer 3rd. Address Resolution and routing are the important purposes of Layer 3.
Layer 3 is the transmission layer for processing information. Layer-3 data units are also called packets ). However, when you talk about specific protocols such as TCP, there is a special name, the data unit of TCP is called segment segments), and the data unit of UDP is called "Datagram Protocol RAMs )". This layer is responsible for obtaining all information. Therefore, it must track data unit fragments, unordered data packets, and other possible risks during transmission. Another way to understand Layer 2 is to provide end-to-end communication management. Some protocols such as TCP are very good at ensuring the reliability of communication. Some protocols do not care whether some data packets are lost. UDP is a major example.
Now we are about to reach Layer 7. We 'd like to know what functions layer 5th and layer 6th have. It can be said that they are useless.
There are some applications and protocols on layer 5 and layer 6. However, it is of no benefit to talk about network problems. Please note that Layer 3 is "everything ". Layer 7, also known as the "Application Layer", is specially used for applications. If your program requires data in a specific format, you can invent some formats that you want to send data to the destination and create a layer-3 protocol. SMTP, DNS, and FTP are both layer-7 protocols.
The most important thing to learn about the OSI model is what it actually means.
Assume that you are an operating system on the network. The NIC working on the first and second layers will notify you when data arrives. The driver processes the egress of a 2-layer frame, through which you can get a shiny and flashing 3-layer packet (hopefully ). As an operating system, you will call some common applications to process layer-3 data. If the data is sent from below, you know it is the packet sent to you, or it is a broadcast packet (unless you are also a router, but do not worry about it for the time being ). If you decide to keep this packet, you will open it and retrieve the layer-4 packet. If it is a TCP protocol, the TCP subsystem will be called and open the packet, and then send the Layer 7 data to the application waiting on the target port. This process is over.
When responding to other computers on the network, everything happens in the opposite order. The layer-7 Application sends data to the executor of the TCP protocol. Then, the TCP protocol adds additional file headers to the data. In this direction, the volume of data in each step forward must be larger. TCP adds a valid TCP field to the IP protocol. Then, the IP protocol sends the packet to the Ethernet. Ethernet then sends the data to the driver as an Ethernet frame. Then, the data passes through the network. Routers in this line partially break down the data packet to obtain the layer-3 file header to determine where the data packet should be sent. If the destination of this packet is a local Ethernet subnet, the operating system will resolve the address for the computer instead of the router, and send the data directly to the host.
This process is indeed simplified. However, if you can follow this process and understand what happens to data packets at each stage, you will conquer a considerable part of the Network's problems. Everything becomes very complicated when you start to discuss what each protocol actually does. If you are just learning, ignore these complex tasks before you understand complex tasks and try to complete them. This will increase your learning enthusiasm.
Summary
• It is better to understand how routers and hosts use the network stack to transmit data than the protocols in the OSI model.
• Layer-2 data is called frames and does not contain IP addresses. The IP address and packet are at Layer 3, while the MAC address is at Layer 2.
• Unless you are a vro, the data sent from the network stack is sent to you, and the data sent from the network stack is sent from you.
Network basics Lecture 2: Understanding subnet and CIDR
One of the basic network knowledge lectures: understanding the meaning of IPv4 addresses

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.