Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Support for tcp mss ceiling in router path …
Browse files Browse the repository at this point in the history
…selection (#3489)

Co-authored-by: Claus Holbech <[email protected]>
  • Loading branch information
amitsagar-arsita and ClausHolbechArista authored Jan 24, 2024
1 parent c9c1ca4 commit f903099
Show file tree
Hide file tree
Showing 9 changed files with 106 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ interface Management1
| ------ | ----- |
| Dynamic peers source | STUN |

#### TCP MSS Ceiling Configuration

| IPV4 segment size | Direction |
| ----------------- | --------- |
| 200 | ingress |

#### Path Groups

##### Path Group PG-1
Expand Down Expand Up @@ -156,6 +162,7 @@ interface Management1
!
router path-selection
peer dynamic source stun
tcp mss ceiling ipv4 200 ingress
!
path-group PG-1 id 666
keepalive interval 200 milliseconds failure-threshold 3 intervals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ hostname router-path-selection
!
router path-selection
peer dynamic source stun
tcp mss ceiling ipv4 200 ingress
!
path-group PG-1 id 666
keepalive interval 200 milliseconds failure-threshold 3 intervals
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,5 @@ router_path_selection:
path_selection_policy: DPS-P-1
# testing VRF without path_selection_policy
- name: VRF-3
tcp_mss_ceiling:
ipv4_segment_size: 200
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@
| [<samp>&nbsp;&nbsp;vrfs</samp>](## "router_path_selection.vrfs") | List, items: Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;name</samp>](## "router_path_selection.vrfs.[].name") | String | Required, Unique | | | VRF name. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path_selection_policy</samp>](## "router_path_selection.vrfs.[].path_selection_policy") | String | | | | DPS policy name to use for this VRF. |
| [<samp>&nbsp;&nbsp;tcp_mss_ceiling</samp>](## "router_path_selection.tcp_mss_ceiling") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ipv4_segment_size</samp>](## "router_path_selection.tcp_mss_ceiling.ipv4_segment_size") | String | | | | Segment Size for IPv4.<br>Can be an integer in the range 64-65515 or "auto".<br>"auto" will enable auto-discovery which clamps the TCP MSS value to the minimum of all the direct paths<br>and multi-hop path MTU towards a remote VTEP (minus 40bytes to account for IP + TCP header). |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;direction</samp>](## "router_path_selection.tcp_mss_ceiling.direction") | String | | `ingress` | Valid Values:<br>- <code>ingress</code> | Enforce on packets through DPS tunnel for a specific direction.<br>Only 'ingress' direction is supported. |

=== "YAML"

Expand Down Expand Up @@ -186,4 +189,15 @@

# DPS policy name to use for this VRF.
path_selection_policy: <str>
tcp_mss_ceiling:

# Segment Size for IPv4.
# Can be an integer in the range 64-65515 or "auto".
# "auto" will enable auto-discovery which clamps the TCP MSS value to the minimum of all the direct paths
# and multi-hop path MTU towards a remote VTEP (minus 40bytes to account for IP + TCP header).
ipv4_segment_size: <str>

# Enforce on packets through DPS tunnel for a specific direction.
# Only 'ingress' direction is supported.
direction: <str; "ingress"; default="ingress">
```

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,22 @@ keys:
path_selection_policy:
type: str
description: DPS policy name to use for this VRF.
tcp_mss_ceiling:
type: dict
keys:
ipv4_segment_size:
type: str
description: |-
Segment Size for IPv4.
Can be an integer in the range 64-65515 or "auto".
"auto" will enable auto-discovery which clamps the TCP MSS value to the minimum of all the direct paths
and multi-hop path MTU towards a remote VTEP (minus 40bytes to account for IP + TCP header).
convert_types:
- int
direction:
type: str
valid_values: ["ingress"]
default: ingress
description: |-
Enforce on packets through DPS tunnel for a specific direction.
Only 'ingress' direction is supported.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@
| ------ | ----- |
| Dynamic peers source | {{ router_path_selection.peer_dynamic_source | upper }} |
{% endif %}
{% if router_path_selection.tcp_mss_ceiling.ipv4_segment_size is arista.avd.defined %}

#### TCP MSS Ceiling Configuration

| IPV4 segment size | Direction |
| ----------------- | --------- |
| {{ router_path_selection.tcp_mss_ceiling.ipv4_segment_size }} | {{ router_path_selection.tcp_mss_ceiling.direction | arista.avd.default("ingress") }} |
{% endif %}
{% if router_path_selection.path_groups is arista.avd.defined %}

#### Path Groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@ router path-selection
{% if router_path_selection.peer_dynamic_source is arista.avd.defined %}
peer dynamic source {{ router_path_selection.peer_dynamic_source }}
{% endif %}
{% if router_path_selection.tcp_mss_ceiling.ipv4_segment_size is arista.avd.defined %}
{% set tcp_mss_ceiling_cli = "tcp mss ceiling ipv4" %}
{% if router_path_selection.tcp_mss_ceiling.ipv4_segment_size != "auto" %}
{% set tcp_mss_ceiling_cli = tcp_mss_ceiling_cli ~ " " ~ router_path_selection.tcp_mss_ceiling.ipv4_segment_size %}
{% endif %}
{{ tcp_mss_ceiling_cli }} {{ router_path_selection.tcp_mss_ceiling.direction | arista.avd.default("ingress") }}
{% endif %}
{# path group #}
{% for path_group in router_path_selection.path_groups | arista.avd.natural_sort('name') %}
{% set path_group_def = "path-group " ~ path_group.name %}
Expand Down

0 comments on commit f903099

Please sign in to comment.