Ethernet Products
Determine ramifications of Intel® Ethernet products and technologies
4855 Discussions

DNS Server address for Galileo

flinc
Novice
3,488 Views

Hi everyone,

im wondering which tool is meant to assign and configure the DNS server address for the Galileo1.

Im using the Intel IoT Devkit Linux galileo 3.8.7-yocto-standard # 1 Tue Jun 9 22:07:14 GMT 2015 i586 GNU/Linux.

 

Everytime I reboot the Galileo i have to set the address manually again.

I tried to add the line to /etc/resolv.conf or with the /usr/lib/connman/test/set-nameservers command.

Both changes are working but are not persistent. Someone has an idea?

Edit:

The same holds for other commands as well. For example the content and modifications done to /proc/sys/net/ipv4/ip_forward are always resetted if I restart the board.

I have workarounds with a startscript. But I cant imagine that there is no way of keeping these settings permanent.

Thanks in Advice

10 Replies
idata
Employee
1,731 Views

Hello Lemming_,

I found a solution to this problem via Hipstercircuits... (you'd have to search for the link yourself)

TL:DR:

connmanctl services # figure out your ethernet device eg. mine was: ethernet_984fee05a892_cable

connmanctl config ethernet_984fee05a892_cable --nameservers 8.8.8.8 8.8.4.4 # these are Google's nameservers

Let me know if this fixed the problem...

Taimoor

Carlos_M_Intel
Employee
1,731 Views

Hi Lemming_,

Do you have updates in this?

Did you try with Taimoor's suggestion?

Regards,

Charlie

flinc
Novice
1,731 Views

Hi Taimoor, Hi CMata_Intel ,

thanks for your and sorry for my late reply.

With Taimoor's command I can add the nameservers to connmanctl:

root@galileo:/var/lib/connman# cat ethernet_984feeaabbcc_cable/settings

[ethernet_984feeaabbcc_cable]

Name=Wired

AutoConnect=true

Modified=2015-09-06T22:27:04.410205Z

IPv4.method=dhcp

IPv4.DHCP.LastAddress=192.168.0.105

IPv6.method=auto

IPv6.privacy=disabled

Nameservers=192.168.0.1;1.2.3.4;

This is permanent and survives Galileo's reboots. So far so good.

Anyhow the problem is that the device is not using the nameservers. I have to run the command again after reboot:

root@galileo:~# ping google.de

ping: bad address 'google.de'

root@galileo:~# connmanctl config ethernet_984feeaabbcc_cable --nameservers 192.168.0.1

root@galileo:~# ping google.de

PING google.de (173.194.112.184): 56 data bytes

64 bytes from 173.194.112.184: seq=0 ttl=51 time=36.464 ms

64 bytes from 173.194.112.184: seq=1 ttl=51 time=36.128 ms

64 bytes from 173.194.112.184: seq=2 ttl=51 time=35.942 ms

64 bytes from 173.194.112.184: seq=3 ttl=51 time=36.137 ms

64 bytes from 173.194.112.184: seq=4 ttl=51 time=35.960 ms

^C

--- google.de ping statistics ---

5 packets transmitted, 5 packets received, 0% packet loss

round-trip min/avg/max = 35.942/36.126/36.464 ms

root@galileo:~#

Im just curious about how other people solve this problem. I have the feel that Im missing some elementary basics configuring the network connection with the yocto os / galileo image.

I have not yet found working connmanctl commands.

Here are my (dirrty) workarounds using the /etc/resolv.conf file if someone is interested:

First I used a Startup Script:

- Create a file, e.g., /etc/init.d/startScript:

# ! /bin/sh

# /etc/init.d/startScript

#

echo 'nameservers 192.168.0.1' > /etc.resolv.conf

- The script runs on systemboot when I use the command:

chmod a+x startScript 

update-rc.d startScript defaults

Later I found a simpler solution: Write lock the resolv.conf after adding the required settings.

chattr +i /etc/resolv.conf

 

Regards 

Carlos_M_Intel
Employee
1,731 Views

Hi Lemming_,

Do you have the 1.0.4 firmware in your board?

Could you post the /var/lib/connman/wifi.config?

Go to the section LSB-compliant Image in http://www.malinov.com/Home/sergey-s-blog this link and try with those steps.

Regards,

Charlie

YHade
New Contributor I
1,731 Views

Hi Lemming_, hi all

i did the same, i got an ip-address but unfortunately, it don't work.

I can ping an ip adress for example 8.8.8.8 but if i try to ping google.de i got bad address

Regards

Carlos_M_Intel
Employee
1,731 Views

Hi Yacine85,

I would like to know more information regarding your case.

Which image are you using? Please run uname -a

Are you behind a proxy?

Are you using connmanctl config ethernet_984fee054a0e_cable --nameservers X.41.38.1 like Lemming above?

Regards,

Charlie

0 Kudos
YHade
New Contributor I
1,731 Views

Hi Charlie, thank you for your reply

i have Linux galileo 3.8.7-yocto-standard

i don't have a proxy

and yes i'm using this command above. I can ping 8.8.8.8 but not google.de or google.com; i find that strange!

Regards

0 Kudos
Carlos_M_Intel
Employee
1,731 Views

Hi,

I was having the same problem but with the command: connmanctl config internet+hash --nameservers 192.168.10.1 I was able to ping to google.

Please try with the command:

connmanctl config ethernet_984fee054a0e_cable --nameservers 192.168.10.1

If this doesn't work, are you receiving an error message after using this command? Are you completely sure that there are no issues in the wired network you are using and that the network is not being blocked.

Regards,

Charlie

0 Kudos
YHade
New Contributor I
1,731 Views

Hi,

Thank you, you given me an idea

i connected Galileo through my PC then it got another IP adress : 192.168.x.x

So i only changed the last number to 1 and it works

0 Kudos
RShuk1
Novice
1,731 Views

Can you please explain it in more detail if possible with screenshots ? I'm very new to Linux and half of the things are just going over my head. Screenshots of steps will long way in making things more clear. Thanks in advance

Reply