match tag
Adds a matching clause to the route map based on the route tag.
Syntax: match tag tag-value ... tag-value
no match tag [tag-value...]
tag-value
List of one or more tag values. Valid values for tag value are integers from 0 to 4294967295.
Description: Use the match tag command to create an entry in a route map to test routes based on whether the route's tag matches the specified tag-value.
Use the no match tag command to delete the tag entry.
Route maps consist of sets of match and set commands. Match commands define the match criteria for route maps. Routes that match all defined match criteria are processed according to the actions defined by the set commands. Routes that do not match all of the defined match criteria in the route map are ignored.
Use the route-map command to create a route map. Use the various match and set commands to define the conditions for redistributing routes between protocols.
Route tags are used to communicate information between autonomous system boundary routers. OSPF supports tags. Other protocols have a tag of zero. You can select the source of exported routes based on tags. This is useful when routes classified by tag are exported into a given routing protocol.
Factory Default: No tags are defined.
Command Mode: Route-map configuration.
Example: In the following example, OSPF routes with tags of 1 and 2 are redistributed into BGP with metric 1, and OSPF routes with a tag of 3 are redistributed into BGP with a metric of 5:
- The route-map commands create two instances of a route map named dist-ospf.
- The match tag commands specify a match on tag values 1 and 2 for the first instance of the route map and on tag value 3 for the second instance.
- The set metric commands set metrics to 1 for routes with a tag of 1 or 2 and a metric of 3 for routes with a tag of 5.
- The router bgp command enables BGP and assigns the router to autonomous system 45.
- The redistribute ospf command redistributes routes with a tag of 1 or 2 with a metric of 1 and redistributes routes with a tag of 3 with a metric of 5.
router(config)#route-map dist-ospf permit 10
router(config-route-map)#match tag 1 2
router(config-route-map)#set metric 1
router(config-route-map)#end
router(config)#route-map dist-ospf permit 20
router(config-route-map)#match tag 3
router(config-route-map)#set metric 5
router(config-route-map)#end
router(config)#router bgp 45
router(config)#redistribute ospf 109 route-map dist-ospf
Related Commands: route-map
match as-path
match community
match ip address
match ip next-hop
match ip route-source
match metric
show route-map
match route-type
set as-path
set community
set community
set ip next-hop
set level
set local-preference
set metric
set metric-type
set origin
set tag
set weight
Copyright © 2004
Avici Systems Inc.
Avici® and TSR®
is a registered trademark of Avici Systems Inc.
IPriori, Composite Links, SSR, QSR, and NSR® are
trademarks of Avici Systems Inc.
Source
File Name: Routing_Pol.fm
HTML File Name: Routing_Pol26.html
Last Updated: 05/10/04 at 16:38:37