Static routes in UniFi Community mean you can manually configure how visitors so be routed by your gateway. This lets you make networks accessible which can be out of sight of your present router, or drive visitors by a selected interface primarily based on their vacation spot IP tackle.
The commonest use case for static routes is to attach a number of websites collectively or to drive visitors by a selected WAN or VPN interface.
On this article, we are going to take a look at when to make use of static routes and methods to configure them in UniFi Community.
When to make use of Static Routes
Static routes are both used to regulate how visitors flows by your community or to redirect visitors by a selected interface. A static route consists of three components:
- Vacation spot – An IP tackle or subnet. You possibly can’t use DNS names as a vacation spot
- Subsequent Hop – The IP tackle the visitors must be despatched towards to achieve the vacation spot
- Interface – As a substitute of Subsequent Hop, you may also specify the interface to make use of.
- Distance – Decide the precedence of the route. The decrease the worth, the upper the precedence.
A superb instance of a static route is when you could have a number of websites linked to one another with a VPN connection. Let’s say we’ve got 3 community websites that we need to join to one another:
- Web site A: 192.168.1.0/24
- Web site B: 192.168.2.0/24
- Web site C: 192.168.3.0/24
Web site A is linked with a VPN to Web site B, and Web site B is linked to Web site C. The router in Web site A doesn’t know methods to attain the units in Web site C by default. That is the place static routes are available in. We will create a route with the vacation spot Web site C: 192.168.3.0/24 and set the subsequent hop to Web site B: 192.168.2.0/24.
When you’ve got a failover VPN connection to Web site B, then you definitely add an additional static route, with a Distance of 5, for instance, which can be utilized by the gateway when the primary static route isn’t out there.
The final possibility we’ve got in UniFi Community is to create a static path to a black gap. Because the identify suggests, it will ship all visitors meant for the required vacation spot to a black gap. Which means that the packets can be dropped with none error messages.
Static Routes vs Coverage-Primarily based Routes
In UniFi Community, we’ve got, apart from Static Routes, additionally Coverage-Primarily based Routes. Now, it’s vital to know the distinction between the 2.
A static route relies on the vacation spot IP tackle. You principally inform the router to achieve this particular community (IP tackle / vary), ship all visitors to this subsequent hop (IP tackle) or this interface.
Coverage-based routing, however, permits you to take a look at the supply visitors as nicely. We will inform the router, ship visitors from this particular system, or VLAN, with this vacation spot, by this particular interface.
Configuring Static Routes
Let’s check out creating static routes in UniFi Community. We can be utilizing the instance from the start of the article, with the three websites, for example:

Notice
I’m operating UniFi Community 9.2.82, and in typical Ubiquiti fasion, they’ve renamed the settings menu as soon as once more. Within the screenshots beneath you will notice Coverage Engine, however in older model simply go to Routing
- Open UniFi Community and go to Settings
- Click on on Coverage Engine (Routing)
- Open the Static Routes tab
- Create a new Entry
- Enter a reputation for the route
- Set the distance to 1 (this can be our most important path to the vacation spot)
- Subsequent Hop would be the router of Web site B to which Web site A has a connection
- Vacation spot is the community subnet of Web site C

After you could have added the route, all visitors that you just ship to the 192.168..0/24 subnet will first be despatched to the router of Web site B, to which Web site A has a VPN connection.
Now vital to understand that Web site C, by default, additionally doesn’t know methods to attain Web site A. Which means additionally, you will must create a static route in Web site C for visitors to Web site A.
Wrapping Up
Static Routes are fairly easy to arrange. Ensure that to take a look at the policy-based routes as nicely, as they is likely to be a greater match for what you need to obtain.
When you’ve got any questions, simply drop a remark beneath.