1

I want to make my Raspberry PI model 3 as a router that is as follows -

Computer will be connected to RPI via Ethernet (eth0) interface
Phone will be connected to RPI over Wifi (wlan0) interface.

I was able to setup a interfaces with the help of the following links -

https://frillip.com/using-your-raspberry-pi-3-as-a-wifi-access-point-with-hostapd/

But I am not able to do the multicast routing from wlan0 to eth0 (or) vice versa Can you please help me with it. I need to route bonjour packets over the interfaces.

Note:

  1. both the interfaces wlan and eth are supporting MULTICAST ( verified with ifconfig command ) I was able to get UP BROADCAST RUNNING MULTICAST for both the interfaces.

  2. I have tried using the following commands for multicasting -

route add -net 224.0.0.0 netmask 240.0.0.0 dev eth0
route add -net 224.0.0.0 netmask 240.0.0.0 dev wlan0

Phani Teja
  • 35
  • 8

2 Answers2

0

You can use avahi-daemon to reflect mDNS queries between interfaces. Some basic configuration like this in avahi-daemon.conf should be enough:

[server]
use-ipv4=yes
use-ipv6=yes
enable-dbus=no
allow-interfaces=eth0,wlan0

[publish]
disable-publishing=yes

[reflector]
enable-reflector=yes
Erki Aring
  • 2,032
  • 13
  • 15
0

This is quite an old discussion but I tried the given answer and it broke LAN DNS, so don't do it. Instead, edit file:

nano /etc/avahi/avahi-daemon.conf

change this one line to ‘yes’:

enable-reflector=yes

restart the service:

service avahi-daemon restart

check to see if the ports are detected automatically:

systemctl status avahi-daemon.service

Takes a minute for new services to be discovered and appear. Works on Buster. The app Discovery (formerly Bonjour Browser) is helpful to verify mDNS ZEROCONF multicast packets are getting across. Also there's an iOS app.

Gnarlodious
  • 304
  • 2
  • 4
  • 16