Skip to content

Commit

Permalink
Adding feature_header_lentgh and re_encapsulation_ethernet_header for…
Browse files Browse the repository at this point in the history
… switchport.tap.encapsulation.gre
  • Loading branch information
Shivani-gslab committed Aug 7, 2024
1 parent 53b649d commit e1c2fe3
Show file tree
Hide file tree
Showing 13 changed files with 114 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,8 @@ interface Ethernet1
switchport tap encapsulation gre protocol 0x0001 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x0010 strip
switchport tap encapsulation gre destination 2.1.1.3 source 2.1.1.4 strip
switchport tap encapsulation gre protocol 0x0002 feature header length 3 strip
switchport tap encapsulation gre protocol 0x0003 feature header length 2 strip re-encapsulation ethernet
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,6 +520,8 @@ interface Port-Channel100
switchport tap encapsulation gre protocol 0x0010 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x0001 strip
switchport tap encapsulation gre destination 1.1.1.3 source 1.1.1.4 strip
switchport tap encapsulation gre protocol 0x0002 feature header length 3 strip
switchport tap encapsulation gre protocol 0x0003 feature header length 2 strip re-encapsulation ethernet
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ interface Ethernet1
switchport tap encapsulation gre protocol 0x0001 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x0010 strip
switchport tap encapsulation gre destination 2.1.1.3 source 2.1.1.4 strip
switchport tap encapsulation gre protocol 0x0002 feature header length 3 strip
switchport tap encapsulation gre protocol 0x0003 feature header length 2 strip re-encapsulation ethernet
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ interface Port-Channel100
switchport tap encapsulation gre protocol 0x0010 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x0001 strip
switchport tap encapsulation gre destination 1.1.1.3 source 1.1.1.4 strip
switchport tap encapsulation gre protocol 0x0002 feature header length 3 strip
switchport tap encapsulation gre protocol 0x0003 feature header length 2 strip re-encapsulation ethernet
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ ethernet_interfaces:
- strip: true
destination: 2.1.1.3
source: 2.1.1.4
- strip: true
protocol: "0x0002"
feature_header_length: 3
- strip: true
protocol: "0x0003"
feature_header_length: 2
re_encapsulation_ethernet_header: true
tool:
mpls_pop_all: true
encapsulation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,13 @@ port_channel_interfaces:
- strip: true
destination: 1.1.1.3
source: 1.1.1.4
- strip: true
protocol: "0x0002"
feature_header_length: 3
- strip: true
protocol: "0x0003"
feature_header_length: 2
re_encapsulation_ethernet_header: true
tool:
mpls_pop_all: true
encapsulation:
Expand Down

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 @@ -192,13 +192,20 @@ interface {{ ethernet_interface.name }}
{% if gre_strip_config.source is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " source " ~ gre_strip_config.source %}
{% endif %}
{% if gre_strip_config.protocol is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " protocol " ~ gre_strip_config.protocol %}
{% endif %}
{% elif gre_strip_config.protocol is arista.avd.defined and gre_strip_config.destination is not arista.avd.defined %}
{% endif %}
{% if gre_strip_config.protocol is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " protocol " ~ gre_strip_config.protocol %}
{% if gre_strip_config.feature_header_length is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " feature header length " ~ gre_strip_config.feature_header_length %}
{% endif %}
{% endif %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " strip" %}
{% if gre_strip_config.protocol is arista.avd.defined and
gre_strip_config.feature_header_length is arista.avd.defined and
gre_strip_config.re_encapsulation_ethernet_header is arista.avd.defined(true) %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " re-encapsulation ethernet" %}
{% endif %}
{{ tap_encapsulation_cli }} strip
{{ tap_encapsulation_cli }}
{% endif %}
{% endfor %}
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,20 @@ interface {{ port_channel_interface.name }}
{% if gre_strip_config.source is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " source " ~ gre_strip_config.source %}
{% endif %}
{% if gre_strip_config.protocol is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " protocol " ~ gre_strip_config.protocol %}
{% endif %}
{% elif gre_strip_config.protocol is arista.avd.defined and gre_strip_config.destination is not arista.avd.defined %}
{% endif %}
{% if gre_strip_config.protocol is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " protocol " ~ gre_strip_config.protocol %}
{% if gre_strip_config.feature_header_length is arista.avd.defined %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " feature header length " ~ gre_strip_config.feature_header_length %}
{% endif %}
{% endif %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " strip" %}
{% if gre_strip_config.protocol is arista.avd.defined and
gre_strip_config.feature_header_length is arista.avd.defined and
gre_strip_config.re_encapsulation_ethernet_header is arista.avd.defined(true) %}
{% set tap_encapsulation_cli = tap_encapsulation_cli ~ " re-encapsulation ethernet" %}
{% endif %}
{{ tap_encapsulation_cli }} strip
{{ tap_encapsulation_cli }}
{% endif %}
{% endfor %}
{% endif %}
Expand Down

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 @@ -1557,6 +1557,20 @@ keys:
description: |-
Protocol type in GRE header.
Protocol range: 0x0000-0xFFFF. It should be unique.
feature_header_length:
description: |-
Feature header length in bytes.
This setting does not reflect in the EOS running-config for protocol 0x0000.
type: int
convert_types:
- str
min: 1
max: 16
re_encapsulation_ethernet_header:
type: bool
description: |-
Extra ethernet header to prepend to the terminated packet.
This setting does not reflect in the EOS running-config for protocol 0x0000.
tool:
description: |-
In tool mode, the interface operates as a tool port.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -945,12 +945,20 @@ keys:
Protocol type in GRE header.
Protocol range: 0x0000-0xFFFF. It should be unique.
feature_header_length:
description: Feature header length in bytes.
description: |-
Feature header length in bytes.
This setting does not reflect in the EOS running-config for protocol 0x0000.
type: int
convert_types:
- str
min: 1
max: 16
re_encapsulation_ethernet_header:
type: bool
description: |-
Extra ethernet header to prepend to the terminated packet.
This setting does not reflect in the EOS running-config for protocol 0x0000.
tool:
description: |-
In tool mode, the interface operates as a tool port.
Expand Down

0 comments on commit e1c2fe3

Please sign in to comment.