Skip to content

Commit 078bf1c

Browse files
lpereiranashif
authored andcommitted
samples: dns_resolve: Clarify documentation about DNS configuration
Add clarification that the DNS server configuration must be edited in the respective prj.conf file. JIRA: ZEP-2040 Signed-off-by: Leandro Pereira <[email protected]>
1 parent 43fb7de commit 078bf1c

File tree

1 file changed

+17
-5
lines changed

1 file changed

+17
-5
lines changed

samples/net/dns_resolve/README.rst

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Requirements
3535
Dnsmasq version 2.76 Copyright (c) 2000-2016 Simon Kelley
3636
3737
38+
3839
Wiring
3940
******
4041

@@ -74,7 +75,6 @@ for example:
7475
CONFIG_NET_APP_MY_IPV6_ADDR="2001:db8::1"
7576
CONFIG_NET_APP_PEER_IPV6_ADDR="2001:db8::2"
7677
77-
7878
are the IPv6 addresses for the DNS client running Zephyr and the DNS server,
7979
respectively.
8080

@@ -88,24 +88,37 @@ The net-tools can be downloaded from
8888

8989
https://github.com/zephyrproject-rtos/net-tools
9090

91-
9291
Open a terminal window and type:
9392

9493
.. code-block:: console
9594
9695
$ cd net-tools
9796
$ ./dnsmasq.sh
9897
98+
('su' or 'sudo' may be required.)
9999

100-
NOTE: some systems may require root privileges to run dnsmaq, use sudo or su.
100+
The default project configurations settings for this sample uses the public
101+
Google DNS servers. In order to use the local dnsmasq server, please edit
102+
the appropriate 'prj.conf' file and update the DNS server addresses. For
103+
instance, if using the usual IP addresses assigned to testing, update them
104+
to the following values:
105+
106+
.. code-block:: console
107+
108+
CONFIG_DNS_SERVER1="192.0.2.2:5353"
109+
CONFIG_DNS_SERVER2="[2001:db8::2]:5353"
110+
111+
.. note::
112+
DNS uses port 53 by default, but the dnsmasq.conf file provided by
113+
net-tools uses port 5353 to allow executing the daemon without
114+
superuser privileges.
101115

102116
If dnsmasq fails to start with an error like this:
103117

104118
.. code-block:: console
105119
106120
dnsmasq: failed to create listening socket for port 5353: Address already in use
107121
108-
109122
Open a terminal window and type:
110123

111124
.. code-block:: console
@@ -115,7 +128,6 @@ Open a terminal window and type:
115128
116129
Try to launch the dnsmasq application again.
117130

118-
119131
QEMU x86
120132
========
121133

0 commit comments

Comments
 (0)