mDNS/Avahi

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking
Author Message
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10805
Location: Netherlands

PostPosted: Tue Apr 12, 2022 12:53    Post subject: mDNS/Avahi Reply with quote
mDNS/Avahi

Available starting with build 48646 but only on routers with sufficient flash.

Disclaimer, I am far from an mDNS expert so your help is needed to improve on our mDNS implementation and documentation.
So please send in your corrections, improvements and additions via PM (personal mail) or open a thread in the Advanced Networking forum.

Multicast DNS(mDNS) is the DNS equivalent for a local network and uses multicast instead of the unicast DNS.

If you wish to query an IP whose hostname you are aware of, then you send a multicast message to all the devices in the network asking if any of them identify with the hostname. One of the devices will match the hostname that you are querying. It will then respond with its IP address (again via multicast, to all devices on the network).
All the devices on the network can then update their local phonebook (mDNS cache), mapping the hostname with the local IP.

But there is more the mDNS/Avahi can also be used to advertises services via mDNS in conjunction with DNS-based Service Discovery (DNS-SD).

Most of the devices also provide some services to other devices on the same network. For example, a SAMBA server may provide messaging services over TCP on port 445. Instead of searching by the hostname, if you search by the service name (by sending a DNS-SD request over mDNS), you can get the hostnames providing these services, and then mDNS can resolve these hostnames to the corresponding IP addresses.

Thus, using mDNS in conjunction with DNS-SD, if you search for, say, a service named ‘._smb._tcp’, you will get a list of all devices on the local network that provide this service, their hostnames, their IP addresses, and the port on which they provide this service (you can also search for a specific port).
Now you can connect to the device of your interest, using the protocol specified in the service, over the specified port and perform the necessary action.

Although this sounds complicated most of these things are done behind the scene and actually with one mouse click (enable mDNS) in the GUI your SAMBA shares (if you enabled SAMBA) are advertised and picked up and shown by your Linux box or Mac.

The second use of mDNS/Avahi is reflecting/relaying mDNS messages between subnets, services relying on discovery via mDNS e.g. a Google Chromecast can now be found from different subnets

For examples and instructions see the attached document.

NOTE: The following document is only visible when you are logged in!

Changelog
Build 48646
mDNS/Avahi added

_________________
Routers:Netgear R7800, R7000, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087


Last edited by egc on Sat Nov 19, 2022 18:32; edited 14 times in total
Sponsor
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10805
Location: Netherlands

PostPosted: Tue Apr 12, 2022 12:54    Post subject: Reply with quote
future use
_________________
Routers:Netgear R7800, R7000, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10805
Location: Netherlands

PostPosted: Tue Apr 12, 2022 12:55    Post subject: Reply with quote
future use
_________________
Routers:Netgear R7800, R7000, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000, E1200v1, WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
Display posts from previous:    Page 1 of 1
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum