Date: Mon, 29 Apr 2024 21:03:06 +0200 From: Dirk-Willem van Gulik <dirkx@webweaving.org> To: "Rodney W. Grimes" <freebsd-rwg@gndrsh.dnsmgr.net> Cc: FreeBSD Hackers <freebsd-hackers@FreeBSD.org> Subject: Re: Multicast & Tunnel devices Message-ID: <8398E49B-629D-4199-BBF8-434E62AA36DB@webweaving.org> In-Reply-To: <202404291752.43THqS5l074359@gndrsh.dnsmgr.net> References: <202404291752.43THqS5l074359@gndrsh.dnsmgr.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 29 Apr 2024, at 19:52, Rodney W. Grimes = <freebsd-rwg@gndrsh.dnsmgr.net> wrote: >>> On 29 Apr 2024, at 03:09, Rodney W. Grimes = <freebsd-rwg@gndrsh.dnsmgr.net> wrote: >>>=20 >>>> Would anyone know if there is something special with tunnel devices = and multicast ?=20 >>>>=20 >>>> I?ve got some code that happily processes multicast packets on a = normal interface; but appears not to do this on a tunnel interface. Tun0 = shows multicast enabled: >>>> =09 >>>> tun0: flags=3D8043<UP,BROADCAST,RUNNING,MULTICAST> metric 0 mtu = 1500 >>>>=20 >>>> Tcpdump on that interface gives the expected thing (here with = mDNS): >>>>=20 >>>> tcpdump -n -i tun0 port 5353 >>>> listening on tun0, link-type NULL (BSD loopback), capture size = 262144 bytes >>>> 19:26:03.976259 IP 10.31.0.6.5353 > 224.0.0.251.5353: 0 PTR = (QM)? _raop._tcp.local. (34) >>>>=20 >>>> And code, with a simple IP_ADD_MEMBERSHIP of the MC group on the = IP of the local interface below works on a normal interface (e.g. = igb0/10.0.0.1/24).=20 >>>>=20 >>>> ./listener 10.0.0.1 224.0.0.251 5353 >>>=20 >>> Is 10.0.0.1 the IP address of tun0, or is it the address of some = other interface? >>> I suspect that the IP address of the tun0 interface is 10.31.0.6 = from your tcpdump above. >>=20 >> That is correct 10.0.0.1/8. 10.31.0.6 is another machine at the other = end of the tunnel broadcasting. Thanks for your reply - it did make play with the several /30=E2=80=99s = aliases I was running in parallel on tun0. And found by accident that if I remove them - things spring to life. = Which is actually possible - as I can split the tun0 up into 8 separate = /24=E2=80=99s tunnels; one for each connection pair. With that - = IP_ADD_MEMBERSHIP does exactly what it says on the tin. Dw
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?8398E49B-629D-4199-BBF8-434E62AA36DB>