The OSI seven layer model is explained in detail

Source: Internet
Author: User
Tags comparison table network function file transfer protocol

The OSI seven-layer model enables reliable communication between different systems and different networks through seven hierarchical structural models. Therefore, its most basic function is to help different types of host implementation of data transmission.

The node that is finished with the relay function is often referred to as a trunk system. In the OSI seven layer model, the relay systems at different tiers have different names.

The level at which a device works. The key is to see which layer of data header information it is working with. When the bridge is working, it is decided to forward the port with the Mac head, so it is obviously a data link layer device.
Detailed said:
Physical layer: Network card, network cable, hub, Repeater, modem

Data Link layer: Bridge, switch

Network layer: Router

The gateway works on the fourth transport layer and above

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

A switch is a machine used for exchanging messages. Many are link-layer devices (two-tier switches). Address learning can be carried out in the form of storage and forwarding to exchange messages.

One function of routers is to connect to different networks. Another function is to select the route of information transmission.

Choose an unobstructed shortcut, can greatly improve communication speed. Reduce network system communication load, save network system resources, improve network system patency rate.


Differences between switches and routers

The switch has a very high bandwidth back bus and an internal switching matrix. All ports of the switch are hooked up to this bus. After the control circuit receives the packet. Processing port looks for an in-memory address comparison table to determine the NIC (NIC) on which the destination Mac (the hardware address of the network card) is hooked up on which port the packet is quickly routed through the internal switch fabric to the destination port, and the destination MAC broadcasts to the full port if it does not exist. After receiving the port response, the switch will "learn" the new address. and add it into the internal MAC address table.
Using a switch is also able to "segment" The network by comparing the MAC address table. The switch only agrees to the necessary network traffic through the switch. Filtering and forwarding through the switch. Can effectively isolate broadcast storms, reduce the occurrence of packet errors and errors, and avoid sharing conflicts.
The switch can transmit data between multiple port pairs at the same time.

Each port can be treated as a separate network segment. The network device on which it is connected has all the bandwidth on its own. It is not necessary to compete with other equipment. When node A sends data to node D. Node B can send data to node C at the same time, and all two transports enjoy all the bandwidth of the network. Have their own virtual connections. If a 10Mbps Ethernet switch is used here, then the total flow of the switch is equal to 2x10mbps=20mbps. When using a 10Mbps shared hub. The total flow of a hub will not exceed 10Mbps.


anyway. The switch is a network device that can complete the packet forwarding packet function based on MAC address recognition. The switch is able to "learn" the MAC address. and put it in the internal Address table, through the data frame between the originator and the target receiver to establish a temporary switching path, so that the data frame directly from the source address to reach the destination.

From the point of view of filtering network traffic, the role of routers is similar to switches and bridges. But unlike the switches that work on the physical layer of the network, physically dividing the network segments. Routers use specialized software protocols to logically divide the entire network. For example, a router that supports IP protocols can divide the network into multiple sub-segments. Only network traffic that points to a particular IP address is capable of passing through the router. For each packet received, the router computes its checksum again and writes a new physical address. So. Using routers to forward and filter data is often slower than a switch that simply looks at the physical address of the packet. However, for those networks with complex structures. Using routers can improve the overall efficiency of your network.

Another obvious advantage of routers is the ability to proactively filter webcasts.

What is the difference between a hub and a router?



First, the hub, that is, the hub.

Its role can be understood simply as connecting some machines together to form a local area network. The switch (aka Interchange Hub) acts in the same way as a hub. But there is a difference in performance: the way the hub uses shared bandwidth, and the switch is bandwidth-exclusive.

In this way, when the machine is very large or the amount of data is very big, the two will be more obvious. The router and the above are obviously different, it is the role of connecting different network segments and find the network to transfer data the most appropriate path. Routers are generated after the switch, just as the switch is generated after the hub, so the router and the switch have a certain connection, not completely independent of the two devices.

routers mainly overcome the inability of the switch to route forward packets.

Overall. The main differences between routers and switches are now in the following areas:

(1) Different levels of work
The initial switch is working at the data link layer, while the router is designed to work at the network layer. Because the switch works in the data link layer, it works relatively simple, and the router works at the network layer, can get a lot of other protocol information, the router can make a more intelligent forwarding decision.

(2) Data forwarding is based on different objects
A switch uses a physical address or MAC address to determine the destination address of the forwarded data.

