07-15-2013 04:41 AM - edited 03-04-2019 08:27 PM
Hi ,
Can someone explain about the below mentioned command ?
ip route 0.0.0.0 0.0.0.0 x.x.x.x(Nxt Hop IP) fa0/1
Solved! Go to Solution.
07-15-2013 05:54 AM
Hi,
is there something in particular you want to know?
Static routes, in your case the default route, can be configured to point to a numerical next hop (IP address), an exit-interface, or -like your example shows- both:
ip route
ip route
ip route
The differences are explained in this document:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml
Dinesh Kumar Mariappan:
This is command for default route.. What ever packet received to the router it simply forward to fa0/1 interface or to next IP.
This is true as long as no more specific route for the destination exists.
Hope that helps
Rolf
07-15-2013 06:54 AM
There are situations, where the combination of exit-int and numerical next-hop is desired.
Let me give you an example.
Lets say you have an AS and use the IP address range 192.168.0.0/16.
Your default route points to 192.168.12.2
ip route 0.0.0.0 0.0.0.0 192.168.12.2
Now imagine that there's another route to the next-hop address 192.168.12.2, e.g. a discard route (just an example):
ip route 192.168.0.0 255.255.0.0 Null0
Do you know what happens when you disable the interface connecting 192.168.12.2 (say Fa0/0)?
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
shutdown
Because of the recursive nature of the this type of routes, there's still a valid route to 192.168.12.2:
R1#show ip route 192.168.12.2
Routing entry for 192.168.0.0/16, supernet
Known via "static", distance 1, metric 0 (connected)
Routing Descriptor Blocks:
* directly connected, via Null0
R1#show ip route
S* 0.0.0.0/0 [1/0] via 192.168.12.2
S 192.168.0.0/16 is directly connected, Null0
So the link is down, however, the default-route is still there.
This behavior changes if you add the exit-interface:
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 192.168.12.2
ip route 192.168.0.0 255.255.0.0 Null0
R1#show ip route
S 192.168.0.0/16 is directly connected, Null0
Hope that helps
Rolf
07-15-2013 04:56 AM
This is command for default route.. What ever packet received to the router it simply forward to fa0/1 interface or to next IP.
07-15-2013 05:54 AM
Hi,
is there something in particular you want to know?
Static routes, in your case the default route, can be configured to point to a numerical next hop (IP address), an exit-interface, or -like your example shows- both:
ip route
ip route
ip route
The differences are explained in this document:
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml
Dinesh Kumar Mariappan:
This is command for default route.. What ever packet received to the router it simply forward to fa0/1 interface or to next IP.
This is true as long as no more specific route for the destination exists.
Hope that helps
Rolf
07-15-2013 06:09 AM
What is the advantage of this comment ..? is there any specific name is there for this commend other than defauls route or static route ????
as per your reply , it will forward the packets to the default gateway, then why we needs to mention the next hop ip as well exit interface ???
07-15-2013 06:54 AM
There are situations, where the combination of exit-int and numerical next-hop is desired.
Let me give you an example.
Lets say you have an AS and use the IP address range 192.168.0.0/16.
Your default route points to 192.168.12.2
ip route 0.0.0.0 0.0.0.0 192.168.12.2
Now imagine that there's another route to the next-hop address 192.168.12.2, e.g. a discard route (just an example):
ip route 192.168.0.0 255.255.0.0 Null0
Do you know what happens when you disable the interface connecting 192.168.12.2 (say Fa0/0)?
interface FastEthernet0/0
ip address 192.168.12.1 255.255.255.0
shutdown
Because of the recursive nature of the this type of routes, there's still a valid route to 192.168.12.2:
R1#show ip route 192.168.12.2
Routing entry for 192.168.0.0/16, supernet
Known via "static", distance 1, metric 0 (connected)
Routing Descriptor Blocks:
* directly connected, via Null0
R1#show ip route
S* 0.0.0.0/0 [1/0] via 192.168.12.2
S 192.168.0.0/16 is directly connected, Null0
So the link is down, however, the default-route is still there.
This behavior changes if you add the exit-interface:
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 192.168.12.2
ip route 192.168.0.0 255.255.0.0 Null0
R1#show ip route
S 192.168.0.0/16 is directly connected, Null0
Hope that helps
Rolf
07-15-2013 07:09 AM
Hi Rolf,
Thanks for your reply .. its make me clear ...
So its like TRACK feature ?? Am i right ?
07-15-2013 07:24 AM
Your're welcome! Thanks for rating and marking as resolved.
So its like TRACK feature ?? Am i right ?
Well, tracking gives you much more options, but yes, I think you could say that.
The point is that packets are routed through a certain interface without having an undesirable growth of the ARP table.
Regards
Rolf
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: