Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): add ip verify unicast source to ethernet-, …
Browse files Browse the repository at this point in the history
…vlan- and port-channel interfaces (aristanetworks#3492)
  • Loading branch information
Shivani-gslab authored Jan 23, 2024
1 parent 62a4110 commit 7e1ae93
Show file tree
Hide file tree
Showing 21 changed files with 134 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ interface Ethernet1
bgp session tracker ST1
no switchport
ip address 172.31.255.1/31
ip verify unicast source reachable-via rx
bfd interval 500 min-rx 500 multiplier 5
bfd echo
priority-flow-control on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@ interface Port-Channel5
l2 mtu 8000
l2 mru 8000
mlag 5
ip verify unicast source reachable-via rx
storm-control broadcast level 1
storm-control multicast level 1
storm-control unknown-unicast level 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,7 @@ interface Vlan2002
description SVI Description
no autostate
vrf Tenant_B
ip verify unicast source reachable-via rx
isis enable EVPN_UNDERLAY
ip address virtual 10.2.2.1/24
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ interface Ethernet1
bgp session tracker ST1
no switchport
ip address 172.31.255.1/31
ip verify unicast source reachable-via rx
bfd interval 500 min-rx 500 multiplier 5
bfd echo
priority-flow-control on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ interface Port-Channel5
l2 mtu 8000
l2 mru 8000
mlag 5
ip verify unicast source reachable-via rx
storm-control broadcast level 1
storm-control multicast level 1
storm-control unknown-unicast level 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,7 @@ interface Vlan2002
description SVI Description
no autostate
vrf Tenant_B
ip verify unicast source reachable-via rx
isis enable EVPN_UNDERLAY
ip address virtual 10.2.2.1/24
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ ethernet_interfaces:
multiplier: 5
bgp:
session_tracker: ST1
ip_verify_unicast_source_reachable_via: rx
eos_cli: |
comment
Comment created from eos_cli under ethernet_interfaces.Ethernet1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ port_channel_interfaces:
session_tracker: ST2
l2_mtu: 8000
l2_mru: 8000
ip_verify_unicast_source_reachable_via: rx
eos_cli: |
comment
Comment created from eos_cli under port_channel_interfaces.Port-Channel5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ vlan_interfaces:
ip_address_virtual: 10.2.2.1/24
no_autostate: true
isis_enable: "EVPN_UNDERLAY"
ip_verify_unicast_source_reachable_via: rx

- name: Vlan81
description: IPv6 Virtual Address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address</samp>](## "ethernet_interfaces.[].ip_address") | String | | | | IPv4 address/mask or "dhcp" |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address_secondaries</samp>](## "ethernet_interfaces.[].ip_address_secondaries") | List, items: String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "ethernet_interfaces.[].ip_address_secondaries.[]") | String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_verify_unicast_source_reachable_via</samp>](## "ethernet_interfaces.[].ip_verify_unicast_source_reachable_via") | String | | | Valid Values:<br>- <code>any</code><br>- <code>rx</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;dhcp_client_accept_default_route</samp>](## "ethernet_interfaces.[].dhcp_client_accept_default_route") | Boolean | | | | Install default-route obtained via DHCP |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;dhcp_server_ipv4</samp>](## "ethernet_interfaces.[].dhcp_server_ipv4") | Boolean | | | | Enable IPv4 DHCP server. |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;dhcp_server_ipv6</samp>](## "ethernet_interfaces.[].dhcp_server_ipv6") | Boolean | | | | Enable IPv6 DHCP server. |
Expand Down Expand Up @@ -502,6 +503,7 @@
ip_address: <str>
ip_address_secondaries:
- <str>
ip_verify_unicast_source_reachable_via: <str; "any" | "rx">

# Install default-route obtained via DHCP
dhcp_client_accept_default_route: <bool>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vlan</samp>](## "port_channel_interfaces.[].ptp.vlan") | String | | | | VLAN can be 'all' or list of vlans as string |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;transport</samp>](## "port_channel_interfaces.[].ptp.transport") | String | | | Valid Values:<br>- <code>ipv4</code><br>- <code>ipv6</code><br>- <code>layer2</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address</samp>](## "port_channel_interfaces.[].ip_address") | String | | | | IPv4 address/mask |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_verify_unicast_source_reachable_via</samp>](## "port_channel_interfaces.[].ip_verify_unicast_source_reachable_via") | String | | | Valid Values:<br>- <code>any</code><br>- <code>rx</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_nat</samp>](## "port_channel_interfaces.[].ip_nat") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;destination</samp>](## "port_channel_interfaces.[].ip_nat.destination") | Dictionary | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dynamic</samp>](## "port_channel_interfaces.[].ip_nat.destination.dynamic") | List, items: Dictionary | | | | |
Expand Down Expand Up @@ -475,6 +476,7 @@

# IPv4 address/mask
ip_address: <str>
ip_verify_unicast_source_reachable_via: <str; "any" | "rx">
ip_nat:
destination:
dynamic:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address_virtual</samp>](## "vlan_interfaces.[].ip_address_virtual") | String | | | | IPv4_address/Mask |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_address_virtual_secondaries</samp>](## "vlan_interfaces.[].ip_address_virtual_secondaries") | List, items: String | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-&nbsp;&lt;str&gt;</samp>](## "vlan_interfaces.[].ip_address_virtual_secondaries.[]") | String | | | | IPv4_address/Mask |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_verify_unicast_source_reachable_via</samp>](## "vlan_interfaces.[].ip_verify_unicast_source_reachable_via") | String | | | Valid Values:<br>- <code>any</code><br>- <code>rx</code> | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_igmp</samp>](## "vlan_interfaces.[].ip_igmp") | Boolean | | | | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_igmp_version</samp>](## "vlan_interfaces.[].ip_igmp_version") | Integer | | | Min: 1<br>Max: 3 | |
| [<samp>&nbsp;&nbsp;&nbsp;&nbsp;ip_helpers</samp>](## "vlan_interfaces.[].ip_helpers") | List, items: Dictionary | | | | List of DHCP servers |
Expand Down Expand Up @@ -215,6 +216,7 @@

# IPv4_address/Mask
- <str>
ip_verify_unicast_source_reachable_via: <str; "any" | "rx">
ip_igmp: <bool>
ip_igmp_version: <int; 1-3>

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 @@ -276,6 +276,11 @@ keys:
type: list
items:
type: str
ip_verify_unicast_source_reachable_via:
type: str
valid_values:
- any
- rx
dhcp_client_accept_default_route:
type: bool
description: Install default-route obtained via DHCP
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,11 @@ keys:
ip_address:
type: str
description: IPv4 address/mask
ip_verify_unicast_source_reachable_via:
type: str
valid_values:
- any
- rx
ip_nat:
type: dict
$ref: "eos_cli_config_gen#/$defs/interface_ip_nat"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ keys:
items:
type: str
description: IPv4_address/Mask
ip_verify_unicast_source_reachable_via:
type: str
valid_values:
- any
- rx
ip_igmp:
type: bool
ip_igmp_version:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ interface {{ ethernet_interface.name }}
{% if ethernet_interface.ip_address is arista.avd.defined("dhcp") and ethernet_interface.dhcp_client_accept_default_route is arista.avd.defined(true) %}
dhcp client accept default-route
{% endif %}
{% if ethernet_interface.ip_verify_unicast_source_reachable_via is arista.avd.defined %}
ip verify unicast source reachable-via {{ ethernet_interface.ip_verify_unicast_source_reachable_via }}
{% endif %}
{% if ethernet_interface.bfd.interval is arista.avd.defined and
ethernet_interface.bfd.min_rx is arista.avd.defined and
ethernet_interface.bfd.multiplier is arista.avd.defined %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,9 @@ interface {{ port_channel_interface.name }}
{% if port_channel_interface.ip_address is arista.avd.defined %}
ip address {{ port_channel_interface.ip_address }}
{% endif %}
{% if port_channel_interface.ip_verify_unicast_source_reachable_via is arista.avd.defined %}
ip verify unicast source reachable-via {{ port_channel_interface.ip_verify_unicast_source_reachable_via }}
{% endif %}
{% if port_channel_interface.ipv6_enable is arista.avd.defined(true) %}
ipv6 enable
{% endif %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ interface {{ vlan_interface.name }}
{% endfor %}
{% endif %}
{% endif %}
{% if vlan_interface.ip_verify_unicast_source_reachable_via is arista.avd.defined %}
ip verify unicast source reachable-via {{ vlan_interface.ip_verify_unicast_source_reachable_via }}
{% endif %}
{% for ip_helper in vlan_interface.ip_helpers | arista.avd.natural_sort('ip_helper') %}
{% set ip_helper_cli = "ip helper-address " ~ ip_helper.ip_helper %}
{% if ip_helper.vrf is arista.avd.defined %}
Expand Down

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

0 comments on commit 7e1ae93

Please sign in to comment.