NeuroAgent

Why is the second packet lost during ping? Complete guide

Learn the causes of second packet loss when executing the ping command in a local network. Diagnostics, equipment checking, and effective solutions for stable communication between the cash register and the Honest Sign module.

Question

Why is the second packet lost when executing the ping command?

I’ve encountered an issue with packet loss when communicating with another computer on the local network. Specifically, when executing the ping command, the second packet is lost. If I immediately repeat the ping command, everything works normally. However, after some time, when running ping again, the second packet is lost again.

Details of my network configuration:

  • Cash register: 192.168.0.221
  • Computer with local Honest Sign module: 192.168.0.9

During operation, the cash register communicates with the local module when scanning marked products. I suspect that the periodic connection loss between the cash register and the computer may be related to the loss of the second packet during ping.

What are the possible causes of this phenomenon and what should be checked to resolve the issue?

NeuroAgent

Loss of the second packet when executing a ping command in a local network often indicates a specific network problem related to temporary network status or equipment. This phenomenon can be caused by several factors, including switch buffer overflow, network adapter driver issues, or temporary network conflicts. When ping is immediately repeated, it works normally, indicating an unstable state that quickly recovers.

Contents

Main causes of second packet loss

Loss of specifically the second packet during ping indicates a specific network situation. According to research, the main causes of this phenomenon include:

Switch buffer overflow
As noted in forum discussions, switches may drop ICMP packets if the port buffer is full or the processor is fully loaded [source]. When sending a series of ping requests, the second packet may coincide with peak load and be discarded.

Temporary network conflicts
In local networks with high activity, temporary conflicts may arise, especially when working with tagged equipment, as in your case with the cash register and the Honest Sign module [source]. The network may be overloaded during mass scanning periods.

Network adapter driver issues
Incorrect driver operation can lead to periodic packet loss, especially during intensive data transfer [source]. This manifests as loss of specific packets in the sequence.

MTU issues
Mismatched MTU (Maximum Transmission Unit) between devices can cause packet loss of specific sizes [source]. With the standard packet size of 1472 bytes (accounting for headers), there may be fragmentation issues.


Problem diagnosis

For accurate diagnosis of second packet loss, the following methods are recommended:

Using extended ping
In Windows, you can use extended ping command parameters for more detailed testing:

cmd
ping -w 2 -l 1472 -n 100 -f 192.168.0.9

Parameters:

  • -w 2 - timeout of 2 milliseconds
  • -l 1472 - packet size of 1472 bytes (MTU 1500 - 28 bytes of headers)
  • -n 100 - send 100 packets
  • -f - do not fragment packets [source]

Monitoring with Pktmon
As recommended by Microsoft, the first step in investigating packet loss is to record packet monitor traces using Pktmon [source]:

cmd
pktmon start -c 1000
ping 192.168.0.9
pktmon stop
pktmon dump -c 100 > trace.etl

Checking network load
Use utilities to monitor network load:

cmd
netstat -an
tasklist | findstr "svchost"

Network equipment checking

Switches and routers
Check network equipment for overload:

  • Monitor switch port load
  • Check CPU load on network devices
  • Ensure port buffers are not overflowed [source]

Network cables
Physical cable problems can cause packet loss:

  • Check cable integrity
  • Eliminate bends and twists
  • Replace cables with known good ones [source]

Network configuration
Check basic network parameters:

  • IP addresses and subnet masks
  • Default gateways
  • DNS servers
  • No duplicate IP addresses

Network parameter configuration

TCP/IP parameter settings
Optimize network parameters for your configuration:

cmd
netsh int tcp set global autotuninglevel=normal
netsh int tcp set global chimney=enabled
netsh int tcp set global netdma=enabled

Disable network adapter power saving
In Device Manager, disable power saving for network adapters:

  • Network adapters → Properties → Power Management → Disable “Allow the computer to turn off this device to save power”

Buffer size settings
Increase network adapter buffer sizes:

cmd
netsh int ip set global userconnectionlimit=10000
netsh int tcp set global rwinautotuninglevel=normal

Problem solutions

Immediate solutions

  1. Reboot network devices (switch, router)
  2. Reboot both computers (cash register and computer with Honest Sign module)
  3. Check for network adapter driver updates

Long-term solutions

  1. Update network equipment firmware
  2. Configure QoS (Quality of Service) on the switch to prioritize Honest Sign traffic
  3. Increase switch buffer size if possible
  4. Segment the network to reduce load

Alternative communication methods
If the problem persists, consider alternative communication methods between the cash register and module:

  • Use direct connection (crossover cable)
  • Configure static routes
  • Change MTU size for both devices

Preventive measures

Regular monitoring
Set up regular network activity monitoring:

  • Use ping utilities at regular intervals
  • Set up packet loss notifications
  • Monitor network device CPU loads

Network optimization

  • Separate traffic by VLAN
  • Configure traffic prioritization
  • Regularly clear network device buffers

Redundancy

  • Configure redundant data transmission paths
  • Use multiple network interfaces for critical services

Sources

  1. Diagnosing packet loss - Windows Client | Microsoft Learn
  2. How to fix packet loss
  3. What could be the cause of packet loss? — Habr Q&A
  4. Troubleshooting network failures
  5. Checking connection between computers with ping command
  6. Ping command or checking network operability
  7. Ping - Windows command line network utility

Conclusion

Loss of the second packet during ping in a local network is a common but solvable problem. Key points for resolution:

  • Conduct diagnostics using extended ping commands and Pktmon
  • Check network equipment for overload
  • Optimize network parameters and drivers
  • Configure traffic prioritization for critical Honest Sign services

It’s important to understand that periodic packet loss may be normal for some network configurations, but for cash register systems, maximum connection reliability is required. It’s recommended to create redundant communication channels and regularly conduct monitoring to prevent operational failures.