Skip navigation
Cisco Learning Home > Certifications > Routing & Switching (CCNA) > Discussions

_Communities

This Question is Not Answered 1 Correct Answer available (4 pts) 2 Helpful Answers available (2 pts)
13611 Views 19 Replies Latest reply: Aug 22, 2011 11:04 AM by Naren RSS 1 2 Previous Next

Currently Being Moderated

difference between static route and default route

Sep 26, 2010 7:33 AM

kevinlim62 129 posts since
Mar 6, 2010

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.

  • Jared 5,498 posts since
    Jul 27, 2008

    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.

  • Martin 13,070 posts since
    Jan 16, 2009

    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

  • Jared 5,498 posts since
    Jul 27, 2008

    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.

  • Diwakar Sharma -CCNA/CCNP/JNCIA-ER 79 posts since
    Nov 5, 2009

    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

  • Keneil Facey 200 posts since
    Oct 1, 2010

    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.

  • John 2,289 posts since
    Jan 17, 2009

    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

  • Taheireem 6 posts since
    Feb 9, 2011

    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

  • Keith Barker - CCIE RS/Security, CISSP 5,351 posts since
    Jul 3, 2009
    Currently Being Moderated
    9. Aug 21, 2011 9:22 AM (in response to Taheireem)
    Re: difference between static route and default route

    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

  • Tim - CCNA 78 posts since
    Apr 16, 2011
    Currently Being Moderated
    10. Aug 21, 2011 10:50 AM (in response to kevinlim62)
    Re: difference between static route and default route

    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.

  • Mohamed Sobair 340 posts since
    Oct 21, 2008
    Currently Being Moderated
    11. Aug 21, 2011 11:01 AM (in response to kevinlim62)
    Re: difference between static route and default route

    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

  • Naren 221 posts since
    Feb 3, 2009

    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) :)

  • cadetalain 2,642 posts since
    Sep 18, 2008
    Currently Being Moderated
    13. Aug 22, 2011 12:10 AM (in response to Naren)
    Re: difference between static route and default route

    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.

  • Naren 221 posts since
    Feb 3, 2009
    Currently Being Moderated
    14. Aug 22, 2011 12:22 AM (in response to cadetalain)
    Re: difference between static route and default route

    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."????

Actions

More Like This

  • Retrieving data ...

Bookmarked By (1)