AAtsushi's Blog
Infrastructure

Sending UDP Packets with the nc Command

→ 日本語版を読む

To send UDP packets with the nc command, use the -u option.

Not knowing this, I kept sending with TCP and was wondering why the packets weren't arriving.

That said, even if you try to check reachability to a destination IP address with something like nc -vuz [destination IP address] [port number], since it's a UDP packet, you need to verify using packet capture or by listening with nc -lu [port number].

TCP is nice because you get an ACK back.

devlights.hatenablog.com