Detailed description of OSI Layer-7 Model

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

 

The OSI Layer-7 model enables reliable communication between different networks of different systems through seven hierarchical structural models. Therefore, its primary function is to help different types of hosts implement data transmission.

The node that completes the relay function is usually called a relay system. In the OSI Layer-7 model, the relay systems at different layers have different names.

The layer at which a device works depends on the Data header information used during its operation. When a bridge works, it determines the forwarding Port Based on the MAC header. Therefore, it is obviously a device at the data link layer.
Specifically:
Physical Layer: Nic, network cable, Hub, repeater, Modem

Data link layer: bridge, switch

Network Layer: vro

The gateway works on the layer 4 transmission layer and above.

A hub is a physical layer device that transmits information in the form of broadcast.

A vswitch is a machine used for Packet Exchange. Most of them are link layer devices (L2 switches). They can perform address learning and exchange messages in the form of storage forwarding ..

One role of a router is to connect different networks, and the other is to select the information transmission line. By selecting smooth and fast routes, You can greatly increase the communication speed, reduce the communication load of the network system, save network system resources, and improve the network system accessibility.

Differences between vswitches and vrouters

The vswitch has a high-bandwidth back bus and an internal switching matrix. All the ports of the switch are attached to this bus. After the control circuit receives the data packet, the processing port searches for the address table in the memory to determine the target MAC address (the hardware address of the NIC) nic connected to which port, data packets are quickly transmitted to the destination port through the internal switching matrix. If the destination MAC does not exist, the packets are broadcast to all ports, after receiving the port response, the switch "learns" the new address and adds it to the internal MAC address table.
You can also use a vswitch to segment the network. By comparing the MAC address table, the vswitch only allows necessary network traffic to pass through the vswitch. Through the filtering and forwarding of vswitches, the broadcast storm can be effectively isolated to reduce the occurrence of incorrect packets and wrong packets, so as to avoid sharing conflicts.
A vswitch can transmit data between multiple port pairs at the same time. Each port can be considered as an independent network segment, and the network devices connected to it enjoy all the bandwidth alone, so they do not need to compete with other devices. When node A sends data to node D, Node B can send data to node C at the same time, and both transmission enjoy all the bandwidth of the network and all have their own virtual connections. If a 10 Mbps Ethernet switch is used here, the total traffic of the switch is 2*10 Mbps = 20 Mbps. When a 10 Mbps shared hub is used, the total traffic of a hub does not exceed 10 Mbps.
In short, a vswitch is a network device that can encapsulate and forward data packets based on MAC address recognition. The switch can "Learn" the MAC address and store it in the internal address table. By creating a temporary exchange path between the initiator of the data frame and the Target receiver, the data frame can directly reach the destination address from the source address.

From the perspective of filtering network traffic, the role of a router is very similar to that of a switch and a bridge. However, unlike switches that work on the physical layer and divide network segments physically, vrouters use specialized software protocols to logically divide the entire network. For example, a router that supports the IP protocol can divide the network into multiple sub-network segments. Only network traffic directed to a Special IP Address can pass through the router. For each received packet, the router recalculates its verification value and writes it to a new physical address. Therefore, the speed of data forwarding and filtering by vro is usually slower than that of A vswitch that only views the physical address of a data packet. However, vrouters can improve the overall efficiency of networks with complex structures. Another obvious advantage of a vro is that it can automatically filter network broadcasts.

What are the functional differences between a hub and a router?

First, the hub, that is, the hub. Its function can be simply understood as connecting some machines to form a LAN. The switch (also known as the switch-type hub) works basically the same as the hub. However, there is a difference between the two in terms of performance: the hub uses the shared bandwidth method, while the switch is the exclusive bandwidth. In this way, when there are many machines or a large amount of data, the two will be obvious. A vro differs significantly from the preceding two. Its function is to connect different network segments and find the most suitable path for data transmission in the network. A vro is generated after a vswitch, just as a vswitch is generated after a hub. Therefore, the vro and vswitch are also associated, rather than two completely independent devices. Vro mainly overcomes the problem that vswitches cannot route and forward data packets.

In general, the main difference between a vro and a vswitch lies in the following aspects:

