Data forwarding process in OSI

CCNA 200-301

CCNA 200-301

CCNP Enterprise

CCNP Enterprise

CCNP Security

CCNP Security

CCIE Enterprise Lab

CCIE Enterprise Lab

CCIE Security Lab

CCIE Security Lab

CCNP Service Provider

CCNP Service Provider

CCNP Data Center

CCNP Data Center

CCNP Collaboration

CCNP Collaboration

CCIE DC Lab

CCIE DC Lab

ic_r
ic_l
Data forwarding process in OSI
images

Introduce some tips about CCNA RS today.

The book was picked up last time, and the last time I briefly understood the role of OSI and various levels. This time we look at how data is moving between the various levels of OSI and how it is passed over the network.

 

First, the package:

We still consider the application layer, presentation layer, and session layer as a whole, and merge them into the application layer. What is the problem after the data is generated by the application? Who is it to pass to? How to pass? Where is the target? Which of these questions is it? For a simple example, we bought something in Tmall. Next, you will worry that the other party does not know who to lend to? Will you worry that the other party does not know your shipping address? It is estimated that it will not. Therefore, after the application layer data is generated, the next question is to determine how the data should be forwarded and controlled. This is the basic role of the transport layer.

 

The transport layer provides a variety of transport methods, of which TCP and UDP are the most commonly used. When the data needs to ensure the integrity, order or reliability of the transfer, TCP is required to be the application. Service, and in the face of multiple applications, how does TCP distinguish the data from that application? You can't open the QQ data to Youku. It then defines the interface that provides TCP or UDP to interface with the application, namely the port. At the same time, the application will add some descriptive and controllable content in front of the data, that is, add headers to the data. This process is encapsulation. At this point, the data after encapsulation becomes a segment.

 

Similarly, when data passes through each layer and is passed down, it tells the next layer what needs to be done, that is, to encapsulate it until the data becomes a bit. Therefore, the control of the next layer on the next layer is reflected in the contents of the package.

 

Data forwarding in OSI

Second, the gateway and next hop

Data forwarding in OSI

 

Because the network layer divides the network, the router connects the boundaries of different networks. Therefore, for the internal network, the router is the boundary between the internal network and the external network, that is, the gateway.

 

In the network, routers are connected to each other to form a network topology, which is like a map that connects different networks. Therefore, to achieve communication between any two points in this map, each router in the figure must know the complete network information, which is the routing table. Therefore, for communication between different networks, the gateway router needs to select the path according to the routing table, and then forwards the data through a reasonable router interface, and forwards the data to the next router or receiver in the forwarding path.

 

When we travel, if we want to reach a certain place, we need to change to a bus or subway in a certain place. The transfer point is equivalent to our router, and this transfer point is the next stop to reach the target. Judging from common sense, this transfer point can be the closest stop to the starting point, or the closest stop to the endpoint, as long as the site on the path can be called the next stop. In the network, the router on the data forwarding path can also be used as the next-hop path for forwarding, which is called the next-hop router. The next hop may also be the next hop closest to the starting point, that is, the next hop directly connected; or the other node router in the forwarding path, that is, the non-direct next hop. From this point of view, the gateway is actually the next-hop router directly connected, and the network layer is hop-by-hop and forwards the data through the router.

Data forwarding in OSI

 

Third, the address resolution protocol

The forwarding of data is nothing more than communication within a subnet or communication between different subnets.

 

The forwarding of data is ultimately due to being sent from the interface and received from the interface. Therefore, when data forwarding occurs, it is important to determine the interface through which the data is sent and the interface to be received. This requires an address resolution protocol.

 

Data forwarding in OSI

 

Both sides of the internal communication of the subnet are in the same broadcast domain. If you want to confirm the interface of the other party receiving the information, you can directly query through the broadcast. After all, the other party and I are in the same community. I only need to shout in the community to make sure that the other party is on the floor of several buildings.

 

Data forwarding in OSI

How to determine the target interface? First, it is certainly not appropriate to use the broadcast to directly ask the other party's address because the parties are not in the same broadcast domain. ARP provides another way -- proxy ARP. In short, the router at the border responds to the target in response to the ARP reply, and the router acts as a proxy to forward the data to the destination. This practice has security risks, so the proxy ARP function is usually turned off. At this time, if you want to achieve access to external data, you need to specify the gateway, or specify the next hop forwarding address, so that the gateway or the next hop router receives the data interface instead of the target response one hop to forward to the target.