10-01-2010 12:45 AM - edited 03-04-2019 09:57 AM
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.
Solved! Go to Solution.
10-01-2010 01:04 AM
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
10-01-2010 01:02 AM
"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.
02-10-2017 08:40 PM
sorry I clicked report n your answer by mistake and for some reason I can't unreport
10-01-2010 01:04 AM
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
10-01-2010 02:22 AM
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
10-01-2010 02:26 AM
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.
10-01-2010 02:44 AM
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
08-26-2020 12:11 AM
excellent info. \Thanks
04-27-2017 08:37 AM
Good Explanation.Thanks
08-26-2020 12:11 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide