Eu criei um switch VDE simples conforme: link
Para parafrasear essa pergunta, a configuração é:
sudo vde_switch -tap tap0 -tap tap1
sudo ifconfig tap0 10.0.0.1 netmask 255.255.0.0
sudo ifconfig tap1 10.0.0.2 netmask 255.255.0.0
A difusão é reconhecida nas interfaces:
$ sudo ifconfig
tap0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.1 netmask 255.255.0.0 broadcast 10.0.255.255
inet6 fe80::3402:41ff:fecc:97ad prefixlen 64 scopeid 0x20<link>
ether 36:02:41:cc:97:ad txqueuelen 500 (Ethernet)
RX packets 6 bytes 468 (468.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2086 bytes 173190 (169.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
tap1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.0.0.2 netmask 255.255.0.0 broadcast 10.0.255.255
inet6 fe80::bced:b3ff:fec0:13a8 prefixlen 64 scopeid 0x20<link>
ether be:ed:b3:c0:13:a8 txqueuelen 500 (Ethernet)
RX packets 2086 bytes 173190 (169.1 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 6 bytes 468 (468.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
No entanto, parece que não consigo transmitir através desta rede. por exemplo,
$ sudo ping -b 10.0.255.255
WARNING: pinging broadcast address
PING 10.0.255.255 (10.0.255.255) from 10.16.0.1 tap0: 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_req=1 ttl=64 time=0.066 ms
64 bytes from 10.0.0.1: icmp_req=2 ttl=64 time=0.059 ms
64 bytes from 10.0.0.1: icmp_req=3 ttl=64 time=0.084 ms
Eu esperava ver respostas de ambos 10.0.0.1 e 10.0.0.2.
A transmissão de ping está ativada:
$ cat /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
0
O que eu poderia ter feito de errado? O VDE / TUN permite a transmissão?