route-map configuration command directory

route-map

match as-path

match community

match ip address

match ip next-hop

match ip address prefix-list

match length

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set dampening

set default

set interface

set ip default

set ip precedence

set ip tos

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

 

route-map

Create a route-map or define an entry of a route-map. Used “no” command to delete it.

route-map <name> [<seq>] [<deny | permit>]

no route-map <name> [<seq>] [<deny | permit>]

Parameter:

<name>          Name of route-map

<seq>       Executing serial number of route-map entry with default of 10.

<deny | permit> Property of route-map entries, with default of permit.

Default:

Under default situation, seq value is 10 and property is “permit”.

Command mode:

global configuration mode

Explanation:

Route-map is used to revise property of routes and filter routes. It is often used for policypolicyof dynamic routing protocol, such as redistributing route, filter the route, set route property, running policyrouting, etc.route-map以名字标识,同一个Route-map is indicated with name. There can be several entries under the same route-map. Total number of route-map in the system is only constrained by system resource. Serial number can be designated or generated automatically by the system. Each entry has a property (deny/permit). Matching rule ( using command “match”), setting rule (using command “set”) and withdrawing policy (using command “on-match”) can be configured under each entry.

Matching rule is used to check whether a property of the object meets certain rules. If the object meets all matching rules under this entry, it will be recognized as matching this entry successfully. Otherwise it will be recognized as failed. If no matching rule is configured under an entry, any object matches this entry. If matching rules are checked, by using other lists (like access-list, prefix-list, community-list, as path-list etc.), for whether the object is matched, the return value using this list is the very result of the matching rules.

Set the rules to set a property of the object. If object matches this entry successfully and the property of this entry is “permit”, use the setting rules configured under this entry to revise the property of the object. If object matches this entry successfully and the property of this entry is “deny”, check the withdraw policy. If the object fails to match the entry, check the next entry.

Withdraw policy is used to determine the action after the object matches the entry successfully. When the object matches an entry successfully and no withdraw policy is configured under this entry, stop checking other entries and return to the propertydeny /permit of this entry. If “on-match next” is configured, continue to check next entry. If “on-match goto N” is configured, skip to the entry with designated serial number and begin to check. If the designated entry doesn’t exist, return to the property deny /permitof this entry.

Only one matching rule or setting rule about the same property can be configured under one entry. Latest configured one will cover previous configuration. There can be the following configuration under the same entry:

match metric 34

set metric 100

There is only one match rule and one set rule.

In order to match several values of the same property, exitcan be used:

route-map match-multi-metric 10 permit

     match metric 10

     on-match goto 30

route-map match-multi-metric 20 permit

     match metric 20

     on-match goto 30

route-map match-multi-metric 30 permit

     set metric 100

In the above example, match the route with metric of 10 or 20 and set its metric as 100.

When Configuring the system can generate serial numbers for each entry. The default begins from 10 and is added 10 in turn. When using route-map, the system checks from the small to the big following the serial number of the entry.

Route-map can deal with routes of different types, among which some matching rules and setting rules are only used for few routes. If the object is matched or revised with matching rule or setting rule not supported, it will be ignored by the system.

If there is only name after the command “no route-map”, whole route-map should be deleted. Otherwise designated entry will be deleted.

Example:

The following EXAMPLE uses route-map to filter routes redistibutefrom OSPF and set their property:

router bgp 20

redistribute ospf 3 route-map redist-ospf

route-map redist-ospf

match tag 139009

set local-preference 300

Relevant command:

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

match as-path

Set a route-map matching rule. Check BGP route bying usingas-path list. Use “no” command to delete the configuration.

match as-path <as-path-list-name>

no match as-path <as-path-list-name>

Parameter:

<as-path-list-name>   Name of as-path list

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Use designated as path list to match the object. It is used only for BGP route. It is used to filter BGP route  accorging the AS_PATH of BGP route.

Example:

