How a router finds destination L2 address?

Unanswered Question
Feb 21st, 2009

In case of Ethernet it performs ARP to find the destination MAC address.

But for each of the other cases (ppp, hdlc, frame relay, atm etc) could someone detail me how the router finds the destination L2 address ?

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 4.3 (4 ratings)
mattkaya56 Sat, 02/21/2009 - 20:49

Router is only responsible to get a packet to the next hop. The destination mac address in this case is that of the router interface. This will keep happening hop by hop until it gets to the L2 were it will resolve traditionally(ARP).

Please correct me if I am wrong.

Giuseppe Larosa Sat, 02/21/2009 - 22:31

Hello Petru,

for HDLC and PPP that are point-to-point there is no need to resolve the IP address it is just enough to prepare the correct L2 header to encapsulate the frame and to send it out.

For Frame-Relay and ATM that can be multipoint the question exists.

Roughly we can distinguish two scenarios:

a) usage of PVCs only

b) usage of SVCs (dynamic pvc set up on demand).

In the first case the question becomes:

out what PVC should the PDU be sent out knowing the ip next hop ?

This question can be answered dynamically by Inverse ARP:

on every end-to-end healthy PVC the DTE (router FR/ATM interface) sends out a frame that travels in-band (using the same DLCI or VPI/VCI) periodically telling here is a DTE with L3 address.

This is supported for IPv4 and IPX for sure.

Another solution is a static mapping:

instead of using inverse-ARP specific commands can be added to provide the next hop ip address to PVC mapping.

static mapping is performed also to provide a way to map broadcast and multicast traffic to a pvc:

frame-relay map ip 102 broadcast

where 102 is the local DLCI is the next hop ip address

this can be necessary on FR main interface or point to multipoint subinterfaces.

A similar command exists for ATM

pvc 8/35

protocol ip

again 8/35 is the VPI/VCI locally to the router and is the remote ip address.

DLCI and VPI/VCI can change at every switch hop so they are not global MAC addresses but sort of labels used to build pre-established paths (the PVCs)

When using SVCs the question changes:

here the Virtual circuit has to be built on demand

the question becomes for ATM (FR SVC are almost unused) :

what ATM NSAP address (sort of E.164 similar to CLNS ) I need to use to reach next hop ip address ?

Once this question is answered an SVC is setup if there are enough resources by using CAC and ATM routing capabilities (based on PNNI or forms of static routes).

These ATM NSAP addresses are actually global like LAN MAC addresses.

Some type of server is responsible to answer DTE questions an example is the NHRP protocol that has been thought for this.

You can have an NSAP server that by keeping an SVC with each endpoint can answer to resolution questions.

So in short:

1) HDLC and PPP no L2 address is needed (point-to-point)

2) ATM and FR on PVCs:

mapping is made to a locally significant virtual circuit identifier either dynamically or statically

3) ATM on SVCs (and FR on SVCs)

here is a multi step process is involved and first the IP next hop is resolved by consulting some type of server then a dynamic path is created

User traffic is sent out using locally significant virtual circuit identifiers also in this last case.

Hope to help


badalam_nt Sun, 02/22/2009 - 06:52

Thanks Giuseppe, you always give me the details I expect.

Some additional questions:

1) HDLC can be used only on point-to-point links?

Both HDLC and PPP have in their frame structure a field called Address, but here's what I found mentioned about this field on')">

"Address: In HDLC this is the address of the destination of the frame. But in PPP we are dealing with a direct link between two devices, so this field has no real meaning. It is thus always set to “11111111” (0xFF or 255 decimal), which is equivalent to a broadcast (it means “all stations”)."

Does it mean that for HDLC it is needed to learn somehow this destination L2 address? Or the link I'm referring to is wrong?

2) What is the best practice: to use Inverse-ARP or static mapping IP to DLCI ?

And what are the pros and cons of each ?

3) Frame Relay can be used on point to point ? If yes, is it needed then to resolve the L2 destination address or not?

4) For HDLC and PPP what is the best practice when defining static routes: to use next hop IP address or outgoing interface name? And what are the pros and cons of each?

Richard Burts Sun, 02/22/2009 - 12:38


1) yes HDLC can be used only in point to point links. The protocols it derived from supported multiple stations on the link and had the address field to identify the unique destination station. HDLC kept the address field, but is used only in point to point links.

2) I would respond that the best practice is to use point to point links in which the mapping is established and you do not need to worry about either inverse ARP or static mappings.

3) Frame Relay does work on point to point links. Frame Relay always needs to resolve the next hop IP address with the L2 destination address, even with point to point links. But with point to point Frame Relay the mapping is created automatically.

4) With HDLC or with PPP there is not the disadvantage when you point just to the outbound interface that there is with Ethernet. When you configure a static route and just specify the outbound interface, if it is an Ethernet interface then the router must ARP for each destination address since it must learn the appropriate L2 address for each destination. But with HDLC or PPP that is not a factor. For consistency I would suggest configuring static routes with next hop address, even over HDLC or PPP.



badalam_nt Sun, 02/22/2009 - 13:00

Rick, what does it mean that the "mapping is established" and so that I don't need neither Inverse ARP nor static mapping of IP@ to DLCI? And is this statement valid as well for point to multipoint links?

As regards to the way of defining static routes on serial links, some books recommend to use the outgoing interface name instead of next hop IP@ in order to reduce the lookup time and so reduce the CPU load. You mean that this advantage is negligible ?

Giuseppe Larosa Sun, 02/22/2009 - 12:58

Hello Petru,

just some additional notes on details the core value is already in Rick's answer


that field is named address but actually is a fixed field with a pre-established value also for HDLC not only for PPP.

So there is no need to resolve the ip address and also this means that HDLC is only usable on point-to-point.

You can consider this address a placeholder.

There are HDLC derivated protocols that may be multipoint capable : SDLC on IBM networking. We have some legacy devices in our customer network that use SDLC but is a different protocol not HDLC.


a point to point FR or ATM subinterface can use and support only one PVC: once we say what PVC is associated to the interface (manually or via some form of LMI ILMI communication with the wan switch) there is no resolution problem anymore

Hope to help


Richard Burts Sun, 02/22/2009 - 13:15


My thanks to Giuseppe for the details supplementing my answer.

When you configure a subinterface as point to point for Frame Relay then IOS automatically knows what DLCI to use for that subnet/destination address and no additional mapping is needed. This is not the case for point to multipoint. For multipoint there is still some mapping that is required.

Some books may advocate specifying the outbound interface and not the next hop address when configuring static routes. I would not argue with them. But I suspect that many of them were written before CEF became common. With the information contained in the CEF table I do not believe that the lookup for the outbound interface is any more efficient than the lookup for the next hop address.

note that the one time when it is certainly better to specify the outbound interface is if you are running a point to point serial interface with ip unnumbered. In this case specifying the interface is certainly better than specifying the next hop address.



badalam_nt Sun, 02/22/2009 - 13:20

Thanks Rick and Giuseppe.

My last question is regarding the point to multipoint links: which are the pros and cons of using Inverse ARP versus static mapping?

Richard Burts Sun, 02/22/2009 - 13:38


For multipoint links the advantage of inverse ARP is that it is automatic and requires no manual effort in the configuration. The disadvantage of inverse ARP is that it sometimes can not resolve all of the addresses. In particular if you have multipoint Frame Relay in a hub and spoke design then inverse ARP on the spoke router can resolve the address of any other spoke router.

For multipoint links the advantage of static mapping is that it can be complete and can resolve addresses of every router in the multipoint environment. The disadvantage of static mapping is that it is manual, requires effort on your part, and as with any manual effort is subject to errors in configuration.




This Discussion