?
Solved

Static route pointing to an interface

Posted on 2010-04-06
16
Medium Priority
?
740 Views
Last Modified: 2012-05-09
If you use an interface instead of a next hop ip address how does that work?

example: ip route 0.0.0.0 0.0.0.0 s1/0

If a packet for 10.10.10.9 came into the router and the best route was the above default route would the router try to arp for 10.10.10.9 out the s1/0 interface?

I have read some articles that say that packet would just get sent out s1/0 but others which say that the router would try to resolve the L3 address to a L2 mac address.

If the router must resolve the L3 address then the 10.10.10.9 must be in the same broadcast domain as s1/0 or use proxy arp on the downstream router/switch?

One article said this configuration is better for interfaces connected via point to point networks but multi-access networks need more configuration and are not scalable.

I have not come across a config where the interface is used instead of the next hop but I am curious as to when or how it might be used.
0
Comment
Question by:Dragon0x40
  • 7
  • 5
  • 4
16 Comments
 
LVL 50

Accepted Solution

by:
Don Johnston earned 1332 total points
ID: 29931861
Using the interface instead of a next hop address is only advisable with a point-to-point serial interface. In that situation, there is no know the layer 2 address since it's a point-to-point link.
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 1332 total points
ID: 29931955
correction:

There is no need to know the layer 2 address since it's a point-to-point link.
0
 
LVL 15

Assisted Solution

by:Nayyar HH (CCIE RS)
Nayyar HH (CCIE RS) earned 668 total points
ID: 29938589
Yes, you are correct.

If you use "Interface" router will try to resolve (using ARP if ethernet) the L2 address of the destination host on that interface, on the other hand if you use "IP Address" the router will try to resolve (using ARP if ethernet) the L2 address of the next-hop address.

An interface as the next-hop is treated as the destination is connected. It is also true that it is not scalable and should only be used on point-to-point links. For example, using a default route pointing to an ethernet interface is not recommended and can cause high processor utilization due to excessive ARPs for every host on accessed on the ethernet.
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 

Author Comment

by:Dragon0x40
ID: 29939803
thanks donjohnston and nazsky,

It sounds to me like you both took opposite sides of the question I am trying to clarify.

donjohnston: no need to know a mac just send frame out s1/0

nazsky: the router will try to resolve the L3 address to a mac adress out the s1/0 interface.

I assumed that all frames must have a source and destination mac address (ethernet)

When you send frames out s1/0 does the frame have the mac address of s1/0 or does the router just physically send it out?
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 1332 total points
ID: 29940488
> the router will try to resolve the L3 address to a mac adress out the  s1/0 interface.

Incorrect. Serial interfaces don't have MAC addresses... period. There is no "ARP" on serial interfaces.

>I assumed that all frames must have a source and destination mac address  (ethernet)

This is correct. Which is why you should not use an interface instead of a next hop address for traffic going out a non point-to-point link.

>When you send frames out s1/0 does the frame have the mac address of  s1/0 or does the router just physically send it out?

If the serial interface uses HDLC or PPP, the address field is set to FF (broadcast). Which, since it's a point-to-point link, is irrelevant.
0
 
LVL 15

Assisted Solution

by:Nayyar HH (CCIE RS)
Nayyar HH (CCIE RS) earned 668 total points
ID: 29943092
> the router will try to resolve the L3 address to a mac adress out the  s1/0 interface.

The L2 resolution method used is always dependant of the the L2 encapsulation.

As ethernet encap. would use ARP so would Frame-relay encap. use Inverse-ARP/Static mappings etc.

So to rephrase the earlier statement  "..... the router will try to resolve the L3 address to a L2 adress out the  s1/0 interface ...." would be more appropriate.
0
 

Author Comment

by:Dragon0x40
ID: 29947340
Can a serial interfacde use ethernet encapsulation?

If the interface used as the next hop is not mulit-access then the frames are broadcast out s1/0 and that is no problem because HDLC and PPP are layer 2 and broadcast anyway?

If the interface used as the next hop is multi-access layer 3 protocol (such as ethernet) then the router will try to resolve the L3 address to a L2 address out of the s1/0 interface which is not acceptable/recommended because the far end may not be able or be configured to answer the L3 to L2 resolution query.

0
 

Author Comment

by:Dragon0x40
ID: 29947419
The contents of the previous post are alll questions not statements.
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 1332 total points
ID: 29949044
>Can a serial interfacde use ethernet encapsulation?

No.

>If the  interface used as the next hop is not mulit-access then the frames are  broadcast out s1/0 and that is no
> problem because HDLC and PPP are layer  2 and broadcast anyway?

Correct.

>If the interface used as the next hop is  multi-access layer 3 protocol (such as ethernet) then the router
> will  try to resolve the L3 address to a L2 address out of the s1/0 interface  which is not
>acceptable/recommended because the far end may not be able  or be configured to answer
> the L3 to L2 resolution query.

Oh boy... :-)

Ethernet is a layer 2 protocol.

If it's multi-access then it's probably not a serial interface. (Could be.. but lets keep it simple for now)

Other than that, this statement is pretty accurate.


0
 

