Example

R5(config-router)# neighbor 172.16.56.6 route-map MYMAP in R5(config-router)# exit

R5(config)# access-list 1 permit 60.1.1.0 0.0.0.255 R5(config)# access-list 2 permit 60.2.2.0 0.0.0.255 R5(config)# route-map MYMAP permit 10 R5(config-route-map)# match ip address 1 R5(config-route-map)# exit R5(config)# route-map MYMAP permit 20 R5(config-route-map)# match ip address 2

■ If route-map sequence number 10 is matched accept the route to 60.1.1.0/24, execute any set statements, and exit the route-map, do not continue processing.

If route-map sequence number 10 is not matched, check sequence number 20.

■ If route-map sequence number 20 is matched accept the route to 60.2.2.0/24, execute any set statements, and exit the route-map, do not continue processing.

■ If route-map sequence number 20 is not matched, exit the route-map. Implicitly deny the route.

R5# show ip bgp

BGP table version is 3, local router ID is 5.5.5.5

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incomplete

Network Next Hop

Metric LocPrf Weight Path 0 0 600 i 0 0 600 i

You accepted networks 60.1.1.0/24 and 60.2.2.0/24. You denied all other networks (60.3.3.0/24). You could have included both networks in one access list if you had wanted to. By using separate access lists, you are able to apply different "set" parameters to each of the networks.

Deny 60.1.1.0/24 Deny 60.2.2.0/24 Permit 60.3.3.0/24

R5(config-router)# neighbor 172.16.56.6 route-map MYMAP in

R5(config-router)# exit

R5(config)# access-list 1 deny 60.1.1.0 0.0.0.255 R5(config)# access-list 1 deny 60.2.2.0 0.0.0.255 R5(config)# access-list 1 permit any R5(config)# route-map MYMAP permit 10

R5(config-router)# neighbor 172.16.56.6 route-map MYMAP in

R5(config-router)# exit

R5(config)# access-list 1 deny 60.1.1.0 0.0.0.255 R5(config)# access-list 1 deny 60.2.2.0 0.0.0.255 R5(config)# access-list 1 permit any R5(config)# route-map MYMAP permit 10

R5(config-route-map)# match ip address 1

© 2002, Cisco Systems, Inc. t o CCIE Prep v1.0—Module 8-86

Permitting in the route-map and denying with the conditional (ACL) statement is the next example.

With the permit/deny form, the logic will follow this format: If a match occurs

Then deny the route exit the route-map

Was this article helpful?

0 0

Post a comment