Force interface name

Hello everyone,

I am using Zerotier to connect remotely on different network. The Zerotier instance is running on a Teltonika Device (RutOS, based on OpenWRT) and the device is set up as a Ethernet Bridge on the web plateform.
I am trying to reduce the number of step to deploy a new router by restoring configuration, it is working well since the openwrt package have been updated to version 1.6.5 (before I was using the 1.1.14).
One of the important point of the configuration is to set my LAN interface as a bridge and specified between which interface :

config interface 'lan'
        option ifname 'eth0 tap0 zt0'
        option type 'bridge'

However, with the new version, the network name is changing on every new device, by example, now the interface could be named : ztnfakfkkm

I would like to know if there is any possibility to force a interface name in Zerotier and avoid changing the network configuration for each file. Or a way to get the interface name easily and do a script to edit the network config.

Thank you for your help

Any idea ?
I am setting up new device and I have to edit the configuration manually every time.

On linux, interface names are derived from the network ID you’re joining. The interface name will always be the same given the same network ID.

On linux, you can create a file in /var/lib/zerotier-one/devicemap with the following format:

So for example:


Thank you for this tips.
It will not fully help me resolving these issue as I am creating a new network for each device (and not in the future) but I could write a little sh script which get the networkID and create a new line in this file + reboot.

Today I realized:
zerotier-cli get <network_id> portDeviceName

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.