Redistribution

In every company, they will use only one protocol like EIGRP or OSPF for their network. But there may be special cases where there might be the need for using two protocols. Let's say company A is buying another company B and company B is using EIGRP whereas company A is using OSPF. In this kind of scenario, we induce the routes from EIGRP into OSPF.

Routing information learned by one routing protocol and advertise those routes into the other routing protocol is called redistribution.


Redistribution into EIGRP




Redistribute command in EIGRP


redistribute protocol[process-id/AS-number] metric[bandwidth delay reliability load mtumatch [internal|nssa-external|external1|eternal2][tag <tag-value>] [route-map ]

Protocol:
Routing protocol being redistributed into the existing protocol. It can be RIP,OSPF, EIGRP,BGP,connected or static

Process-id,AS-number:
If the protocol being redistributed is having a process ID or it might have ASN like eigrp.

Metric:
The parameters like bandwidth,delay,reliability,link load and MTU of the route has to be mentioned after this keyword.

Match:
This keyword is used for the routers being redistributed from OSPF.The routers can be internal OSPF routers,external routes or NSSA external routes.

tag:
This keyword marks the routes being redistributed by an interger value.

route-map:
Route-map is used to filter routes, modify metrics, and assign route tags.

Example:-





R2(config)#router eigrp 10
R2(config-router)#redistribute ospf 1 metric 1544 2000 255 1 1500


In the above example, we are redistributing OSPF 1 into eigrp 10. The second line in the above configuration tells the router to redistribute ospf 1 into eigrp10 and the values after the keyword metric tells the router that the redistributed routes will have the metric values of 1544,2000,255,1 and 1500.




Redistribution into OSPF







OSPF redistribute command

redistribute protocol [metric ][metric-type ][match ][route-map][subnet]

Protocol:
Routing protocol being redistributed into the existing protocol. It can be RIP,OSPF, EIGRP,BGP,connected or static

Process-id, AS-number:
If the protocol being redistributed is having a process ID or it might have ASN like eigrp.

Metric:
Using this option we can assign a cost to the routes being redistributed into OSPF domain by this command.

metric-type[1/2]:
Using this option we can decide whether the external routes being redistributed in to OSPF domain should be E1 routes or E2 routes.

match:
By using this option we can match the internal ospf routes,external and NSSA external routes if we are redistributing from another ospf process.

tag:
Using this keyword we can mark the routes being redistributed in to ospf domain with a integer value.This value can be used later by other routers to identify these routes.

route-map:
Using route-map conditions we can configure various parameters for the routes like filtering routes, changing metric values and applying tags for the routes.

subnets:

If we use this keyword, the routes will be redistributed as the subnets of the classful network.If we don't use this keyword then only the classful network of the subnet will be redistributed.

Example:-




R2(config)#router ospf 1
R2(config-router)#redistribute eigrp 10 metric 50000 subnets

In the above example we are redistributing eigrp10 into ospf 1. 
The second line of the above configuration tells the router to
redistribute eigrp10 into ospf 1 and the metric keyword will tell the router that the redistributed routes will have the cost of 50000. The subnets keyword is used that the routes will be redistributed as subnets of the classful network.