It is useful to know about the policy routing configuration. Here we mainly introduce the policy routing configuration based on the source address, policy-based routing provides network managers with stronger control over packet forwarding and storage than traditional routing protocols. Traditionally, routers use Route tables derived from routing protocols, forward packets based on the destination address.
A policy-based route is better than a traditional route and more flexible to use. It prevents network administrators from selecting a forwarding path based on the destination address, packet size, application, or IP source address. Policies can be defined as multi-router load balancing or quality of service QOS based on the total traffic forwarded on each line ).
Policy Routing enables the network manager to determine the specific path of a message based on the machine it provides. In today's high-performance networks, this kind of choice is very necessary for freedom. Policy Routing provides a mechanism for forwarding packets based on the standards set by network administrators. Policy routing configuration uses the MATCH and SET statements to select the path. Policy Routing is configured on the receiving packet interface instead of the sending interface.
Source Address-based policy routing configuration
Policy routing configuration overview:
Vroa A sends all data from 192.1.1.1 from interface S0, and all data from 192.1.1.2 from interface S1.
Vroa A defines several secondary interfaces as test points. Configure RIP for router A and router B. apply the IP Policy Routing diagram LAB1 on the ETHERNET interface of A, and set the next hop interface to S0 for data from 192.168.1.1 to 192 .. set the next hop interface to S1 in the number 1.1.2. All other packets will be routed based on the destination address.
Policy route Configuration:
- Route:
- Version 11.2:
- No service udp-small-servers
- No service tcp-small-servers
- Hostname roupid
- Interface ethernet0
- Ip address 192.1.1.1 255.255.255.0 secondary
- Ip address 192.1.1.2 255.255.255.0 secondary
- Ip address 192.1.1.3 255.255.255.0 secondary
- Ip address 192.1.1.10 255.255.255.0
- Ip policy route-map lab1
- // Apply Policy Routing to E0 Port
- Interface serial0
- Ip addr 150.1.1.1 255.255.255.0
- Interface serial1
- Ip addr 151.1.1.1 255.255.255.0
- Router rip
- Network 192.1.1.0
- Network 150.1.0.0
- Network 151.1.0.0
- Ip local policy route-map lab1
- // Route a vro policy to generate packets locally
- No ip classless
- Access-list 1 permit 192.1.1.1
- Access-list 2 permit 192.1.1.2
- Route-map lab1 permit 10
- // Define the route map name LAB1 and 10 as the serial number to indicate the matching route order.
- Match ip address 1
- // The matched address is access list 1.
- Set interface serial0
- // Match the next hop to S0
- Route-map lab1 permit 20
- Match ip address 2
- Set interface serial1
- Line con0
- Line aux0
- Line vty 0 4
- Login
- End
- Router B is a standard configuration.
-