Project

General

Profile

Actions

Bug #14473

open

Automatic gateway not updating after default deleted

Added by Matthew Foran 11 months ago. Updated 9 months ago.

Status:
Confirmed
Priority:
Low
Assignee:
-
Category:
Gateways
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Default
Affected Version:
2.6.0
Affected Architecture:

Description

Copied from forum post: https://forum.netgate.com/topic/177395/automatic-gateway-not-updating-after-default-deleted

At System/Routing/Gateways in the web UI, I created a new gateway and set it to be the default gateway. It was not working (my fault, not pfsense issue) so I deleted it and returned the "Default gateway IPv4" field to the "Automatic" setting. After hours of frustration I realized this "Automatic" setting had not switched back to the original gateway (received via DHCP). The original gateway was online according to the Status/Gateways page, but was not the default and thus no default route was defined. Manually resetting the default ipv4 gateway solved the problem.

I am on pfSense 2.6.0-RELEASE. I do have ipv6 enabled so there are two gateways on Status/Gateways, one for ipv4 and one for v6 (there should be a default gateway for each).

I found this somewhat similar issue (https://redmine.pfsense.org/issues/11570), but mine seems to be more related to config saving/parsing. While attempting to replicate the issue with the ipv6 gateway I found that even worse, I could not change the default gateway back manually. All my configuration is done in the web UI but I will show how the config file gets messed up:

Default configuration:

<gateways>
        <defaultgw4>WANGW</defaultgw4>
        <defaultgw6>WANGWv6</defaultgw6>
</gateways>

Added a new default ipv6 gateway "test6" and disabled the original:


<gateways>
        <defaultgw4></defaultgw4>
        <defaultgw6></defaultgw6>
        <gateway_item>
                <interface>wan</interface>
                <gateway>dynamic</gateway>
                <name>WAN_DHCP6</name>
                <weight>1</weight>
                <ipprotocol>inet6</ipprotocol>
                <descr><![CDATA[Interface WAN_DHCP6Gateway]]></descr>
                <disabled></disabled>
        </gateway_item>
        <gateway_item>
                <interface>wan</interface>
                <gateway>**garbage ipv6**</gateway>
                <name>test6</name>
                <weight>1</weight>
                <ipprotocol>inet6</ipprotocol>
                <descr></descr>
        </gateway_item>
</gateways>

Removed the new gateway and manually restored the default gateway:


<gateways>
        <defaultgw4></defaultgw4>
        <defaultgw6></defaultgw6>
        <gateway_item>
                <interface>wan</interface>
                <gateway>dynamic</gateway>
                <name>WAN_DHCP6</name>
                <weight>1</weight>
                <ipprotocol>inet6</ipprotocol>
                <descr><![CDATA[Interface WAN_DHCP6 Gateway]]></descr>
        </gateway_item>
</gateways>

But now the web UI does not show wan_dhcp6 as a default gateway!

The gateway itself works as it should, but whatever determines the default gateway is not choosing the only one remaining after "test6" was deleted.

Actions #1

Updated by Christopher Cope 9 months ago

  • Status changed from New to Confirmed

I can confirm this behavior on

23.05-RELEASE (amd64)
built on Mon May 22 15:04:36 UTC 2023
FreeBSD 14.0-CURRENT
as well.

Simply re-saving the Gateways again is enough to create the default route.

Actions #2

Updated by Alhusein Zawi 9 months ago

it could be related to #12536

Actions #3

Updated by Jim Pingle 9 months ago

  • Category changed from Configuration Backend to Gateways
Actions

Also available in: Atom PDF