Use as-list to check whether BGP route is matched.

route-map match-aspath

match as-path as-list1

Relevant command::

route-map

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

match community

Set a route-map matching rule to check BGP route property through “community list. Use no command to delete the configuration.

match community <community-list-name>

no match community <community-list-name>

Parameter:

<community-list-name>    Name of community-list

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Use designated community to match the object. It is only applicable for BGP routes 。

Example:

Use “comm-list1 to check whether the BGP route is matched.

route-map match-comm

match community comm-list1

Relevant command::

route-map

match as-path

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

match ip address

Set a route-map matching rule to match destination network numberof the route by “ip access list. Use “no” command to delete the configuration.

match ip address <name>

no match ip address <name>

Parameter:

<name>          Name of “ip access list.

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Use “access-list to filter network address of routes. It is applicable for routes and massages.

Example:

In the following example, routes passed by checking “access list is set with metric:

route-map set-metric

match ip address acl-metric

set metric 100

Relevant command::

route-map

match as-path

match community-list

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

 

match ip next-hop

Set a route-map matching rule to check whether the nexthop address of the route is matched with the designated nexthop address. Use “no” command to delete the configuration.

match ip next-hop <a.b.c.d>

no match ip next-hop <a.b.c.d>

Parameter:

<a.b.c.d>    IP address.

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Use “access-list to check nexthop property of the route. It is applicable to all ip routes.

Example:

In the following example, the route with nexthop address of 192.121.13.28 will matchwith entry 20 of route-map.

route-map beijing 10 permit

match ip nexthop 172.12.29.98

set metric 100

route-map beijing 20 permit

match ip nexthop 192.121.13.28

set metric 20

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

match ip address prefix-list

Set a matching rule of route-map to match destination network address of the route with “ip prefix list.

match ip address prefix-list <name>

no match ip address prefix-list <name>

Parameter:

<name>          Name of prefix-list

Default:

none

Command mode:

Route-map configuration mode.

Explanation:

It is applicable for all ip routes.

Example:

In the following example, only route with destination address 192.121.0.0 will matchwith route-map match-prefix

ip prefix-list beijing permit 192.121.0.0/16

route-map match-prefix

match ip address prefix-list beijing

set metric 100

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

match length

Set a route-map matchrule to check whether the metric of the route is matched with designated metric. Use “no” command to delete the configuration.

match length <minimum-length> <maximum-length>

no match length <minimum-length> <maximum-length>

Parameter:

<minimum-length>        Smallest length of the massage.

    <maximum-length>        Largest length of the massage.

Default:

none

Command mode:

Route-map configuration mode.

Explanation:

It is applied for policypolicy route.

Example:

none

Relevant command::

route-map

match metric

Set a route-map matching rule to check whether the metric of the route is matched with designated metric. Use “no” command to delete the configuration.

match metric <value>

no match metric <value>

Parameter:

<value>         Value of metric

Default:

none

Command mode:

Route-map configuration mode.

Explanation:

It is applicable for all ip routes.

Example:

In the following example, the route with metric of 120 will be matched with the entry 20 of route-map and be refused

route-map beijing 10 permit

match ip nexthop 172.12.29.98

set metric 100

route-map beijing 20 deny

match ip metric 120

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

match tag

Set a route-map matching rule to check whether the tag of the route is matched with designated tag. Use “no” command to delete the configuration.

match tag <value>

no match tag <value>

Parameter:

<value>         Tag vlue.

Default:

none

Command mode:

Route-map configuration mode.

Explanation:

It is applicable to all routes.

Example:

In the following example, the route with tag of 120923 will be matched with the entry 20 of route-map and then be refused.

route-map huang 10 permit

match ip nexthop 172.12.29.98

set metric 100

route-map huang 20 deny

match ip tag 120923

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

on-match

Configure exit policy of route-map entry. Use no command to delete configuration.

on-match {next | goto n}

