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

Static routing or dynamic routing, an example to clarify

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > IT Information >

Share

Shulou(Shulou.com)11/24 Report--

What is routing?

Routing refers to the path that packets pass through the network, that is, the path that data chooses from one device to another.

So how to choose the way?

It is divided into two factions: static routing and dynamic routing.

It still sounds stylish, but the document gentleman gives an example to explain it!

This year, Mr. Archive is going to take a walk-and-go trip. He plans to travel all the way from Beijing to Sanya. How to plan our itinerary? Is it a group tour (static route) or a free trip (dynamic route)?

Follow the tour (static route): the route provided by the tour guide is Beijing-Nanjing-Shenzhen-Sanya.

Individual travel (dynamic routing): starting from Beijing and ending in Sanya, where we analyze the specific situation.

What are the advantages and disadvantages of static routing and dynamic routing respectively?

How should I choose this trip?

Wait for the document to come in detail.

PART.01 static routes static routes are routes created manually by the network administrator, who manually populate the routing table entries of the router. And static routes are fixed and will not change with the change of the network.

Just like when traveling with a group, the tour guide arranges each itinerary clearly and carefully and cannot be changed.

The advantage of static routing is that there is no need to exchange dynamic routing information between routers, which takes up very few resources of devices. Just like when we go on a group tour as tourists, we don't have to arrange food and accommodation for the next stop in advance.

But static routing has its drawbacks:

(1) the network administrator must be very clear about the structure and parameters of the whole network, otherwise human configuration errors will lead to static routing errors. For example, the most important thing for a happy group tour is a reliable guide. Following an unreliable guide can only catch the blind together.

(2) when the network changes or breaks down, the route cannot be reselected, which is likely to cause the route to fail. Just like if traffic control occurs through Shenzhen during a trip, the fixed itinerary cannot be changed and cannot arrive at the destination Sanya as planned, which greatly affects the mood of the trip.

(3) at the beginning of the construction of the network, the use of static routes requires the administrator to manually configure it on each router. If there are a large number of routers, the configuration workload is very large, and if the network changes later, the administrator needs to adjust the configuration of static routes on each router, which is also a lot of work.

Just like when a travel agency develops a new itinerary, the tour guide has to go to various scenic spots to investigate and arrange the itinerary. When the tour guide leads the tour on the spot, the itinerary of a scenic spot changes, which will affect the follow-up itinerary and put a lot of pressure on the tour guide.

Therefore, static routing is more suitable for small and simple networks, but not for networks with more routers, high possibility of network change and more complex networks. Just like with a group tour, you don't arrange multiple destinations on the way, because the tour guide says, "my concubine can't do it!"

PART.02 dynamic routing is a concept relative to static routing, which means that routers can automatically establish their own routing table according to the specific routing information exchanged between routers, and can adjust automatically according to the changes of links and nodes.

When network nodes or links between nodes fail, or other available routes exist, dynamic routing can choose the "best" available route on its own.

In other words, dynamic routing is like choosing to travel alone, we change our travel arrangements in real time according to the destination and each scenic spot. For example, when Shenzhen encounters traffic control, we can choose to make a detour from Guangzhou without delaying our trip due to some unexpected circumstances. But we also have to bear the "price" of freedom, that is, we need to make painstaking arrangements in real time according to changes.

Similarly, dynamic routing can be automatically adjusted according to changes in the network topology, while also consuming the CPU, memory, and link bandwidth of the router.

Common dynamic routing protocols are:

RIP (Routing Information Protocol), OSPF (Open Shortest Path First, Open shortest path first), IS-IS (Intermediate System-to-Intermediate System, Intermediate system to Intermediate system), BGP (Border Gateway Protocol, Border Gateway Protocol).

The working mode and routing principles of each dynamic routing protocol are different, and more professional knowledge is needed to understand how they work.

If you want to know more about various dynamic routing protocols, please leave a message for the document and let me see your hands.

Although there are many dynamic routing protocols, there are two general rules:

(1) routing information needs to be exchanged in real time between routers. Show me your routing table. I'll show you my routing table. Hello, me, too.

The reason why dynamic routing can automatically calculate the route and choose the forwarding path according to the situation of the network is that when the network changes, the routing information exchanged between routers will inform each other of the change of the network. Through information diffusion, all routers can know the changes in the network.

(2) the router processes the collected routing information into a routing table according to the routing algorithm, which can be consulted by the router when forwarding IP packets.

When the network changes, the router collects the latest routing information and recalculates the route so that the latest routing table can be obtained.

It should be noted that the process and principles for the exchange of routing information between routers in different routing protocols are different. The ultimate goal of exchanging routing information is to find the best path to forward IP packets through the routing table.

Each routing algorithm has its own set of principles to measure "best", most of which are calculated on the basis of combining multiple characteristics.

These characteristics include the number of routing nodes (hop count), network transmission cost (cost), bandwidth (bandwidth), delay (delay), load (load), reliability (reliability) and maximum transmission unit MTU (maximum transmission unit).

PART.03 summarizes the characteristics of dynamic and static routes and compares them as follows:

Static rout

The complexity of dynamic routing configuration becomes more complex as the size of the network increases, which is usually not limited by the size of the network. Administrators do not need additional expertise to understand dynamic routing protocols and skills. Topology changes require administrators to participate in automatic adjustment according to topology changes. Scalability is suitable for simple network topologies, both simple and complex topologies. Overall security is more secure, no static routing security resources are consumed, no additional resources are required for CPU, The predictability of memory and link bandwidth is always reached by the same path to the destination based on the current network topology. If you don't believe it, you don't understand!

This article comes from the official account of Wechat: ZTE documents (ID:ztedoc)

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

IT Information

Wechat

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

12
Report