Skip to content

Commit

Permalink
Feat: Add flow-tracking on WAN interfaces
Browse files Browse the repository at this point in the history
  • Loading branch information
gmuloc committed Dec 19, 2023
1 parent 3296485 commit b9bb353
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ interface Dps1
interface Ethernet1
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address dhcp
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,11 +83,13 @@ interface Dps1
interface Ethernet1
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address 10.7.7.7/31
!
interface Ethernet2
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address 172.16.0.1/31
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface Dps1
interface Ethernet1
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address 10.8.8.8/31
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ interface Dps1
interface Ethernet1
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address 10.9.9.9/31
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,13 @@ interface Dps1
interface Ethernet1
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address dhcp
!
interface Ethernet2
no shutdown
no switchport
flow tracker hardware WAN-FLOW-TRACKER
ip address 172.16.6.6/31
!
interface Loopback0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ ethernet_interfaces:
ip_address: dhcp
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,15 @@ ethernet_interfaces:
ip_address: 10.7.7.7/31
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
- name: Ethernet2
peer_type: l3_interface
ip_address: 172.16.0.1/31
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ ethernet_interfaces:
ip_address: 10.8.8.8/31
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ ethernet_interfaces:
ip_address: 10.9.9.9/31
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,11 +190,15 @@ ethernet_interfaces:
ip_address: dhcp
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
- name: Ethernet2
peer_type: l3_interface
ip_address: 172.16.6.6/31
shutdown: false
type: routed
flow_tracker:
hardware: WAN-FLOW-TRACKER
dps_interfaces:
- name: Dps1
description: DPS Interface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,4 +401,7 @@ def _get_l3_interface_cfg(self, l3_interface: dict) -> dict | None:
if ip_address == "dhcp" and l3_interface.get("dhcp_client_accept_default_route", False):
interface["dhcp_client_accept_default_route"] = True

if self.shared_utils.cv_pathfinder_role:
interface["flow_tracker"] = {"hardware": "WAN-FLOW-TRACKER"}

return strip_empties_from_dict(interface)

0 comments on commit b9bb353

Please sign in to comment.