Comments (4)
After further investigation, I tried using the new MFDeploy
tool with IPv6 settings. Even using that tool, and even if the DNS servers are first programmed with valid static values, enabling DHCP results in a NullReferenceException
when reading the DNS servers, and an inability to resolve host names.
from netduino.ip.
Thank you for all of your tests, NameOfTheDragon.
Netduino.IP was relying on the "DHCP-specified DNS servers" flag, which is not necessarily set correctly from MFDeploy. For backwards compatibility, we will now treat an empty set of DNS server entries (all-zero) as an indication that DNS servers should be specified by DHCP (when DHCP-allocated IP config is enabled).
This is fixed for the Netduino.IP v1.0.1 release.
from netduino.ip.
My testing suggests that this isn't fixed (sorry). When I configure my Netduino Plus 2 for DHCP, I get a NullReferenceException
when I try to read the nic.DnsServers
property. Note: it is not returning null, any attempt to just read the property throws the NullReferenceException
. Whatever way you look at it, it has got to be a bug for a property getter to throw a NullReferenceException
no matter what state the network is in.
In my test code, which is based on your 'network time' sample, I have ensured that the link layer is active and that the NIC has a valid IP address (which also comes from DHCP, so DHCP itself must be working).
I have configured my Netduino with your 'special' version of MFDeploy that has the IPv6 settings pane. I have configured to obtain both the IP address and the DNS servers automatically. Attached is a screen shot of my settings.
from netduino.ip.
As a workaround, the DNS servers can be set to 0.0.0.0 in MFDeploy and then the network stack does work as expected - however the DnsAddresses property then returns an empty array, rather than the actual DNS servers being used. When I run my test code, I see the following output that shows DNS is actually working and has picked up the servers from DHCP:
[Network ] Link layer available [Network ] Waiting for network layer [Network ] Network address changed: [Network ] 5C:86:4A:00:87:2C 192.168.16.7 (DHCP) [Network ] Found 1 network interfaces - details as follows... [Network ] Network interface: 0 [Network ] Interface type: 6 [Network ] IPv4 address: 192.168.16.7 [Network ] Default gateway: 192.168.16.1 [Network ] Subnet mask: 255.255.255.0 [Network ] No DNS servers - empty list returned [Network Time] Attempting to set the time from pool.ntp.org [Network Time] Resolved IP Address: 85.119.80.232 [Network Time] Network time received [Network Time] UTC Time: 10/18/2015 17:44:26 [Unspecified ] Set system time to: 10/18/2015 17:44:26 UTC [Unspecified ] Clock set to 10/18/2015 17:44:26
However, this is not what I would call "correct behaviour" since configuring the Netduino to use "automatic settings" simply doesn't work.
from netduino.ip.
Related Issues (7)
- DNS resolution fails if the first DNS server is unreachable HOT 1
- Standards compliance issue with DHCP MaxDHCPMessageSize option HOT 1
- NetduinoExtensions problems with Netduino.IP 1.0.1 HOT 2
- EnableStaticIP() not implemented in NetworkInterface class HOT 27
- EnableDhcp() not implemented in NetworkInterface class
- Problems with EnableStaticDns() & EnableDynamicDns() Methods in NetworkInterface class
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from netduino.ip.