3 Replies Latest reply: Jun 5, 2009 1:12 AM by Hari ktm RSS

    static routing

    Hari ktm

      hai

       

      please clarify the difference b/w


      ip route 0.0.0.0 0.0.0.0 s0/0

      and

      ip route 0.0.0.0 255.255.255.255 so/o

        • 1. Re: static routing
          Conwyn

          Hi Hari

           

          ip route 0.0.0.0 0.0.0.0 s0/0 is correct convention for a default route for a non-multi-access technology

          ip route 0.0.0.0 0.0.0.0 fa0/0 1.2.3.4 1 is the correct syntax for a multi-access techology. The fa0/0 is optional generally but there are specific examples when to code it.

           

           

          Regards Conwyn

          • 2. Re: static routing
            Matt Kerry

            Hello,

             

            The difference is that your second command is not a default route, whereas your first one is.

             

            The mask used in the command ip route specifies which bits of the address you're interested in.  When you use a zero in the mask, you're saying I don't care about the bits in this portion, match anything.  Using 255 is the total opposite.

             

            The only packets that would match your second route command are those with the destination address 0.0.0.0.  This is a mistake.

             

            If you put those two routes into a router it looks like this.  Notice the deafult route is set and your candidate default is marked with the asterix.

             

             

            Router#sh ip ro
            *Mar  1 00:02:08.531: %SYS-5-CONFIG_I: Configured from console by consoleute
            Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
                   D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
                   N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
                   E1 - OSPF external type 1, E2 - OSPF external type 2
                   i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
                   ia - IS-IS inter area, * - candidate default, U - per-user static route
                   o - ODR, P - periodic downloaded static route

             

            Gateway of last resort is 0.0.0.0 to network 0.0.0.0

             

            C    192.168.1.0/24 is directly connected, Serial0/0
            S    0.0.0.0/32 is directly connected, Serial0/0
            S*   0.0.0.0/0 is directly connected, Serial0/0
            Router#

            • 3. Re: static routing
              Hari ktm

              hi

               

               

              thank u very much for this information