06-27-2018 07:52 AM
With petalinux, if I specify DHCP in the interfaces file, the DHCP server will provide DNS servers and they get saved into /etc/resolv.conf. Everything works fine.
If I instead choose static IP definition and use the keyword "dns-nameservers x.x.x.x y.y.y.y", these numbers never get inserted into the "resolv.conf". I can come back after "ifup", see that its empty, and then insert dns ip's *manually* and then the nameservers work. But this resolv.conf file is supposed to be a "DO NOT EDIT" file... so I don't think this is a good viable strategy long term.
I know its actually picking up on the term "dns-nameservers" when parsing the interfaces file because if I instead mis-spell and use "dns-nameserver", it then fails to even start the adapters.
What is the trick to getting "dns-nameservers" to work from the interfaces file?
12-05-2018 10:56 AM
Did you ever get resolution to your issue?
I have a somewhat related issue. I am actually using dynamic IP addresses. The DHCP part works fine and I do actually see my dev board hostname showing up there. However, if I do a scan of my subnet the hostname does not get passed on. The DNS nameserver IP addresses do get passed down from DHCP correctly and are the correct addresses. I believe there is something missing from my Petalinux image/rootfs that is preventing the hostname association from being resolved.
Any help is appreciated.
03-13-2019 02:26 PM
I'm getting proper resolving of names from petalinux. I had to edit /etc/resolv.conf to get there (when using static ip). Make sure you are specifying your domain suffix properly (i.e. abcinc.domain) . In this way when you access by "ping mymachine" it will actually "ping mymachine.abcinc.domain"
I have in resolv.conf:
Basically I have a small app I wrote that runs at startup. It reads an platform independent INI file from an sd card, then creates platform specific (LF line endings) /etc/resolv.conf and /etc/network/interfaces, and brings up the network. The interfaces file that I include in my petalinux-build just specifies manual startup so I don't get any jittering.