Cisco Support Community
Community Member

What is the "tag" value used for in Route-maps?

Config below. URL would be great if it uniquely defines the tag, and what it's used for.


router(config-route-map)#match ?

as-path Match BGP AS path list

clns CLNS information

community Match BGP community list

interface Match first hop interface of route

ip IP specific information

length Packet length

metric Match metric of route

route-type Match route-type of route

tag Match tag of route

router(config-route-map)#match tag ?

<0-4294967295> Tag value



Re: What is the "tag" value used for in Route-maps?

It can be used for a number of things ,

say you are redistributing from an BGP to OSPF and only wanted to allow routes that came from a certain AS , say AS 40 , then you can use the match tag 40 ,it would go something like this , my syntax may not be exactly correct.

route-map permit40 10

match tag 40

router ospf 1

redistribute bgp 20 route-map permit40

you can also use it to filter routes from IGP to EGP .


Re: What is the "tag" value used for in Route-maps?

Some routing protocols have the ability to insert tags into routes, using the "set tag" syntax in a route map. You can then match on these tags elsewhere, using them to filter out routes which were redistributed or tagged elsewhere in the network. OSPF and EIGRP support tags on external routes today, IS-IS is in the process of having tag support added, and EIGRP will, at some point, be able to set and match on tags on internal as well as external routes.

Take a look here for EIGRP:

These configs should work just as well in OSPF, I think.


CreatePlease to create content