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

Interface as Next-hop

ymj
Level 1
Level 1

Hello,

If I specify an interface instead of an IP address as the next-hop to reach a network, how does the router know how to forward the packet ?

Example:

________________________________________

interface Ethernet0/0

ip address 10.1.1.2 255.255.255.0

ip route 0.0.0.0 0.0.0.0 Ethernet0/0

________________________________________

How will the router determine to whom forward packets to (in this case for default route) ?

In this case it's ethernet, so it needs the MAC address and therefore the IP address...

thanks

5 Replies 5

Harold Ritter
Level 12
Level 12

The router arps for each destination ip address. Note that in this scenario the default router(s) would have to be configured for proxy arp since arp requests will be received for destination ip address that are not part of the local subnet.

It is usually recommended to use a combinaison of physical interface and ip next hop for broadcast interfaces to avoid the above mentioned situation.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

yeah but i assume that there is a router behind the interface to which I'm forwarding packets...

I stated Ethernet as an example, but it could be Serial or whatever...

I often see such static route setup in books or reality (ip route xxxx xxxx ) and for me it does not make sense UNLESS you know what is the next-hop ip address thanks to the updates received by the adjency router.

thanks

The statement I made about the router ARPing for each and every destination resolvable via the static route is applicable in the case you have a router behind that interface. It is that very router that will act as a ARP proxy. So on the router with the static pointing to the physical interface you could end up with a fairly large ARP table (especially if this in an Internet access scenario), which is not necessarily good.

With a serial interface it is much simpler since all packets with a destination address resolvable via the static route will simply be sent down the serial inerface (no arp required obviously).

Using a physical interface as part of the static route will make sure that this route is withdrawn form the routing table when the interface goes down. If you don't specify the physical interface, you might end up in a scenario where the next ip address used on the static route is still resolvable via some oter route in the routing table even after the interface goes down.

Hope this helps,

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

I think it is helpful to think of the static route to an interface differently depending on whether the interface is multipoint or is point-to-point. In the case of a multipoint interface (such as Ethernet) there is ambiguity about what is the next hop. As Harold has stated in his response when there is ambiguity about the next hop there must be something to resolve the ambiguity such as ARP on Eternet interfaces. When there is no ambiguity (on point-to-point interfaces such as serial interfaces) we do not need to know the next hop address and the router simply forwards the packet out the serial interface.

So to look at it in a slightly different perspective, a static route using only the interface works efficiently on point-to-point connections and is not efficient on multipoint interfaces. On multipoint the static route must depend on some other mechanism such as ARP. This means that there will be extra traffic generated (sending ARP requests and receiving ARP responses) and will consume extra CPU cycles maintaining the larger tables that will be generated.

And in the case where the static route points to a multipoint interface where there is no router behind it or the router is configured to disable Proxy ARP then you will have a static route that does not work (traffic will not be forwarded).

HTH

Rick

HTH

Rick

Good summarization Rick.

In the case of a multipoint it is strongly recommended to use a next hop IP address along with the physical interface address. I know I stated that in a previous email but it is worth repeating myself.

Harold Ritter
Sr Technical Leader
CCIE 4168 (R&S, SP)
harold@cisco.com
México móvil: +52 1 55 8312 4915
Cisco México
Paseo de la Reforma 222
Piso 19
Cuauhtémoc, Juárez
Ciudad de México, 06600
México

Review Cisco Networking for a $25 gift card