Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Add switchport 'tap' and 'tool' mode config…
Browse files Browse the repository at this point in the history
… to the ethernet and port-channel interfaces (#4174)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Shivani Chourasiya <[email protected]>
Co-authored-by: Carl Buchmann <[email protected]>
Co-authored-by: Guillaume Mulocher <[email protected]>
Co-authored-by: Claus Holbech <[email protected]>
  • Loading branch information
6 people authored Dec 17, 2024
1 parent 6b27b2c commit 7b21968
Show file tree
Hide file tree
Showing 12 changed files with 5,146 additions and 2,219 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4758,6 +4758,49 @@ interface Ethernet81/2
interface Ethernet81/10
description isis_port_channel_member
channel-group 110 mode active
!
interface Ethernet82
description Switchport_tap_tool
switchport tap native vlan 10
switchport tap identity 3 inner 5
switchport tap mac-address dest 01:00:00:00:00:00 src 01:23:45:67:89:ab
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 protocol 0x0 strip
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x10 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x11 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x12 strip re-encapsulation ethernet
switchport tap encapsulation gre destination 2.1.1.3 source 2.1.1.4 strip
switchport tap mpls pop all
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
switchport tap allowed vlan 25
switchport tool allowed vlan 23
switchport tool identity qinq
switchport tool identity dot1q source dzgre port
switchport tap truncation 150
switchport tap default group g1 group g2 group g3
switchport tap default nexthop-group nexthop_g1 nexthop_g2 nexthop_g3
switchport tap default interface ethernet4
switchport tap default interface port-channel10
switchport tool group set group1 group2 group3
switchport tool dot1q remove outer 1
!
interface Ethernet83
description Test_tap_tool
switchport tap identity 5
switchport tap mac-address dest 01:00:00:00:00:00
switchport tap encapsulation vxlan strip
switchport tap encapsulation gre strip
switchport tool identity dot1q
switchport tool identity qinq source dzgre policy inner port
switchport tap truncation
!
interface Ethernet84
switchport tap encapsulation gre protocol 0x1 strip
switchport tap encapsulation gre protocol 0x2 feature header length 3 strip
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x4 strip re-encapsulation ethernet
```

### Port-Channel Interfaces
Expand Down Expand Up @@ -5111,7 +5154,7 @@ interface Port-Channel16
isis authentication mode md5
isis authentication key 0 <removed>
spanning-tree guard none
switchport backup-link Port-Channel100.102 prefer vlan 20
switchport backup-link Port-Channel100 prefer vlan 20
!
interface Port-Channel17
description PBR Description
Expand Down Expand Up @@ -5502,6 +5545,47 @@ interface Port-Channel131.10
interface Port-Channel132
profile test-interface-profile
description Test_port-channel_interface-profile
!
interface Port-Channel133
description Test1_switchport_tap_tool
switchport tap native vlan 10
switchport tap identity 3
switchport tap mac-address dest 01:00:00:00:00:00 src 01:23:45:67:89:ab
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 protocol 0x0 strip
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 strip
switchport tap encapsulation gre destination 1.1.1.3 source 1.1.1.4 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x1 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x2 feature header length 2 strip re-encapsulation ethernet
switchport tap mpls pop all
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
switchport tap allowed vlan 25
switchport tool allowed vlan 23
switchport tool identity qinq
switchport tool identity qinq source dzgre port inner policy
switchport tap truncation
switchport tap default group g1 group g2 group g3
switchport tap default nexthop-group nexthop_g1 nexthop_g2 nexthop_g3
switchport tap default interface ethernet4
switchport tap default interface port-channel10
switchport tool group set group1 group2 group3
switchport tool dot1q remove outer 1-2
!
interface Port-Channel134
description Test2_switchport_tap_tool
switchport tap identity 3 inner 10
switchport tap mac-address dest 01:00:00:00:00:00
switchport tap encapsulation vxlan strip
switchport tap encapsulation gre strip
switchport tool identity dot1q
switchport tool identity dot1q source dzgre policy
switchport tap truncation 120
!
interface Port-Channel135
switchport tap encapsulation gre protocol 0x2 feature header length 3 strip
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x10 strip
```

### Loopback Interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1783,7 +1783,7 @@ interface Port-Channel16
isis authentication mode md5
isis authentication key 0 password
spanning-tree guard none
switchport backup-link Port-Channel100.102 prefer vlan 20
switchport backup-link Port-Channel100 prefer vlan 20
!
interface Port-Channel17
description PBR Description
Expand Down Expand Up @@ -2175,6 +2175,47 @@ interface Port-Channel132
profile test-interface-profile
description Test_port-channel_interface-profile
!
interface Port-Channel133
description Test1_switchport_tap_tool
switchport tap native vlan 10
switchport tap identity 3
switchport tap mac-address dest 01:00:00:00:00:00 src 01:23:45:67:89:ab
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 protocol 0x0 strip
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 strip
switchport tap encapsulation gre destination 1.1.1.3 source 1.1.1.4 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x1 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x2 feature header length 2 strip re-encapsulation ethernet
switchport tap mpls pop all
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
switchport tap allowed vlan 25
switchport tool allowed vlan 23
switchport tool identity qinq
switchport tool identity qinq source dzgre port inner policy
switchport tap truncation
switchport tap default group g1 group g2 group g3
switchport tap default nexthop-group nexthop_g1 nexthop_g2 nexthop_g3
switchport tap default interface ethernet4
switchport tap default interface port-channel10
switchport tool group set group1 group2 group3
switchport tool dot1q remove outer 1-2
!
interface Port-Channel134
description Test2_switchport_tap_tool
switchport tap identity 3 inner 10
switchport tap mac-address dest 01:00:00:00:00:00
switchport tap encapsulation vxlan strip
switchport tap encapsulation gre strip
switchport tool identity dot1q
switchport tool identity dot1q source dzgre policy
switchport tap truncation 120
!
interface Port-Channel135
switchport tap encapsulation gre protocol 0x2 feature header length 3 strip
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x10 strip
!
interface Dps1
description Test DPS Interface
shutdown
Expand Down Expand Up @@ -3155,6 +3196,49 @@ interface Ethernet81/10
description isis_port_channel_member
channel-group 110 mode active
!
interface Ethernet82
description Switchport_tap_tool
switchport tap native vlan 10
switchport tap identity 3 inner 5
switchport tap mac-address dest 01:00:00:00:00:00 src 01:23:45:67:89:ab
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 protocol 0x0 strip
switchport tap encapsulation gre destination 1.1.1.1 source 1.1.1.2 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x10 strip
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x11 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre destination 2.1.1.2 protocol 0x12 strip re-encapsulation ethernet
switchport tap encapsulation gre destination 2.1.1.3 source 2.1.1.4 strip
switchport tap mpls pop all
switchport tool mpls pop all
switchport tool encapsulation vn-tag strip
switchport tool encapsulation dot1br strip
switchport tap allowed vlan 25
switchport tool allowed vlan 23
switchport tool identity qinq
switchport tool identity dot1q source dzgre port
switchport tap truncation 150
switchport tap default group g1 group g2 group g3
switchport tap default nexthop-group nexthop_g1 nexthop_g2 nexthop_g3
switchport tap default interface ethernet4
switchport tap default interface port-channel10
switchport tool group set group1 group2 group3
switchport tool dot1q remove outer 1
!
interface Ethernet83
description Test_tap_tool
switchport tap identity 5
switchport tap mac-address dest 01:00:00:00:00:00
switchport tap encapsulation vxlan strip
switchport tap encapsulation gre strip
switchport tool identity dot1q
switchport tool identity qinq source dzgre policy inner port
switchport tap truncation
!
interface Ethernet84
switchport tap encapsulation gre protocol 0x1 strip
switchport tap encapsulation gre protocol 0x2 feature header length 3 strip
switchport tap encapsulation gre protocol 0x3 feature header length 2 strip re-encapsulation ethernet
switchport tap encapsulation gre protocol 0x4 strip re-encapsulation ethernet
!
interface Loopback0
description EVPN_Overlay_Peering
ip address 192.168.255.3/32
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1656,6 +1656,7 @@ ethernet_interfaces:
inner_vlan: 11
network:
encapsulation: client inner

- name: Ethernet70
description: dot1x_aaa_unresponsive
shutdown: false
Expand All @@ -1674,6 +1675,7 @@ ethernet_interfaces:
traffic_allow: true
apply_alternate: true
mac_based_access_list: true

- name: Ethernet71
description: dot1x_aaa_unresponsive1
shutdown: false
Expand All @@ -1690,6 +1692,7 @@ ethernet_interfaces:
time_duration: 10
time_duration_unit: hours
mac_based_access_list: true

- name: Ethernet72
description: dot1x_aaa_unresponsive2
shutdown: false
Expand Down Expand Up @@ -1845,3 +1848,107 @@ ethernet_interfaces:
spanning_tree_portfast: edge
lldp:
ztp_vlan: 112

- name: Ethernet82
description: Switchport_tap_tool
switchport:
tap:
allowed_vlan: 25
default:
groups:
- g2
- g1
- g3
nexthop_groups:
- nexthop_g1
- nexthop_g3
- nexthop_g2
interfaces:
- port-channel10
- ethernet4
identity:
id: 3
inner_vlan: 5
mpls_pop_all: true
native_vlan: 10
truncation:
enabled: true
size: 150
mac_address:
destination: 01:00:00:00:00:00
source: 01:23:45:67:89:ab
encapsulation:
gre:
destinations:
- destination: 1.1.1.1
source: 1.1.1.2
protocols:
- protocol: "0x0"
strip: true
strip: true
- destination: 2.1.1.2
protocols:
- protocol: "0x10"
strip: true
- protocol: "0x11"
feature_header_length: 2
re_encapsulation_ethernet_header: true
strip: true
- protocol: "0x12"
re_encapsulation_ethernet_header: true
strip: true
- destination: 2.1.1.3
source: 2.1.1.4
strip: true
tool:
mpls_pop_all: true
encapsulation:
dot1br_strip: true
vn_tag_strip: true
allowed_vlan: 23
identity:
tag: qinq
dot1q_dzgre_source: port
groups:
- group1
- group2
- group3
dot1q_remove_outer_vlan_tag: 1

- name: Ethernet83
description: Test_tap_tool
switchport:
tap:
identity:
id: 5
mac_address:
destination: 01:00:00:00:00:00
encapsulation:
vxlan_strip: true
gre:
strip: true
truncation:
enabled: true
tool:
identity:
tag: dot1q
qinq_dzgre_source: policy inner port

- name: Ethernet84
switchport:
tap:
encapsulation:
gre:
protocols:
- protocol: "0x1"
strip: true
- protocol: "0x2"
feature_header_length: 3
strip: true
- protocol: "0x3"
feature_header_length: 2
re_encapsulation_ethernet_header: true
strip: true
- protocol: "0x4"
re_encapsulation_ethernet_header: true
strip: true
Loading

0 comments on commit 7b21968

Please sign in to comment.