- Posts: 7
- Thank you received: 0
diff between ip route,ip default-gateway
- gangadar1234
- Topic Author
- Offline
- New Member
Less
More
19 years 1 month ago #10792
by gangadar1234
diff between ip route,ip default-gateway was created by gangadar1234
hi all,
Can any one explain what is the difference between ip route,
ip default-gateway,ip default-network commands.
tahnks
Can any one explain what is the difference between ip route,
ip default-gateway,ip default-network commands.
tahnks
19 years 1 month ago #10797
by Chris
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
Replied by Chris on topic Re: diff between ip route,ip default-gateway
Gangadar,
The 'ip default-gateway' command is used to enter your router's default gateway, just as you would do on your normal Windows machine. This command does not differ from your everyday 'gateway' used in all devices required to access hosts outside the local network.
On the other side, the 'ip route' command is available to help us create 'static' routes. In other words, we can tell the router which 'gateway' it must use in order to reach specific networks.
The 'ip route' command can also be used to define a default gateway using the following command:
ip route 0.0.0.0 0.0.0.0 <next hop ip address>
But the main use of this command is to provide routes to other networks which cannot be reached via the 'default gateway'.
I hope that helps clear things up for you.
Cheers,
The 'ip default-gateway' command is used to enter your router's default gateway, just as you would do on your normal Windows machine. This command does not differ from your everyday 'gateway' used in all devices required to access hosts outside the local network.
On the other side, the 'ip route' command is available to help us create 'static' routes. In other words, we can tell the router which 'gateway' it must use in order to reach specific networks.
The 'ip route' command can also be used to define a default gateway using the following command:
ip route 0.0.0.0 0.0.0.0 <next hop ip address>
But the main use of this command is to provide routes to other networks which cannot be reached via the 'default gateway'.
I hope that helps clear things up for you.
Cheers,
Chris Partsenidis.
Founder & Editor-in-Chief
www.Firewall.cx
19 years 1 month ago #10807
by jwj
-Jeremy-
Replied by jwj on topic Re: diff between ip route,ip default-gateway
Here's a couple of interesting things I learned too. One was a few months ago, trying to get a Catalyst 4500 to work with the ip default-gateway command. I configured the switch exactly as I thought it need to, but it would not connect to it's uplink. Finally, after a bit of reading, I found out that the default-gateway command only works on layer 3 switches and routers with the "no ip routing" command. Another thing is the default network command. I've never seen it used, so I decided to check Cisco's site for an explanation of it. Apparently it's (almost) the same thing as doing ip route 0.0.0.0 0.0.0.0 (next hop ip). Here's the difference:
So in short, if you have ip routing enable, use either ip default-network or ip route 0.0.0.0 0.0.0.0. If you do not have ip routing enable or are working on a pure switch, use ip default-gateway. Interesting stuff.
Edit: Oh yeah, and another difference is how routing protocols treat either command. It's detailed in the below link.
Source: www.cisco.com/warp/public/105/default.html#ipnetwork
If you use both the ip default-network and ip route 0.0.0.0 0.0.0.0 commands to configure candidate default networks, and the network used by the ip default-network command is known statically, the network defined with the ip default-network command takes precedence and is chosen for the gateway of last resort. Otherwise if the network used by the ip default-network command is derived by a routing protocol, the ip route 0.0.0.0 0.0.0.0 command, which has a lower administrative distance, takes precedence and is chosen for the gateway of last resort.
So in short, if you have ip routing enable, use either ip default-network or ip route 0.0.0.0 0.0.0.0. If you do not have ip routing enable or are working on a pure switch, use ip default-gateway. Interesting stuff.
Edit: Oh yeah, and another difference is how routing protocols treat either command. It's detailed in the below link.
Source: www.cisco.com/warp/public/105/default.html#ipnetwork
-Jeremy-
19 years 1 month ago #10816
by TheBishop
Replied by TheBishop on topic Default Gateway
Good information there jwj! Thanks.
- gangadar1234
- Topic Author
- Offline
- New Member
Less
More
- Posts: 7
- Thank you received: 0
19 years 1 month ago #10826
by gangadar1234
Replied by gangadar1234 on topic Re: diff between ip route,ip default-gateway
thanks chris,JWJ...............
Time to create page: 0.131 seconds