How to set host name in Xavier?

We are struggling with ROS network settings.

Host PC (Ubuntu 18.04 laptop) & Jetson xavier (Jetpack 4.2.3)(Ubuntu 18.04)

Both devices can be connected through ping or ssh , but Jetson Xavier or PC cannot read each ROS server on the host PC. (PC <-> Xavier ROS connection doen’t work)
[error code]
WARNING:ROS_MASTER_URI [http://:11311] host is not set to this machine

ex)
Host PC: rospc@192.16x.xx.xx
Xavier:rospc@192.16x.xx.xx

I also tried to ADD host name in Xavier.
But Xavier cannot connect(ping) to PC using hostname. PC can connect to Xavier using hostname.

Do you have any ideas?
Thank you for your help

Usually a router is what provides DNS host names if two or more machines must understand that name. A Linux host can alias an IP address to a name using “/etc/hosts”. For example, if you do this from the Jetson’s “/etc/hosts”, then the Jetson will know a correct IP address:
192.168.1.3 pc

As a result, if 192.168.1.3 is a PC reachable from the Jetson, and if there are no firewall or other issues, then these would work equally well:

ping pc
ping 192.168.55.3

In a case where the router does not provide a name, then you would have to do this on each host (even Windows has “C:Windows\System32\drivers\etc\hosts” (or a variation on “Windows”).

This won’t cause a missing network configuration to work, all it does is give a name alias. If ping to the dotted-decimal address does not work, then there is more to set up.

NOTE: Your router might have the ability to assign a name which works for anything on the router, but not outside of your own local network.

linuxdev

Thank you for your reply.
In Jetson, I add an IP address and PCname to a name using “/etc/hosts”.
ex) 192.168.1.3 pc
In my case, Jetson doesn’t connect other device using PCname. But ping IP address was work.
Thank you for your help.

Can I verify that the Jetson has a line in “/etc/hosts”:

192.168.1.3 pc

Also, that from the Jetson you can successfully “ping 192.168.1.3”, but fail to “ping pc”?

If this is the case, then what do you see from “traceroute 192.168.1.3” and “traceroute pc”?