Electrical – Packet loss on LAN point-to-point

adapterethernet

I would like to ask if packet loss in p2p LAN is a normal behavior in LAN.

And now in more details:

I am connecting PC to target board with TI's chip and LAN9221 controller.
I am doing a ping-pong test, with udp protocol:

  1. PC is sending the first packet.

  2. target wait for packet, and on receive, it send the same packet back to PC.

  3. PC wait, and on receiving send a new packet (increment data in the UDP packet), and so on….

Running the ping-pong test, I see that once in a while the target did not receive the packet correctly. It is easy to notice the failure because the ping-pong test stops whenever one of the side did not receive a packet.
When the failure happens, I see that the first bytes the target detected is actually the the 5th byte that the PC send (I see in WIRESHARK).

I also observed that these failures always happens when a another packet is sent about the same time from PC as the packet from the test , as if a collision happened.

If I add firewall rules, which take care that only the ping-pong packets shall be delivered in the LAN, then there is no failure at all.

So, the question is if the collision failures is a normal behavior in LAN ?

EDIT: seems the problem was related to (sw) driver error, not to collision, thank you for the solutions, which emphasized that in p2p there are no collisions.

Thank you!

Best Answer

No. There is no collision or packet loss in p2p Ethernet network. We have not had collisions/packet loss since the introduction of Ethernet switches. If you are connected point to point Tx/RX with no switch in-between ...there simply cannot be packet loss on the wire (it's typically a software problem).

If you are connected through a switch, then you have a store and forward system, again with no potential for collisions or packet loss. If the store RAM gets close to filling then the switch sends a signal to the sender to stop sending.

If you are connected to a larger network there can be packet loss, but this is a decision making process in the network routers to drop packets (typically due to route congestion). Your software needs to react appropriately to this and handle it (usually with timeouts).

If you are dealing with partial packets (runts), this is typically a software problem in your stack. If you are doing ping-pong, then you should simply never see an Rx failure. You may have a poor hardware implementation (perhaps unmatched magnetics or noise).

Related Topic