Preface
ZeroTier is a very useful software-defined LAN (SDN), but when using it for LAN games you may run into some problems, such as not being able to discover other players or high connection latency.
Server-Side Configuration
1. Enable Network Broadcast
To let games automatically discover other players, you need to enable broadcast and multicast in the ZeroTier network settings:
- Log into the admin panel (or ztncui)
- Add a new route
- Add the following two route rules:
- Destination:
255.255.255.255/32, via:0.0.0.0(enable broadcast) - Destination:
224.0.0.0/4, via:0.0.0.0(enable multicast)
- Destination:
Note: Although broadcast reduces network efficiency, it’s necessary for game discovery functionality.
2. Optimize MTU Settings
Most home networks have an MTU of 1500 (1492 under PPPoE). You need to adjust ZeroTier’s MTU to avoid packet fragmentation:
# Enter the ZeroTier configuration directorysudo sucd /var/lib/zerotier-one/controller.d/network# Modify the MTU value in all json network configuration files in the directory# Open the .json files with a text editor and change "mtu":2800 to "mtu":1492Client-Side Configuration
1. Install WindowsIPBroadcast
Some games (Civilization 6) only broadcast on the first network adapter, so third-party software is needed to broadcast to all adapters. WindowsIPBroadcast can solve this problem: GitHub repository - download the latest version