Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Community Manager
3,391 Views

Hostname and DNS

Hello,

I would like to know how to setup the Intel Edison Yocto, so it can be accessed by hostname within a domain without using its IP address.

The Intel Edison is on a network with some Windows based DHCP server. The server is providing IP addresses, but is not resolving the hostname properly. I added the following to the /etc/hosts file: 127.0.1.1 edison.somedomainname edison

This change did not make any difference, and I cannot access the Intel Edison with it's FQDN.

Any help would be greatly appreciated.

Thanks.

0 Kudos
20 Replies
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

Have you been able to connect to the Edison via its hostname before? Do you remember if you were using a different image or made some to the Edison configuration?

 

Also, in the /etc/hosts file I believe you should add your Edison's IP address, mine is 192.168.10.80, so you should check yours using ifconfig.

 

There's a similar thread, I would suggest you to check it /thread/105064 https://communities.intel.com/thread/105064.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hello Pablo,

I am able to connect with home router, and use the hostname (edison.local), but on a company network this is not possible but possible with IP address.

I cannot use static IP addresses, and the IP address provided has a high probability to be changed with every reboot.

The link you are referring to does not solve the issue.

Thank you for your reply.

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

So you're able to do it from home with your router, but you're not able to replicate that from work, right?

 

Are you working behind a proxy at your office? This might be one of the reasons. Also, the router configuration at your office might have some restrictions, it would be a good idea to discard that or at least ask to the IT department about that.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hello again Pablo,

yes this is correct.

I don't think there is a proxy. The problem is that the IT personnel are not Linux savvy and everything is Windows based.

If there is anyone you know I could hire for a few hours to configure the system I would greatly appreciate it.

Thanks.

0 Kudos
Highlighted
Community Manager
46 Views

Hi Nelfata,

 

 

Unfortunately, I don't know anyone who could help you with that. But you could ask the IT department if they can provide a static IP for your Edison, that way you'll be able to connect via its IP address without having to change it every time you boot the board.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hello again Pablo and thank you for your response.

The issue is that there will be multiple devices on the network, so dynamic IPs are the way to go.

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

Which hostname do you use when connecting at home? Do you use the one from the /etc/hosts file (local.localdomain)?

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hi again,

I don't change anything on the Edison, but I am able to access it as edison.local.

Maybe I don't understand your question.

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

Thank you for the information. I've been trying to run some more tests, however, I haven't been able to reproduce your issue. Right now, if you want to connect via SSH you'll have to do it with the IP address, at least in your work's network. An alternative would be to adapt your code to use the information from the ifconfig command, so that when it starts running it reads the IP information and use that to connect (I guess that's why you were using the hostname in the first place).

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Yes, this is what I am doing now, I report the IP from the application, the only thing if there is an issue and I need to access the device, the application needs to be running.

In any case, thank you for your support.

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

You're welcome. If you run into any other issue or have any other question related to this, please let us know. We'll be glad to help you.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hello again Pablo,

I have some additional information that may help.

I spoke with the IT person about this issue and he ran some tests.

Here is a note from him:

"It looks like the Yocto boards are not replying with a DHCP inform packet or any packets which include DHCP option 12 (Hostname)."

Maybe that could help identify some issues?

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

Let us investigate this new information. We'll get back to you once we have updates.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

We've been reviewing your information and still haven't found the source of the issue. For now you'll need to keep working with the IP address to avoid issues with the hostname.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hello again Pablo,

some additional information that might shed some light about the missing DHCP option.

In /etc/wpa_supplicant/wpa_cli-actions.sh there is an entry:

if [ "$CMD" = "CONNECTED" ]; then

kill_daemon udhcpc /var/run/udhcpc-$IFNAME.pid

udhcpc -i $IFNAME -p /var/run/udhcpc-$IFNAME.pid -S

fi

apparently adding "-x hostname:name" to the udhcpc line seems to perform the request correctly (name is the name of the host when calling hostname).

There is an issue, name could be the FQDN or just the hostname and on some of the devices it seems to work fine and register correctly and on others not.

I think you need to review this script and provide correct recommendation to others.

Please let me know your thoughts.

Thanks.

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

So you were able to get it working by adding this line to the wpa_cli-actions.sh script? I'm a bit confused by this line: "There is an issue, name could be the FQDN or just the hostname and on some of the devices it seems to work fine and register correctly and on others not".

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hello again Pablo,

I am no expert in networking but it seems to behave differently when using: "-x hostname:name" and "-x hostname:name.domain"

I will perform more tests and let you know here. But I am curious to hear from whoever wrote the wpa_cli-actions.sh script.

Thank you.

0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

Thank you for your update. We are now investigating this case and we'll come back to you once we have more information, especially about the wpa_cli-actions.sh script.

 

 

Regards,

 

-Pablo
0 Kudos
Highlighted
Community Manager
46 Views

Hi nelfata,

 

 

We would like to let you know that we've been running some tests but haven't been able to replicate your issue. We would like to have some additional information regarding your network configuration, we hope you don't mind. The more information you can provide the better.
  1. Which authentication are you using? DHCP, IPV4/IPV6, etc.? If you don't feel comfortable sharing this information here you can send me a private message.
We'll be waiting for your reply.

 

 

Regards,

 

-Pablo
0 Kudos