Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

On the concept of routing

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

The five-layer Internet protocol stack of computer network is from top to bottom: application layer, transport layer, network layer, link layer and physical layer. The concept of routing appears in the network layer, because the three important functions of the network layer are: forwarding, routing, and establishing connections. This article mainly analyzes the concept of routing.

First, distinguish the difference between forwarding and routing:

Forwarding is a router-local action that transfers packets from an input link interface to the appropriate output link interface.

Routing is a network-wide process that determines the end-to-end path that a packet takes from the source to the destination.

The choice of route needs to be determined by the algorithm, so the task of the routing algorithm is to determine a good path from the sender to the receiver, which can be understood as a route.

For example, suppose a driver drives from Shanghai to Beijing. As we all know, there are too many roads from Shanghai to Beijing, and there are many cities, so the driver needs to determine his best route before leaving. The best basis may be the shortest distance, the least cost, the shortest time, and so on. This is equivalent to the routing algorithm, and eventually the driver will determine a route. This route is equivalent to routing. This route will pass through multiple cities, and forwarding is equivalent to passing through the city, that is, the driver enters the city from one road and decides which way to leave the city, which can be understood as the difference between macro and micro.

Each router has a forwarding table. The router forwards the packet by checking the value that reaches the header field of the packet, and then uses that value to index the query in the forwarding table of the router. The value of the header stored in the forwarding table entry indicates the output link interface of the router to which the packet will be forwarded. The value in the header of the packet may be the destination address of the packet or a hint of the connection to which the packet belongs, depending on the network layer protocol.

How is the forwarding table configured in the router? This is a key issue because it reveals the important interaction between routing protocols and forwarding. The routing algorithm determines the value of the forwarding table inserted into the router. The routing algorithm may be centralized or distributed, but in either case, the router accepts routing protocol messages, which are used to configure its forwarding table. The specific implementation process will not be described in detail, consult computer network books (mainly because I am not very clear =. = |)

The forwarding function of the network layer actually transmits packets from the incoming link of a router to the appropriate outgoing link.

The four components of a router are: input port, switching fabric, output port, routing processor.

1. Input port: performs the physical layer function of connecting an input physical link to the router; performs the data link layer function that requires interaction with the data link layer located at the far end of the incoming link; performs the lookup function at the input port.

two。 Switch fabric: connects the input port of the router to the output port. This switch fabric is completely included in the router, that is, it is a network in a network router.

3. Output port: stores packets received from the switching node and transmits them on the input link by performing the necessary link layer and physical layer functions.

4. Routing processor: executes routing protocols, maintains routing tables and link-state information for connections.

Reference textbook: computer Network (Top-Down approach)

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report