README.rst
1.. _mdns-responder-sample:
2
3mDNS Responder Application
4##########################
5
6Overview
7********
8
9This application will wait mDNS queries for a pre-defined hostname and
10respond to them. The default hostname is **zephyr** and it is set in the
11:file:`prj.conf` file.
12
13Requirements
14************
15
16- :ref:`networking_with_host`
17
18- avahi or similar mDNS capable application that is able to query mDNS
19 information.
20
21Building and Running
22********************
23
24Build and run the mdns-responder sample application like this:
25
26.. zephyr-app-commands::
27 :zephyr-app: samples/net/mdns_responder
28 :board: <board to use>
29 :conf: <config file to use>
30 :goals: build
31 :compact:
32
33After the mdns-responder sample application is started, it will await queries
34from the network.
35
36Open a terminal window in your host and type:
37
38.. code-block:: console
39
40 $ avahi-resolve -4 -n zephyr.local
41
42If the query is successful, then following information is printed:
43
44.. code-block:: console
45
46 zephyr.local 192.0.2.1
47
48For a IPv6 query, type this:
49
50.. code-block:: console
51
52 $ avahi-resolve -6 -n zephyr.local
53
54If the query is successful, then following information is printed:
55
56.. code-block:: console
57
58 zephyr.local 2001:db8::1
59
60Lastly, resolve services using DNS Service Discovery:
61
62.. code-block:: console
63
64 $ avahi-browse -t -r _zephyr._tcp
65
66If the query is successful, then the following information is printed:
67
68.. code-block:: console
69
70 + zeth IPv6 zephyr _zephyr._tcp local
71 = zeth IPv6 zephyr _zephyr._tcp local
72 hostname = [zephyr.local]
73 address = [192.0.2.1]
74 port = [4242]
75 txt = []
76