cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5074
Views
5
Helpful
6
Replies

Static Route Next Hop - Interface or IP Address

j1mbo78
Level 1
Level 1

Hi,

Q1) I'd like some opinions as to what the advantages are of using a next hop of an interface as opposed to an IP address for a static route - this is a static route for a subnet connected via a Serial Interface e.g.

interface S0.1

ip address 10.1.1.1 255.255.255.252

ip route 10.2.2.0 255.255.255.0 s0.1

-or-

ip route 10.2.2.0 255.255.255.0 10.1.1.2

Now I now that the first example will be given a metric of 0 like a connected interface and the second example will have a metric of 1 but I fail to see the benefit of using one over the other (other than one having a slightly better metric). Am I missing something?

Q2) This is kind of linked to Q1. When using OSPF, is it generally good practice to have a network statement for point-to-point link subnets e.g using the example above

network 10.1.1.1 0.0.0.0 area 0.0.0.0

even though it will only ever be a next hop for traffic destined for a further subnet e.g 10.2.2.0, to use the example above? What I mean by this is that it will not need to be known about by any other router in the network for the purposes of routing traffic too, it only serves as a local next hop for the 10.2.2.0 subnet.

In this case I will be redistributing static routes in to OSPF.

Hopefully this isn't too confusing.

Any thoughts most appreciated,

James Smith

6 Replies 6

lgijssel
Level 9
Level 9

The following document is dicussing your topic:

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

Hope this answers your question.

Regards,

Leo

Hi,

Thanks for this but unfortunately my CCO login will not let me view it.

James

Just found out a great trick! (Saw someone else using it actually ;-)

The link works when you remove the word "partner" from the URL.

Regards,

Leo

Richard Burts
Hall of Fame
Hall of Fame

James

Actually the static route ip route 10.2.2.0 255.255.255.0 s0.1 will be assigned an Administrative Distance of 1 not of 0.

If the outbound interface really is a point to point connection (PPP, HDLC, etc) then there might be a very slight advantage to using the interface form of static route but the two forms are very close in terms of their overhead.

If the outbound interface is a multi-point interface, and especially if the interface is a LAN interface, there is a major disadvantage in using the interface form of static route (ip route 10.2.2.0 255.255.255.0 eth 0). The disadvantage is based on the effort to resolve the layer 2 addressing to forward the packets. If the static route points to an interface rather than to an address then the router must resolve the layer 2 address for every packet it forwards through the outbound interface. In the case of Ethernet it means that the router must ARP for every destination. This will depend on the next hop router supporting proxy ARP (which may or may not be the case). And having to ARP for each address will drive up CPU utilization and increase memory utilization because of the larger ARP table that will result.

So in general it is better to use static routes with IP addresses identifying the next hop.

As far as your question about OSPF, if you want OSPF to forward traffic over the point to point link then you must have an OSPF network statement that includes that interface. If the interface is not included in some OSPF network statement then OSPF will not send HELLO messages over the interface, will not form neighbor relationships over the interface, and will not learn any remote destinations over the interface. So yes it is important to have an OSPF network statement for the interface.

HTH

Rick

HTH

Rick

Rick,

Thanks for your response.

In regards to Q2, I do not want OSPF to forward traffic over the link in order to form adjancencies, I was wondering whether it is generally best practice to advertise point-to-point link-subnets via network statements (and make the interface passive), or whether this is unnecessary, considering that the subnet on the point-to-point just provides a next hop and is never the destination for traffic.

Maybe I did not understand your question very well. Based on this statement:

even though it will only ever be a next hop for traffic destined for a further subnet

I assumed that you wanted OSPF to run over that link. If you do not want OSPF to run on the interface (I guess that means that routers on both ends have static routes for all remote subnets over the point to point) and if no other router will ever want to get to that interface address as a destination, then you do not need an OSPF network statement for it. (Bear in mind that if you ever do a ping or a traceroute that is sent over that interface then the interface address will be the source address and the remote destination will need to get to the router point to point interface address. So I would be very cautious about saying that no remote device will ever need to get to the router interface.)

HTH

Rick

HTH

Rick
Review Cisco Networking products for a $25 gift card