- Redistribution
- Configuration
- First Example
- Second Example
- Summary
Configuration
Now let’s get down to the configuration. All redistribution is done through the redistribute command. This command has many different options, as shown here:
redistribute protocol [process-id] [metric {metric-value}] [metric-type type-value] [match {internal | external 1 | external 2}] [subnets]
The protocol parameter is specifying the routing protocol of the source routes being redistributed; for the purpose of this article, they would be rip, ospf or eigrp. The process-id is a value that is used a little differently depending on the protocol specified in the protocol parameter. If redistributing RIP based routes, then the process-id is not required. For OSPF, the process-id is equal to the process-id used when configuring OSPF on this device (as it is only locally significant). For EIGRP, the process-id is equal to the autonomous system number used when EIGRP was configured.
The value of the metric-value parameter is a little different as well depending on the destination routing protocol. If redistributing into RIP, then the metric-value is equal to the number of hops, and with RIP the valid values are from 0 to 16; however, 16 in RIP is equal to unreachable so it should not be used. If redistributing into OSPF, then the metric-value is equal to the cost metric, and by default is set with a cost of 20 and as an OSPF External-2 metric type. If redistributing into EIGRP, then the metric-value is entered as five values: bandwidth, delay, reliability, load, and MTU.
The value of the type-value parameter is specific to the redistribution of routes into OSPF and sets the metric type (internal, external-1, external-2); as covered above by default, the type-value is equal to External-2.
The value of the match parameter is specific to OSPF as well but instead of applying to routes coming into OSPF, it is specific to routes to be redistributed into other routing protocols from OSPF. The use of the match {internal | external 1 | external 2} command specifies which types of OSPF metric types to redistribute. By default, only internal and external-1 routes are redistributed.
And finally, the subnets parameter can be used when redistributing routes into OSPF. Without this parameter, only classful networks will be redistributed into OSPF. In most modern networks, subnetting is used and classful boundaries are not, because of this almost always will this be added when redistributing into OSPF.
Now for the examples. In the interest of attempting to tie this all together we will present two examples, one from RIP to OSPF and other from OSPF to EIGRP. Both will utilize the same diagram as shown in Figure 1.