Project

General

Profile

Actions

Feature #12931

closed

Retain knowledge of previous dynamic gateway IP address when interface is down

Added by Jim Pingle about 2 years ago. Updated almost 2 years ago.

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

0%

Estimated time:
Plus Target Version:
22.05
Release Notes:
Default

Description

Our current methods for determining a gateway IP address only work while an interface with a dynamic address is up (e.g. DHCP, PPPoE, etc). There are cases in which we need to know what the previous gateway was before it was removed from the interface/routing table/etc. This already works properly for static IP address interfaces as the gateway address is present in the configuration, but that isn't possible for dynamic WANs.

One example of this need is to kill states for the previous gateway (See #12092) when an interface is down. It could also be useful for gateway monitoring status output.

With dynamic interfaces the gateway address is stored in temporary files (e.g. /tmp/<interface name>_router). This could be as simple as moving that file to /tmp/<interface name>_router.last instead of deleting it, and adding functions to read that when needed. We might need to be careful that the information isn't too stale. It's unlikely to be that simple in practice, given the different types of dynamic interfaces, but it's a starting point.

Nice to have, but can be pushed to a future release as needed.


Related issues

Related to Feature #12092: Utilize new ``pfctl`` abilities to kill statesClosedJim Pingle06/29/2021

Actions
Blocks Bug #12942: Code to kill states for old gateway when reconnecting an interface is incorrectResolvedMarcos M

Actions
Actions #1

Updated by Jim Pingle about 2 years ago

  • Related to Feature #12092: Utilize new ``pfctl`` abilities to kill states added
Actions #2

Updated by Jim Pingle about 2 years ago

  • Status changed from New to In Progress
  • Assignee set to Jim Pingle
Actions #3

Updated by Jim Pingle about 2 years ago

  • Status changed from In Progress to Pull Request Review
Actions #4

Updated by Jim Pingle about 2 years ago

  • Blocks Bug #12942: Code to kill states for old gateway when reconnecting an interface is incorrect added
Actions #5

Updated by Jim Pingle about 2 years ago

  • Status changed from Pull Request Review to Feedback

Changes merged.

Actions #6

Updated by Alhusein Zawi almost 2 years ago

  • Status changed from Feedback to Resolved

/tmp/em2_router.last was created after disabling the interface (proxmox) and it contains previous dynamic gateway IP.

steps:

created WAN2 interface.
selected "IPv4 Configuration Type" = DHCP.
GW was added automatically.
disabled em2 interface from pfsense GUI.
/tmp/em2_router.last is created.

2.7.0.a.20220426.0600

Actions

Also available in: Atom PDF