Why does ethernet delays sending the first packet after plugging the cable?

Viewed 57

When I plug my ethernet cable to my pc, observing first packet on wireshark takes approximately 4-5 seconds. Why is that? Is the PHY chip taking long time to wake up?

I am asking this because I am working on a project where I am using STM32F429ZI nucleo board to implement TCP/IP.

I am currently able to send ARP requests. However, before sending anything I have to wait also 4-5 seconds otherwise I cannot observe the ARP request on wireshark.

Is this normal behavior for PHY chips?

I also tried different computer, It takes the same amount of time to send its first packet.

1 Answers

Normally a PHY can transmit and receive as soon as the link status goes "up". Hardware wakeup, autonegotiation, lane-level linking etc. are all before the "link up".

However, if your switch runs a spanning-tree protocol and the port hasn't specifically configured as portfast or admin-edge-port (depending on vendor/model), the STP port status blocks all traffic a few seconds after "link up", waiting for a BPDU. For an end-node port you should always set that option.

Related