Use ACL and Prefix-list plus route-map to control route updates

Source: Internet
Author: User


Use ACL and Prefix-list plus route-map to control route update topology www.2cto.com

Note: OSPF is run on the left, and OSPF is run on the right, the redistribution routing protocol uses the access list and prefix list to control the route update. In the OSPF routing protocol domain, the route 5.5.0.0 5.5.1.0 5.5.2.0 5.5.3.0 is rejected. In the OSPF routing protocol domain, the route 15.5.16.0/20 15.5.64.0/18 is rejected. route configuration description 1. configure the IP address on all routers and configure the routing protocol as shown in figure 2. configure redistribution on R3 to make sure That R1 sees all of R5's loopback route R1 # show ip route ospf34.0.0.0/24 is subnetted, 1 subnetsO E2 34.1.1.0 [110/20] via 12.1.1.2, 00:00:12, serial0/05.0.0.0/24 is subnetted, 6 subnetsO E2 5.5.0.0 [110/20] via 12.1.1.2, 00:00:12, Serial0/0O E2 5.5. 1.0 [110/20] via 12.1.1.2, 00:00:12, Serial0/0O E2 5.5.2.0 [110/20] via 12.1.1.2, 00:00:12, Serial0/0O E2 5.5.3.0 [110/20] via 12.1.1.2, 00:00:12, serial0/0O E2 5.5.4.0 [110/20] via 12.1.1.2, 00:00:12, Serial0/0O E2 5.5.5.0 [110/20] via 12.1.1.2, 00:00:12, Serial0/023.0.0.0/24 is subnetted, 1 subnetsO 23.1.1.0 [110/128] via 12.1.1.2, 00:32:48, Serial0/045.0.0.0/24 is subnetted, 1 subnetsO E2 45.1. 1.0 [110/20] via 12.1.1.2, 00:00:12, Serial0/015.0.0.0/8 is variably subnetted, 4 subnets, 4 masksO E2 15.4.0.0/16 [110/20] via 12.1.1.2, 00:00:12, serial0/0O E2 15.5.16.0/20 [110/20] via 12.1.1.2, 00:00:12, Serial0/0O E2 15.5.64.0/18 [110/20] via 12.1.1.2, 00:00:12, serial0/0O E2 15.5.129.0/26 [110/20] via 12.1.1.2, 00:00:12, Serial0/0R1 #3. control route redistribution. Use route-map and access control list on R3 to Control update. Reject 5.0.0 in the ospf route protocol domain. 5.5.1.0 5.5.2.0 5.5.3.0 route R3 (config) # ip access-list stand 10R3 (config-std-nacl) #10 permit 5.5.0.0 0.0.3.0R3 (config-std-nacl) # exitR3 (config) # route-map liuqing deny 10R3 (config-route-map) # match ip add 10R3 (config-route-map) # exitR3 (config) # route-map liuqing per 20R3 (config-route-map) # set metric-type type-1R3 (config) # router ospf 110R3 (config-router) # redistribute image90 subnets route-map liuqing View R1 route table R1 # show ip route ospf34.0.0.0/24 is subnetted, 1 subnetsO E1 34.1.1.0 [110/148] via 12.1.1.2, 00:02:42, Serial0/05.0.0.0/24 is subnetted, 2 subnetsO E1 5.5.4.0 [110/148] via 12.1.1.2, 00:02:42, Serial0/0O E1 5.5.5.0 [110/148] via 12.1.1.2, 00:02:42, Serial0/023.0.0.0/24 is subnetted, 1 subnetsO 23.1.1.0 [110/128] via 12.1.1.2, 00:50:02, Serial0/045.0.0.0/24 is subnetted, 1 subnetsO E1 45.1. 1.0 [110/148] via 12.1.1.2, 00:02:42, Serial0/015.0.0.0/8 is variably subnetted, 4 subnets, 4 masksO E1 15.4.0.0/16 [110/148] via 12.1.1.2, 00:02:42, serial0/0O E1 15.5.16.0/20 [110/148] via 12.1.1.2, 00:02:42, Serial0/0O E1 15.5.64.0/18 [110/148] via 12.1.1.2, 00:02:42, serial0/0O E1 15.5.129.0/26 [110/148] via 12.1.1.2, 00:02:42, Serial0/0 result: the four routes to be filtered are no longer displayed in the R1 route table. 4. control route update. Use the prefix list and route-map on R3 to control the update. Do not learn the route R3 (config-route-map) of 15.5.16.0/20 15.5.64.0/18 in the OSPF route domain) # route-map liuqing deny 15R3 (config-route-map) # match ip address prefix-list 20 view R1 route table R1 # show ip route ospf34.0.0.0/24 is subnetted, 1 subnetsO E1 34.1.1.0 [110/148] via 12.1.1.2, 00:01:17, Serial0/05.0.0.0/24 is subnetted, 2 subnetsO E1 5.5.4.0 [110/148] via 12.1.1.2, 00:01:17, Serial0/0O E1 5.5.5.5.0 [11 0/148] via 12.1.1.2, 00:01:17, Serial0/023.0.0.0/24 is subnetted, 1 subnetsO 23.1.1.0 [110/128] via 12.1.1.2, 01:05:02, Serial0/045.0.0.0/24 is subnetted, 1 subnetsO E1 45.1.1.0 [110/148] via 12.1.1.2, 00:01:17, Serial0/015.0.0.0/8 is variably subnetted, 2 subnets, 2 masksO E1 15.4.0.0/16 [110/148] via 12.1.1.2, 00:01:17, serial0/0O E1 15.5.129.0/26 [110/148] via 12.1.1.2, 00:01:17, Serial0/0 conclusion: 1. You can use one statement to control multiple routes in the access control list and use the anti-mask to match them. the bit with the anti-mask 0 must match the route entry, the bitwise of the anti-mask is 1, indicating that no matching is required. However, if you use the access control list to filter routes, the mask length of the routes cannot be matched. 2. When you use the prefix list to control route updates, you can use one statement to match multiple routes. Use the prefix list to filter routes and match the subnet mask www.2cto.com 3. when route-map is used to control route updates, if the match statement has multiple access control lists or prefix lists, it means that you only need to match one of the addresses to execute route-map, if multiple match ip addresses are written vertically under the same serial number, it means that the route-map4 needs to be executed only when both requirements are met. when route-map is used to control route updates, the access control list and prefix list used use the permit statement to match one or more routes; if you want to reject one or more routes, use the deny statement in the route-map file. If yes, use the permit statement. A deny statement is hidden at the end of Route-map. If no null Statement of permit is written, the default deny statement is matched.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.