1 2 Previous Next 19 Replies Latest reply: Aug 22, 2011 11:04 AM by Naren RSS

    difference between static route and default route

    kevinlim62

      Hi,

      What is the difference between static route and also default route? When do we use it? Thanks.

       

      [1] ip route 0.0.0.0 0.0.0.0 next-hop-router-IP address

      [2] ip route network-number subnet-mask local-interface/next-hop-router-IP address

       

      Thanks.

        • 1. Re: difference between static route and default route
          Jared

          In the simplest terms a static route is simply a route that is manually entered in the routing table by the administrator.  A default route is a static route that simply says all traffic go here, where as a static route says this specific network, go here.  A static route is simply a route that is much more network specific than the default route.

          • 2. Re: difference between static route and default route
            kevinlim62

            Comparing static route and default route, which one is more reliable and have trustworth information for the routing process?

            • 3. Re: difference between static route and default route
              Martin

              you have to configure static route on routers so you believe destination is good; whereas,

              default route is like router does not know what to do with destination network, so router will use default route and hope it is good, it reach destination

              • 4. Re: difference between static route and default route
                Jared

                To add to what Martin stated, the router will use the more specific route.  A default route is not specific, it is all traffic go there.  So if you have a default route configured and then a more specific route configured to go to a different hop or interface, if the traffic matches the more specific route, then that is the route that will be used, even though the traffic matches both routes, the more specific route is used.

                • 5. Re: difference between static route and default route
                  Diwakar Sharma -CCNA/CCNP/JNCIA-ER

                  there are  2 important characteristics of default route:

                   

                  - a default route is a route that matches anything.

                   

                  - a default route may be statically configured or may be advertised by a dynamic routing protocol.

                   

                   

                   

                  I would add that the routing logic of IOS is to search the routing table for the most specific match. If there is no specific match and if there is a default route in the routing table then IOS will use the default route to make the forwarding decision.

                   

                   

                   

                  I would suggest that there are equivalent characteristics of static routes:

                   

                  - a static route is manually configured not dynamically learned.

                   

                  - a static route may be a default route, or it may be a route to a supernet, to a specific network, to a specific subnet, or to a specific host

                  • 6. Re: difference between static route and default route
                    Keneil Facey

                    The configurations are similar, however static points to a specific subnet while default routes tend to be a route of last resort.

                     

                    Static route pointing to 10.1.1.0 subnet

                    ip route 10.1.1.0 255.255.255.0 fa0/0

                     

                    Default route pointing to 'Outside'/Internet

                    ip route 0.0.0.0 0.0.0.0 fa0/0

                     

                    As for when to use which, statics are used to point to a definite location, like another branch router, while default routes point to every other location, like the Internet, which has too many addresses to assign static routes.

                     

                    Can you imagine punching in static routes for each website you might need to visit?

                    Default routes make life alot easier for you in that sense.

                    • 7. Re: difference between static route and default route
                      John

                      Hi

                       

                      This may be a good example of a default route, i changed the IP addresses so i don't give out the customers real IP's, this is not Cisco but same concept.

                       

                      For the person that posted this.

                      All my traffic depending on what subnet they are in below gets pushed either to 10.2.230.28 or 10.2.230.49.

                       

                      Should we create an IP that does not fit into these subnets below, then forget to add a destination, the traffic will still get to its destination via the default route. It may not go the path we want it to take but it will still get there.

                       

                       

                       

                      UNIT     DESTINATION        GATEWAY ADDRESS

                      -------- ------------------ ------------

                      OMU-1    DEFAULT ROUTE      10.1.230.11

                      OMU-1    192.29.64.0/18           10.2.230.28

                      OMU-1    192.29.128.0/18         10.2.230.49

                       

                       

                       

                      Regards

                      John

                      • 8. Re: difference between static route and default route
                        Taheireem

                        A STATIC ROUTE is a Route manually entered by an Administrator on a Network Device to reach to a specific network or set of specific networks using its Exit Interface or next hop router IP

                        "[2] ip route network-number subnet-mask local-interface/next-hop-router-IP address"

                         

                        A DEFAULT ROUTE is a special kind of STATIC ROUTE and is sometime called Zero/Zero Route because the network and subnet you are specifying as the destination for the traffic that it would match are all zeros.A DEFAULT ROUTE says "for any traffic that DOES NOT match a specific route in the routing table ,then forward that traffic to this destination (next-hop-router-IP Address)".Other words default route is a "CATCH ALL"

                        [1] ip route 0.0.0.0 0.0.0.0 next-hop-router-IP address

                        • 9. Re: difference between static route and default route
                          Keith Barker - CCIE RS/Security, CISSP

                          Taheireem-

                           

                          Along with the other very good posts, I like the fact that you added that both of the routes in the original post are "static routes" as they are manually configured.

                           

                          Here is a video on static default routes, default-gateway and default-network.

                           

                          http://www.youtube.com/watch?v=PbHlcT9sxb8&hd=1

                          • 10. Re: difference between static route and default route
                            Tim - CCNA

                            Kevin,

                             

                            A default route is a special kind of static route in which the source adress is quad zeros for both the IP address and subnet mask. If any other static routes are configured, they will be more specific and therefore have priority over the default route. If no static routes match and no routes learned by any routing protocols match, the router will send that packet to the interface or IP address configured in the default route command. This usually points out towards the internet.

                            • 11. Re: difference between static route and default route
                              Mohamed Sobair

                              Hello,

                               

                              The Default route is also a Static route , its also refered/called ad a Static default route.

                               

                              The default route is a route used to reference to ANY destination Network that the router  use when forwards the packets. its simply tells the router that for any unknown routes in your routing table , forward the packet to the next hop x.x.x.x.

                               

                              The Static route , on the other hand is refering to particular destination Network that the router use to forward the packet. if you have a static route as bellow:

                               

                              ip route 1.1.1.1 255.255.255.255 2.2.2.2

                               

                              It just tell the router for any packet targeting destination 1.1.1.1, please forward to the next hop 2.2.2.2.

                               

                              However, as I mentioned, the default route is an also an Static default route.

                               

                               

                              Regards,

                              Mohamed

                              • 12. Re: difference between static route and default route
                                Naren

                                Adding to the outstanding explainations above, you should understand a concept in your 2nd statement which is,

                                 

                                [2] ip route network-number subnet-mask local-interface/next-hop-router-IP address

                                 

                                There is an important difference between a static route that has the next hop ip address and local interface.

                                 

                                Difference in how Layer 2 encapsulation will happen through ARP behaviour.

                                 

                                See statement,

                                 

                                (R1) Fa0 --- 11.0.0.0  ----- Fa0 (R2) Fa1 -- 10.0.0.0

                                 

                                When you have R1 and R2 connected on their FastEthernet0 segment 11.0.0.0/24, and you want to reach 10.0.0.0 network which is directly configured / connected to R2's FastEth1 interface.

                                 

                                R1(config)#ip route 10.0.0.0 255.0.0.0 11.0.0.2

                                 

                                When you use the next hop ip in static route as above, when the router needs to send info to 11.0.0.0 network, R1 needs the layer two next hop to encapsulate the frame. So inorder to get the layer two next hop, it uses ARP. So it ARPs for 11.0.0.2 in its ethernet segment. And Since R2 is configured with that IP on that segement in which the ARP request is coming from, it will resond with its MAC.

                                 

                                Then R1 will forward the frame to R2 using R2's Fa0 mac in the dest MAC address of the frame.

                                 

                                This is a success - Layer 2 encapsulation success.

                                 

                                But now let us come to where you use local exit interface in the same static route instead of next hop,

                                 

                                R1(config)#ip route 10.0.0.0 255.0.0.0 Fa0

                                 

                                In this case, in order to do layer 2 encapsulation, R1 will send ARP not to the next hop (as it doesn't know), but to the 10.0.0.0 segment itself on its eth0 segment.. Meaning R1 will ask on its fa0 segment 11.0.0.0, whether anyone in 10.0.0.0 is available on this segment, and if so please provide your MAC so that i can use for encapsulation of the traffic that I can send to 10.0.0.0 network.

                                 

                                The R1's ARP request will be succeeded and the normal routing to that 10.0.0.0 network can hapen only if "proxy-arp" is congured on R2's Fa0 interface(which is by default) otherwise the traffic will not get routed.

                                 

                                If R2's Fa0 interface has proxy-arp it will inform R1 to send frames destined to 10.0.0.0 network encapsulated with R2's Fa0 mac in the destination MAC field.

                                 

                                Whenever you use the local exit interface for your static route, it is wise to be aware of this concept.

                                 

                                Message was edited by: Naren (AD info modified) :)

                                • 13. Re: difference between static route and default route
                                  cadetalain

                                  Hi,

                                   

                                  Narendrakumar a écrit:

                                   

                                  Adding to the outstanding explainations above, you should understand a concept in your 2nd statement which is,

                                   

                                  [2] ip route network-number subnet-mask local-interface/next-hop-router-IP address

                                   

                                  There is an important difference between a static route that has the next hop ip address and local interface.

                                   

                                  Yes, we know the AD difference that, a static route with next hop has AD 1 and local interface have AD 0.

                                   

                                  But there is another imortant diff. Difference in how Layer 2 encapsulation will happen.

                                   

                                  See statement,

                                   

                                  (R1) Fa0 --- 11.0.0.0  ----- Fa0 (R2) Fa1 -- 10.0.0.0

                                   

                                  When you have R1 and R2 connected on their FastEthernet0 segment 11.0.0.0/24, and you want to reach 10.0.0.0 network which is directly configured / connected to R2's FastEth1 interface.

                                   

                                  R1(config)#ip route 10.0.0.0 255.0.0.0 11.0.0.2

                                   

                                  When you use the next hop ip in static route as above, when the router needs to send info to 11.0.0.0 network, R1 needs the layer two next hop to encapsulate the frame. So inorder to get the layer two next hop, it uses ARP. So it ARPs for 11.0.0.2 in its ethernet segment. And Since R2 is configured with that IP on that segement in which the ARP request is coming from, it will resond with its MAC.

                                   

                                  Then R1 will forward the frame to R2 using R2's Fa0 mac in the dest MAC address of the frame.

                                   

                                  This is a success - Layer 2 encapsulation success.

                                   

                                  But now let us come to where you use local exit interface in the same static route instead of next hop,

                                   

                                  R1(config)#ip route 10.0.0.0 255.0.0.0 Fa0

                                   

                                  In this case, in order to do layer 2 encapsulation, R1 will send ARP not to the next hop (as it doesn't know), but to the 10.0.0.0 segment itself on its eth0 segment.. Meaning R1 will ask on its fa0 segment 11.0.0.0, whether anyone in 10.0.0.0 is available on this segment, and if so please provide your MAC so that i can use for encapsulation of the traffic that I can send to 10.0.0.0 network.

                                   

                                  The R1's ARP request will be succeeded and the normal routing to that 10.0.0.0 network can hapen only if "proxy-arp" is congured on R2's Fa0 interface(which is by default) otherwise the traffic will not get routed.

                                   

                                  If R2's Fa0 interface has proxy-arp it will inform R1 to send frames destined to 10.0.0.0 network encapsulated with R2's Fa0 mac in the destination MAC field.

                                   

                                  Whenever you use the local exit interface for your static route, it is wise to be aware of this concept.

                                  Only connected routes have an AD of 0.All static routes wheter they're pointing to an interface or to a next-hop have an AD of 1.

                                   

                                  Regards.

                                   

                                  Alain.

                                  • 14. Re: difference between static route and default route
                                    Naren

                                    Alain,

                                     

                                    Although slightly deviating from my point, is it true to say "All static routes wheter they're pointing to an interface (LOCAL EXIT INTERFACE) or to a next-hop have an AD of 1."????

                                    1 2 Previous Next