From: IP Routing: EIGRP Configuration Guide, Cisco IOS Release 15M&T
The first match clause defines EIGRP routes that contain an external protocol metric between 400 and 600 inclusive; the second match clause defines EIGRP external routes that match a source protocol of BGP and the autonomous system 45000. When the two match clauses are true, a tag value of the destination routing protocol is set to 5.
! Enters route-map configuration mode.
Router(config)# route-map METRIC-RANGE
! Specifies a match clause that filters inbound updates that match an internal or external protocol metric.
! Command syntax: match metric {metric-value | external metric-value} [+- deviation-number]
! metric-value --Internal protocol metric, which can be an EIGRP five-part metric. The range is from 1 to 4294967295.
! external metric-value --External protocol metric. The range is from 1 to 4294967295.
! +- deviation-number -- (Optional) Represents a standard deviation. The deviation can be any number. There is no default. Note: When you specify a metric deviation with the + and - keywords, the router will match any metric that falls inclusively in that range.
! Note: The external protocol metric is not the same as the EIGRP assigned route metric, which is a figure computed from EIGRP vectorized metric components (delay, bandwidth, reliability, load, and MTU).
Router(config-route-map)# match metric external 500 +- 100
! Specifies a match clause that matches external routes from sources that match the source protocol.
! Command syntax: match source-protocol source-protocol [autonomous-system-number]
! source-protocol --Protocol to match. The valid keywords are bgp, connected, eigrp, isis, ospf, rip, and static. There is no default.
! autonomous-system-number -- (Optional) Autonomous system number. The autonomous-system-number argument is not applicable to the connected, static, and rip keywords. The range is from 1 to 65535. There is no default.
Router(config-route-map)# match source-protocol bgp 45000
! Sets a tag value on the route in the destination routing protocol when all the match criteria of a route map are met.
Router(config-route-map)# set tag 5
Router(config)# router eigrp 1
! Filters networks received in updates.
Router(config-router)# distribute-list route-map METRIC-RANGE in
! Enters route-map configuration mode.
Router(config)# route-map METRIC-RANGE
! Sets the metric value for EIGRP in a route map.
Router(config-route-map)# set metric 10000 10 255 1 1500
! Redistributes routes that have been advertised by routers at the address specified by the access lists.
! Command syntax: match ip route-source {access-list-number | access-list-name} [...access-list-number | ...access-list-name]
Router(config-route-map)# match ip route-source 5 80
! Specifies a match clause that includes EIGRP routes that match an internal or external protocol metric.
! Command syntax: match metric {metric-value | external metric-value} [+- deviation-number]
Router(config-route-map)# match metric external 500 +- 100
! Specifies a match clause that includes EIGRP external routes that match a source protocol.
! Command syntax: match source-protocol source-protocol [autonomous-system-number]
Router(config-route-map)# match source-protocol bgp 45000
Router(config-route-map)# set tag 5
Router(config)# router eigrp ONE
Router(config-router)# address-family ipv4 autonomous-system 45000
Router(config-router-af)# af-interface default
! Enables EIGRP to advertise routes with the local outbound interface address as the next hop.
Router(config-router-af-interface)# next-hop-self eigrp
Router(config-router-af-interface)# exit-af-interface
Router(config-router-af)# topology base
! Filters networks received in updates.
Router(config-router-af-topology)# distribute-list route-map METRIC-RANGE in
The following example shows how to configure a route map to match EIGRP routes with a metric of 110, 200, or an inclusive range of 700 to 800. When the match clause is true, the tag value of the destination routing protocol is set to 10. The route map is used to redistribute EIGRP packets.
-- Classic Mode --
Router(config)# route-map METRIC-EIGRP
Router(config-route-map)# match metric 110 200 750 +- 50
Router(config-route-map)# set tag 10
Router(config-route-map)# exit
Router(config)# router eigrp 1
Router(config-router)# network 172.21.1.0/24
Router(config-router)# redistribute eigrp route-map METRIC-EIGRP
-- Named Mode --
Router(config)# route-map METRIC-EIGRP
Router(config-route-map)# match metric 110 200 750 +- 50
Router(config-route-map)# set tag 10
Router(config-route-map)# exit
Router(config)# router eigrp ONE
Router(config-router)# address-family ipv4 autonomous-system 45000
Router(config-router-af)# network 172.21.1.0/24
Router(config-router-af)# topology base
Router(config-router-af-topology)# distribute-list route-map METRIC-EIGRP in
- EIGRP supports the route map filtering capability that exists for other routing protocols to filter routes being redistributed into their protocol. (For more details about understanding and configuring route maps, see the Enabling Policy Routing section of the Configuring IP Routing Protocol-Independent Features module of the Cisco IOS IP Routing: Protocol-Independent Configuration Guide.)
- EIGRP can be configured to filter traffic using a route map and the redistribute or distribute-list command. Using a route map with the redistribute command allows routes that are redistributed from the routing table to be filtered with a route map before being admitted into an EIGRP topology table. Routes that are dynamically received from, or advertised to, EIGRP peers can be filtered by adding a route map option to the distribute-list command.
- The use of route maps to filter traffic is the same for both autonomous-system configurations and named configurations.
How to Configure EIGRP Support for Route Map Filtering
Setting EIGRP Tags Using a Route Map for Autonomous System Configurations
The first match clause defines EIGRP routes that contain an external protocol metric between 400 and 600 inclusive; the second match clause defines EIGRP external routes that match a source protocol of BGP and the autonomous system 45000. When the two match clauses are true, a tag value of the destination routing protocol is set to 5.
! Enters route-map configuration mode.
Router(config)# route-map METRIC-RANGE
! Specifies a match clause that filters inbound updates that match an internal or external protocol metric.
! Command syntax: match metric {metric-value | external metric-value} [+- deviation-number]
! metric-value --Internal protocol metric, which can be an EIGRP five-part metric. The range is from 1 to 4294967295.
! external metric-value --External protocol metric. The range is from 1 to 4294967295.
! +- deviation-number -- (Optional) Represents a standard deviation. The deviation can be any number. There is no default. Note: When you specify a metric deviation with the + and - keywords, the router will match any metric that falls inclusively in that range.
! Note: The external protocol metric is not the same as the EIGRP assigned route metric, which is a figure computed from EIGRP vectorized metric components (delay, bandwidth, reliability, load, and MTU).
Router(config-route-map)# match metric external 500 +- 100
! Specifies a match clause that matches external routes from sources that match the source protocol.
! Command syntax: match source-protocol source-protocol [autonomous-system-number]
! source-protocol --Protocol to match. The valid keywords are bgp, connected, eigrp, isis, ospf, rip, and static. There is no default.
! autonomous-system-number -- (Optional) Autonomous system number. The autonomous-system-number argument is not applicable to the connected, static, and rip keywords. The range is from 1 to 65535. There is no default.
Router(config-route-map)# match source-protocol bgp 45000
! Sets a tag value on the route in the destination routing protocol when all the match criteria of a route map are met.
Router(config-route-map)# set tag 5
Router(config)# router eigrp 1
! Filters networks received in updates.
Router(config-router)# distribute-list route-map METRIC-RANGE in
Setting EIGRP Tags Using a Route Map for Named Configurations
! Enters route-map configuration mode.
Router(config)# route-map METRIC-RANGE
! Sets the metric value for EIGRP in a route map.
Router(config-route-map)# set metric 10000 10 255 1 1500
! Redistributes routes that have been advertised by routers at the address specified by the access lists.
! Command syntax: match ip route-source {access-list-number | access-list-name} [...access-list-number | ...access-list-name]
Router(config-route-map)# match ip route-source 5 80
! Specifies a match clause that includes EIGRP routes that match an internal or external protocol metric.
! Command syntax: match metric {metric-value | external metric-value} [+- deviation-number]
Router(config-route-map)# match metric external 500 +- 100
! Specifies a match clause that includes EIGRP external routes that match a source protocol.
! Command syntax: match source-protocol source-protocol [autonomous-system-number]
Router(config-route-map)# match source-protocol bgp 45000
Router(config-route-map)# set tag 5
Router(config)# router eigrp ONE
Router(config-router)# address-family ipv4 autonomous-system 45000
Router(config-router-af)# af-interface default
! Enables EIGRP to advertise routes with the local outbound interface address as the next hop.
Router(config-router-af-interface)# next-hop-self eigrp
Router(config-router-af-interface)# exit-af-interface
Router(config-router-af)# topology base
! Filters networks received in updates.
Router(config-router-af-topology)# distribute-list route-map METRIC-RANGE in
Examples in Autonomous System and Named Configuration
The following example shows how to configure a route map to match EIGRP routes with a metric of 110, 200, or an inclusive range of 700 to 800. When the match clause is true, the tag value of the destination routing protocol is set to 10. The route map is used to redistribute EIGRP packets.
-- Classic Mode --
Router(config)# route-map METRIC-EIGRP
Router(config-route-map)# match metric 110 200 750 +- 50
Router(config-route-map)# set tag 10
Router(config-route-map)# exit
Router(config)# router eigrp 1
Router(config-router)# network 172.21.1.0/24
Router(config-router)# redistribute eigrp route-map METRIC-EIGRP
-- Named Mode --
Router(config)# route-map METRIC-EIGRP
Router(config-route-map)# match metric 110 200 750 +- 50
Router(config-route-map)# set tag 10
Router(config-route-map)# exit
Router(config)# router eigrp ONE
Router(config-router)# address-family ipv4 autonomous-system 45000
Router(config-router-af)# network 172.21.1.0/24
Router(config-router-af)# topology base
Router(config-router-af-topology)# distribute-list route-map METRIC-EIGRP in
Comments
Post a Comment