no on-match {next | goto n}

Parameter:

<n>         Serial number of target entry

Default:

none

Command mode:

Route-map configuration mode.

Explanation:

Used to set the withdraw policy of route-map entry. When the route-map entry is matched successfully, stop checking other entries and return to property of the route-map entry if no withdraw policy is configured under the entry. Continue to check the next entry if “on-match next” is configured. Skip to the entry with specified serial number N and begin to check if “on-match goto N” is configured. If the specified entry doesn’t exist, return to the property (deny/permit) of the entry. 

Example:

In the following example, set aggregator attributefor all routes:

route-map huang

set aggregator as 200 192.12.90.82

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

set aggregator

Configure a route-map setting rule to set aggregator property of BGP route. Use command “no” to delete the setting.

set aggregator <as> <as-number> <a.b.c.d>

no set aggregator <as> <as-number> <a.b.c.d>

Parameter:

<as-number>  Autonomous system number of route aggregate.

<a.b.c.d>    IP address of summary routes.

Default:

none

Command mode:

Route-map configuration state

Explanation:

Only applicable to BGP routes.

Example:

In the following example, set aggregator property for all routes.

route-map huang

set aggregator as 200 192.12.90.82

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

set as-path

Add AS in front of as-path property of BGP route to configure a route-map setting rule. Use command “no” to delete the configuration.

set as-path <prepend> <as>

no set as-path <prepend> <as>

Parameter:

<prepend>      Add in front of as-path property

<as>        autonomous system number

Default:

none

Command mode:

Route-map configuration state

Explanation:

Only applicable to BGP routes.

Example:

In the following example, add respective autonomous system numbers in front of as-path properties of all routes to enlarge the length of as-path property and change the result of selecting routes.

route-map add-as

set as-path prepend 200 200 200 200

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

set atomic-aggregate

Configure a route-map setting rule to set atomic-aggregate property of BGP route. Use command “no” to delete the configuration.

set atomic-aggregate

no set atomic-aggregate

Parameter:

none

Default:

none

Command mode:

Route-map configuration state

Explanation:

Only applicable to BGP routes. If the aggregate of information losing is caused when a system transmits routes, it is necessary to set atomic-aggregate property for this route.

Example:

In the following example, add respective autonomous system numbers in front of as-path properties of all routes to enlarge the length of as-path property and change the result of selecting routes.

route-map tee

set atomic-aggregate

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

set community

Configure a route-map setting rule to set community property of BGP route. Use command “no” to delete the configuration.

set community <aa:nn | 1-4294967295 | local-AS | no-advertise | no-export>

no set community <aa:nn | 1-4294967295 | local-AS | no-advertise | no-export>

Parameter:

<aa:nn>         New form of community value

<1-4294967295>   Community value

<no-advertise>  Without advertising to any neighbor (famous community number)

<local-AS>      Without advertising outside this autonomous system including outside EBGP neighbor (well known community) within the same autonomous system confederation.

<no-export>     Without advertising outside this autonomous system or autonomous system confederation (well known community).

 

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Only applicable to BGP routes. Newly set community value will replace the former community property of the route.

Example:

In the following example, set local-AS property for all routes from neighbor 193.12.202.12 to make these routes not to be advertised to other autonomous systems.

router bgp 200

neighbor 193.12.202.12 remote 100

neighbor 193.12.202.12 route-map tee in

route-map tee

set community local-AS

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

set community-additive

Set a route-map setting rule to add community value to community property of BGP routes. Use command “no” to delete the configuration.

set community-additive <aa:nn | 1-4294967295 | local-AS | no-advertise | no-export>

no set community-additive <aa:nn | 1-4294967295 | local-AS | no-advertise | no-export>

Parameter:

<aa:nn>                      New form of community value

<1-4294967295>        Community value

<no-advertise>         Without advertising to any neighbor (well know community number)

