cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
100294
Views
110
Helpful
9
Replies

Diff Between Default route,Default gateway and ip route 0.0.0.0 0.0.0.0

Tompeshwar Lal
Level 1
Level 1

HI,

Can any body tell me what is difference between Default route information origin,Default gateway and ip route 0.0.0.0 0.0.0.0.a.b.c.d

and how it select the route.

Thanks in Adv.

1 Accepted Solution

Accepted Solutions

danrya
Level 1
Level 1

Sure,

Default gateway is usually used on switches that are not L3 switches/routers or on "hosts".  It just points to a router that "knows" how to get out.

The term "Default Route" usually means "ip route 0.0.0.0 0.0.0.0 x.x.x.x" or "default-information originate".  And means, if you don't have a "more specific" route, then send it to x.x.x.x, and that router will take care of it.

"Default-information originate", is the exact same thing as "ip route", except it's sending it through a routing protocol.

If a router learns a default route from another router through a routing process, it will have a cost associated, as well as the administrative distance of the routing protocol.  The important information is the AD (administrative distance).  When we type the command "ip route" the AD for that route is 1 (unless we change it).  If we learn a default route from OSPF, it will have the AD of OSPF (110).  So the static will be preferred.

I hope this helps.  If your using something other than OSPF, just look at the AD of the routing protocols to figure out the preferred (lowest) one.

Dan

View solution in original post

9 Replies 9

Jennifer Halim
Cisco Employee
Cisco Employee

"ip default-gateway" is only default gateway for that device itself.

"ip route 0.0.0.0 0.0.0.0" is default gateway for the device as well as for traffic routing through the device.

Hope that answers your question.

sorry I clicked report n your answer by mistake and for some reason I can't unreport

danrya
Level 1
Level 1

Sure,

Default gateway is usually used on switches that are not L3 switches/routers or on "hosts".  It just points to a router that "knows" how to get out.

The term "Default Route" usually means "ip route 0.0.0.0 0.0.0.0 x.x.x.x" or "default-information originate".  And means, if you don't have a "more specific" route, then send it to x.x.x.x, and that router will take care of it.

"Default-information originate", is the exact same thing as "ip route", except it's sending it through a routing protocol.

If a router learns a default route from another router through a routing process, it will have a cost associated, as well as the administrative distance of the routing protocol.  The important information is the AD (administrative distance).  When we type the command "ip route" the AD for that route is 1 (unless we change it).  If we learn a default route from OSPF, it will have the AD of OSPF (110).  So the static will be preferred.

I hope this helps.  If your using something other than OSPF, just look at the AD of the routing protocols to figure out the preferred (lowest) one.

Dan

thanks @ danrya

its really helpfull..

i have one query can you tell me what is mean of 0.0.0.0 0.0.0.0 in ip route 0.0.0.0 0.0.0.0 a.b.c.d

0.0.0.0 0.0.0.0 means to all subnets.

The first 0.0.0.0 means the actual subnet, in this case any and the second 0.0.0.0 means the subnet mask, also any.

If you have specific routes as follows:

ip route 192.168.5.0 255.255.255.0 a.b.c.d

That means routing for 192.168.5.0/24 subnets would route to a.b.c.d

Hope that helps.

Hi everybody,

This document sums up the differences between ip default-network, ip default-gateway and ip route quite nicely:

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

Best regards,

Peter

excellent info. \Thanks

Good Explanation.Thanks

well explained.
Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Innovations in Cisco Full Stack Observability - A new webinar from Cisco