OPNsense Forum

Archive => 22.1 Legacy Series => Topic started by: SimpleRezo on June 10, 2022, 11:32:49 am

Title: Issue with static IP configuration - cannot define static gateway
Post by: SimpleRezo on June 10, 2022, 11:32:49 am
Hi

With the last version (22.1.8_1) we are facing a bug when trying to setup static IPv4 WAN.

We cannot add the gateway, the GUI always answer "The gateway address does not lie within one of the chosen interface's IPv4 subnets". Of course, it's not the case ! I tried with 192.168.1.1/24 and 192.168.1.254 as gateway.

I have noticed:
 - that an error 500 occurs on POST system_gateways_edit.php without any details (and no error repport)
 - the same bug occuring when IP has been saved and we try to setup gateway through System / Gateways
 - the only "workaround" is to enable "Far gateway"

Regards
Title: Re: Issue with static IP configuration - cannot define static gateway
Post by: franco on June 10, 2022, 11:42:29 am
> Of course, it's not the case !

>  - the only "workaround" is to enable "Far gateway"

In that case it's not a workaround. It is the solution.


Cheers,
Franco
Title: Re: Issue with static IP configuration - cannot define static gateway
Post by: SimpleRezo on June 10, 2022, 11:53:14 am
That's a weird solution since the gateway is not "far", and that's a regression bug.

We have also been able to create the gateway without using "far", but it requires to Apply configuration first: so my guess is now the check is made on the "current" IP address and not the new one.
Title: Re: Issue with static IP configuration - cannot define static gateway
Post by: franco on June 10, 2022, 01:32:33 pm
If it's not in any attached network it's not "near" either. I'd call this "far" enough. :)

Frankly, I don't want to debate semantics for the configuration you chose to apply. You seem to have your reasons for not having a gateway that is locally reachable so you need to configure it as such.


Cheers,
Franco
Title: Re: Issue with static IP configuration - cannot define static gateway
Post by: defaultuserfoo on June 11, 2022, 01:42:03 am
Well, I don't really understand this idea of a "far" gateway.  I might understand an "unreachable" gateway, but what actually is "far"?  A gateway is kinda always far and otherwise it might not be a gateway :~Z
Title: Re: Issue with static IP configuration - cannot define static gateway
Post by: SimpleRezo on August 24, 2022, 04:50:27 pm
If it's not in any attached network it's not "near" either. I'd call this "far" enough. :)

Frankly, I don't want to debate semantics for the configuration you chose to apply. You seem to have your reasons for not having a gateway that is locally reachable so you need to configure it as such.


Cheers,
Franco

The gateway of course is on the same network - actually can be closer since it's directly linked -, and locally reachable !

As mentionned in my initial message:
  IP static: 192.168.1.1/24
  IP gateway: 192.168.1.254

And as I explained in my second message: "We have also been able to create the gateway without using "far", but it requires to Apply configuration first: so my guess is now the check is made on the "current" IP address and not the new one."
Title: Re: Issue with static IP configuration - cannot define static gateway
Post by: franco on August 24, 2022, 09:03:00 pm
And as I explained in my second message: "We have also been able to create the gateway without using "far", but it requires to Apply configuration first: so my guess is now the check is made on the "current" IP address and not the new one."

Yes. Because when you use e.g. DHCP you cannot guess the IP beforehand and need to enable and apply the interface first.


Cheers,
Franco