(1) different levels of work
The original vswitch was working at the data link layer, and the router was designed at the network layer from the very beginning. Because a vswitch works at the data link layer, its working principle is relatively simple, while a vro works at the network layer to obtain more protocol information, allowing the vro to make more intelligent forwarding decisions.

(2) Data Forwarding depends on different objects
A vswitch uses a physical address or a MAC address to determine the destination address for data forwarding. The router uses IP addresses to determine the data forwarding address. IP addresses are implemented in software, and the network where the device is located is described. The MAC address is usually provided by the hardware and allocated by the NIC manufacturer, and has been fixed to the NIC. Generally, it cannot be changed. The IP address is usually automatically assigned by the network administrator or the system.

(3) Traditional vswitches can only be divided into conflicting domains, but not broadcast domains. vrouters can be divided into broadcast domains.
The CIDR Block connected by the vswitch still belongs to the same broadcast domain. broadcast packets are transmitted across all CIDR blocks connected to the vswitch. In some cases, communication congestion and security vulnerabilities may occur. The CIDR blocks connected to the vro are allocated to different broadcast domains, and the broadcast data does not pass through the vro. Although vswitches above Layer 3 Have VLAN functions and can also be divided into broadcast domains, communication between subbroadcast domains is not allowed, and communication between them still requires routers.

(4) The router provides firewall services.
A vro only forwards data packets of a specific address. It does not support packet transmission through the routing protocol or unknown destination network, thus preventing broadcast storms.

 

Physical Layer
In the OSI reference model, the 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 media to provide physical connections to the data link layer for transparent transmission of bit streams.
The role of the physical layer is to achieve transparent transmission of bit streams between adjacent computer nodes and eliminate the differences between specific transmission media and physical devices as much as possible. So that the above data link layer does not have to consider the specific transmission media of the network. The "transparent transfer bit stream" indicates that the bit stream transmitted by the actual circuit has not changed. This circuit seems invisible to the transmitted bit stream.

Data Link Layer
The data link layer is the second layer of the OSI model. It establishes and manages links between nodes. The main function of this layer is to convert an erroneous physical channel into a data link that can reliably transmit data frames through various control protocols.
In computer networks, physical links are unreliable due to various interference. Therefore, the main function of this layer is to convert erroneous physical lines into error-free data links based on the bit streams provided by the physical layer through error control and traffic control methods, it provides a reliable method for data transmission through physical media.
This layer is usually divided into two sub-layers: Media Access Control (MAC) and Logical Link Control (LLC.

The main task of the MAC Sub-layer is to solve the problem of multi-users competing with the channel in the shared network, and complete the access control of network media;

The main task of the LLC sublayer is to establish and maintain network connections and perform error verification, traffic control, and link control.
The specific work of the data link layer is to receive data in the form of bitstream from the physical layer, encapsulate the data into frames, and transmit the data to the upper layer, data in the form of bit streams is encapsulated and forwarded to the physical layer. It is also responsible for processing the confirmation frame information sent from the receiving end to provide reliable data transmission.

Network Layer
The network layer is the third layer of the OSI model. It is the most complex layer of the OSI reference model and the highest layer of the Communication Subnet. It provides services to the resource subnet on the basis of the next two layers. The main task is to select the most appropriate path for packets or groups through the Communication Subnet through the routing selection algorithm. This layer controls information forwarding between the data link layer and the transport layer, and establishes, maintains, and terminates network connections. Specifically, data on the data link layer is converted into data packets at this layer, and then controlled by path selection, segmentation combination, sequence, inbound/outbound routing, etc, transmits information from one network device to another.
Generally, the data link layer solves the communication between nodes in the same network, while the network layer mainly solves the communication between different subnets. For example, when communication between wide area networks (WANs), there must be a routing problem (that is, there may be multiple paths between two nodes.

The main problems to be solved when implementing the network layer functions are as follows:
Addressing: Physical addresses (such as MAC addresses) used in the data link layer only address the internal network. During communication between different subnets, to identify and find the devices in the network, the devices in each subnet are 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: different information exchange methods are defined. Common exchange technologies include line exchange technology and storage and forwarding technology, which also include Packet Exchange Technology and group exchange technology.
Routing Algorithm: when multiple paths exist between the source node and the target node, this layer can select the optimal path for the Data Group through the network based on the routing algorithm, and transmit the information from the sender to the receiver in the most appropriate path.
Traffic between adjacent nodes in the network. The latter controls the traffic between the source node and the target node. The purpose is to prevent blocking and perform error detection.

Transport Layer
The main task at Layer 3 of OSI is data communication, and the task at Layer 3 is data processing. The transport layer is the 4th layer of the OSI model. Therefore, this layer serves as an interface and bridge between the Communication Subnet and the resource subnet.
The main task of this layer is to provide users with reliable end-to-end error and traffic control to ensure correct transmission of packets. The role of the transport layer is to shield the details of lower-layer data communication from the high-level layer, that is, to transparently transmit packets to users. Common protocols at this layer: TCP/IP protocol, SPX protocol in Novell Network, and Microsoft NETBIOS/netbeui protocol.
The transport layer provides a transmission service between the Session Layer and the network layer. This service obtains data from the Session Layer and splits the data when necessary. The Transport Layer then passes the data to the network layer and ensures that the data is correctly transmitted to the network layer. Therefore, the transport layer is responsible for reliable data transmission between two nodes. When the connection between the two nodes is determined, the transport layer is responsible for monitoring. In summary, the main functions of the transport layer are as follows:
Monitor service quality.
Session Layer
Session Layer is the layer 5th of the OSI model. It is an interface between user applications and networks. Its main task is to provide the presentation layer of two entities with the method of establishing and using connections. The connection between presentation layers of different entities is called a session. Therefore, the Session Layer task is to organize and coordinate the communication between two session processes and manage the data exchange.
Users can establish sessions in half-duplex, single-work, and full-duplex mode. When you create a session, you must provide the remote address they want to connect. These addresses are different from MAC addresses (Media Access Control Sub-layer) addresses or logical addresses at the network layer. They are designed for users to facilitate user memory. A domain name (DN) is a remote address used on the network. For example, www.3721.com is a domain name. The Session Layer has the following functions:
Session management: allows users to establish, maintain, and terminate sessions between two physical devices, and supports data exchange between them. For example, a single-direction session or two-way simultaneous session is provided, and the sending sequence and duration of the session are managed.
Session traffic control: Provides session traffic control and cross-session functions.
Addressing: Use a remote address to establish a session connection. L
Error Control: logically speaking, the Session Layer is mainly responsible for establishing, maintaining, and terminating data exchanges. However, the actual work is to receive data from the transport layer and correct errors. Both session control and remote process invocation belong to this layer of functions. However, it should be noted that the errors detected at this layer are not communication media errors, but advanced errors of disk space, printer paper shortage, and other types.
Presentation Layer
The presentation layer (presentation layer) is the sixth layer of the OSI model. It interprets commands and data from the application layer, gives corresponding meanings to various syntaxes, and sends them to the Session Layer in a certain format. Its main function is to "handle user information representation problems, such as encoding, data format conversion, and encryption and decryption. The specific features of the presentation layer are as follows:
Data format processing: negotiate and establish a data exchange format to resolve the differences in data format representation between applications.
Data Encoding: converts character sets and numbers. For example, because the data types (integer or real type, signed or unsigned) and user IDs in the user program can all have different representations, devices must have the ability to convert between different character sets or formats.
Compression and decompression: to reduce the amount of data transmitted, this layer is also responsible for data compression and recovery.
Data encryption and decryption: improves network security.

Application Layer
The application layer is the highest level of the OSI reference model. It is a computer user and an interface between various applications and networks. Its function is to provide services directly to users, complete the work you want to do on the network. On the basis of other layer-6 work, it is responsible for completing the connection between applications in the network and the network operating system, and establishing the connection with end users, complete various protocols, such as supervision, management, and service, required for various network services and applications proposed by network users. In addition, this layer is responsible for coordinating the work between applications.
Services and protocols provided by the application layer include: file service, directory service, file transmission service (FTP), remote login service (Telnet), and email service (e-mail) print Service, Security Service, Network Management Service, database service, etc. The above various network services are completed by different application protocols and programs at this layer, different network operating systems vary greatly in terms of functions, interfaces, implementation technologies, hardware support, security and reliability, and various application interfaces. The main functions of the application layer are as follows:
User Interface: the application layer is a direct interface between users and networks, as well as between applications and networks, enabling users to interact with the network.
Implement various services: various applications at this layer can complete and implement various services requested by users.

Summary of osi7 Models
Because OSI is an ideal model, generally, network systems only involve several layers. Few systems have all 7 layers and fully comply with its rules.
In a layer-7 model, each layer provides a special network function. From the perspective of network functions: the following four layers (physical layer, data link layer, network layer, and transmission layer) mainly provide data transmission and exchange functions, that is, communication between nodes is the main function; layer 4th serves as a bridge between the upper and lower layers, and is the most critical part of the entire network architecture. Layer 3 (Session Layer, presentation layer, and application layer) it mainly provides information and data processing functions between users and applications. In short, the next four layers mainly implement the Communication Subnet function, and the last three layers mainly implement the resource subnet function.

 

 

The following is the TCP/IP layered model
── ------ ── ─ ┐ ┌ ── ┬ ──-┐ ──
│ D │ F │ W │ F │ H │ g │ t │ I │ s │ U │
│ N │ I │ H │ t │ o │ e │ R │ M │ s │ its │
│ Layer 4, application layer │ s │ n │ o │ P │ t │ P │ l │ C │ t │ e │
│ G │ I │ P │ H │ n │ P │ n │
│ E │ s │ e │ it │
│ R │ t │
── ------ ─ ┘ └ ── ┴ ──-┴ ── ─ ┘
── ─ ----- ┐ ┌ ── ─ ------- ┬ ── -------- ── ─
│ Layer 3, transmission layer │ TCP │ UDP │
── ─ ------┘ └ ── ─ --------┴ ── ─ ---------┘
── ─ ------┐ ┌ ── ─ ---- ┬ ── ----┬ ── ─ ------- ──
│ ICMP │
│ Second layer, inter-network layer │ ── ─ ┘ │
│ IP │
└ ── ─ ----- ┘ └ ── ─ ------------
── ─ ----- ┐ ┌ ── ─ ------- ┬ ── -------- ── ─
│ Layer 1, network interface │ arp/RARP │ others │
── ------ ┘ └ ── ------ ┴ ── ─ -------- ── ─
TCP/IP layer-4 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 contain the physical layer and data link layer. Therefore, it cannot independently complete the functions of the entire computer network system and must work with many other protocols.
The four protocol layers of the TCP/IP layered model provide the following functions:
Layer 1: Network Interface Layer
This includes protocols used to transmit data from a collaborative IP address on an existing network medium. In fact, TCP/IP standards do not define functions that correspond to the ISO data link layer and physical layer. Instead, it defines a protocol like Address Resolution Protocol (ARP) that provides the data structure of the TCP/IP protocol and interfaces between the actual physical hardware.
Layer 2: inter-network layer
Corresponds to the network layer of the OSI Layer-7 Reference Model. This layer includes IP protocol and RIP Protocol, which are responsible for data packaging, addressing, and routing. It also contains the inter-network Control Message Protocol (ICMP) to provide network diagnostic information.
Layer 3: Transport Layer
Corresponding to the transport layer of the OSI Layer-7 reference model, it provides two end-to-end communication services. Among them, the TCP protocol (Transmission Control Protocol) provides reliable data stream transportation services, and the UDP protocol (use datainprotocol) provides unreliable User Datagram services.
Layer 4: Application Layer
It corresponds to the application layer and expression layer of the OSI Layer-7 Reference Model. The application layer protocols of the Internet include finger, Whois, FTP (file transfer protocol), Gopher, HTTP (Hypertext Transfer Protocol), Telent (Remote Terminal protocol), and SMTP (Simple Mail Transfer Protocol) IRC (Internet Relay Session), NNTP (network news transmission protocol), etc. This is also the focus of this book.

 

From: http://blog.csdn.net/yaopeng_2005/article/details/7064869

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.