I'm trying to understand UDP broadcasting, and running into some trouble.
1 - Running a server like this
nc.traditional -l -u 10.0.0.253 -p 65001
2 - Sending stuff from the client like this - on the same machine - works:
nc.traditional -u 10.0.0.253 65001
I can type stuff into the client nc
and it shows up in the server nc
.
3 - But in broadcast mode like this, when I type stuff into the client the server receives nothing:
nc.traditional -u -b 10.0.0.255 65001
I'm running Ubuntu 22.04. The address 10.0.0.253
comes from ip a
output which is like this:
3: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 8c:1d:96:d8:df:97 brd ff:ff:ff:ff:ff:ff
altname wlp0s20f3
inet 10.0.0.253/24 brd 10.0.0.255 scope global dynamic noprefixroute wlo1
valid_lft 161367sec preferred_lft 161367sec
inet6 2601:647:6400:32f0::2056/128 scope global dynamic noprefixroute
valid_lft 593370sec preferred_lft 593370sec
inet6 fe80::c1c7:fce6:ecca:b966/64 scope link noprefixroute
valid_lft forever preferred_lft forever
Any idea about what I'm doing wrong?