=======Route-maps=======
* Can identify the subset of the routes to filter or change based on the route's prefix/length, and many other factors.
* Can make filtering choices.
* Can set different metric values with different routes.
* Can set different metric types for different OSPF routes.
* Can set route tags.
* Relies on the **match** command to identify routes.
* There are multiple **match** command options for redistribution:
* **match interface g 1/1**
* **match 192.168.1.254 1**
* **match 192.168.1.252 ACL-INGRESS**
* **match 192.168.2.251 PREFIX-INGRESS**
* **match ip next-hop ACL-EGRESS**
* **match ip next-hop 2**
* **match ip route-source ACL-INGRESS**
* **match ip route-source** {access-list-number | access-list-name}
* **match metric** metric-value {+- deviation}
* **match route-type** {internal | external [type-1 | Matches route type type-2] | level-1 | level-2}
* **match tag** tag-value [...tag-value]
* **Set** commands to change characteristics. There are multiple **set** command options for redistribution.
* **set metric** metric-value
* **set metric** bandwidth delay reliability load mtu
* **set metric-type** {**type-1** | **type-2**}
* **set tag** tag-value
* To set the metric of a route-map entry, use **set metric**.
* Validation commands:
* show ip eigrp topology
* show ip ospf database [external | nssa-external]
* show ip rip database
* show ip route
router eigrp 100
network 120.0.0.0
redistribute connected # Learns from interface #
!
access-list 1 permit 188.188.188.0 0.0.0.255
!
route-map INE permit 10
match ip address 1
set metric 1000 100 255 1 1500
!
route-map INE permit 20
set metric 100000 50 255 1 1500
set tag 999
!
show ip route eigrp # Look for D EX #
!
show ip eigrp topology 120.120.120.0/24
# no tag shown #
!
access-list 2 permit 120.120.120.0 0.0.0.255
!
route-map TAG permit 10
match ip address 2
set tag 888
!
router eigrp 100
network 120.120.120.0 0.0.0.255
# Can't apply a tag to an iEIGRP route #
!
access-list 2 permit 2.2.2.0 0.0.0.255
!
router eigrp 100
redistribute connected route-map TAG
!
show ip eigrp topology 2.2.2.0/24
# Can see **Administrator tag is 888** now #
!
route-map TAG permit 20
# Now second statement in route-map will permit network 88.88.88.20, but not set a tag #
# Only redistribute eEIGRP routes with a tag of 888 #
route-map Match-External permit 10
match tag 888
match route-type external
!
route-map Match-External permit 20 # Capture everything else internal #
match route-type internal
set metric-type type-1
set metric 77
!
route-map Match-External permit 30 # Capture everything else #
!
router ospf 1
redistribute eigrp 100 route-map Match-External subnets
show ip route eigrp
show run router ospf
show ip route 2.2.2.0 # Has a tag of 888 #
show ip route 88.88.88.0 # Has no tag #
show ip route ospf
* The metric-type can only be changed for OSPF routes when they are being redistributed into the OSPF domain. Can only be done on the ASBR.
* The tag value is useful for preventing routing loops when there are multiple routers doing mutual route redistribution between two or more routing domains.
* Validation commands
show ip access-list
show ip prefix-list
show route-map
show ip eigrp topology table
show ip ospf database
show ip rip database
show ip route
====Filtering with a Distribute-List====
* The **distribute-list** command refers to the direction, and to either an ACL or IP prefix-list, allowing the routes matched with a permit and filtering routes matched with a deny action.
* The **distribute-list** command can be configured to refer to the routing process from which routes are redistributed and cuase the router to filter routes taken from that process.