This task is very simple so do it. Only thing which may confuse some one why we are creating loopback interface as point-to-point. Then answer is by default OSPF doesn't take loopback as a real interface so if you are not creating it as point-to-point then it'll show the interface with /32 mask.So go in each and every loopback and do it as-
R2(config)#interface loopback 1
R2(config-if)#ip address 10.1.7.1 255.255.255.0
R2(config-if)#ip ospf point-to-point
* When we are redistributing routes in EIGRP and RIP we have to give metric value because by default both protocols take infinite metric.
* When we are redistributing is OSPF by default metric (seed metric) is 20. So if we are doing redistribution no need to provide metric until it doesn't ask. :P
* When we are redistributing is OSPF there are 2 option to set metric E1 and E2. By default it is E2 which means metric will not increase in network. We use it when there is only one way to go out. If we have multiple way then we'll use E1 which means metric is incremental in network. And now OSPF will decide which is better way.
* By default OSPF summarize redistributed network so we'll use 'subnet' when redistributing.
R2(config)#router ospf 1
R2(config-router)#redistribute eigrp 100 subnet
"Now check the metric type and metric on R3"
R2(config)#router eigrp 100
R(config-router)#redistribute ospf 1 metric 100 100 100 100 100
"Metric of EIGRP is little bit complex Bandwidth, Load, Delay, Reliability,MTU. So for now I am providing random values"
Here we need to filter routes. And here I am doing filtering using ACL.
Create ACL that permit odd numbered loopbacks.
R2(config)#access-list 1 permit 10.1.1.0 0.0.0.255
R2(config)#access-list 1 permit 10.1.3.0 0.0.0.255
R2(config)#access-list 1 permit 10.1.5.0 0.0.0.255
And apply it on OSPF.
R2(config)#router ospf 1
R2(config-router)#distribute-list 1 out
"Now look at routing table of R3"
Here we can also use ACL but we have one another better way to doing this that is by using prefix list.
First create a prefix-list-
R2(config)#ip prefix-list CCNP permit 10.0.0.0/8 le 24
"Now this prefix list allow only network 10.0.0.0 which have mask between 8-24"
Now we need to create route-map-
R2(config)#route-map FILTER_OSPF_TO_EIGRP //It's only route map name
R2(config-route-map)#match ip address prefix-list CCNP
"Rote map work like if-else statement in programming. Here we use Match-set statement. But by default if we are not providing any no and set statement then it start from 10 and permit"
Now apply this may in redistribution-
R2(config)#router eigrp 100
R2(config-router)#redistribute ospf 1 metric 100 100 100 100 100 route-map FILTER_OSPF_TO_EIGRP
All objective are done. If still you have any doubt and write your question in comment box or join our group for discussion on any point. Link of group is give in left side of page.
Thanks. Have a good day.
No comments:
Post a Comment