The router uses the IP address to determine the address of the data forwarding. The IP address is implemented in software, describing the network in which the device is located.

MAC addresses are usually hardware-brought, distributed by the manufacturer of the NIC. and has been cured to the network card, in general, is not changed. The IP address is usually assigned by the network administrator or the system itself.

(3) Traditional switches can only cut the conflict domain. Cannot cut broadcast domain, while router can cut broadcast domain
The network segments connected by the switch still belong to the same broadcast domain, and broadcast packets propagate across all network segments connected to the switch. In some cases, traffic congestion and security vulnerabilities can result. Network segments connected to routers are assigned to different broadcast domains, and broadcast data does not pass through the router.

Although the switch above the third layer has VLAN capabilities. Can also cut the broadcast domain, but there is no communication between the sub-broadcast domains, the communication between them still need routers.



(4) The router provides the service of the firewall
Routers only forward packets of a specific address, do not transmit packets that do not support routing protocols, and the transmission of unknown destination network packets. So as to prevent broadcast storms.

Physical Layer
In the OSI reference Model, the physical layer (physical layer) is the lowest layer of the reference Model and the first layer of the OSI model.
The main function of the physical layer is to use the transmission medium to provide the physical connection to the data link layer, and realize the transparent transmission of the bit stream.
The function of physical layer is to realize the transparent transmission of bitstream between neighboring computer nodes, and to shield the difference between detailed transmission media and physical equipment as much as possible.

The data link layer above it does not have to consider what the network's detailed transport media is.

"Transparent transfer bitstream" means that the bit stream after the actual circuit has not changed, for the transmitted bit stream. This circuit seems to be invisible.

Data Link Layer
The data link layer is the second layer of the OSI model. Responsible for establishing and managing links between nodes.

The main functions of this layer are: through various control protocols. The error-prone physical channel becomes error-free, reliable data link for data transmission frames.


In the computer network because of the existence of various disturbances. The physical link is unreliable. So. The primary function of this layer is based on the bit stream provided by the physical layer. Through error control and flow control method, the error-prone physical line becomes the error-free data link. Provides a reliable way to transfer data through physical media.
This layer is also typically divided into two sub-tiers of media access Control (MAC) and Logical Link Control (LLC) .

The main task of Mac sub-layer is to solve the problem of multi-user channel competition in the shared network, and complete the access control of the network media;

The main task of the LLC Sublayer is to establish and maintain network connectivity. Run error checking, flow control and link control.
The detailed work of the data link layer is to receive data from the physical layer in the form of a bitstream, which is encapsulated into frames and transmitted to the previous layer, and also from the upper data frame. Disassemble data forwarded to the physical layer in the form of a bitstream. And. It is also responsible for processing information about the acknowledgement frame sent back by the receiving end. To provide reliable transmission of data.

Network layer
The network layer is the third layer of the OSI model. It is the most complex layer in the OSI Reference model and the highest level of communication subnets. It provides services to resource subnets on the basis of the next two tiers.

The main task is to select the most appropriate path for the message or packet through the communication subnet through the routing algorithm. This layer controls the forwarding of information between the data link layer and the transport layer, establishing, maintaining, and terminating the network connection. In detail, data link layer data in this layer is converted to a packet, and then through the path selection, segmentation combination, order, the input/exit by the control. Transfer information from a network device to a network device.
In general, the data link layer solves the communication between nodes in the same network, and the network layer mainly solves the communication between different subnets. For example, when communicating between WANs, there must be a choice between routing (that is, there may be multiple paths between two nodes).

The main issues that need to be addressed when implementing network layer functionality include the following:
addressing: A physical address (such as a MAC address) used in the data link layer solves only addressing problems within the network.

When communicating between different subnets, in order to identify and locate devices in the network. Every device in the subnet is assigned a unique address. Because the physical technology used by each subnet may be different, this address should be a logical address (such as an IP address).
Exchange: specify different ways of exchanging information.

The common switching technologies are: line switching technology and storage and forwarding technology, and the latter includes message exchange technology and packet switching technology.


Routing algorithm: when there are multiple paths between the source node and the destination node, this layer can select the best path through the network for the data grouping based on the routing algorithm, and transmit the information from the most suitable path from the transmitting side to the receiving end.