Author Comment

by:Dragon0x40
ID: 29951878
I am still not getting the complete picture in my head.

Whether we have a serial interface or an ethernet interface we are still using IP at L3 and the same IP protocols are in effect wherever the packets are sent. (ppp or ethernet)

Would understanding how ppp and hdlc on a serial interface encapsulates the packets help me or am I missing something with how IP and arp works?

Does arp not work on a serial interface?

Does ppp have physicall addresses?
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 1332 total points
ID: 29953332
>Would understanding how ppp and hdlc on a serial interface encapsulates  the packets help me or am I missing something with how IP and arp works?

It wouldn't hurt and yes. Look at an HDLC or PPP frame. There is no source address field. Only a destination address field and it's a legacy feature from back we had multi-drop circuits.

>Does arp not work on a serial interface?

There is only ARP on LAN interfaces that have MAC addresses. (ethernet, token-ring, etc.)

>Does ppp have physicall addresses?

No. If you issue a "show int" for your serial interface,  you'll notice the MAC address field is missing.

There is an "address" field in the PPP (and HDLC) frame, but it is always set to an all 1's (broadcast address). So when a router sends anything over a PPP or HDLC link, the layer 2 address is irrelevant.
0
 
LVL 15

Assisted Solution

by:Nayyar HH (CCIE RS)
Nayyar HH (CCIE RS) earned 668 total points
ID: 30007526
ARP is used by ethernet ONLY to resolve L3 to L2 mappings.

Some form of L3 to L2 mapping needs to be implemented by encapsulation protocols to successfully transmit over media. In point-to-point protocols there is usually only one possible destination hence L2 address is irrelevant thus no real need for a mapping method. An example is PPP on the contrary is Frame-relay using Inverse-ARP.

> Does arp not work on a serial interface? No
ARP (which is the resolution method) is tied to the encapsulation used on the Interface, Since we cannot encapsulate a serial interface with ethernet ARP cannot apply.

>Does ppp have physicall addresses?
No is the simple answer. As explained above.
0
 

Author Comment

by:Dragon0x40
ID: 30046830
So my takeaway:

You can create static routes to point to an interface or next hop ip address if using serial interface or an interface connected to a point to point link but it more of the standard to use the next hop ip address? You may point to the interface for a technical reason which can not be easily summarized here. Using the ip address is self documenting and is easier for the next admin doing a show ip route?

It is not recommended to point a static route to an ethernet interface because of the increased cpu utilization of the L3 to L2 resolution workload (because the router thinks every ip address that matches the static route is directly connected) instead you should point to the next hop ip address? The next hop ip address is then resolved once and placed in the arp cache.
0
 
LVL 50

Assisted Solution

by:Don Johnston
Don Johnston earned 1332 total points
ID: 30047982
That pretty much sums it up rather nicely. Well done.

One final point.

>It is not recommended to point a static route to an ethernet interface  because of
>the increased cpu utilization of the L3 to L2 resolution  workload...

It is not recommended because the packet will most likely never make it to the destination. The CPU utilization issue would be a relatively minor issue by comparison.
0
 
LVL 15

Expert Comment

by:Nayyar HH (CCIE RS)
ID: 30056585
Agreed, but on the final point frankly do not.

>It is not recommended to point a static route to an ethernet interface  because of
>the increased cpu utilization of the L3 to L2 resolution  workload...

This is certainly a possibility, Cisco has documented this. Also, if default setting are in effect on the remote router the packet will certainly make it.

See link ....

http://www.cisco.com/en/US/products/hw/routers/ps359/products_tech_note09186a00801c2af6.shtml#arp 

As an example;

Host1(10.1.1.1/24) |--------|fa0/1-R1-fa0/0|--------- 10.1.3.0/24 ---------|fa0/1| R2 |fa0/0|---------|Servers(10.1.2.0/24)

Lets assume R1 is configured as follows;
ip route 0.0.0.0 0.0.0.0 fa0/0

And R2
ip route 10.1.1.0 255.255.255.0 fa0/1

And everything else is default.

When Host1 connects to Servers on 10.1.2.0/24, R1 will send ARP requests out fa0/0 for every Server that Host1 tries to communicate with. Because proxy-arp is enabled by default the packet will definitely make it to the servers and back.

Now consider if we replace the server segment with the Internet, this means an ARP request would be generated for every host on the Internet Host1 tries to communicate with. This is not ideal.


0
 
LVL 50

Expert Comment

by:Don Johnston
ID: 30057212
The problem with this theory is that it requires proxy ARP to be enabled. Which is why I stated " the packet will most likely never make it to the destination."

Best practices recommends disabling of proxy ARP.

http://www.cisco.com/en/US/tech/tk648/tk361/technologies_tech_note09186a0080120f48.shtml

If proxy ARP is not enabled, the packets will not make to the destination.
0

Featured Post

Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the hope of saving someone else's sanity... About a year ago we bought a Cisco 1921 router with two ADSL/VDSL EHWIC cards to load balance local network traffic over the two broadband lines we have, but we couldn't get the routing to work consi…
In this article, we’ll look at how to deploy ProxySQL.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question