CÔNG TY TNHH CÔNG NGHỆ VIỆT THÁI DƯƠNG
Logo CNTTShop.vn

NTT03, Line 1, Thống Nhất Complex, Thanh Xuân, Hà Nội.
Danh mục sản phẩm

Configure Route Map

A route map is a tool for matching routes and setting route properties. A route map consists of multiple statements, and each statement consists of some match clauses and set clauses. The match clauses define the matching rules of the statement, and the set clauses define the follow-up actions after a route match the match clauses. The match clauses are in the OR relation, that is, a route must match all match clauses of the statement.

The route map statements are in the OR relation. When a route tries to match a route map, it checks the entries in the sequence of small to large. Once a route matches a statement, it matches the route map, and the next statement will no longer be checked. If a route fails to match a statement, it fails to match the route map.

Configuration Condition

Before configuring a route map, ensure that:

  • The ACL, prefix list, AS-PATH, and Community-list or Extcommunity-list that are required for configuring a route map have been configured.

Create a Route Map

In creating a route map, you can specify the match mode of the statements of the route map. Two match modes are available: permit and deny.

The permit mode sets the matching mode of the statements of the route map to permit, that is, if a route matches all match clauses of the statement, the route is allowed to pass, and then the set clauses of the statement are executed. If a route fails to match the match clauses of the statement, it starts to match the next statement of the route map.

The deny mode sets the matching mode of the statements of the route map to deny, that is, when a route matches all match clauses of a statement, the route is denied, and the route will not match the next statement of the route map. In deny mode, set clauses will not be executed.

Table 15-7 Create a route map

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Create a route map.

route-map map-name [ { permit | deny } [ seq-number ] ]

Mandatory.

By default, no route map is created.

note


  • If you run the route-map command to create a route map, if you configure only the route map name but do not configure the match mode and statement serial number, a statement whose match mode is permit and serial number is 10 is automatically created.
  • If a route map is applied to the routing protocol but the route map has not been configured, all objects will fail to match.

Configure the Match Clauses of a Route Map

The match clauses of a route map statement are in the OR relation, that is, a route must match all match clauses before it is allowed to pass.

Table 15-8 Configure the match clause of a route map

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the route map configuration mode.

route-map map-name [ { permit | deny } [ seq-number ] ]

-

Specify the AS-PATH list that the route map matches.

match as-path path-list-number

Optional.

By default, no AS-PATH list that the route map matches is specified.

Specify the BGP Community-list that the route map matches.

match community community-list-number / community-list-name [ exact-match ]

Optional.

By default, no BGP Community-list that the route map matches is specified.

Specify the BGP Extcommunity-list that the route map matches.

match extcommunity extcommunity-list-number / extcommunity-list-name

Optional.

By default, no BGP Extcommunity-list that the route map matches is specified.

Specify the interface that the route map matches.

match interface interface-names

Optional.

By default, no interface that the route map matches is specified.

Specify the route prefix that the route map matches.

match ip address { access-list-number | access-list-name | prefix-list prefix-list-name }

Optional.

By default, no route prefix that the route map matches is specified.

Specify the next-hop address that the route map matches.

match ip next-hop { access-list-name | prefix-list prefix-list-name }

Optional.

By default, no next-hop address that the route map matches is specified.

Specify the source route address that the route map matches.

match ip route-source { access-list-name | prefix-list prefix-list-name }

Optional.

By default, no source route address that the route map matches is specified.

Specify the route metric value that the route map matches.

match metric metric-value [+-offset]

Optional.

By default, no route metric value that the route map matches is specified.

Specify the routing type that the route map matches.

match route-type { external / interarea / internal / level-1 / level-2 / nssa-external type-1 / type-2 }

Optional.

By default, no routing type that the route map matches is specified.

Specify the tag value that the route map matches.

match tag tag-value

Optional.

By default, no tag value that the route map matches is specified.

note


  • If a route map is not configured with match clauses, all objects can match the route map successfully.
  • When the ACL and prefix list that are associated with the match clauses do not exist, no object can match the route map.

Configure the Set Clauses of a Route Map

When the route map match mode is permit, if a route matches all match clauses, the set operations will be executed. If the match mode is deny, the set operations will not be performed.

Table 15-9 Configure the set clauses of a route map

Step

Command

Description

Enter the global configuration mode.

configure terminal

-

Enter the route map configuration mode.

route-map map-name [ { permit | deny } [ seq-number ] ]

-

Set the AS path property of a BGP route.

set as-path prepend as-path-number

Optional.

By default, the AS path property of the BGP route is not configured.

Configure the community property of the BGP route.

set communtiy { community-number | additive local-AS | internet no-advertise | no-export none }

Optional.

By default, the community property of the BGP route is not configured.

Delete the Community-list of the BGP route.

set comm-list { community-list-number community-list-name } delete

Optional.

By default, the community property of the BGP route is not deleted.

Set BGP route attenuation parameters.

set dampening half-life start-reusing start-suppress max-duration

Optional.

By default, BGP route attenuation parameters are not set.

Set Extcommunity properties of the MPLS L3VPN route.

set extcommunity { rt | soo extcommunity

Optional.

By default, the Extcommunity properties of MPLS L3VPN are not configured.

Set the next hop for the route.

set ip default next-hop

ip-address

Optional.

By default, the next hop for the route is not configured.

It is used to set the next hop during the OSPF route redistributing

Set the next hop for the route

set ip next-hop ip-address

Optional.

By default, the next hop for the route is not configured.

It is used to set the route next hop for the BGP associated route map.

Set the local priority of BGP route.

set local-preference value

Optional.

By default, the local priority is not configured for the BGP route.

Set the metric value of the route.

set metric { metric | +metric | -metric | bandwidth delay reliable loading mtu }

Optional.

By default, the metric value of the route is not configured.

Set the metric type of the route.

set metric-type { external internal | type-1 | type-2 }

Optional.

By default, the metric type of the route is not configured.

Configure the Origin property of the BGP route.

set origin { egp as-number | igp incomplete }

Optional.

By default, the Origin property of the BGP route is not configured.

Set the tag option field of external routes.

set tag tag-value

Optional.

By default, the tag option field of external routes is not configured.

Set the weight of the BGP route.

set weight weight-value

Optional.

By default, the weight of the BGP route is not configured.