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

packet lost whenever 1st ping on newly configure interface

SJ K
Level 5
Level 5

Hi all,

 

I have 2 routers R1 and R2 connected via FE0/0.

R1 Fe0/0 = 192.168.3.1

R2 Fe0/0 = 192.168.3.2

 

Everytime once i configure the ip on either interface and ping the other the 1st time, there is always 1 packet lost.

Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 28/47/72 ms

 

Subsequent pings will be fine. Why ?

 

Regards,

Noob

2 Accepted Solutions

Accepted Solutions

devils_advocate
Level 7
Level 7

The first ICMP packet is dropped due to the switch not having an ARP cache entry for the corresponding destination IP address.

Effectively the switch looks at the destination IP address in the ICMP Packet, checks the ARP cache for the an entry and finds nothing, then sends out an ARP to obtain the destination MAC address, adds it to the cache for future reference. Because there is no ARP cache entry for the initial ICMP packet, it is dropped. By the time the second ICMP packet is seen, the ARP cache has an entry so it can find the corresponding MAC address.

I feel I have rambled a little so hopefully this makes sense!

View solution in original post

Hey,

The ARP is done after you issue the ping command. So the first packet will get dropped till the time it learns the MAC address. Once it learns the MAC address, the value is added in the ARP cache. So all the subsequent pings will succeed.

The ARP cache will have a timeout period, until that time the learnt MAC address will be retained in the ARP cache.

Once its flushed from the ARP cache due to timeout/or manual clearing, the next time you ping again you will see the first packet drop.

Below is an output of ARP cache from a windows PC:

 

C:\Users\User>arp -a

Interface: 10.212.46.82 --- 0xe
  Internet Address      Physical Address      Type
  10.212.46.1            00-1b-0c-17-dd-c4     dynamic
  10.212.46.93           a0-36-9f-4c-8b-ad     dynamic
  10.212.46.255          ff-ff-ff-ff-ff-ff     static
  224.0.0.22            01-00-5e-00-00-16     static
  224.0.0.252           01-00-5e-00-00-fc     static
  239.255.255.250       01-00-5e-7f-ff-fa     static
  255.255.255.255       ff-ff-ff-ff-ff-ff     static

Krishna

 

View solution in original post

5 Replies 5

jorlan.vandeven
Level 1
Level 1

It's normal behavior.

It has to do with ARP. It needs to put a MAC address into it's table. As you already mention it's just the 1st packet.

Hi Jorlan,

 

Isn't the ARP done before the 1st packet is send out ? Else what would be the content of the 1st packet ? (without destination mac address ) ?

 

Regards,
Noob

Hey,

The ARP is done after you issue the ping command. So the first packet will get dropped till the time it learns the MAC address. Once it learns the MAC address, the value is added in the ARP cache. So all the subsequent pings will succeed.

The ARP cache will have a timeout period, until that time the learnt MAC address will be retained in the ARP cache.

Once its flushed from the ARP cache due to timeout/or manual clearing, the next time you ping again you will see the first packet drop.

Below is an output of ARP cache from a windows PC:

 

C:\Users\User>arp -a

Interface: 10.212.46.82 --- 0xe
  Internet Address      Physical Address      Type
  10.212.46.1            00-1b-0c-17-dd-c4     dynamic
  10.212.46.93           a0-36-9f-4c-8b-ad     dynamic
  10.212.46.255          ff-ff-ff-ff-ff-ff     static
  224.0.0.22            01-00-5e-00-00-16     static
  224.0.0.252           01-00-5e-00-00-fc     static
  239.255.255.250       01-00-5e-7f-ff-fa     static
  255.255.255.255       ff-ff-ff-ff-ff-ff     static

Krishna

 

devils_advocate
Level 7
Level 7

The first ICMP packet is dropped due to the switch not having an ARP cache entry for the corresponding destination IP address.

Effectively the switch looks at the destination IP address in the ICMP Packet, checks the ARP cache for the an entry and finds nothing, then sends out an ARP to obtain the destination MAC address, adds it to the cache for future reference. Because there is no ARP cache entry for the initial ICMP packet, it is dropped. By the time the second ICMP packet is seen, the ARP cache has an entry so it can find the corresponding MAC address.

I feel I have rambled a little so hopefully this makes sense!

Dear ,

Once router up Arp table doesn't complete so check arp on router before and after ping 

R1#show arp

 

Review Cisco Networking for a $25 gift card