Route Redistribution
Route Redistribution
You can redistribute routes from one routing process to another using the redistribute command inside the destination routing process:
When a routing protocol starts, it automatically redistributes connected routes that are matched by the network command. This also happens for static routes that point to an interface if they are matched by a network command. These routes are considered to be directly connected and will be redistributed without the static keyword.
Redistributing into OSPF
When redistributing into OSPF, automatic classless summarization takes place, unless the subnets keyword is specified:
Redistributing from OSPF
When redistributing OSPF routes, you can select the types of routes that are redistributed.
When redistributing OSPF routes into BGP, the default behavior is to redistribute only OSPF intra-area and inter-area routes. You must use the external keyword to enable the redistribution of OSPF external routes.
Redistributing BGP into IGP
When redistributing BGP, only eBGP routes are redistributed by default. You can modify this behavior if you use the command:
Seed metric
By default only when redistributing from one EIGRP process to another or from one OSPF process to another, the metric values can be used from the first to the second.
RIP
When redistributing from any other protocol to RIP, the metric transparent keyword can make RIP use the numerical value of the metric from the other protocol. If this value is greater than 15 (usually), the route will be considered unreachable in RIP.
The router that performs redistribution into RIPt will send updates to other RIP routers using the seed metric. When those routers will send updates to the next hop, they will add one more hop to the metric.
OSPF
When redistributing from any other protocol to OSPF, the default metric value is 20 with a metric type of E2.
EIGRP
When redistributing from any other protocol to EIGRP, the metric cannot be auto-converted. You must use the EIGRP metric keyword with the redistribute command.
Default metric
You can alse set a default metric regardless of the route source:
The metric used with the redistribute command overrides this default value.
Conditional Redistribution
Conditional redistribution can be achieved by using a route-map. Only routes that are allowed in the route-map are redistributed into the protocol. Also, the set commands in the route-map are applied to the redistributed routes. A route map is defined as a series of entries identified by a sequence number (SEQ). Routes that are matched by a permitting entry are redistributed, while routes that are matched by a denying entry are not redistributed.
Match rules
Each route is passed through each entry until a match is found, if no match is found, the default is to not redistribute the route. You can change this by using an entry with no match commands that would match any route.
In each entry a set of match rules define the routes that are matched by the entry. If multiple match rules are defined, a packet must pass all of them (logical AND). Some match rules can have multiple entries (for example multiple ACLs in one line). In this case, a route is considered to be matched if it is matched by at least one entry in the match rule (logical OR). Also, by entering the same match type with different conditions (e.g. multiple match ip address ACL) they will be converted to one match entry with multiple entries – therefore the logical OR will apply.
General match rule
IGP specific
We saw before that we can use an extended ACL to match a route using:
When dealing with IGP routes, the extended ACL will be interpreted as follows: The SOURCE in the extended ACL will match the update source, while the DESTINATION will match the route destination. E.g:
Of course, any binary math can still be used. Other rules:
BGP specific
We saw before that we can use an extended ACL to match a route using:
When dealing with BGP routes, the extended ACL will be interpreted as follows: The SRC in the extended ACL will match the destination address, while the DST will match the network mask. E.g:
Of course, any binary math can still be used.
Set rules
Set commands:
Last updated