Configure a subnet router
This topic is a quick guide for configuring subnet routers in a tailnet. For more detailed information, refer to Subnet routers and traffic relay nodes.
To use a tailnet device as a subnet router, select your platform and complete the steps.
-
Download and install the Tailscale client.
-
Open a terminal session on the device and enable IP forwarding.
If your Linux system has a
/etc/sysctl.d
directory, use:echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
Otherwise, use:
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf sudo sysctl -p /etc/sysctl.conf
-
In the terminal session, advertise subnet routes for the device. Replace the subnets in the example below with the subnets for your network.
sudo tailscale up --advertise-routes=192.0.2.0/24,198.51.100.0/24
-
Go to the Machines page of the admin console and locate the device in the list. It should display the Subnets badge.
-
Select the
menu, then select Edit route settings.
-
Check the IP range boxes that correspond to the subnet routes you want to advertise, then select Save.
For more information about subnet router configuration with Tailscale, refer to Subnet routers and traffic relay nodes.