Giter VIP home page Giter VIP logo

Comments (4)

NameOfTheDragon avatar NameOfTheDragon commented on September 28, 2024

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.

netduino avatar netduino commented on September 28, 2024

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.

NameOfTheDragon avatar NameOfTheDragon commented on September 28, 2024

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.
n2plusdhcpconfig

from netduino.ip.

NameOfTheDragon avatar NameOfTheDragon commented on September 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.