<local-AS>                Without advertising outside this autonomous system including outside EBGP neighbor (well known community) within the same autonomous system confederation.

<no-export>              Without advertising outside this autonomous system or autonomous system confederation (well known community).

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Only applicable to BGP routes. Newly set community value will be added to the former community value of the route.

Example:

In the following example, add local-AS community property to routes from neighbor 193.12.202.12 to make these routes not to be advertised to other autonomous systems.

router bgp 200

neighbor 193.12.202.12 remote 100

neighbor 193.12.202.12 route-map tee in

route-map tee

set community-additive local-AS

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight

show route-map

set dampening

Set BGP route dampening control parameter without revising route’s property. Use “no” command  to delete.

set dampening <half-time> <reuse-value> <suppress-value> <hold-time>

no set dampening <half-time> <reuse-value> <suppress-value> <hold-time>

Parameter:

    <half-time>                                Half-life of BGP route dampening punishment attenuation. The unit is minute.

        <reuse-value>                         BGP reuses punishment value of route suppressed by dampening

        <suppress-value>                     Punishment value of route that BGP suppresses dampening

        <hold-time>                              The longest time BGP route dampening being held. The unit is minute.

 

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Used only to provide parameter to BGP dampening route control

Example:

none

Relevant command::

route-map

set default

Set default information for policy routes. Use “no” command to delete configuration.

set default interface <interface-name>

no set default interface <interface-name>

Parameter:

   <interface-name>    Name of specified interface

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Applicable topolicy routes. Used to set default output interface for strategic routes. It will be really validated only when the state of the interface is available. The interface is available means that the interface meets two conditions:

First: IpprotocolUP of the interface.

Second: the interface has IP address, or negotiated IP address, or NULL interface.

Example:

Relevant command::

route-map

set interface

Set outgoing interface for the route. Use “no” command to delete the configuration.

set interface  <interface-name>

no set interface <interface-name>

Parameter:

   <interface-name>    Name of specified interface

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Applicable to strategic routes. Used to set default output interface for strategic routes. It will be really validated only when the state of the interface is available. The interface is available means that the interface meets two conditions:

First: IpprotocolUP of the interface.

Second: the interface has IP address, or negotiated IP address, or NULL interface.

Example:

Relevant command::

route-map

set ip default

   Set default naxthop for strategic routes. Use “no” command to disable the configuration.

   set ip default nexthop <A.B.C.D>

   no set ip default nexthop <A.B.C.D>

Parameter:

   <A.B.C.D>       Gateway address

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Applicable to strategic routes. It will be valid only when nexthop is reachable. It can be set as a route.

Example:

none

Relevant command::

route-map

set ip precedence

Set precedence for policyroute. Use “no” command to delete the configuration.

   set ip precedence <0-7>

   no set ip precedence <0-7>

Parameter:

   <0-7>          Precedence set for packet.

Default:

none

Command mode:

Route-map configuration mode

Explanation:

applicable to strategic routes. After strategic route finds proper usable routing for the route, it will set precedence for the route. If the strategic route fails, precedence won’t be set. Precedence definition of IP packet is as the following:

routine        0

priority       1

immediate       2

flash          3

flash-override  4

critical       5

internet       6

network        7

Example:

none

Relevant command::

route-map

set ip tos

   Set precedence for strategic routes. Use “no” command to delete the configuration.

   set ip tos <0-15>

   no set ip tos <0-15>

Parameter:

   <0-15>         TOS set for the packet.

Default:

none

Command mode:

Route-map configuration state

Explanation:

Applicable for policy routes.  After the strategic find proper usable route, it will also set tos for it. If strategic route fails, tos won’t be set. Different tos can be set according to bit or set together as the following:

    normal             0

    min-monestary       1

max-reliability     2

max-throughput      4

min-delay          8

Relevant command::

route-map

set ip next-hop

Configure a route-map setting rule to set next-hop address. Use “no” command to delete the configuration.