Connection Service: Unlike data link layer traffic control. The former controls the traffic between neighboring nodes of the network . The latter controls the flow of traffic from the source node to the destination node . The aim is to prevent clogging and to detect errors.



Transport Layer
The main task of the OSI under Layer 3 is data communication. The task on the 3 floor is data processing.

The Transport layer (Transport layer) is the 4th layer of the OSI model. Therefore, this layer is the interface and bridge of communication subnet and resource subnet, which plays a connecting role.
The main task of this layer is to provide users with reliable end-to-end error and flow control to ensure the correct transmission of the message. The function of the transport layer is to block the details of the lower layer data communication to the high level, i.e. transparently transmitting the message to the user.

Common protocols for this layer are TCP protocols in TCP/IP, SPX in Novell networks, and Microsoft's Netbios/netbeui protocol.
The transport layer provides a transport service between the session layer and the network layer, and such services obtain data from the session layer. And when necessary. The data is cut.

And then. The transport layer passes the data to the network layer. and ensure that the data is transmitted to the network layer correctly and without errors.

Therefore, the transport layer is responsible for providing reliable transmission of data between two nodes. When the connection between the two nodes is determined. The transport layer is responsible for overseeing the work. In summary, the main functions of the transport layer are as follows:
Transport Connection Management: provides the ability to establish, maintain, and dismantle transport connections. In the network layer, the transport layer provides the two services of "connection-oriented" and "non-link oriented" to the high level.
Handling Transmission errors: provides reliable "connection-oriented" and less reliable "non-connected" Transport data Services, error control, and flow control. When you provide a "connection-oriented" service. Data transmitted through this layer will be confirmed by the target device, assuming that no acknowledgement has been received within the specified time and the data will be re-sent.
Monitor Service quality .


Session Layer
The session layer is the 5th layer of the OSI model. Is the interface between the user application and the network. The main task is to provide a method for establishing and using a connection to the presentation layer of two entities.

Connecting a presentation layer between different entities is called a session. Therefore, the task of the session layer is to organize and coordinate the communication between the two session processes and manage the data exchange.


The user is able to establish a session in half-duplex, simplex, and full duplex mode. When a session is established, the user must provide the remote address that they want to connect to. These addresses are specifically designed for users, unlike the MAC (media access control sub-layer) address or the logical address of the network layer. More user-friendly memory.

A domain name (DN) is a remote address used on a network such as: Www.3721.com is a domain name. The detailed features of the session layer are as follows:
Session Management: allow users to establish, maintain, and terminate sessions between two physical devices. and support the exchange of data between them. For example, provide single-direction sessions or two-way sessions at the same time, and manage the order of delivery in the session. And the length of time that the session takes.
Session Flow Control: provides session traffic control and cross-session functionality.


addressing: establishing a session connection using a remote address.

L
error Control: The conversational layer is logically responsible for establishing, maintaining, and terminating data exchange. But the actual work is to receive data from the transport layer, and is responsible for correcting errors. Both session control and remote procedure calls belong to this layer of functionality. But be careful. This layer checks for errors that are not communication media errors, but high-level errors such as disk space, printer-less paper, and so on.


Presentation Layer
The presentation layer (Presentation layer) is the sixth layer of the OSI model, which interprets commands and data from the application layer and assigns the corresponding meanings to the various grammars. and transmitted to the session layer in a certain format. Its main function is "handling the representation of user information, such as encoding, data format conversion and encryption and decryption". The detailed features of the presentation layer are as follows:
Data format processing: negotiate and establish the format of data interchange to resolve differences in data format representations between applications.


encoding of data: handles conversion of character sets and numbers. For example, because of the type of data in the user program (integer or real, signed or unsigned, etc.), user ID, etc. can have different representations, therefore, between the devices need to have a different character set or format conversion between the function.
compression and decompression: To reduce the amount of data transferred. This layer is also responsible for data compression and recovery.
Data encryption and decryption: can improve the security of the network.

Application Layer
The application layer (application layer) is the highest layer of the OSI Reference Model, which is the interface between the computer user and the various applications and networks, and its function is to provide services directly to the user, completing all kinds of work that the user wants to complete on the network.

It is based on other 6-storey jobs. In charge of the connection between application and network operating system in network, establish and end the connection between users, and complete various protocols such as Network service and the supervision, management and service required by network user.

In addition, the layer is responsible for coordinating the work between the various applications.


