network-wiredZeroTier

circle-info

ZeroTier creates secure peer-to-peer networks that work like a traditional Ethernet switch, but across the internet. It's ideal for connecting devices across different locations seamlessly.

In RouterOS v7+, you can configure ZeroTier in ZeroTier menu, or use terminal with command /zerotier

ZeroTier is different from traditional VPNs - it creates a software-defined network where all devices appear to be on the same LAN, regardless of their physical location.


ZeroTier concepts

How ZeroTier works

Network model:

  • Creates virtual Ethernet networks (like VLANs but global)

  • Each device gets a ZeroTier address (like a MAC address)

  • Devices communicate directly when possible (P2P)

  • Falls back to relay servers when direct connection isn't possible

Key components:

  • Network ID - Unique identifier for your virtual network (16-character hex)

  • Node ID - Unique identifier for each device (10-character hex)

  • Controllers - Manage network membership and configuration

  • Roots - ZeroTier's infrastructure servers for coordination

Advantages over traditional VPN

Benefits:

  • True mesh networking - All devices can communicate with each other

  • Automatic NAT traversal - Works behind firewalls and NAT

  • No central server required - Devices connect directly when possible

  • Easy management - Web-based network controller

  • Cross-platform - Works on virtually any device

  • Scalable - Networks can grow to thousands of devices


Prerequisites

Before setting up ZeroTier on RouterOS:

  1. RouterOS v7.1+ - ZeroTier support was added in version 7.1

  2. Internet connectivity - Required for initial network join and coordination

  3. ZeroTier account - Sign up at https://my.zerotier.com

  4. Network created - Create a network in ZeroTier Central


ZeroTier Central setup

Create ZeroTier account and network

  1. Sign up at https://my.zerotier.com

  2. Create new network:

    • Click "Create A Network"

    • Note the Network ID (16-character hex string)

    • Configure network settings:

      • Name - Give your network a descriptive name

      • Access Control - Set to "Private" (recommended)

      • IPv4 Auto-Assign - Enable and configure IP range

      • IPv6 Auto-Assign - Enable if needed

Network configuration in ZeroTier Central

Basic settings:

  • Network Name - "Company Network" or similar

  • Description - Brief description of network purpose

  • Access Control - Private (devices must be authorized)

  • Certificate - Auto-generated, shows network is valid

IP assignment:

  • IPv4 Auto-Assign Pool - e.g., 192.168.192.0/24

  • IPv6 Auto-Assign - Enable if using IPv6

  • Managed Routes - Routes to advertise to network members


RouterOS ZeroTier configuration

Install and enable ZeroTier

Check connection status

Authorize device in ZeroTier Central

After joining the network:

  1. Go to ZeroTier Central - https://my.zerotier.com

  2. Select your network - Click on the network you created

  3. Find your RouterOS device - Look for new device in "Members" section

  4. Authorize device - Check the "Auth?" checkbox

  5. Assign IP - ZeroTier will auto-assign IP, or set manually

  6. Set name - Give device a descriptive name


Interface configuration

Configure ZeroTier interface IP

The ZeroTier interface acts like a regular network interface:

Bridge ZeroTier with local network

To allow ZeroTier devices to access local network:


Routing configuration

Basic routing for ZeroTier

Site-to-site connectivity

Configure RouterOS to route local networks over ZeroTier:

Router A (Site A - 192.168.1.0/24):

Router B (Site B - 192.168.2.0/24):


Firewall configuration

Allow ZeroTier traffic

NAT configuration (if needed)

If ZeroTier devices need internet access through RouterOS:


Advanced ZeroTier configuration

Multiple ZeroTier networks

RouterOS can join multiple ZeroTier networks:

Custom ZeroTier controller

For enterprise use, you can run your own ZeroTier controller:

ZeroTier network segmentation

Use VLANs with ZeroTier for network segmentation:


Monitoring and management

Check ZeroTier status

Network troubleshooting

ZeroTier Central management

From ZeroTier Central web interface:

  1. View network topology - See all connected devices

  2. Manage device authorization - Approve/deny devices

  3. Configure IP assignments - Set static IPs for devices

  4. Set up managed routes - Define network routing

  5. Monitor network activity - View connection statistics


Use cases and scenarios

Remote office connectivity

Scenario: Connect branch offices to main office

Configuration:

  1. Main office router joins ZeroTier network

  2. Branch office routers join same network

  3. Configure managed routes in ZeroTier Central

  4. Set up local routing on each router

Remote worker access

Scenario: Allow remote workers to access office resources

Setup:

  1. Office router joins company ZeroTier network

  2. Remote workers install ZeroTier client and join network

  3. Configure firewall rules to allow appropriate access

  4. Set up DNS for internal resource resolution

IoT device management

Scenario: Securely manage IoT devices across locations

Implementation:

  1. Create dedicated IoT ZeroTier network

  2. Configure IoT devices to join ZeroTier network

  3. Set up management server on ZeroTier network

  4. Implement network segmentation for security


Security considerations

Network access control

Network segmentation

Monitoring and logging


chevron-rightShow complete ZeroTier setuphashtag

Performance optimization

Optimize ZeroTier performance

Network optimization tips

  1. Direct connections - Ensure devices can establish direct P2P connections

  2. Firewall configuration - Allow UDP 9993 for optimal performance

  3. Geographic placement - Consider ZeroTier root server locations

  4. Network sizing - Keep networks under 100 devices for best performance

  5. Route optimization - Use managed routes efficiently


Troubleshooting common issues

Connection problems

ZeroTier not connecting:

  • Check internet connectivity

  • Verify UDP 9993 is allowed through firewall

  • Confirm network ID is correct

  • Check device authorization in ZeroTier Central

Poor performance:

  • Check if direct P2P connection is established

  • Monitor for relay usage (indicates NAT/firewall issues)

  • Test network latency and packet loss

  • Consider ZeroTier root server proximity

Network access issues

Can't reach other devices:

  • Verify IP assignments in ZeroTier Central

  • Check managed routes configuration

  • Test basic connectivity with ping

  • Review local firewall rules

Intermittent connectivity:

  • Check for NAT session timeouts

  • Monitor ZeroTier peer connection status

  • Verify network stability

  • Check for IP address conflicts

Diagnostic commands

Last updated

Was this helpful?