With the development of the routing industry, the market competition is fierce. It is also very important for users to correctly set routes. Here I have studied some network router settings, and I will share them with you here, hoping to help you. As we all know, China's domestic network access service providers are basically monopolized by China Netcom and China Telecom, and there are some problems with online and site access, that is, if your network belongs to the China Netcom line, the access to China Telecom's resources will be slow, and if your network is provided by China Telecom, similarly, access to China Netcom resources will be slow.
This is why many enterprise users have begun to apply for dual-line solutions to solve this problem. But do we know how to rationally allocate network access outlets and links as a network administrator? By rationally allocating the destination IP address, we can make better use of network resources, so that the data accessing the telecom network can be sent to the telecom link, and the data accessing the Netcom can be smoothly sent to the Netcom link. Today, I would like to invite readers of IT168 to learn how to use routing policies to achieve automatic allocation of configuration information for dual-line dual-network routers, making data packet forwarding more intelligent.
I. Advantages of the routing policy:
Readers who frequently follow our IT168 network channel know that we have previously introduced how to solve this dual-line network problem by starting with the routing information of the local computer, however, this method is only limited to operations on a single computer. If there are many employees and computers in the enterprise, the setting of one machine is definitely not realistic, in this case, we can implement overall management of egress settings for enterprise network routers through routing policies, and set reasonable routing policies for egress network routers, so that network packets can be forwarded to different lines according to different requirements.
In general, the commands of the routing policy only need to be set in the network router at the external egress of the enterprise connection network. The router actually connects to the dual-line dual-channel, that is, an interface connects to the network connected to China Netcom, an interface connects to China Telecom's network.
Ii. Routing Policy commands:
The routing policy enables the router to select the next hop route information according to certain rules, so that the router can automatically select the basic information of the received network packet, determine the route table in which the data should be forwarded. Through the routing policy, we can specify multiple next hop forwarding route addresses for a vro. Next, let's take a look at a route policy command, and then learn its meaning based on the instructions following it.
1) set the basic information of the routing policy:
Route-map src80 permit 10
// Create a policy route with the name src80 and serial number 10. The rule is allowed.
Matches ip address 151
// Set match to meet the condition. This means that the set operation is performed only when the ip address meets the requirements in access control list 151. Otherwise, the set operation is skipped directly.
Set ip next-hop 10.91.31.254
// Modify the next hop route information of the data to 10.91.31.254 if the preceding conditions are met.
Access-list 150 deny tcp any 10.80.0.0 0.7.255.255 eq www
Access-list 150 permit tcp 10.80.0.0 0.7.255.255 any eq www
// Set the matching information in access control list 150
2) Enable and take effect of the configured routing policy on an interface:
Int FastEthernet3/2
// Access the Gigabit Ethernet Interface
Ip policy route-map src80
// Apply the routing policy src80.
No ip policy route-map src80
// Cancel the application of the src80 routing policy.
Of course, the actual commands of each routing policy will be different, but the basic commands such as match and set are similar. We can modify them as needed during actual use.
Iii. network router configuration instance:
After learning about the basic routing policy setting method, we can use it to solve the actual problem of dual-line dual-channel network router setting. First, the enterprise applied for a dual-line network egress, the other side is the China Telecom line. What we need to do is to use the routing policy to allow data sent to different networks to be directly forwarded to the corresponding network interface. After knowing the technical application point, we will use this technology to solve the actual problem. The use of policy routing is as flexible as that of programming. It can set forwarding conditions, you can also use the source address or destination address information to guide the packet sending direction.
1) Source Address-Based Policy Routing:
If an enterprise divides departments based on the network, we can use the source address-Based Policy Routing to distribute network packets. For policy routing of the source address, the data that the Netcom department wants to access is forwarded to the WAN1 interface corresponding to the China Netcom line; the data that the telecom department wants to access is forwarded to the WAN2 interface corresponding to the telecom line. In this way, both Departments can smoothly and quickly carry out business without interfering with each other. However, there is a problem with this network router configuration, that is, if we need a staff of the China Netcom department to solve the needs of telecom customers temporarily, it will not be possible, because the data of the China Netcom department will only be sent to the China Netcom line, the access speed for telecom customers will be greatly reduced.
2) target address-Based Policy Routing:
Since the source address-Based Policy Routing has problems in cross-network access, can the target address-Based Policy Routing solve the actual problem perfectly? The so-called destination address refers to the IP address of the customer we want to access. Generally, it is possible to determine whether the customer is a telecom or a Netcom network through its IP address. Therefore, as long as the enterprise collects the CIDR blocks of the Telecom and China Netcom networks, it can adopt a policy route based on the destination address to transmit or receive the data of the Telecom address through the WAN2 telecom line) interface, transmit the sent or received IP address data through the WAN1 network line) interface. Even if the communication department staff temporarily solve the problem of telecom customers, they can still ensure high speed.
Iv. Summary:
From the description in this article, we can see that the routing policy is much more flexible to solve the problem of dual-line and dual-network than the previous introduction, and it is more efficient to solve the problem, the Network Administrator does not need to set a network router for an enterprise employee's computer. On the other hand, the routing policy function is not limited to this. After understanding its true meaning, we can develop a more reasonable and effective forwarding policy based on the actual needs of the enterprise just like programming, you can precisely control the routing information of each computer.