07-29-2006 07:29 PM - edited 03-03-2019 01:29 PM
ip route dest ip dest mask next hop(gateway)
The next hop should always be from reference to the source on which this route is configured or it can be the next hop with reference to the dest i.e., next hop from dest.
07-29-2006 07:34 PM
Hi Aksher,
Next Hop should be the reference of source where u r configuring this route and to be the next device towards that destination.
There is another type of static route, called the interface static route. It is used when you want the destination network to look like it is attached to one of the router?s interfaces. So that insted of nexthop ip address, U can configure router interface towards that device as a reference. The administrative distance for an interface static route is 0, which makes it equivalent to a directly connected network route.
http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a00800ef7b2.shtml
Rate if it does,
Rgs
07-29-2006 08:42 PM
Hi balajitvk,
Just to correct you on one aspect, the AD for a static route pointing out via an interface is "1", not "0". 0 is for a directly connected route, therefore for a route that originates on the router because an IP address/subnet mask was configured on an interface (there are other ways to get an IP address into the routing table as connected, therefore have an AD of 0 and not be configured on the router but that is a separate discussion). All static routes when configured without the optional AD have an admin distance of "1".
To illustrate it:
xxxxxxx#sh ip ro 1.1.1.2
Load for five secs: 4%/0%; one minute: 2%; five minutes: 1%
Time source is NTP, 05:35:44.873 BST Sun Jul 30 2006
Routing entry for 1.1.1.2/32
Known via "static", distance 1, metric 0 (connected)
Routing Descriptor Blocks:
* directly connected, via FastEthernet0/0.1
Route metric is 0, traffic share count is 1
xxxxxxx#
xxxxxxx#sh run | incl ip route 1.1.1.2
ip route 1.1.x.x.255.255.255 FastEthernet0/0.1
xxxxxxx#
Notice the "distance 1" in the output of show ip route 1.1.1.2.
Cheers,
H
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