You are on page 1of 6

How does the ARP works for Loopback...

Anupama 5 posts since Sep 10, 2013


How does the ARP works for Loopback Address? Feb 1, 2014 10:00 PM
Hi!

As I understand that there is no MAC address for Loopback interface, how does the ARP functions when i ping
a loopback interface?

Thanks,
Anupama.
Tags: arp, loopback

Martin 14,093 posts since Jan 16, 2009


Re: How does the ARP works for Loopback Address? Feb 1, 2014 11:08 PM
no MAC ?
Ethernet adapter MSLoop1:

Connection-specific DNS Suffix . :


Description . . . . . . . . . . . : Microsoft Loopback Adapter
Physical Address. . . . . . . . . : 02-00-4C-4F-4F-50
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::b468:e0aa:7f40:1822%1
Autoconfiguration IPv4 Address. . : 169.254.24.34(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 402784332
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-16-E5-A8-57-48-

DNS Servers . . . . . . . . . . . : fec0:0:0:ffff::1%1


fec0:0:0:ffff::2%1
fec0:0:0:ffff::3%1
NetBIOS over Tcpip. . . . . . . . : Enabled

Kevin Santillan 1,006 posts since Apr 22, 2013


Re: How does the ARP works for Loopback Address? Feb 1, 2014 11:43 PM

© 2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
1
How does the ARP works for Loopback...

Hello.

Loopbacks use the router's physical interface's MAC for L2 communication. Let's say we have the following
scenario where in we ping 1.1.1.1 from 2.2.2.2.

R1#sh int f0/0 | i bia


Hardware is Gt96k FE, address is c000.0e44.0000 (bia c000.0e44.0000)

R2#sh int f0/1 | i bia


Hardware is Gt96k FE, address is c001.0e44.0001 (bia c001.0e44.0001)

R2#ping 1.1.1.1 source 2.2.2.2

Type escape sequence to abort.


Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
Packet sent with a source address of 2.2.2.2
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/24/32 ms

See the following captures of the ping.

© 2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
2
How does the ARP works for Loopback...

Note that each router that receives a packet will look at the destination IP address. If the router doesn't have
the IP address it will refer to the routing table to see what the next hop is. Then, based on the next hop, the
router will look for the L2 mapping for the L3 address and will forward the packet.

Daniel Dib CCIE #37149 2,467 posts since Sep 7, 2011


Re: How does the ARP works for Loopback Address? Feb 2, 2014 12:09 AM
in response to Kevin Santillan
I wouldn't say that the loopback is using the MAC address of the Ethernet interface.

The general process to route a packet:

1) Look up route in FIB


2) FIB has next-hop and L2 adjacency information
3) In this case it was Ethernet so the frame has to be encapsulated, to do this SRC MAC is set to local
interface and DST MAC is set to MAC of other side
4) Packet is received, MAC is for local device so the packet must be punted
5) Packet is forwarded to loopback

If we use serial encapsulation such as HDLC or PPP then there will be no MAC encapsulation.

R2#sh adjacency detail


Protocol Interface Address
IP Serial1/0 point2point(7)
0 packets, 0 bytes
0F000800
CEF expires: 00:02:53
refresh: 00:00:53
Epoch: 0

R1#debug ip packet det


IP packet debugging is on (detailed)

© 2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
3
How does the ARP works for Loopback...

IP: tableid=0, s=10.0.0.2 (Serial1/0), d=1.1.1.1 (Loopback0), routed via RIB


IP: s=10.0.0.2 (Serial1/0), d=1.1.1.1, len 100, rcvd 4
ICMP type=8, code=0
IP: tableid=0, s=1.1.1.1 (local), d=10.0.0.2 (Serial1/0), routed via FIB
IP: s=1.1.1.1 (local), d=10.0.0.2 (Serial1/0), len 100, sending
ICMP type=0, code=0

Note that incoming packet is routed via RIB because it was punted. The reply going out is routed via FIB.

Kevin Santillan 1,006 posts since Apr 22, 2013


Re: How does the ARP works for Loopback Address? Feb 2, 2014 1:33 AM
in response to Daniel Dib CCIE #37149
Good point Daniel. I stand corrected. Technically, the loopback will not "use" the bia of the interface.The source
MAC and dest MAC is due to encapsulation which is just part of the process. Thanks.

Aref - CCNPx2 (R&S - Security) / Network+ / Security+ 5,055 posts since Nov 29, 2011
Re: How does the ARP works for Loopback Address? Feb 2, 2014 6:55 AM
HI Anupama,

I would agree with Daniel, the Loopback interface does not have any mac address associated to it, also for this
reason it can be always up even when the physical interfaces are shutdown, if the Loopback interface had any
association of L2 with any physical interface it would not be able to be up when the physical interface is down.

From this output you can see that the Loopback interface has no L2 information:

router#sh int loopback 10


Loopback10 is up, line protocol is up
Hardware is Loopback
Internet address is 10.10.10.10/32
MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation LOOPBACK, loopback not set
Last input 00:23:10, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 no buffer

© 2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
4
How does the ARP works for Loopback...

Received 0 broadcasts, 0 runts, 0 giants, 0 throttles


0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
0 packets output, 0 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 output buffer failures, 0 output buffers swapped out

Instead when you try to reach that Loopback interface address, the arp reply from the device will be sent by
the physical interface faced to the arp requester, with its mac address, then once the packet received on the
device, the device will route it internally to the Loopback interface.

requester# traceroute 10.10.10.10

Type escape sequence to abort.

Tracing the route to 10.10.10.10

1 192.168.1.4 0 msec * 0 msec

Arp debug output:

router#
IP ARP: rcvd req src 192.168.1.3 0026.0b59.7710, dst 192.168.1.4 Vlan1
IP ARP: sent rep src 192.168.1.4 0021.d8e6.46da, dst 192.168.1.3 0026.0b59.7710 Vlan1

router#sh int vlan 1


Vlan1 is up, line protocol is up
Hardware is EtherSVI, address is 0021.d8e6.46da (bia 0021.d8e6.46da)

I hope this would be helpful in addition to the other guys posts.


Regards,
Aref

Anupama 5 posts since Sep 10, 2013


Re: How does the ARP works for Loopback Address? Feb 2, 2014 8:25 AM
in response to Aref - CCNPx2 (R&S - Security) / Network+ / Security+
Thanks Aref, That adds lot of clarity..

Anupama 5 posts since Sep 10, 2013


Re: How does the ARP works for Loopback Address? Feb 2, 2014 8:33 AM

© 2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
5
How does the ARP works for Loopback...

in response to Daniel Dib CCIE #37149


Thanks Daniel.. for your detailed explanation.

Aref - CCNPx2 (R&S - Security) / Network+ / Security+ 5,055 posts since Nov 29, 2011
Re: How does the ARP works for Loopback Address? Feb 2, 2014 10:04 AM
in response to Anupama
You are welcome Anupama, glad I could be of help.

Regards,
Aref

© 2015 Cisco and/or its affiliates. All Rights Reserved. Generated on 2015-05-24-07:00
This document is Cisco Public Information.
6

You might also like