Two gateways and policy routing
-
Hello everyone,
I have the following problem: I have configured the opt1 Interface of my Netgate 3100 as a WAN interface (added gateway in the interface configuration). It has an IP of 10.150.0.2 and shares the 10.150.0.0/16 network with two other hosts, which both are gateways to different ISPs.
One of these gateways is also the default gateway that's configured for the Netgate (10.150.0.1).
Now, I want to use a policy routing rule to route all traffic from a special IP to the second gateway (10.150.0.3) by setting the gateway in the advanced section. The rule is also being used , as the counters show.
However, even though the gateway 10.150.0.3 is configured, traffic passing the rule is still using the default gateway 10.150.0.1.
The big question here: what am I doing wrong?
Best regards,
Christian Loth -
@christian-loth said in Two gateways and policy routing:
It has an IP of 10.150.0.2 and shares the 10.150.0.0/16 network with two other hosts
So you have set up a /16 network for three hosts?
However, even though the gateway 10.150.0.3 is configured, traffic passing the rule is still using the default gateway 10.150.0.1.
Is the rule on the top of the rule set so the is applied before others?
Did you consider to delete states after activating the rule?Post the rule set please.
-
Hello,
@viragomann said in Two gateways and policy routing:
@christian-loth said in Two gateways and policy routing:
It has an IP of 10.150.0.2 and shares the 10.150.0.0/16 network with two other hosts
So you have set up a /16 network for three hosts?
Yes. I mean it's a private net, got enough of those. :-)
It's not a technical reason, just following a scheme of using private nets that are part of 10/8.However, even though the gateway 10.150.0.3 is configured, traffic passing the rule is still using the default gateway 10.150.0.1.
Is the rule on the top of the rule set so the is applied before others?
Yes
Did you consider to delete states after activating the rule?
No, will do so next time.
Post the rule set please.
Need to make sure to get permission for that, so I probably reply with a rule set on monday.
Best regards,
Christian Loth -
@christian-loth said in Two gateways and policy routing:
Yes. I mean it's a private net, got enough of those. :-)
It's not a technical reason, just following a scheme of using private nets that are part of 10/8.Better to use rather small subnets to prevent routing issues. For instance if you connect to a remote network using a site to site VPN.