In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)06/01 Report--
Overview
One of the functions of the OSI specification is to help transfer data between different hosts.
The OSI model consists of seven layers, which are divided into two groups.
The above three layers specify how applications in the terminal communicate with each other and how to communicate with users.
The following four layers specify how to conduct end-to-end data transfer.
The upper three layers know nothing about networking and network addresses, and that is the responsibility of the lower four layers.
The following four layers define how data is transmitted over physical cables, switches, and routers, and how to rebuild the data flow from the sender host to the target host application.
The following network devices run on all seven layers of the OSI model:
NMS (Network Management Station, network management workstation)
Web and Application Server
Gateway (non-default gateway)
Network host
Examples of functions at each layer:
Application layer
The application layer of OSI model is the place where users communicate with computers. This layer works only when you need to access the network. IE, for example, does not need to access the application layer when accessing local html files. IE accesses the application layer only if you try to get the html document through http, or use FTP to download the file. In fact, the application layer enables the application to transfer information down the protocol stack, thus acting as an interface between the application and the next layer. In other words, IE is not in the application layer, but interacts with application layer protocols only when remote resources need to be processed.
The application layer is also responsible for determining the availability of the target communication party and determining whether there are sufficient resources for the desired communication.
These tasks are important because computer applications require more than just desktop resources. Typically, they will use the communication components of multiple network applications, such as file transfer, e-mail, remote access, network management activities, and information lookup.
It is important that the application layer is the interface between real applications. Applications such as MS Word are not located in the application layer, but interact with the application layer protocols.
Presentation layer
The presentation layer, named for its purpose, provides data to the application layer and is responsible for data conversion and code format.
(the transmission format is used in the data transfer process, which is converted to a format that can be recognized by the application when it reaches the computer.)
In essence, this layer is a converter that provides coding and conversion capabilities. A successful method of data transmission is to convert the data into a standard format and then transmit it. The computer is configured to accept data in this common format and then convert it to a native format for reading (for example, from EDCDIC to ASCII). By providing conversion services, the presentation layer ensures that data transmitted from the application layer of one system can be read by the application layer of another system.
OSI has established relevant protocol standards, which define how to format standard data. Tasks such as data compression, decompression, encryption, and decryption are related to the presentation layer. Some presentation layer standards also involve multimedia operations.
Session layer
The session layer is responsible for establishing, managing and terminating sessions between presentation layer entities, as well as controlling the dialogue between devices or nodes. It coordinates and organizes communication between systems, providing three different modes: simplex, half-duplex, and full-duplex. In short, the basic function of the session layer is to separate data from different applications.
Transport layer
The transport layer segments and reassembles the data into data streams. Services located at the transport layer segment and reassemble data from upper-level applications and merge them into the same data stream. They provide end-to-end data transmission services and can establish a logical connection between the sending host and the target host on the Internet.
If you are familiar with TCP and UDP, you know that they are both running at the transport layer. TCP is a reliable service, while UPD is unreliable. This means that application developers have more choices because when using the TCP/UDP protocol, they can choose between the two protocols.
The transport layer is responsible for providing the following mechanisms: multiplexing upper-layer applications, establishing sessions, and dismantling virtual circuits. It also provides transparent data transmission, thus hiding network differences from the upper layers.
Connection-oriented (reliable) Transport layer Protocol flow Control
Data integrity is ensured by the transport layer, which is achieved through flow control and allowing applications to request reliable data transfer between systems. Flow control can avoid the data receiver buffer overflow caused by the data sender. Reliable data transfer uses connection-oriented communication sessions between systems, and the protocols involved can achieve the following goals:
After receiving the data, confirm to the sender
Retransmit all unacknowledged segments
After the data segments have their final destination, arrange them in the correct order
Ensure that data traffic does not exceed processing capacity to avoid congestion, overload, and data loss.
(flow control is designed to provide a mechanism for the receiver to control the amount of data sent by the sender.)
Connection-oriented communication
In a reliable transmission operation, the device to transmit data establishes a connection-oriented communication session to the remote device. The transmission device first establishes a connection-oriented session with its peer system, which is called call setup or a three-way handshake, and then transmits data. When the transmission is complete, the call is terminated to remove the virtual circuit.
The figure above depicts a typical reliable session between the sending system and the receiving system. As can be seen from the figure, the applications of both hosts must first notify their respective operating systems to establish a connection. The two operating systems send messages over the network confirming that the transmission has been approved and that both sides are ready. After this essential synchronization is completed, a connection is established and the data can then be transferred.
During the establishment of the connection, the two hosts regularly check each other and communicate through the protocol software to ensure that everything goes smoothly and correctly receives the data. The summary of the three-way handshake is as follows:
The first is the connection Agreement data segment, which is used to request synchronization.
The next segment acknowledges the request and determines the connection parameters between hosts. These segments also request to synchronize the ordering of the receiver to establish a two-way connection.
The last segment is also used for acknowledgement, informing the target host that the connection agreement has been accepted and the connection has been established. At this point, you can begin to transfer data.
In connection-oriented reliable data transmission, the order in which datagrams arrive at the receiving host is exactly the same as the sending order; if the order is disrupted, the transmission will fail. If any segments are lost, duplicated, or damaged during transmission, the transmission will also fail.
If the transport service has the following characteristics, it is connection-oriented (reliable):
Establish a virtual circuit (three-way handshake)
Use sorting techniques
Use confirmation
Use flow control.
Window technology
Ideally, data transmission is fast and efficient. However, if the transmitter has to wait for confirmation after each segment is sent, the transmission speed will become slow. There is a period of time between the transmission of the data segment by the sender and the completion of the confirmation from the receiver, and the sender can use this time to transmit more data. The number of segments (in bytes) that the transmitter can send before receiving an acknowledgement is called a window.
The window is used to control the number of unacknowledged segments.
The size of the window controls the amount of information that one party transmits to the other. Of course, the size of the window is adjustable, and if you do not receive all the bytes that should be acknowledged, the receiver will shrink the window to improve the communication session.
confirm
Reliable data transmission depends on fully functional data links to ensure the integrity of data streams sent between machines. It ensures that the data is not duplicated or lost, which is achieved by affirmative acknowledgement and retransmission, which requires the receiver to send an acknowledgement message to the sender after receiving the data. The sender records each segment measured in bytes, sends it and waits for confirmation, but does not send the next piece of data. After sending the segment, the sender starts the timer and retransmits the segment if it still does not receive an acknowledgement from the receiver after the timer expires.
Network layer
The network layer manages device addressing, tracks the location of devices in the network, and determines the best data transmission path, which means that the network layer must transmit data streams between devices located in different networks. Routers are located at the network layer and provide routing services in the internetwork.
The specific process of routing is as follows: after receiving the packet on its interface, the router first checks the destination IP address of the packet. If the destination of the packet is not the current router, the router looks for the destination network address in the routing table. When an outbound interface is selected, the router sends the packet to that interface, or encapsulates the packet into a frame and transmits it on the local network. If the entry for the destination network is not found in the routing table, the router discards the packet.
There are two types of packets used at the network layer: data and routing updates.
Data packet: used to transmit user data in the Internet. The protocol used to support user data is called a routing protocol.
Routing update packet: contains update information about the network connected to all routers in the internetwork, which is used to inform neighboring routers. The protocols that send routing update packets are called routing protocols, and some common routing protocols include RIP, RIPv2, EIGRP, and OSPF. Routing update packets are used to help each router establish and maintain routing tables.
The following figure shows a routing table:
The routing table used by the router contains the following information:
Network address: a network address that varies from protocol to protocol. For each routing protocol, the router must maintain a routing table because each routing protocol tracks the network with a different addressing scheme, such as IP, IPv6, and IPX.
Interface: the outbound interface that will be selected for the packet when going to a specific network.
Measure: the distance to the remote network. Different routing protocols calculate this distance in different ways. Some routing protocols (specifically RIP) use hop count (the number of routers that a packet traverses when it travels to a remote network), while others use bandwidth, line delay, or even ticks.
The following figure illustrates the role of routers in the Internet.
For routers, you must keep the following points in mind:
By default, routers do not forward any broadcast and multicast packets
The router determines that the packet is forwarded to the next-hop router based on the logical address in the network layer header
Routers can use access control lists created by administrators to control the packet types of accessible interfaces to improve security.
If necessary, the router can provide layer 2 bridging and routing functions on the same interface.
Layer 3 devices (in this case, routers) provide connectivity between virtual LAN (VLAN).
Routers can provide QoS (Quality of Service, quality of service) for specific types of network data flows.
Data link layer
The data link layer provides physical transmission of data and handles error notification, network topology, and flow control. This means that the data link layer will use hardware addresses to ensure that messages are transmitted to the correct devices in the LAN, and messages from the network layer will be converted into bits for transmission at the physical layer.
The data link layer encapsulates the message into a data frame and adds a custom header that contains the hardware address of the destination and the hardware address of the source. The added information is located around the original message, forming a "small container".
The following figure shows the data link layer and Ethernet and IEEE specifications:
The router runs at the network layer and doesn't care where the host is, but only where the network (including remote networks) is located and the best path to these networks (including remote networks)! Routers only care about the network, which is a good thing! The work of uniquely identifying each device in the local network is the responsibility of the data link layer.
The data link layer uses hardware addresses to enable hosts to send packets to other hosts in the local network and across routers. Whenever a packet is transmitted between routers, the packet is encapsulated into a frame using the data link layer control information, but the receiving router strips the information, leaving only the complete original packet. The process of encapsulating the packet into a frame is repeated at each hop until the packet finally reaches the correct receiving host. Throughout the transmission process, the packet itself has never been modified, but is only encapsulated by the necessary control information so that it can be transmitted through different media, which is very important.
The IEEE Ethernet data link layer consists of two sublayers:
Media access Control (MAC) sublayer (802.3)
It defines how packets are transmitted over the media. It uses "first come, first served" access mode, and the bandwidth is shared by everyone, so it is called competitive Media access (contention media access). This sublayer defines the physical address and logical topology. What is a logical topology? It refers to the test path of the signal in the physical topology. In this sublayer, line control, error notification (no error correction), sequential delivery of frames, and optional flow control can also be used.
Logical Link Control (LLC) sublayer (802.2)
It is responsible for identifying and encapsulating network layer protocols. The LLC header tells the data link layer how to process the packet after receiving the frame. It works like this: after receiving a frame, the host looks at the LLC header to determine who to give the packet to-such as the IP protocol at the network layer. LLC can also provide flow control and control bit ordering.
Switches and bridges operate at the data link layer and filter the network based on hardware (MAC) addresses. We will introduce it in detail below.
Switches and bridges operating at the data link layer
Layer 2 switching is considered hardware-based bridging because it uses special hardware called ASIC (Application-specific Integrated Circuit). Therefore, not only the speed is high, but also the delay is very low (delay refers to the time between the frame entering the port and leaving the port).
Bridges and switches read each frame transmitted over the network, and these layer 2 devices add the source hardware address to the filter table to track the port from which the frame was received. The information recorded in the bridge or switch filter table will help determine the location of the sending device.
Although both layer 2 and layer 3 devices need to understand the network, their concerns are very different. Layer 3 devices (routers) need to determine the location of the network, while layer 2 devices (switches and bridges) need to determine the location of devices. Therefore, a network is to a router what a device is to a switch and bridge, and a routing table that provides an Internet map is to a router what a filter table that provides a device map is to a switch and bridge.
After the filter table is established, the layer 2 device will forward the frame only to the network segment to which the target hardware address belongs: if the target device is on the same network segment as the sending device, the layer 2 device will prohibit the frame from entering other network segments; if the target device is in another network segment, the frame will only be transmitted to that network segment. This is called transparent bridging.
After the switch interface receives the frame, if its destination hardware address is not found in the filter table, the switch forwards the frame to all network segments. If an unknown device responds to this forwarding operation, the switch updates the location of the device in its filter table. However, if the destination address of the frame is a broadcast address, the switch forwards all broadcasts to all network segments connected to it by default.
All the devices that receive broadcasts are located in the same broadcast domain, that is, layer 2 devices propagate layer 2 broadcast storms, which greatly reduces network performance. The only way to stop the broadcast storm from spreading over the Internet is to use a layer 3 device, the router.
In the Internet, the greatest advantage of using a switch instead of a hub is that each switch port belongs to a different collision domain, and the hub forms a large collision domain. However, even if a switch is used, the broadcast domain cannot be split by default. Neither the switch nor the bridge has this function. Instead, they forward all broadcasts.
Another advantage of LAN switching over a hub-centric implementation is that every device in each network segment connected to the switch can transmit at the same time (at least if only one host is connected to each switch port without a hub). When using a hub, there cannot be multiple devices communicating at the same time on each network segment.
Physical layer
The physical layer has two functions: send and receive bits. The value of bits can only be 0 or 1. The physical layer communicates directly with various communication media. Different types of media represent bit values in different ways, some use tones, some use state switching-from high to low and from low to high. For each type of media, specific protocols are required, which describe the correct bit mode, how to encode data into media signals, and the characteristics of physical media connectors.
The physical layer defines the electrical, mechanical, regulatory, and functional requirements that need to be met to activate, maintain, and disconnect physical links between end systems, and allows you to determine the interface between DIE (Data Terminal Equipment) and DCE (Data Communication Equipment). The DCE is usually located at the service provider, and the DTE is the device to which it is connected. Typically, DTE uses available services through a modem or CSU/DSU (Channel Service Unit/Data Service Unit, channel service unit / data service unit).
OSI defines various physical topologies of physical layer junction boxes in a standard form, allowing different systems to communicate with each other.
Hubs operating at the physical layer
A hub is actually a multi-port transponder. The transponder receives the digital signal, amplifies or reconstructs it, and then forwards it through all active ports without looking at the data represented by the signal. This means that all devices connected to the hub belong to the same collision domain and the same broadcast domain.
Like transponders, hubs do not view incoming data streams, but simply forward them to other parts of the physical media. All devices connected to the hub must listen to see if any other devices are transmitting data. The star physical network is formed by using the hub, in which the hub is located in the center of the network, and the cable extends from the hub in all directions.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.