The services and protocols that the application layer provides to users are: File service, folder service, File transfer Service (FTP), Telnet Service (telnet), e-mail Service (email), Print service, security Service, network Management Service, database service, and so on.

The various network services described above are completed by different application protocols and procedures for this layer. Different network operating systems in the function, interface, implementation technology, hardware support, security and reliability, as well as a variety of application interfaces and other aspects of the difference is very large. The main functions of the application layer are as follows:
user interface: The application layer is a direct interface between the user and the network, and the application and the network, so that users can interact with the network interactively.
implement a variety of services: This layer has a variety of applications to complete and implement the various services requested by the user.


Summary of OSI7 layer model
Because the OSI is an ideal model. So the general network system involves only a few layers. Very few systems can have all 7 layers and fully follow its rules.
In a 7-tier model, each layer provides a special network function. From the point of view of network function: The following 4 layers (physical layer, Data link layer, network layer and Transport layer) mainly provide transmission data and exchange functions. That is, node-to-node communication is the main, the 4th layer as the upper and lower part of the bridge is the most critical part of the network architecture, and the upper 3 layers (Session layer, presentation layer and application layer) to provide users and applications between the information and data processing functions. In short, the next 4 layers are mainly the function of communication subnet. The function of the resource subnet is mainly completed on the 3 level.

Here is the TCP/IP tiering model
┌────------────┐┌─┬─┬─-┬─┬─-┬─┬─-┬─┬─-┬─┬─-┐
│││d│f│w│f│h│g│t│i│s│u││
│││n│i│h│t│t│o│e│r│m│s│ its │
│ fourth floor, application layer ││s│n│o│p│t│p│l│c│t│e││
││││g│i││p│h│n││p│n││
││││e│s│││e│e│││e│ It │
││││r││││r│t│││t││
└───────------─┘└─┴─┴─-┴─┴─-┴─┴─-┴─┴─-┴─┴-─┘
┌───────-----─┐┌─────────-------┬──--------─────────┐
│ the third tier. Transport Layer ││tcp│udp│
└───────-----─┘└────────-------─┴──────────--------─┘
┌───────-----─┐┌───----──┬───---─┬────────-------──┐
││││icmp││
│ Second floor. Network Layer ││└──---──┘│
│││ip│
└────────-----┘└────────────────────-------------─-┘
┌────────-----┐┌─────────-------┬──────--------─────┐
│ first layer, network interface ││arp/rarp│ other │
└────────------┘└─────────------┴─────--------──────┘
TCP/IP four-layer Reference Model

The TCP/IP protocol is organized into four conceptual layers, with three layers corresponding to the corresponding layers in the ISO reference model. The ICP/IP protocol family does not include the physical layer and the data link layer, so it cannot complete the function of the whole computer network system independently, and must work together with more protocols.
The four protocol layers of the TCP/IP layered model are completed with the following features:
First layer: Network interface layer
Contains protocols that are used to collaborate on the transfer of IP data over existing network media. In fact, the TCP/IP standard does not define the functions that correspond to the ISO data link layer and the physical layer.

Instead, it defines such protocols as Address Resolution Protocol (Resolution Protocol,arp), which provides the interface between the data structure of the TCP/IP protocol and the actual physical hardware.
Second floor: The Inter-network layer
The network layer corresponding to the OSI seven-layer reference model. This layer includes IP protocol, RIP protocol (Routing information Protocol, routing Information Protocol). Responsible for the packaging, addressing, and routing of data. The same time also includes the inter-Network Control Message Protocol (Internet Command message PROTOCOL,ICMP) to provide network diagnostic information.


Layer Three: Transport layer
The transport layer corresponding to the OSI seven-layer reference model. It provides two types of end-to-end communication services.

Among these, the TCP protocol (transmission Control Protocol) provides reliable data flow transport services, and the UDP protocol (use Datagram Protocol) provides unreliable user datagram services.
Layer Fourth: Application layer
Corresponds to the presentation layer of the OSI application layer and the seven-layer reference model.

Includes the Internet Application layer protocol finger, Whois, FTP (File Transfer Protocol), Gopher, HTTP (Hypertext transfer contract), Telent (Remote terminal Protocol), SMTP (Simple Mail Transfer Protocol), IRC (Internet relay conferencing), NNTP (Network News Transfer Protocol) Waits, which is also the focus of this book will be discussed.

The OSI seven layer model is explained in detail

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.