In the network, how does a router forward data packets to a remote network? Routing plays a vital role in this process. Routes are generally classified into static routes and dynamic routes. In this article, I will not expand the role of routing. After all, this is a relatively basic content. Here, I want to explain the configuration of Static Routing and under what circumstances can I use static routing.
1. Static route Configuration
Static Routing refers to manually adding a route to each vro. As shown in, you can see the basic steps of static routing configuration.
In a Cisco router, the ip route command is used to configure static routes. As shown in, ip route indicates that static routing is used. Generally, Cisco's IOS operating system is case-insensitive. In this command, the following parameters are required.
The first parameter is Destination network. This parameter indicates the network number to be placed in the routing table. That is to say, we want to send packets to the remote network. Generally, this parameter is used with the second parameter Mask. Mask indicates the subnet Mask used on this network. If you are not clear about the relationship between the subnet mask and the IP address, I suggest you fill in the basic knowledge.
The third parameter is Nest hop address. This parameter is mainly used to set the router address of the next hop. That is, the router to which the data packet is forwarded. Note: This router refers to the interface of the next vro directly connected to the local router. The address must be entered correctly. If an incorrect next hop address is entered here, or this interface is disabled for your vro, although this static route record is available, but it does not actually appear in the routing table. Therefore, when configuring static routes, the network administrator is often required to have a comprehensive and profound understanding of the current network of the enterprise.
The fourth parameter is Exitinterface. This parameter is generally an optional parameter. This parameter can be used to place the address to reach the next hop. In general, the preceding parameter is the first route, and this parameter is the second intersection. Of course, the first and second are relative to the previous vro. This parameter is not required. If this parameter is configured, the next hop may look like a directly connected route. However, it should be noted that if the route information configured in the next hop router is different from this parameter, the subsequent configuration will be used.
The fifth parameter is administrative_distance. This indicates the Administrative distance, also known as the hop. This is also an optional parameter. If the parameter value is not specified, the default value is 1. In the above configuration, I will change it to 2 or 3. The network administrator can modify the value according to the actual situation.
The sixth parameter is Permanent. This parameter is important. In Static Routing mode, you can manually add routes. But can I automatically delete it? That is to say, when a vro finds that the next hop router is unavailable, can this route information be automatically deleted? This parameter is mainly used for setting. When this option is selected, the route information is retained no matter what happens. If this option is not selected, the route information is automatically deleted if the interface is disabled or the router cannot communicate with the next selected router.
Generally, you only need to use three or four of the parameters. In practice, if many records are involved, we recommend that you set the format in the Excle table first. Then configure. In this case, you can use a script for one-time configuration. Or, copy and paste it. This reduces the workload of static routing configuration.
Ii. Summary of advantages and disadvantages of Static Routing and Analysis of application scenarios
In short, Static Routing uses manual management. Obviously, compared with dynamic routing, it has a huge workload. However, this does not mean that static routing is useless. In practical work, Static Routing is still useful. As a network administrator, you must know the advantages and disadvantages of Static Routing and be able to determine when Static Routing is more suitable.
I believe that the characteristics of Static Routing are obvious. In general, compared with dynamic routing, it has the following advantages.
First, it can save bandwidth. In Static Routing mode, the network administrator manually adds a route to each vro. Therefore, no route tables are updated between routers. This means that there is no bandwidth occupation between routers in the network. Therefore, in static routing, the bandwidth available to users is much higher than that of dynamic routing. This improves the network performance of enterprises.
Second, it is more flexible and more secure in terms of security. This is mainly because in Static Routing mode, the network administrator can select to allow a route to only access a specific network. For example, a group has four branches. Branches are connected through optical fiber cables and routers. In this case, you can use routing to restrict the access to the network of the Group Company only by the Branch Office (generally, the servers are deployed in the Group Company), and the group company cannot access the network of the branch office. Dynamic Routing uses the automatic route table update mechanism, so this feature is not available.
Third, it can improve the performance of the router. In dynamic routing mode, the router needs to update its route table at intervals. This requires a certain amount of resource overhead. In Static Routing mode, routes are not automatically updated Once configured. That is to say, there is no management performance overhead for the CPU or memory of the router. This can improve the data processing performance for users, or purchase routers with low configurations to help users save investment in information technology.
Of course, Static Routing also has its own defects that cannot be concealed. Compared with dynamic routing, Static Routing has the following defects.
First, the management workload is relatively large. In Static Routing mode, the network administrator needs to configure all static routing information one by one. As shown in the preceding configuration case. If the enterprise network has 30 routers, You need to configure 30 records on each router. Obviously, this workload is a little heavy.
Second, it is not flexible enough. When a vro is added to the network, the routing environment changes. In Static Routing mode, automatic updates are not performed. In this case, you must manually update the route table of each vro and add relevant route records. This will have a great negative impact on subsequent network upgrades and adjustments.
Third, they have higher requirements on Network Administrator skills. If dynamic routing is used, you only need to connect the router to the network. The router selects the appropriate route information according to the routing selection rules enabled. That is to say, the Network Administrator does not need to fully understand the network conditions of the enterprise. On the contrary, in Static Routing mode, the network administrator must understand the configured network and how each router can correctly connect to the network to correctly configure the route information. In short, in Static Routing mode, users have higher professional skills.
From the comparison of this advantage and defect, we can see that Static Routing and dynamic routing have different application scenarios. As a static route, it is often used in small-sized networks or applications with special security requirements. One of the main features of these scenarios is the immediate manual maintenance of routing information, and the workload is not great. Or can be accepted by users.
Static Routing is not suitable for large networks or networks with static changes. This is because the workload will increase. Dynamic Routing may be more appropriate.