I am currently working on a UDP connection between an FPGA and an Ubuntu 20 host pc (firewall turned off, different NICs tested). For sending UDP packets, a custom Ethernet program is implemented on the FPGA. On the receiver side, there is a simple UDP-server receiving these packets.
The problem is, that I can not receive any packets. The simple UDP-server was tested, and it works when I am sending messages from another pc to it. To troubleshoot the FPGA, Wireshark is used to monitor the traffic. In Wireshark, every packet with its data can be seen, which means that the layers 1-4 are not responsible (wireshark record). Even the terminal command "ip -s link" showed that no packets are dropped (terminal output).
How can I find out where the packet is dropped?
Difference between working and "FPGA" UDP-packet: difference
CodePudding user response:
- 239.255.255.250 is not a valid source address, because it's a multicast address. Multicast addresses have the first part in the range 224 to 239 (and 240-255 is reserved for future expansion). Multicast source address makes no sense and the kernel is probably discarding the packets for this reason.
- It's also on a different subnet than the receiver. I don't think this makes a difference, but maybe it does for 169.254 subnet in particular (the one you get by default if there's no router). Try a source address starting with 169.254.
- It's also too short. The minimum size of a valid Ethernet packet is 64 bytes including the Ethernet CRC. You don't have to use all the bytes for UDP data - the UDP length can be shorter than the packet, and the extra bytes are unused.
- Do verify the IPv4 header checksum. I'm not sure why Wireshark isn't verifying it for you. It must be correct or the kernel will drop the packet.