Regular Member
Posts: 745
Registered: ‎11-06-2013
Kudos: 230
Solutions: 26

Re: mDNS/bonjour forwarding


@psydafke wrote:

Hmmmm, getting often hostname is already in use prompt when mDNS is enabled and macs are waking from sleep... seems it needs some tweaking.. Didn't really find anything usefull on avahi.org (most of the time even getting internal server errors while trying to search that site).

Anybody else seeing these issues with avahi?


May or may not be related, but I have noticed that if I reboot/reset my AppleTV (it is on WiFi) the remote app on my iPhone shows Living Room (2). It goes away by the next day.

Member
Posts: 120
Registered: ‎02-05-2014
Kudos: 44
Solutions: 2

Re: mDNS/bonjour forwarding

Yeah I've gotten that on some of the Macs here. It seems to stop if you disable file sharing and Wake for network access.

New Member
Posts: 1
Registered: ‎05-18-2014
Kudos: 1

Re: mDNS/bonjour forwarding

[ Edited ]

I have the same Avahi config running on a Raspberry Pi, and I also get numbers after my AppleTVs when I reboot them. They don't go away but keep accumulating with every reboot. Never have been able to figure it out. There would have to be an option to not reflect out the same interface that the AppleTVs are connected to.

Emerging Member
Posts: 64
Registered: ‎06-18-2013
Kudos: 10

Re: mDNS/bonjour forwarding


@kazibole wrote:

I have the same Avahi config running on a Raspberry Pi, and I also get numbers after my AppleTVs when I reboot them. They don't go away but keep accumulating with every reboot. Never have been able to figure it out. There would have to be an option to not reflect out the same interface that the AppleTVs are connected to.


Any updates on this? I am having the same issue. Did you find anything else to fix it?

New Member
Posts: 2
Registered: ‎05-04-2014

Re: mDNS/bonjour forwarding

It's possilbe this is a related issue, if not, open to better locations for posting.

I have a Brother HL-5470DW printer that has native AirPrint support. Before my EdgeMax router & Ubiquity AP, I ran DD-WRT and had no trouble finding and printing to the printer from my iOS devices. After the upgrade to Ubnt, my iOS equipment is challenged to find the printer (though it can sometimes) and AirPlay to my AppleTV from iPad's has become unstable. After turning on the mDNS redirector I haven't noticed much change.

Has anyone else wrestled with this?

New Member
Posts: 12
Registered: ‎04-24-2014
Kudos: 28

Re: mDNS/bonjour forwarding

[ Edited ]

jrydb, your problem sounds unrelated if the reflector wasn't aready running, I'd start a new thread.

Back to mbwmbw et al.'s problem, I'd also be interested in a solution to the incrementing hostnames. The problem seems to be that the device sees its old hostname already on the network every time it bothers to check, and increments it to make it unique. That suggests that the reflector is actually reflecting back out the same interface in addition to forwarding to other interfaces, which is what we actually want. I couldn't find any configuration options that would seem to fix that.

Regular Member
Posts: 745
Registered: ‎11-06-2013
Kudos: 230
Solutions: 26

Re: mDNS/bonjour forwarding

I don't have any problems with AirPlay. I have this basic setup.

eth0 & eth0.1003 -> AirPort Express (bridge mode) -> Multiple devices

eth1 -> Generic Switch -> Multiple devices

I can put the AppleTV on either connection, pull the appropriate IP, and AirPlay to it.

Regular Member
Posts: 536
Registered: ‎11-12-2013
Kudos: 78
Solutions: 3

Re: mDNS/bonjour forwarding

[ Edited ]

im not sure if this is possible. but i will explain what i would like to do.

when i am at home with my pc and iphone connected to network. if i go to

Music ---> More ---> Shared ---> my itunes pops up. it shows my library.

then if i click on it it loads for a few seconds, and switches to playing music from my itunes through my iphone.

at home, this isnt useful.

but when i'm out an about, mainly in the car. it would be nice to have access to my entire home library over 3G/LTE.

my idea was to setup a PPTP VPN. and then use my iphone as the client so it appeared i was on my home network.

this would essentially allow me to access anything in my itunes anywhere without having the file on my iphone. (my library is to big to even consider fitting)

the VPN idea. while it sounded good, didnt work.

is there any way to get this working?

T1200 - ERX - UAP - R7000 - WEB6000Q
New Member
Posts: 35
Registered: ‎06-11-2014
Kudos: 32

Re: mDNS/bonjour forwarding

[ Edited ]

I've been dealing with the same issue on my network.  I have separate LAN and WLAN subents and use Avahi to repeate mDNS across them.  For whatever reason, Avahi seems to continue to broadcast services even after the devices have gone offline, which causes name conflicts when they come back up.

 

