1

I have a device which is normally connected to the internet, but for test purposes, it's now connected directly to a nic of my PC. The device pings a hostname by means of a connectivity test.

While my PC has another hostname, is it possible to reply to the ping request of the device?

Currently the OS is linux, but a windows solution is welcome also. Adding additional hardware is fine as well.

2 Answers 2

1

ICMP uses IP addresses to communicate; not hostnames. If you specify a hostname, the pinging machine attempts to lookup the IP of the specified host.

For more info, check out the Wikipedia article. https://en.wikipedia.org/wiki/Internet_Control_Message_Protocol

0

This is about the IP of your PC's NIC. You need to tell your device where to ping. By a casual connection over the NIC, both ends should get a link-local IP like 169.254.73.253. To check your PC's IP, connect the device and start the connection in Linux. Then check ifconfig. Once you know the PC's IP, you need to set it in the device as the ping's target or associate it with the hostname there.

By a more complex Linux setup, there will be a DHCP server on the Linux side that assigns IP to the device. This is similar to the former. Check the PC's IP with ifconfig and configure it as the target on the device.

1
  • Unfortunately the target is hardcoded in the firmware of the device. It's currently not possible to change it.
    – dn Fer
    Jun 14, 2018 at 4:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .