Skip to content

examples/gnrc_border_router: enable sock_dns if WiFi uplink is used#13732

Closed
benpicco wants to merge 1 commit intoRIOT-OS:masterfrom
benpicco:gnrc_border_router-dns
Closed

examples/gnrc_border_router: enable sock_dns if WiFi uplink is used#13732
benpicco wants to merge 1 commit intoRIOT-OS:masterfrom
benpicco:gnrc_border_router-dns

Conversation

@benpicco
Copy link
Contributor

Contribution description

When using a WiFi uplink it is very likely we also have proper DNS set up.
So enable the sock_dns module by default.

This allows us to ping6 proper hostnames instead of IP addresses.
It also enables the dissemination of DNS server information in the LoWPAN network.

Testing procedure

2020-03-27 00:00:40,074 #  ping6 google.com
2020-03-27 00:00:41,179 # 12 bytes from 2a00:1450:4001:816::200e: icmp_seq=0 ttl=55 rssi=-54 dBm time=40.581 ms
2020-03-27 00:00:42,182 # 12 bytes from 2a00:1450:4001:816::200e: icmp_seq=1 ttl=55 rssi=-42 dBm time=40.901 ms
2020-03-27 00:00:43,181 # 12 bytes from 2a00:1450:4001:816::200e: icmp_seq=2 ttl=55 rssi=-50 dBm time=37.504 ms
2020-03-27 00:00:43,182 # 
2020-03-27 00:00:43,184 # --- google.com PING statistics ---
2020-03-27 00:00:43,190 # 3 packets transmitted, 3 packets received, 0% packet loss
2020-03-27 00:00:43,194 # round-trip min/avg/max = 37.504/39.662/40.901 ms

Issues/PRs references

When using a WiFi uplink it is very likely we also have proper DNS
set up.
So enable the `sock_dns` module by default.

This allows us to ping6 proper hostnames instead of IP addresses.
It also enables the dissemination of DNS server information in the
LoWPAN network.
@benpicco benpicco added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking labels Mar 26, 2020
@benpicco benpicco requested review from gschorcht and miri64 March 26, 2020 23:02
@miri64
Copy link
Member

miri64 commented Mar 26, 2020

But there is no DNS server announcement support for DHCPv6 yet. So does this make sense?

@miri64
Copy link
Member

miri64 commented Mar 26, 2020

Thinking more about this, I think this adds just too much feature creep to the border router... How about adding just a commented-out version of your proposal to the main Makefile, as we currently do for gnrc_rpl?

@benpicco
Copy link
Contributor Author

When I run tests/gnrc_sock_dns (no DHCPv6 involved) I get

2020-03-27 00:24:28,320 #  dns server
2020-03-27 00:24:28,326 # DNS server: [fd00::de39:6fff:fe6a:6980]:53
2020-03-27 00:24:36,786 #  dns request riot-os.org
2020-03-27 00:24:36,864 # riot-os.org resolves to 2a01:4f8:151:64::11

so the DNS information comes in through router advertisements. And the border router will forward them with gnrc_ipv6_nib_dns.
(I think we really should have these DNS commands available outside the gnrc_sock_dns test)

@miri64
Copy link
Member

miri64 commented Mar 26, 2020

so the DNS information comes in through router advertisements. And the border router will forward them with gnrc_ipv6_nib_dns.

Only if you configure your router advertisement daemon as such.

(I think we really should have these DNS commands available outside the gnrc_sock_dns test)

If you are worried that with the commented-out version of my proposal for this would not work due to regressions, then maybe we should add a gnrc_ipv6_nib_dns test that sends a respective RA via scapy, so the functionality is ensured to work.

@benpicco
Copy link
Contributor Author

benpicco commented Mar 26, 2020

Only if you configure your router advertisement daemon as such.

Well I didn't do that, that was AVM 😉

If you are worried that with the commented-out version of my proposal this would not work, then maybe we should add a gnrc_ipv6_nib_dns test that sends a respective RA via scapy, so the functionality is ensured to work.

Hm I'm not sure what you mean - just adding a comment about sock_dns to Makefile.wifi.conf ?
TBH DNS is still a bit flaky and I was hoping by enabling it by default it would get a bit more use and thus more polish - and IPv6 addresses are just so hard to remember…

(I actually had to cheat a bit. For some reason my border router can't ping addresses outside my LAN, but nodes connected to the border router can. This worked yesterday and since the BR can still ping my Fritz!Box and my PC I suspect a fuckup in my network…)

@miri64
Copy link
Member

miri64 commented Mar 26, 2020

Then let me try to provide some alternative PR(s) ... tomorrow 😜

@miri64
Copy link
Member

miri64 commented Mar 27, 2020

then maybe we should add a gnrc_ipv6_nib_dns test that sends a respective RA via scapy, so the functionality is ensured to work.

See #13734.

miri64 added a commit to miri64/RIOT that referenced this pull request Mar 27, 2020
@miri64
Copy link
Member

miri64 commented Mar 27, 2020

Thinking more about this, I think this adds just too much feature creep to the border router... How about adding just a commented-out version of your proposal to the main Makefile, as we currently do for gnrc_rpl?

See #13735

@benpicco benpicco closed this Mar 27, 2020
@benpicco benpicco deleted the gnrc_border_router-dns branch March 27, 2020 13:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants