4 Replies Latest reply: Aug 1, 2011 10:49 AM by Gabriel RSS

    static routes main and backup explanation

    Gabriel

      Hello,

       

      I have a question which runs in my head for a while so,  if i have 2 static routes, lets` supose like this:

       

      ip route 0.0.0.0 0.0.0.0 1.1.1.1

      ip route 0.0.0.0 0.0.0.0 1.1.1.2 250

       

      Can you explain me in details why the second route will never work as a backup? i know the fact that first route if it fails will become unreachable (interface down for example).

       

      Solutions for this are: using a protocol, HSRP, etc.

       

      But i want to know why the router doesnt use the second route.

       

      Thank you for any respond,

      Gabriel

        • 1. Re: static routes main and backup explanation
          Ryan Schuett

          Hi Gabriel,

           

          The first line has an AD of 1 so it will of course be used instead of the default route with the AD of 250. As long as the interface to which the default gateway is connected is up, the route with the AD of 1 will always stay as the default route in the routing table. You need a way to remove this route if 1.1.1.1 is unavailable so that is gets removed from the routing table and the default route with the AD of 250 will then be inserted into the routing table and used. To do this, you can setup SLA(s) and tracking and apply the tracked object(s) to the default route pointing to 1.1.1.1.

           

          In essence, you need a way to remove the default route to 1.1.1.1 so the next route with a higher AD will really be a backup. This is true with routes tied to routers on the same subnet.

           

          HTH,

           

          Ryan

          • 2. Re: static routes main and backup explanation
            Gabriel

            Hi Ryan,

             

            Good point and obviously its clear now.

             

            It is a way to work just with static routes main and backup in a simple topology like this: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml

             

            R,

            Gabriel

            • 3. Re: static routes main and backup explanation
              Conwyn

              Hi Gabriel

               

              ip route 0.0.0.0 0.0.0.0 1.1.1.1

              ip route 0.0.0.0 0.0.0.0 1.1.1.2 250

               

              It is likely that 1.1.1.1 and 1.1.1.2 will use the same interface so

               

              ip route 0.0.0.0 0.0.0.0 fa0/0 1.1.1.1

              ip route 0.0.0.0 0.0.0.0 fa0/0 1.1.1.2 250

               

              would not help.

               

              One solution would be to verify 1.1.1.1 responds to a ping. You can then create a SLA and add the track keyword to the first route statement.

              If the SLA fails the route is removed and the second one takes effect.

               

              Regards Conwyn

              • 4. Re: static routes main and backup explanation
                Gabriel

                Hi Conwyn,

                 

                Regarding: http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml

                 

                I tested this and everythink works as it get described, but just for point to point conection: router to router (recomended serials).

                 

                Exemple for ethernet topology:  R1>>>SW>>>R2

                 

                If you put a switch betwen this 2 routers and if you "unplug" the conection from one router to switch, the oposite router will (R2 lets supose) not change his interface status ( up for status/ up for protocol). I think the protocol remains up for R2 because we have the switch port conected to R2 interface so everythink will remain up/up (no matter what happens to R1), so the configuration from the link which i mentioned above will not work.

                 

                Anyway its clear that is no way other than "teach" the router to switch the route.

                 

                R,

                Gabriel