Route Maps - Examples
For more information, see sk100501: How to configure Routemaps in Gaia Clish.
Redistribute interface route for eth3 into OSPF, and set the OSPF route-type to AS type-2 with cost 20:
|
Do not accept routes from RIP neighbor 192.0.2.3, accept routes from neighbor 192.0.2.4 as is, and for all other routes increment the metric by 2:
|
Redistribute all static routes into BGP AS group 400.
Set the MED value to 100, prepend our AS number to the aspath 4 times.
If the route belongs to the prefix 192.0.2.0/8, do not redistribute.
Send all BGP routes whose aspath matches the regular expression (100 200+) and set the MED value to 200.
|
|
Note - There is no need for a match protocol statement for routes belonging to the same protocol. |
To redistribute OSPFv2 routes from one instance to a different instance.
This routemap ("Intranet") matches all OSPF routes from OSPF instance default in the prefix-list "Intranet" (only when used in OSPF because of missing match statement).
Match all static routes in prefix-list "Intranet".
Match all direct routes in prefix-list "Intranet".
Match all aggregate routes in prefix-list "Intranet".
Match all kernel routes in prefix-list "Intranet".
Export to OSPF - no need to match protocol OSPF for one of the IDs, it will assume it.
Do not match OSPF2 or OSPF2ASE, they are both matched implicitly for this ID.
|
Redistribute all OSPFv3 (internal and external) routes into BGP group 400.
Set the outgoing community string to 'no-export, 200 as 100'.
For BGP IPv6 routes, send them with an empty community string.
For all routes set the nexthop value to 3003::abcd:1012 (the address on the interface connecting to the peers).
|
Note - To exchange IPv6 routes in BGP the multiprotocol capability must be turned ON in BGP Configuration for the peer. |
|
To redistribute routes from an OSPFv2 Instance to BGP:
|
To redistribute routes from an OSPFv3 Instance to BGP:
|