What is routing? Routing refers to the path that a data packet takes in a network, that is, the path that data takes from one device to another. So how do you choose the path? There are two factions: static routing and dynamic routing. It still sounds a bit pedantic, so let me explain it with an example! This year, I am going to travel on a whim, starting from Beijing and traveling all the way to Sanya. How should I plan my trip? Should I travel with a group (static route) or travel independently (dynamic route)? Group tour (static route): The route provided by the tour guide is Beijing-Nanjing-Shenzhen-Sanya. Free travel (dynamic route): starting from Beijing and ending in Sanya. We will analyze the specific routes according to the specific situation. What are the advantages and disadvantages of static routing and dynamic routing? How should I choose this tour? Wait for the document master to explain in detail PART.01 Static RoutingStatic routes are routes created manually by network administrators, and the routing table entries of routers are filled manually by network administrators. Moreover, static routes are fixed and will not change with changes in the network. It’s just like when you’re on a group tour, the tour guide arranges every itinerary location clearly and in detail, and they cannot be changed. The advantage of static routing is that routers do not need to exchange dynamic routing information, and it takes up very little device resources. Just like when we are tourists traveling with a group, we do not have to arrange food and accommodation for the next stop in advance, which is very worry-free. But static routing also has disadvantages: (1) The network administrator must be very clear about the structure and parameters of the entire network, otherwise human configuration errors will lead to static routing errors. It is like a pleasant group tour. The most important thing is a reliable tour guide. If you follow an unreliable tour guide, you will just be at a loss. (2) When the network changes or fails, the route cannot be reselected, which is likely to cause routing failure. Just like if there is a traffic control in Shenzhen during the trip, the fixed itinerary cannot be changed, and it is impossible to reach the destination Sanya as planned, which greatly affects the mood of the trip. (3) In the early stages of network construction, static routing requires administrators to manually configure each router. If there are a large number of routers, the configuration workload is very large. If the network changes later, the administrator needs to adjust the static routing configuration on each router, which is also a lot of work. Just like when a travel agency develops a new travel route, the tour guide must personally go to each scenic spot to conduct research and arrange the itinerary. When the tour guide is leading a tour group on site, changes in the itinerary of a scenic spot will affect the subsequent itinerary, which puts a lot of pressure on the tour guide. Therefore, static routing is more suitable for small, simple networks, and is not suitable for more complex networks with many routers and high probability of network changes. Just like group tours generally do not arrange multiple destinations along the way, because the tour guide said "I can't do that!" PART.02 Dynamic RoutingDynamic routing is a concept opposite to static routing. It means that the router can automatically establish its own routing table based on the specific routing information exchanged between routers, and can automatically adjust it in time according to the changes of links and nodes. When a network node or a link between nodes fails, or when other available routes exist, dynamic routing can select the "best" available route on its own. In other words, dynamic routing is like choosing a free trip. We change our travel arrangements in real time according to the destination and the situation of each scenic spot. For example, if Shenzhen encounters traffic control, we can choose to detour from Guangzhou and will not delay the trip due to some unexpected situations. However, we also have to bear the "price" of freedom, which is that we need to make arrangements in real time according to changes. Similarly, dynamic routing can automatically adjust according to changes in network topology, but it also takes up the router's CPU, memory, and link bandwidth. Common dynamic routing protocols include: RIP (Routing Information Protocol), OSPF (Open Shortest Path First), IS-IS (Intermediate System-to-Intermediate System), and BGP (Border Gateway Protocol). Each dynamic routing protocol has different working methods and routing principles, and understanding their working principles requires deeper professional knowledge. If you want to learn more about various dynamic routing protocols, please leave a message to the document master and let me see your hands~ Although there are many dynamic routing protocols, there are two general rules: (1) Routers need to exchange routing information in real time. Show me your routing table and I'll show you my routing table. It's good for you and me too. The reason why dynamic routing can automatically calculate routes and select forwarding paths based on network conditions is that when the network changes, the routing information exchanged between routers will inform each other of the network changes. Through information diffusion, all routers can be informed of the network changes. (2) The router processes the collected routing information into a routing table based on the routing algorithm for the router to refer to when forwarding IP packets. When the network changes, the router collects the latest routing information and recalculates the route to obtain the latest routing table. It should be noted that the process and principle of exchanging routing information between routers in different routing protocols are different. The ultimate goal of exchanging routing information is to find an optimal path for forwarding IP packets through the routing table. Each routing algorithm has its own set of principles for measuring "best", and most of them are calculated based on a combination of multiple characteristics. These characteristics include: the number of routing nodes contained in the path (hop count), network transmission cost (cost), bandwidth (bandwidth), delay (delay), load (load), reliability (reliability) and maximum transmission unit (MTU). PART.03 SummaryThe characteristics of dynamic routing and static routing are compared as follows:
You have read all this, I don’t believe you still don’t understand! |
<<: A article about connection and socket
In this issue, we will introduce the basic neighb...
A week ago, we shared RackNerd's promotional ...
As connected technology continues to advance, bus...
ProfitServer has launched a Black Friday promotio...
LiteServer is carrying out a promotion for its 15...
First of all, I wish all my readers a happy Natio...
At the beginning of last month, I shared the news...
IPSec is not a single protocol, but a set of netw...
RAKsmart continued to launch a number of activiti...
[[414891]] This article is reprinted from the WeC...
On the 17th local time, the Brazilian government&...
Hostodo launched a new server in the middle of th...
[51CTO.com original article] As a representative ...
This morning, the National Development and Reform...
The story of "A horse gallops across the sky...