To perform redistribution, one or more routers run both routing protocols, with each routing protocol placing routes into that router's routing table. Then, each routing protocol can take all or some of the other routing protocol's routes from the routing table and advertise those routes
The default metric for a redistributed route should be set to a value larger than the largest metric within the AS.
Redistribution is configured in two steps:
Step 1: In the routing protocol configuration that is to receive the redistributed routes, use the redistribute command to specify the source of the routes.
Step 2: Specify the metric to be assigned to the redistributed routes. The metric should be appropriate for the host protocol, for example, if you are importing routes into RIP, the metric should reflect the hop count. The metric needs to be configured such that it will not lead to routing loops.
Example1: Considere redistribution of two networks, each running EIGRP and OSPF as shown in the figure. The default metric values to be assigned are also given in the figure. What is the basic sequence of commands need to be given for redistribution of EIGRP into OSPF? Assume proper router configuration mode.
Here, it is required to redistribute EIGRP into OSPF. The command sequence for this is:
router ospf 10
redistribute eigrp 5
The command "redistribute eigrp 5" signifies that OSPF is being redistributed into EIGRP.
Also, default-metric 128 signifies the default metrics to be assigned to routes being redistributed.
Example2: You want the stub network 192.168.10.0 to be propagated into the EIGRP domain, and at the same time do not want to create unnecessary EIGRP broadcasts. Which command is most appropriate? Please refer the figure below
Notice that Venus is also connected to a stub network (192.168.12.0/24). In this case, the stub network should be advertised into the EIGRP domain, but not into the RIP domain. One way to accomplish this configuration is to simply add the appropriate network statement under EIGRP. However, doing so will create unnecessary EIGRP broadcasts on the stub network. Another way to achieve the desired configuration is to redistribute the stub network into the EIGRP domain.
Example3: See the figure enclosed. You want to redistribute OSPF routes into EIGRP. What command sequence is most appropriate?
The appropriate commands for redistributing OSPF routes in to EIGRP are given below:
router eigrp 1
redistribute ospf 1 metric 10000 100 255 1 15000
Policy-based routing is applied to incoming packets. All packets received on an interface with policy-based routing enabled are considered for policy-based routing. The router passes the packets through enhanced packet filters called route maps. Based on the criteria defined in the route maps, packets are forwarded/routed to the appropriate next hop.
The command clear ip route * will clear all dynamically created routes from a routers routing table.