zephyr/samples/net/dns_client/README

140 lines
3.2 KiB
Plaintext
Raw Normal View History

DNS Client Application
Requirements
------------
* Ethernet LAN for testing purposes.
* Galileo Gen 2 Development Board.
* USB-UART cable: CH340, FTDI 6-pin or equivalent for debugging.
* dnsmasq application. The dnsmasq version used in this sample is:
dnsmasq -v
Dnsmasq version 2.75 Copyright (c) 2000-2015 Simon Kelley
Building instructions
---------------------
* Read src/tcp_config.h, change the IP addresses according to the LAN
environment.
* make pristine && make are enough to build this sample.
* Follow the steps indicated here:
https://www.zephyrproject.org/doc/board/galileo.html
to load the binary into the Galileo Dev Board.
Usage
-----
* Open a terminal window and type:
dnsmasq -d
* Connect the USB-UART cable to the Galileo. Open a terminal and run:
screen /dev/ttyUSB0 115200
* Connect Galileo to the LAN, Turn on the board.
* The screen terminal window will show:
-----------------------------------------
Domain name: not_a_real_domain_name
[fiber:89] DNS Query: OK, ID: 0
[fiber:92] TX: OK
[fiber:97] RX: OK
[fiber:102] DNS Response: ERROR <- :)
-----------------------------------------
Domain name: linuxfoundation.org
[fiber:89] DNS Query: OK, ID: 1
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 140 211 169 4
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: www.linuxfoundation.org
[fiber:89] DNS Query: OK, ID: 2
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 140 211 169 4
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: gnu.org
[fiber:89] DNS Query: OK, ID: 3
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 208 118 235 148
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: www.gnu.org
[fiber:89] DNS Query: OK, ID: 4
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: CNAME NO IP address
CNAME: wildebeest.gnu.org
****** DNS ANSWER: 1 ******
Response: IP address Size: 4: 208 118 235 148
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: npr.org
[fiber:89] DNS Query: OK, ID: 5
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: IP address Size: 4: 216 35 221 76
[fiber:102] DNS Response: OK
-----------------------------------------
Domain name: www.npr.org
[fiber:89] DNS Query: OK, ID: 6
[fiber:92] TX: OK
[fiber:97] RX: OK
****** DNS ANSWER: 0 ******
Response: CNAME NO IP address
CNAME: www-cdn.npr.org.edgesuite.net
****** DNS ANSWER: 1 ******
Response: CNAME NO IP address
CNAME: a1723.g.akamai.net
****** DNS ANSWER: 2 ******
Response: IP address Size: 4: 63 80 4 192
****** DNS ANSWER: 3 ******
Response: IP address Size: 4: 63 80 4 161
[fiber:102] DNS Response: OK