Looking for alternatives, I compiled mdns-repeater (https://bitbucket.org/geekman/mdns-repeater) and took it for a spin.  So far, I haven't had any of the issues I was seeing with Avahi.

 

Here's a quick walkthough:

  1. Add the debian repositories to your system.  See https://community.ubnt.com/t5/EdgeMAX-CLI-Basics-Knowledge/EdgeMAX-Add-other-Debian-packages-to-Edge....
  2. Install a compiler and mercurial: 
    sudo apt-get install build-essential mercurial
  3. Clone mdns-repeater from its repository and compile:
    hg clone https://bitbucket.org/geekman/mdns-repeater
    cd mdns-repeater
    make
  4. Give it a try.  Just call the program with the interfaces you want it to use (in my case, that's eth1 and switch0).  Be sure to run as root!
    sudo ./mdns-repeater eth1 switch0
    # by default, it will daemonize; run it with -f to stay in foreground.

     

If it solves this issue for everybody, it may be worth considering using instead of Avahi in a future release.  Avahi is rather heavyweight anyway when we just need the reflector/repeater functionality.

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5474
Solutions: 1656
Contributions: 2

Re: mDNS/bonjour forwarding

Great work! Yeah the mdns-repeater has been mentioned before and we should look into it. Would be great if more people can give it a try too of course. Thanks for your contributions!

New Member
Posts: 35
Registered: ‎06-11-2014
Kudos: 32

Re: mDNS/bonjour forwarding

While I'm at it, here's a tarball with a binary and integration into Edgemax's configuration system.  (Figuring out how to make a debian package exceeded my tolerance for learning distro-specific jargon!)

 

Download and extract, run install.sh as root on your router.  After that, simply specify some interfaces in the configuration:

configure
set service mdns repeater interface eth1
set service mdns repeater interface switch0
commit
save

 

Run a `ps -e | grep mdns-repeater` and you should see it running.

Attachment
Member
Posts: 182
Registered: ‎05-23-2013
Kudos: 45
Solutions: 11

Re: mDNS/bonjour forwarding

I have installed it, let see how it goes.

 

Nabil

Member
Posts: 182
Registered: ‎05-23-2013
Kudos: 45
Solutions: 11

Re: mDNS/bonjour forwarding

Not sure what I am doing worng but thinks are not working for me, nothing in logs. my config change as following

 

set service mdns repeater interface switch0
set service mdns repeater interface switch0.123

 

Thanks

Nabil

Member
Posts: 182
Registered: ‎05-23-2013
Kudos: 45
Solutions: 11

Re: mDNS/bonjour forwarding

Ok all is good, I had broadcast block between both vlans, disabling that worked.

 

Thanks

Nabil

Member
Posts: 182
Registered: ‎05-23-2013
Kudos: 45
Solutions: 11

Re: mDNS/bonjour forwarding

Ok after testing with 2 vlan, It is work fine and I installed it on 1.6Alpha2. 

 

Thanks

Nabil

Emerging Member
Posts: 43
Registered: ‎09-21-2014
Kudos: 5
Solutions: 1

Re: mDNS/bonjour forwarding

After downloading the above tarball and running install.sh I am getting the following error when attempting to commit:

 

commit
[ service mdns repeater ]
sudo: /opt/vyatta/sbin/ubnt-mdns-repeater.pl: command not found

 

Any suggestions?  

I've looked to make sure the /ubnt-mdns-repeater.pl exists at the above path.

Not versed enough with OS to troubleshoot.

 

Thanks for any help.

 

New Member
Posts: 35
Registered: ‎06-11-2014
Kudos: 32

Re: mDNS/bonjour forwarding

[ Edited ]

That's odd.

 

Can you try running the "ubnt-mdns-repeater.pl" script manually?  Just type /opt/vyatta/sbin/ubnt-mdns-repeater.pl into your shell and hit enter.  It should return with no output if it's installed correctly.

 

Also, what version are you running?  I haven't tested on the 1.6.0beta line.

Emerging Member
Posts: 43
Registered: ‎09-21-2014
Kudos: 5
Solutions: 1

Re: mDNS/bonjour forwarding

[ Edited ]

sudo /opt/vyatta/sbin/ubnt-mdns-repeater.pl
sudo: /opt/vyatta/sbin/ubnt-mdns-repeater.pl: command not found

 

When I installed this is how I installed.  

I untarr'd on my windows machine\copied over the mdns-repeater folder and contents using sftp

to /var/tmp/mdns-repeater$  and then executed install:  $sudo sh install.sh

 

Thanks for quick reply!

 

Running latest released version 1.5.

New Member
Posts: 35
Registered: ‎06-11-2014
Kudos: 32

Re: mDNS/bonjour forwarding

Well, it looks like install.sh put most of the other files in the right place since it is recognizing the custom configuration nodes.  Perhaps you can copy the missing files by hand.

 

Also type "/opt/vyatta/sbin/mdns-repeater" (wihtout the quotes) and see if it gives a command not found.  Make sure those files exist within the directory you uploaded as well. ubnt-mdns-repeater.pl should be in the scripts subdirectory, and the mdns-repeater executable should be in the binaries directory.

 

cd into the uploaded directory and run these commands to copy the missing files into place:

sudo cp scripts/ubnt-mdns-repeater.pl /opt/vyatta/sbin/
sudo cp binaries/mdns-repeater /opt/vyatta/sbin/

 

Emerging Member
Posts: 43
Registered: ‎09-21-2014
Kudos: 5
Solutions: 1

Re: mDNS/bonjour forwarding

Ok : 

sudo /opt/vyatta/sbin/mdns-repeater
sudo: /opt/vyatta/sbin/mdns-repeater: command not found

 

sudo cp scripts/ubnt-mdns-repeater.pl /opt/vyatta/sbin/

sudo cp binaries/mdns-repeater /opt/vyatta/sbin/

 

I tried the configure again:

configure

set service mdns repeater interface eth0

set service mdns repeater interface eth2

 

commit
[ service mdns repeater ]
sudo: /opt/vyatta/sbin/ubnt-mdns-repeater.pl: command not found

 

Not sure what to think.  Seems like everything is where it's suppose to be.  Possible issue with the .pl script?  Im not familiar enough to say.