Routing Subnets

Started by Haddock27, April 16, 2025, 08:23:38 AM

Previous topic - Next topic
The documentation lacks clarity on configuring static routing for multiple subnets through a single interface. Specifically, I need to route traffic for two different IPv6 subnets (2401:xxxx:xxxx::/64 and fd1a:xxxx:xxxx::/64) via the same interface.

Currently, the interface has a static IP address within the 2401:xxxx:xxxx::/64 subnet. OPNsense automatically created an entry in the routing table for this subnet, so traffic is correctly routed here. For the fd1a:xxxx:xxxx::/64 subnet, I attempted to create a gateway on the same interface.

Creating the gateway required specifying an IP address. I tried both using the actual address and an address within the fd1a:xxxx:xxxx::/64 range. Afterward, I configured a static route for fd1a:xxxx:xxxx::/64, directing it to this newly created gateway.

Despite these steps, traffic destined for the fd1a:xxxx:xxxx::/64 subnet is not being routed correctly. Could someone provide guidance on how to properly configure this setup?

Any assistance would be greatly appreciated.

Can you set up a separate VLAN for each subnet? That will give you different interfaces for the routing table.

That would not be the best solution as the subnet is for a particular set of containerised workloads (using maclvan with docker) so both subnets do in fact reach the same physical interface and traffic is co-mingled on the receiving host. Since writing the initial post I have found that if I select "Dynamic Gateway Policy" on the interface and do not assign any static IPs to the interfaces then the static routes start to work. Presumably this is the correct way to do it - though if anyone could confirm if this is the correct way that would be great.