# Rmw\_zenoh router configuration

**URL:** <https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885>\
**Category:** ROS General\
**Created:** [May 13, 2025, 10:03am UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885 "2025-05-13T10:03:59Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [May 13, 2025, 10:03am UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885/1 "2025-05-13T10:03:59Z")

</div>

Okay, found it right in the README … Shame on me 😃

[https://github.com/ros2/rmw\_zenoh/?tab=readme-ov-file#connecting-multiple-hosts](https://github.com/ros2/rmw_zenoh/?tab=readme-ov-file#connecting-multiple-hosts)

To directly connect to a router running on the robot, just do this:

```auto
ZENOH_CONFIG_OVERRIDE='mode="client";connect/endpoints=["tcp/192.168.1.1:7447"]' ros2 run rqt_image_view rqt_image_view

```

Alternatively, run a router on your laptop that communicates with the robot’s router:

```auto
ZENOH_CONFIG_OVERRIDE='connect/endpoints=["tcp/192.168.1.1:7447"]' ros2 run rmw_zenoh_cpp rmw_zenohd

```

And then all other ROS 2 commands work without anything special.

* * *

A downside I found is that you can’t enter hostname in the endpoint.

---

<div class="post-metadata">

**Author:** ![ciandonovan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ciandonovan/32/17709_2.png) [@ciandonovan](https://discourse.openrobotics.org/u/ciandonovan)\
**Post date:** [May 21, 2025, 7:19pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885/2 "2025-05-21T19:19:26Z")

</div>

Definitely possible to use hostnames in the endpoint, this all-in-one command is what we use to bridge from a router running on a remote robot (va0003) to the local router on the dev machine.

```auto
 podman run -it --init --pull=newer --cgroups=split --tz=local --ipc=host --net=host --dns=127.0.0.53 docker.io/eclipse/zenoh --cfg='listen/endpoints:[]' --cfg='connect/endpoints:["tcp/localhost:7447","tcp/va0003:7447#iface=tailscale0"]' --cfg='scouting/multicast/enabled:false'

```

Could you be running a particularly old version?

---

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [May 21, 2025, 7:43pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885/3 "2025-05-21T19:43:22Z")

</div>

I’m using the RMW-bundled Zenoh. Could the problem be in using the Avahi .local address?

---

<div class="post-metadata">

**Author:** ![ciandonovan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ciandonovan/32/17709_2.png) [@ciandonovan](https://discourse.openrobotics.org/u/ciandonovan)\
**Post date:** [May 22, 2025, 3:38pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885/4 "2025-05-22T15:38:48Z")

</div>

It should just work if you have NSS configured correctly.

What distro are you using? Are you running in containers or not?

---

<div class="post-metadata">

**Author:** ![peci1](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/peci1/32/10145_2.png) [@peci1](https://discourse.openrobotics.org/u/peci1)\
**Post date:** [May 26, 2025, 1:21pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885/5 "2025-05-26T13:21:26Z")

</div>

You’re right, hostnames do work.

It was a wrong configuration of my local container in which I run ROS 2.

(For the curious, I had to bind-mount `/var/run/avahi-daemon/socket`)

---

<div class="post-metadata">

**Author:** ![ciandonovan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.openrobotics.org/ciandonovan/32/17709_2.png) [@ciandonovan](https://discourse.openrobotics.org/u/ciandonovan)\
**Post date:** [May 26, 2025, 3:40pm UTC](https://discourse.openrobotics.org/t/rmw-zenoh-router-configuration/43885/6 "2025-05-26T15:40:54Z")

</div>

Also, if you’re running `systemd-resolved`, you can set `--net=host` and `--dns=127.0.0.53` and get more thorough integration into your host’s name resolution mechanisms, including mDNS but also Tailscale’s MagicDNS if you use that.
