Todo #16816
openImprove default gateway detection when gateways share the same address
100%
Description
In some scenarios it's possible for multiple gateways to share the same gateway IP address. For example a dynamic (DHCP) gateway can pick up the same address as an existing static gateway. It can also happen with PPPoE multi-WAN configurations from the same ISP. The default gateway detection doesn't take these scenarios into account leads to multiple gateways (of the same IP address family) being considered the default gateway; in turn this results in undefined behavior. This can be seen with dpinger monitoring an unused dynamic gateway instead of the configured default static gateway. Update the default gateway detection to ensure a single default gateway per IP address family.
Use the following priority order when multiple default gateways exist that share the same IP address:- Gateway specified in System > Routing > Gateways > Default gateway.
- First gateway group member with the highest priority tier for the default gateway group.
- First configured gateway.
Files
Updated by Marcos M about 3 hours ago
- Tracker changed from Bug to Todo
- Assignee set to Marcos M
- Target version set to 2.9.0
- Plus Target Version set to 26.07
- Enable the interface OPT1 with no IP address.
- Create a gateway for OPT1 named "OPT1_DHCP" with
dynamicas the gateway IP address. - Create a gateway for OPT1 named "OPT1_STATIC" with a static IP address for the gateway.
- Configure OPT1 as a DHCP WAN, save/apply.
- Switch OPT1 to a static WAN using OPT1_STATIC for its gateway, save/apply.
- Set "OPT1_STATIC" as the default gateway.
Updated by Marcos M about 2 hours ago
- File clipboard-202604301649-mrbbd.png clipboard-202604301649-mrbbd.png added
- File clipboard-202604301650-6dnmo.png clipboard-202604301650-6dnmo.png added


Updated by Marcos M about 2 hours ago
- File clipboard-202604301653-hhff3.png clipboard-202604301653-hhff3.png added
- File clipboard-202604301653-iivjw.png clipboard-202604301653-iivjw.png added
- File clipboard-202604301654-cm3ie.png clipboard-202604301654-cm3ie.png added
- File clipboard-202604301655-fpdcb.png clipboard-202604301655-fpdcb.png added
- Status changed from New to Feedback
- % Done changed from 0 to 100
Applied with 8a360777517314edc9d5e6c296b537f756c2dae8.
Another example of this issue is with DDNS. Since the wrong gateway is monitored, DDNS does not update:
Example after patch, reboot, and DDNS update:

