Skip to content

Commit

Permalink
Feat(eos_cli_config_gen): Added support for DHCP client accept defaul…
Browse files Browse the repository at this point in the history
…t route feature in port-channel interfaces (#4767)

Co-authored-by: Mahesh Kumar <[email protected]>
  • Loading branch information
MaheshGSLAB and Mahesh Kumar authored Dec 2, 2024
1 parent 843c742 commit 47fa743
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3412,6 +3412,7 @@ interface Dps1
| Ethernet65 | Multiple VRIDs | - | 192.0.2.2/25 | default | - | False | - | - |
| Ethernet66 | Multiple VRIDs and tracking | - | 192.0.2.2/25 | default | - | False | - | - |
| Ethernet80 | LAG Member | 17 | *192.0.2.3/31 | **default | **- | **- | **- | **- |
| Ethernet81/2 | LAG Member LACP fallback LLDP ZTP VLAN | 112 | *dhcp | **default | **- | **- | **- | **- |

*Inherited from Port-Channel Interface

Expand Down Expand Up @@ -4674,6 +4675,8 @@ interface Ethernet81/10
| Port-Channel99 | MCAST | - | 192.0.2.10/31 | default | - | - | - | - |
| Port-Channel100.101 | IFL for TENANT01 | - | 10.1.1.3/31 | default | 1500 | - | - | - |
| Port-Channel100.102 | IFL for TENANT02 | - | 10.1.2.3/31 | C2 | 1500 | - | - | - |
| Port-Channel111.400 | TENANT_A pseudowire 3 interface | - | dhcp | default | - | - | - | - |
| Port-Channel112 | LACP fallback individual | - | dhcp | default | - | - | - | - |
| Port-Channel113 | interface_with_mpls_enabled | - | 172.31.128.9/31 | default | - | - | - | - |
| Port-Channel114 | interface_with_mpls_disabled | - | 172.31.128.10/31 | default | - | - | - | - |

Expand Down Expand Up @@ -5112,6 +5115,7 @@ interface Port-Channel111.400
!
encapsulation vlan
client dot1q outer 400 inner 20 network dot1q outer 401 inner 21
ip address dhcp
!
interface Port-Channel111.1000
description L2 Subinterface
Expand All @@ -5130,6 +5134,8 @@ interface Port-Channel112
switchport trunk allowed vlan 112
switchport mode trunk
switchport
ip address dhcp
dhcp client accept default-route
port-channel lacp fallback individual
port-channel lacp fallback timeout 5
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1930,6 +1930,7 @@ interface Port-Channel111.400
!
encapsulation vlan
client dot1q outer 400 inner 20 network dot1q outer 401 inner 21
ip address dhcp
!
interface Port-Channel111.1000
description L2 Subinterface
Expand All @@ -1948,6 +1949,8 @@ interface Port-Channel112
switchport trunk allowed vlan 112
switchport mode trunk
switchport
ip address dhcp
dhcp client accept default-route
port-channel lacp fallback individual
port-channel lacp fallback timeout 5
!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ port_channel_interfaces:

- name: Port-Channel111.400
description: TENANT_A pseudowire 3 interface
ip_address: dhcp
encapsulation_vlan:
client:
encapsulation: dot1q
Expand Down Expand Up @@ -705,12 +706,16 @@ port_channel_interfaces:
allowed_vlan: 112
lacp_fallback_timeout: 5
lacp_fallback_mode: individual
ip_address: dhcp
dhcp_client_accept_default_route: true

- name: Port-Channel113
description: interface_with_mpls_enabled
switchport:
enabled: false
ip_address: 172.31.128.9/31
# This won't be rendered because IP address is not DHCP
dhcp_client_accept_default_route: true
mpls:
ip: true
ldp:
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 @@ -330,6 +330,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_address is arista.avd.defined("dhcp") and port_channel_interface.dhcp_client_accept_default_route is arista.avd.defined(true) %}
dhcp client accept default-route
{% 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 %}
Expand Down
9 changes: 7 additions & 2 deletions python-avd/pyavd/_eos_cli_config_gen/schema/__init__.py

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 @@ -801,7 +801,10 @@ keys:
Hence, MPASS is needed only on MLAG port-channels connected to non-Arista devices.
ip_address:
type: str
description: IPv4 address/mask.
description: IPv4 address/mask or "dhcp".
dhcp_client_accept_default_route:
type: bool
description: Install default-route obtained via DHCP.
ip_verify_unicast_source_reachable_via:
type: str
valid_values:
Expand Down

0 comments on commit 47fa743

Please sign in to comment.