Friday, 5 July 2013

Redistribution Between RIP and OSPF

Redistribution Between RIP and OSPF

 

Topology


 

Objectives


  • Configure RIPv2
  • Configure OSPF
  • Allow One-way Redistribution
  • Redistribute Between Two Routing Protocols
  • Set a default seed metric
  • Modify OSPF external network types
  • Configure summary addresses

Configure RIP


We can check both the routing table and database to verify the configuration;





You can verify the routes coming in from RIP advertisements with the database command;






If can see that in R1 routing table its receiving advertisements from R2's 172.16.23.0 interface. This is because R2 is advertising the entire class B network of 172.16.0.0/16. You can see this with the following command;




To stop this behavior you disable RIP updates being sent out that interface. You can do this with the following command;



If you check the interface again now you will see interface s0/1 is no longer part of the RIP process.



The loopback interfaces will also participate in the RIP process as you can see if you issue the debug ip rip command;



You can do the following to put the loopbacks in passive. I will do this for both R1 and R2.





If we look at R2 routing table we can see that it has a number of routes to R1 loopbacks. We can use a summary address the cut down the routing table size.



As I am using RIP, Cisco IOS does not allow you to summarize to mask length that is less than the classful network prefix.



To get around this we can do the following;





We can see that the route has been added to R2s routing table;



On R1 I'm going to apply a prefix list so that only the summary route and loopback 0 and 70 are advertised to R2.

The prefix list will prevent the more specific routers to loopback 48 - 51 and allow everything else.



Like an ACL we need to apply it to the interface;



We can verify this on R2;





Configure OSPF


I'm just going to use a few show commands to verify everything is working;





Ok now i'm going to put the loopbacks in a passive state. This can be done using the following commands;



This will put all interfaces into passive I will need allow s0/1 to participate in OSPF.



 To verify this configuration you can use the following commnad;



Allow One-way Redistribution


 Right now I'm going to configure OSPF to redistribute into RIP. To do this I need to go on R2 and enter the redistribute command;



You can verify this with the sh ip protocols commands;



If we look at R1 routing table we can see that it has the OSPF routes, however R3 does not have a route back to R1. You can use a traceroute to check this.





To overcome this we can use the default-information originate always command. This will force R2 to advertise a default route in OSPF.







Redistribute Between Two Routing Protocols


You can substitute the default route with actual and more specific routes. First I'm going to remove the command I just entered and use the redistribute rip command on R2.



when we check the routing table on R3 the only external OSPF route that came in was the 192.168.0.0/24 network.



This is because by default OSPF only accepts classful networks when redistributing into it. You can modify this behavior by adding the following commands;



We should now have full connectivity between all the networks;



Set a Default Seed Metric


A seed metric is used for redistribution, instead of or in addition to setting metrics on a per-protocol basis. Seed metric are used when redistributing into distance vector protocols. By using the follow command you can configure a default metric for redistributed routes on a per protocol basis.





Modify OSPF external network types


You can see from R3 routing table the O E2 routes which means OSPF external type 2. There are two external metric types, and E2 is the default. External type 1 metrics increase like a usual route, whereas external type 2 metrics do not increase as they get advertised through OSPF. 

You can change this by using the following commands;



If we know check the routing table on R3 we can see that the metric has changed;



Complete