Sei sulla pagina 1di 9

difference between static route and...

kevinlim62 129 posts since Mar 6, 2010


difference between static route and default route Sep 26, 2010 7:33 AM
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,576 posts since Jul 27, 2008


Re: difference between static route and default route Sep 26, 2010 7:37 AM
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.

kevinlim62 129 posts since Mar 6, 2010


Re: difference between static route and default route Sep 26, 2010 7:52 AM
in response to Jared
Comparing static route and default route, which one is more reliable and have trustworth information for the
routing process?

Martin 14,093 posts since Jan 16, 2009


Re: difference between static route and default route Sep 26, 2010 9:45 AM
in response to kevinlim62
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,576 posts since Jul 27, 2008


Re: difference between static route and default route Sep 26, 2010 2:07 PM
in response to kevinlim62
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

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
1
difference between static route and...

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


Re: difference between static route and default route May 23, 2011 9:21 AM
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


Re: difference between static route and default route May 23, 2011 9:35 AM
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.

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
2
difference between static route and...

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,301 posts since Jan 17, 2009


Re: difference between static route and default route May 23, 2011 11:19 AM
in response to Keneil Facey
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


Re: difference between static route and default route Aug 21, 2011 1:35 AM
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"

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
3
difference between static route and...

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

Keith Barker - CCIE RS/Security, CISSP 5,327 posts since Jul 3, 2009
Re: difference between static route and default route Aug 21, 2011 9:22 AM
in response to Taheireem
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


Re: difference between static route and default route Aug 21, 2011 10:50 AM
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 344 posts since Oct 21, 2008


Re: difference between static route and default route Aug 21, 2011 11:01 AM
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.

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
4
difference between static route and...

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

Regards,
Mohamed

Naren 221 posts since Feb 3, 2009


Re: difference between static route and default route Aug 22, 2011 4:42 AM
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,

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
5
difference between static route and...

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,730 posts since Sep 18, 2008


Re: difference between static route and default route Aug 22, 2011 12:10 AM
in response to Naren
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

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
6
difference between static route and...

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


Re: difference between static route and default route Aug 22, 2011 12:22 AM

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
7
difference between static route and...

in response to cadetalain
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."????

Naren 221 posts since Feb 3, 2009


Re: difference between static route and default route Aug 22, 2011 12:34 AM
in response to cadetalain
OMG !!! You seen correct Alain,

http://cciepursuit.wordpress.com/2007/07/09/the-administrative-distance-of-a-static-route-pointed-to-an-
interface-is-not-zero/

Brian has demonstrated this already it seems.. !!

Then why do I remember very clearly that I have always studied "a static route pointing out its local interfacce
has an AD of 0" ???????

Any thoughts !!! ???

Naren 221 posts since Feb 3, 2009


Re: difference between static route and default route Aug 22, 2011 4:40 AM
in response to cadetalain
I got the AD confusion sorted out,

https://learningnetwork.cisco.com/thread/34032?start=0&tstart=0

Thank you Alain

cadetalain 2,730 posts since Sep 18, 2008


Re: difference between static route and default route Aug 22, 2011 5:14 AM
in response to Naren
Hi Naren,

Yes it is true, just lab it up and you'll see they both have an AD of 1.

Regards.

Alain.

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
8
difference between static route and...

Keith Barker - CCIE RS/Security, CISSP 5,327 posts since Jul 3, 2009
Re: difference between static route and default route Aug 22, 2011 9:35 AM
in response to Naren
Another quick way to verify they are both AD of 1:

R1(config)#do debug ip routing


IP routing debugging is on
R1(config)#ip route 55.0.0.0 255.0.0.0 10.0.0.2
RT: add 55.0.0.0/8 via 10.0.0.2, static metric [1/0]
RT: NET-RED 55.0.0.0/8
R1(config)#ip route 66.0.0.0 255.0.0.0 Fa0/0
R1(config)#
RT: add 66.0.0.0/8 via 0.0.0.0, static metric [1/0]
RT: NET-RED 66.0.0.0/8

Naren 221 posts since Feb 3, 2009


Re: difference between static route and default route Aug 22, 2011 11:04 AM
in response to Keith Barker - CCIE RS/Security, CISSP
Keith, Thats a nice and quickest verification, perfect ! Thank you very much
1 2 Previous Next

2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
9

Potrebbero piacerti anche