1 2 Previous Next 15 Replies Latest reply: Sep 24, 2010 3:20 PM by ASHABU RSS

    redistribute between Rip and Ospf

    ASHABU

       

      Trying to redistribute between Rip and Ospf:

      My main problem is in configure R1(please see diagram)

      Capture1.JPG

      Loopback 1 19.19.11.1 and loopback 0 19.19.1.1 and s0/2  19.19.18.1  should not be advertised by rip, So I made those interface as passive-interfaces for rip, also I applied a disrepute-list to filter them out of interface s0/0, so R3 will not know about them throw rip:

      router rip

      version 2

      passive-interface default

      no passive-interface Serial0/1

      no passive-interface Loopback2

      network 19.0.0.0

      distribute-list DISTREPUTELIST out Serial0/1

      no auto-summary

       

      ip access-list standard DISTREPUTELIST

      permit 19.19.12.0 0.0.0.255

      permit 19.19.13.0 0.0.0.255

       

      no I have to redistribute loopback1 into rip, also I have to redistribute the ospf  route into rip,and here it comes the problem: because the distribute list applied to s0/1 in R1, loopback 1 and loopback 0 and s0/2 will be filtered , and R3 will not know about them. The requirement is that R3 should know about those routes as redistributed routes into rip (with a special metric)!!!..can anyone tell me if that’s possible ???and how I can do that???

        • 1. Re: redistribute between Rip and Ospf
          Paul Stewart  -  CCIE Security

          Since those routes are connected from the perspective of this router, you will need to redistribute "connected" as opposed to redistribute "ospf".  If you wish to filter and set a special metric, you should be able do all of this within a route-map. However, there are many other ways to do it as well.

           

           

          access-list 1 permit 19.19.11.0 0.0.0.255

          access-list 1 permit 19.19.1.0 0.0.0.255

           

          route-map connected-to-rip 10

          match ip address 1

          set metric 10

           

          redistribute connected route-map connected-to-rip

          • 2. Re: redistribute between Rip and Ospf
            Scott Morris - CCDE/4xCCIE/2xJNCIE

            If you are only doing ONE set of redistribution, your locally connected routes WILL actually come in.  It's when you start doing multiple things for the router to think about that connected routes are left out and need to be treated separately.

             

            But as was noted, a route-map will allow you to individually "match ip address prefix" as well as "set metric" values different per match.

             

            HTH,

             

            Scott

            • 3. Re: redistribute between Rip and Ospf
              ASHABU

               

              I think I did not explain my question good enough for you guys, also im not sure if you can see the diagram or not, anyway im reattach it, and rephrasing my question , R1 is running both Ripv2 and ospf:

              Loopback 0 (19.19.1.1/24) is should only belong to ospf
              loopback  1 (19.19.11.1/24) should not be part of ospf

              The problem is that: to run rip in R1 , the network command will be like this

              Router rip

              Network 19.0.0.0/8  (because rip will advertise the classfull network)
              that’s mean all the subnets starts with 19 will be included in the advertisement, and so R3 will see loopback 0 and loopback1 as part of rip and I don’t want that. To fix this problem I create an access-list to capture those networks( loopback 0 & loopback 1 )and then use this access-list to apply an distribute-list out of s0/1 so R3 cant see those route as rip routes anymore.

              Now I need to redistribute loopback0 and loopback1 (and all the ospf) to the rip domain:

              router rip

              version 2

              redistribute connected metric 10 route-map CONNECTED

              redistribute ospf 1 metric 5

              passive-interface default

              no passive-interface Serial0/1

              no passive-interface Loopback2

              network 19.0.0.0

              distribute-list DISTREPUTELIST out Serial0/1

              no auto-summary

               

               

              !

              ip access-list standard CONECCTED

              permit 19.19.11.1

              ip access-list standard DISTREPUTELIST

              permit 19.19.12.0 0.0.0.255

              permit 19.19.13.0 0.0.0.255

              !

              access-list 1 permit 19.19.11.0 0.0.0.255

              !

              route-map CONNECTED permit 10

              match ip address CONECCTED

               

              now looking to the route map in R3,

              19.0.0.0/24 is subnetted, 11 subnets

              C       19.19.3.0 is directly connected, Loopback0

              R       19.19.12.0 [120/1] via 19.19.13.1, 00:00:01, Serial0/0

              C       19.19.13.0 is directly connected, Serial0/0

              C       19.19.33.0 is directly connected, Loopback1

               

              So we see the redistributed route (connected and ospf) are not there

              But if we remove the distribute list in R1, the routing table will be like this :

                   19.0.0.0/8 is variably subnetted, 17 subnets, 2 masks

              R       19.19.1.0/24 [120/1] via 19.19.13.1, 00:00:00, Serial0/0

              C       19.19.3.0/24 is directly connected, Loopback0

              R       19.19.11.0/24 [120/1] via 19.19.13.1, 00:00:00, Serial0/0

              R       19.19.12.0/24 [120/1] via 19.19.13.1, 00:00:00, Serial0/0

              C       19.19.13.0/24 is directly connected, Serial0/0

              R       19.19.18.0/24 [120/1] via 19.19.13.1, 00:00:01, Serial0/0

              C       19.19.33.0/24 is directly connected, Loopback1

               

                   7.0.0.0/32 is subnetted, 2 subnets

              R       7.7.7.1 [120/5] via 19.19.13.1, 00:00:02, Serial0/0

              R       7.7.77.1 [120/5] via 19.19.13.1, 00:00:02, Serial0/0

               

               

              I think I did not explain my question good enough for you guys, also im not sure if you can see the diagram or not, anyway im reattach it, and rephrasing my question , R1 is running both Ripv2 and ospf:

              Loopback 0 (19.19.1.1/24) is should only belong to ospf
              loopback  1 (19.19.11.1/24) should not be part of ospf

              The problem is that: to run rip in R1 , the network command will be like this

              Router rip

              Network 19.0.0.0/8  (because rip will advertise the classfull network)
              that’s mean all the subnets starts with 19 will be included in the advertisement, and so R3 will see loopback 0 and loopback1 as part of rip and I don’t want that. To fix this problem I create an access-list to capture those networks( loopback 0 & loopback 1 )and then use this access-list to apply an distribute-list out of s0/1 so R3 cant see those route as rip routes anymore.

              Now I need to redistribute loopback0 and loopback1 (and all the ospf) to the rip domain:

              router rip

              version 2

              redistribute connected metric 10 route-map CONNECTED

              redistribute ospf 1 metric 5

              passive-interface default

              no passive-interface Serial0/1

              no passive-interface Loopback2

              network 19.0.0.0

              distribute-list DISTREPUTELIST out Serial0/1

              no auto-summary

               

               

              !

              ip access-list standard CONECCTED

              permit 19.19.11.1

              ip access-list standard DISTREPUTELIST

              permit 19.19.12.0 0.0.0.255

              permit 19.19.13.0 0.0.0.255

              !

              access-list 1 permit 19.19.11.0 0.0.0.255

              !

              route-map CONNECTED permit 10

              match ip address CONECCTED

               

              now looking to the route map in R3,

              19.0.0.0/24 is subnetted, 11 subnets

              C       19.19.3.0 is directly connected, Loopback0

              R       19.19.12.0 [120/1] via 19.19.13.1, 00:00:01, Serial0/0

              C       19.19.13.0 is directly connected, Serial0/0

              C       19.19.33.0 is directly connected, Loopback1

               

              So we see the redistributed route (connected and ospf) are not there

              But if we remove the distribute list in R1, the routing table will be like this :

                   19.0.0.0/8 is variably subnetted, 17 subnets, 2 masks

              R       19.19.1.0/24 [120/1] via 19.19.13.1, 00:00:00, Serial0/0

              C       19.19.3.0/24 is directly connected, Loopback0

              R       19.19.11.0/24 [120/1] via 19.19.13.1, 00:00:00, Serial0/0

              R       19.19.12.0/24 [120/1] via 19.19.13.1, 00:00:00, Serial0/0

              C       19.19.13.0/24 is directly connected, Serial0/0

              R       19.19.18.0/24 [120/1] via 19.19.13.1, 00:00:01, Serial0/0

              C       19.19.33.0/24 is directly connected, Loopback1

               

                   7.0.0.0/32 is subnetted, 2 subnets

              R       7.7.7.1 [120/5] via 19.19.13.1, 00:00:02, Serial0/0

              R       7.7.77.1 [120/5] via 19.19.13.1, 00:00:02, Serial0/0

                  

                  

              • 4. Re: redistribute between Rip and Ospf
                Paul Stewart  -  CCIE Security

                I am still struggling a bit to understand exactly what it is that needs to be accomplished.  When we are looking at loop 0 and loop 1 on R1, they must be injected into the route-process with a network statement or a "redistribute connected".  We can't put an interface into a RIP process and expect redistributing that RIP process into OSPF to inject the route into OSPF.  It is a connected route from the perspective of the router, not a RIP route.  Now an interface can be part of a RIP and an OSPF process.  Does that help?

                • 5. Re: redistribute between Rip and Ospf
                  ASHABU

                   

                  I totally understand ur point.

                  loop 0 and loop 1 on R1 must be injected into the route-process by using "redistribute connected “. What im trying to accomplish is the way that router R3 see those routes. R3 should see those routes as redistributed into rip. In other words R3 should not see those routes before redistribution. But when i run ripv2 in R1 I have to use the network 19.0.0.0/8  which is the default rip behavior. By doing this R1 now advertise those routes (loop0 and loop2)and all the network starts with 19 to R3 as rip route, and R3 will see them as rip route 1 hop away. So to stop R1 from advertise (loop0 and loop2) I did use a distribute list to filter those rout from going out s0/1. So now R3 do not have an entry to those routes.

                  Now I have to redistribute the connected and ospf routes into rip. After redistribution, I go to router R3 and see that none of the networks (loop0 and loop2) have an entry in R3 routing table. Ithik the reason for that is the distribute-list witch I did apply in s0/1 in router R1 (and that’s the problem), if I remove that distribute-list, R3 will see them as normal rip route (not a redistributed routes). So my question is how I can make R3 see those routes as redistribute routes)

                  • 6. Re: redistribute between Rip and Ospf
                    toor

                    Hi Ashabu,

                     

                    RIP doesn't really distinguish between "native" and redistributed routes. The only thing that could be different is if you have route tags set.

                    If you have specific requirements on the routes metric you can achieve that by route-map or offset-list.

                     

                    Regards,

                     

                    Toor

                    • 7. Re: redistribute between Rip and Ospf
                      ASHABU

                      yaa..there is a route map with a different metric, so we can tell wich is native and which is redisribute,,,the question again is how to make R3 see those routes as redistrbuted (with a special metric) and not just normal rip route???

                      • 8. Re: redistribute between Rip and Ospf
                        Scott Morris - CCDE/4xCCIE/2xJNCIE

                        Matching based on metric is one way to do it.  Another way (since RIP offers no distinction between internal or external routes) is to use route tags.  Then you can later match on the route-tag (very similar to what BGP does with communities).

                         

                        The catch, of course, is that you have to use something like redistribution with a route-map in order to "set tag", but after that, at any point within IGPs you can match on it!

                         

                        HTH,

                         

                        Scott

                        • 9. Re: redistribute between Rip and Ospf
                          toor

                          route-map

                            set metric

                           

                          or

                          offset-list

                           

                          HTH,

                           

                          Toor

                          • 10. Re: redistribute between Rip and Ospf
                            ASHABU

                            ok...let say that im going to use a route map...so we will redistrbute connected and ospf

                            redistribute connected metric of 10

                             

                            ok...this in not the problem . the problem is loop0 and loop1 are filltered with a distribute list out s0/1. this is the problem, the rout map will redistrbute the connected routes then and before the routes go out of int s0/1 those routes will be fillterd and never reach R#3. agin why do i need a distribut list...??? to prevent R1 from sending advirtisment about loop0 and loop1, if we did not use a distrbute list R3 will see those route as normal rip route ..if we did use a distrbuted list loop0 lpp1 will be  filterd in s0/1 and R3 will never know about them????????.. this is my problem...

                            • 11. Re: redistribute between Rip and Ospf
                              toor

                              I think you should get rid of distribute-list and use offset-list out of s0/1 interface.

                               

                              Regards,

                               

                              Toor

                              • 12. Re: redistribute between Rip and Ospf
                                Paul Stewart  -  CCIE Security

                                I am a bit confused. You state--

                                 

                                ok...this in not the problem . the problem is loop0 and loop1 are filltered with a distribute list out s0/1. this is the problem, the rout map will redistrbute the connected routes then and before the routes go out of int s0/1 those routes will be fillterd and never reach R#3. agin why do i need a distribut list...??? to prevent R1 from sending advirtisment about loop0 and loop1, if we did not use a distrbute list R3 will see those route as normal rip route ..if we did use a distrbuted list loop0 lpp1 will be  filterd in s0/1 and R3 will never know about them????????.. this is my problem...

                                 

                                If I am reading this correctly, you are saying in the first part that you need a distribute list to prevent R1 from sending advertisements about l1 and l0.  However you go on to say that if we did use a distribute list l1 and l2 will be filtered in s0/1 and R3 will never know about them. That seems to me to be the first requirement.  In other words, I am reading this as the requirements are in direct conflict with one another (or I am misreading the problem).

                                • 13. Re: redistribute between Rip and Ospf
                                  ASHABU

                                  thank u paul,

                                   

                                  You just answer my question (I am reading this as the requirements are in direct conflict with one another ) …..i was going in circles trying to resolve this…im just not confident enough to tell my instructor that there is something wrong with the requirement. But know and after getting your opinion, I feel much better..)

                                  Again paul..thanks a lot .

                                  • 14. Re: redistribute between Rip and Ospf
                                    toor

                                    Hi Ashabu,

                                     

                                    Could you let us know what your instructor replies you? Just interesting...

                                     

                                    Regards,

                                     

                                    Toor

                                    1 2 Previous Next