{"slug":"configure-a-subnet-router","title":"Configure a subnet router","tags":["tailscale","routing","setup"],"agent_summary":"Last validated: Jan 5, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# Configure a subnet router\r\n\r\nLast validated: Jan 5, 2026\r\n\r\nThis topic is a quick guide for configuring subnet routers in a tailnet. For more detailed information, see [Subnet routers](https://tailscale.com/docs/features/subnet-routers).\r\n\r\nTo use a tailnet device as a subnet router, select your platform and complete the steps.\r\n\r\n[Linux](https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=linux) [macOS](https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=macos) [Windows](https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=windows) [tvOS](https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=tvos) [Android](https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=android)\r\n\r\n1. [Download and install](https://tailscale.com/docs/install/linux) the Tailscale client.\r\n\r\n2. Open a terminal session on the device and enable IP forwarding.\r\n\r\nIf your Linux system has a `/etc/sysctl.d` directory, use:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\necho 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf\r\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf\r\nsudo sysctl -p /etc/sysctl.d/99-tailscale.conf\r\n```\r\n\r\n\r\n\r\nOtherwise, use:\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\necho 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf\r\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf\r\nsudo sysctl -p /etc/sysctl.conf\r\n```\r\n\r\n3. In the terminal session, advertise subnet routes for the device. Replace the subnets in the example below with the subnets for your network.\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n```shell\r\nsudo tailscale set --advertise-routes=192.0.2.0/24,198.51.100.0/24\r\n```\r\n\r\n4. Go to the [Machines](https://login.tailscale.com/admin/machines) page of the admin console and locate the device in the list. It should display the **Subnets** badge.\r\n\r\n5. Select the ![ellipsis icon](https://tailscale.com/files/images/icons/fa-ellipsis-h.svg) menu, then select **Edit route settings**.\r\n\r\n6. Check the IP range boxes that correspond to the subnet routes you want to advertise, then select **Save**.\r\n\r\n\r\nFor more information about subnet router configuration with Tailscale, review [Subnet routers](https://tailscale.com/docs/features/subnet-routers).\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>Configure a subnet router</h1>\n<p>Last validated: Jan 5, 2026</p>\n<p>This topic is a quick guide for configuring subnet routers in a tailnet. For more detailed information, see <a href=\"https://tailscale.com/docs/features/subnet-routers\">Subnet routers</a>.</p>\n<p>To use a tailnet device as a subnet router, select your platform and complete the steps.</p>\n<p><a href=\"https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=linux\">Linux</a> <a href=\"https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=macos\">macOS</a> <a href=\"https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=windows\">Windows</a> <a href=\"https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=tvos\">tvOS</a> <a href=\"https://tailscale.com/docs/features/subnet-routers/how-to/setup?tab=android\">Android</a></p>\n<ol>\n<li>\n<p><a href=\"https://tailscale.com/docs/install/linux\">Download and install</a> the Tailscale client.</p>\n</li>\n<li>\n<p>Open a terminal session on the device and enable IP forwarding.</p>\n</li>\n</ol>\n<p>If your Linux system has a <code>/etc/sysctl.d</code> directory, use:</p>\n<pre><code class=\"language-shell\">echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf\r\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf\r\nsudo sysctl -p /etc/sysctl.d/99-tailscale.conf\n</code></pre>\n<p>Otherwise, use:</p>\n<pre><code class=\"language-shell\">echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.conf\r\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.conf\r\nsudo sysctl -p /etc/sysctl.conf\n</code></pre>\n<ol start=\"3\">\n<li>In the terminal session, advertise subnet routes for the device. Replace the subnets in the example below with the subnets for your network.</li>\n</ol>\n<pre><code class=\"language-shell\">sudo tailscale set --advertise-routes=192.0.2.0/24,198.51.100.0/24\n</code></pre>\n<ol start=\"4\">\n<li>\n<p>Go to the <a href=\"https://login.tailscale.com/admin/machines\">Machines</a> page of the admin console and locate the device in the list. It should display the <strong>Subnets</strong> badge.</p>\n</li>\n<li>\n<p>Select the <img src=\"https://tailscale.com/files/images/icons/fa-ellipsis-h.svg\" alt=\"ellipsis icon\"> menu, then select <strong>Edit route settings</strong>.</p>\n</li>\n<li>\n<p>Check the IP range boxes that correspond to the subnet routes you want to advertise, then select <strong>Save</strong>.</p>\n</li>\n</ol>\n<p>For more information about subnet router configuration with Tailscale, review <a href=\"https://tailscale.com/docs/features/subnet-routers\">Subnet routers</a>.</p>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}