set ip next-hop <a.b.c.d>

no set ip next-hop <a.b.c.d>

Parameter:

<a.b.c.d>    IP address

Default:

none

Command mode:

Route-map configuration state

Explanation:

Applicable to all IP routes.

Example:

In the following example, set the nexthop address of all routes from neighbor 193.12.202.12 as 193.12.202.1:

router bgp 200

neighbor 193.12.202.12 remote 100

neighbor 193.12.202.12 route-map tee in

route-map tee

set ip next-hop 193.12.202.1

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set local-preference

set metric

set origin

set tag

set weight

show route-map

set local-preference

Configure a route-map setting rule to set local-preference property of BGP route. Use “no” command to delete the configuration.

set local-preference <value>

no set local-preference <value>

Parameter:

<value>         Local-preference vlue

Default:

none

Command mode:

Route-map configuration state

Explanation:

Applicable only for BGP routes.

Example:

The defined ROUTE-MAP as the following will set local-preference of BGP route as 200:

route-map set-local-pref

set local-preference 200

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set metric

set origin

set tag

set weight

show route-map

set metric

Set a route-map setting rule to set metric value of route. Use “no” command to delete configuration.

set metric <value>

no set metric <value>

Parameter:

<value>         Metric value

Default:

none

Command mode:

Route-map configuration mode

Explanation:

Applicable to all ip routes.

Example:

In the following example, defined ROUTE-MAP can set metric value of the route as 120:

route-map set-metric

set metric 120

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set origin

set tag

set weight

show route-map

set origin

Configure a ROUTE-MAP setting rule to set origin property of BGP route. Use no command to delete the configuration.

set origin <igp | egp | incomplete>

no set origin <igp | egp | incomplete>

Parameter:

<igp>           Interior route of autonomous system

<egp>           Exterior route of autonomous system

<incomplete>    Uncertain route

Default:

The default of route configured locally with “network command is igp. The default of route configured locally with “aggregate command is incomplete. The route default generated by redistribute is incomplete.

Command mode:

Route-map configuration mode

Explanation:

Applicable only to BGP route.

Example:

ROUTE-MAP defined in the following example can set origin property of BGP route with path property beginning from 10 as igp:

ip as-path-list self permit ^10

route-map set-origin

match as-path self

set origin igp

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set tag

set weight

show route-map

set tag

Set a route-map setting rule to set tag value of the route. Use “no” command to delete the configuration.

set tag <value>

no set tag <value>

Parameter:

<value>         Tag value

Default:

Default tag value is 0.

Command mode:

Route-map configuration mode

Explanation:

Applicable to all ip routes

Example:

The ROUTE-MAP defined in the following example can set tag value of the route as 120980

route-map set-tag

set tag 120980

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set weight

show route-map

set weight

Set a route-map setting rule to set weight value of BGP route. Use “no” command to delete the configuration.

set weight <value>

no set weight <value>

Parameter:

<value>         Weight value

Default:

Default weight value of BGP route generated locally is 32768. route weight value obtained from neighbor is 0.

Command mode:

Route-map configuration mode

Explanation:

Applicable only to BGP route.

Example:

ROUTE-MAP defined in the following example can set the weight value of BGP    route as 230:

route-map set-weight

set weight 230

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

show route-map

show route-map

Show route map configured in the system. Specifying the name will show specified route map information.

show route-map <name>

Parameter:

<name>          Name of route-map

Default:

none

Command mode:

supervisor mode

Explanation:

If no name is specified, route-map information of all configurations in the system will be showed.

Example:

All route-maps in the system is showed in the following example:

Show ip route-map

Relevant command::

route-map

match as-path

match community-list

match ip address

match ip next-hop

match ip prefix-list

match metric

match tag

on-match

set aggregator

set as-path

set atomic-aggregate

set community

set community-additive

set ip next-hop

set local-preference

set metric

set origin

set tag

set weight