It looks like macvlan doesn't work on wifi, see https://unix.stackexchange.com/a/555676 for details. It's possible to make it work on both wifi and Ethernet by using type ipvlan mode l2 instead of type macvlan.
Here is my full setup, which creates 3 IP addresses, each in their own network namespace:
sudo ip link del hostnet ||: sudo ip link add hostnet link wlp2s0 type ipvlan mode l2 sudo ip addr add 192.168.0.90/32 brd + dev hostnet sudo ip link set hostnet up # `ip route add' below needs it. for I in 91 92 93; do sudo ip netns del net"$I" && sleep .5 ||: sudo ip netns add net"$I" sudo ip netns exec net$I ip link set lo up sudo ip link add link wlp2s0 name net"$I"in type ipvlan mode l2 sudo ip link set net"$I"in netns net"$I" sudo ip netns exec net"$I" ip addr add 192.168.0."$I"/24 brd + dev net"$I"in sudo ip netns exec net"$I" ip link set net"$I"in up sudo ip netns exec net"$I" ip route add default via 192.168.0.1 sudo ip route add 192.168.0."$I"/32 dev hostnet done This makes e.g. ping 192.168.0.91 etc., ping 192.168.0.92, ping 192.168.0.93, ping 192.168.0.130 and ping 192.168.0.12 work in all 35 participants: host root network namespace (IP address 192.168.0.130), each 3: host net"$I" network namespace (IP address 192.168.0.91 etc.), other hosts on the local network (IP address e.g. 192.168.0.12).
This also makes TCP connections and UDP packets work in any direction between any of the 35 participants.
This also makes UDP broadcasts work between any of the 35 participants. This is set up by the brd + clauses above. It looks like the clause is not needed though, because broadcast is enabled by default.
TCP connections have the correct IP address, except that for TCP connections from the host root network namespace to the host net"$I" network namespace show incoming IP address 192.168.0.90 instead of 192 192.168.0.130.
The host net"$I" network namespace can connect to the host root network namespace using either IP address 192.168.0.90 or 192.168.0.130.