3 Replies Latest reply: May 21, 2019 3:38 PM by Luke RSS

    ospf and static route

    kp

      Hi,

      Screen Shot 2019-05-21 at 11.31.23 PM.png

       

       

       

       

       

       

      r1#sh run | se ospf

      router ospf 1

      network 1.1.1.0 0.0.0.255 area 0

      network 192.168.12.0 0.0.0.255 area 0

       

       

       

      r1#sh run | in route

      ip route 3.3.3.0 255.255.255.0 192.168.12.2

       

       

       

       

      R2#sh run | se ospf

      router ospf 1

      network 192.168.12.0 0.0.0.255 area 0

      network 192.168.23.0 0.0.0.255 area 0

      R2#sh run | in route

      ip route 3.3.3.0 255.255.255.0 192.168.23.2

      ip route 192.168.41.0 255.255.255.0 192.168.12.1

       

       

       

       

      R3#sh run | se ospf

      router ospf 1

      network 3.3.3.3 0.0.0.0 area 0

      network 192.168.23.0 0.0.0.255 area 0

      R3#sh run | in route

      ip route 192.168.41.0 255.255.255.0 192.168.23.1

       

       

      r4#sh run | in route

      ip route 3.3.3.0 255.255.255.0 192.168.41.2


      Now if I ping  3.3.3.0 will chose the static route since the AD is less .

      If  I  add connect another router R6 to R1 and run only ospf ,If I ping from R6 what will happen in terms of routing . What I mean when the packet reaches the R1 , will it chose static route .

      What is the drawback of building these kind of topology


      Thanks


        • 1. Re: ospf and static route
          Steven Davidson

          Since you're using a link-state database R6 will learn of 3.3.3.0 and it will be able to deliver a packet, destined to 3.3.3.0, to R1.  Then static routing would take over from there.

           

          kp wrote:

           

          What is the drawback of building these kind of topology

           


          Not sure what you mean by this.  What's the drawback of using static routing???

          • 2. Re: ospf and static route
            Ing_Percy

            Hi!

             

            If your apply only static routes, you must configure the static routes in each router for each network according to the case.

            If you use ospf as routing protocol and in some routers apply static routes, you could manipulate the sending of the packet to another next-hop address that indicate for this static route.

             

            Regards!

            • 3. Re: ospf and static route
              Luke

              If you add R6 to R1 and configure OSPF, it will learn the route to 3.3.3.0 through OSPF.

              OSPF will tell it that R1 is the next hop to this network.

              If there are no static routes, the route learned from OSPF will be installed into the routing table.

               

              When a packet starts moving, R6 will look at it's routing table. It will use the route installed there, which in this case was learned through OSPF.

              When the packet moves to R1, R1 will look in it's routing table, and will use the route installed there. In this case, this was learned as a static route.

               

              Each router will make their own decisions based on the appropriate route in their routing table.

              OSPF, static routes, EIGRP, BGP, whatever, are just ways to learn about routes. What really matters is what's in the routing table, and each router makes their own decisions.