191 字
1 分钟
Using ZeroTier to Set Up a LAN Gaming Environment

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:

  1. Log into the admin panel (or ztncui)
  2. Add a new route
  3. 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)

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:

Terminal window
# Enter the ZeroTier configuration directory
sudo su
cd /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":1492

Client-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

2. Paying for a MOON Server#

Using ZeroTier to Set Up a LAN Gaming Environment
https://tski.uk/blog/en/zerotier-game-setting/
作者
Tokisaki Galaxy
发布于
2025-02-04
许可协议
CC BY