Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat(eos_designs): Add support for l3_port_channel_interfaces for WAN #4752

Open
wants to merge 3 commits into
base: devel
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- [Internal VLAN Allocation Policy Device Configuration](#internal-vlan-allocation-policy-device-configuration)
- [Interfaces](#interfaces)
- [Ethernet Interfaces](#ethernet-interfaces)
- [Port-Channel Interfaces](#port-channel-interfaces)
- [Loopback Interfaces](#loopback-interfaces)
- [Routing](#routing)
- [Service Routing Protocols Model](#service-routing-protocols-model)
Expand Down Expand Up @@ -235,7 +236,6 @@ dhcp server
| -------------- | --------- | --------- |
| Ethernet5 | True | False |
| Ethernet6 | True | False |
| Ethernet8 | True | False |

## Monitoring

Expand Down Expand Up @@ -306,7 +306,9 @@ vlan internal order ascending range 1006 1199
| Ethernet5 | site1-wan1-Ethernet4 | - | 100.64.10.1/24 | default | - | False | - | - |
| Ethernet6 | site1-wan2-Ethernet4 | - | 100.64.11.1/24 | default | - | False | - | - |
| Ethernet7 | site2-wan2-Ethernet4 | - | 100.64.21.1/24 | default | - | False | - | - |
| Ethernet8 | site3-wan1-Ethernet4 | - | 100.64.30.1/24 | default | - | False | - | - |
| Ethernet8 | - | 8 | *100.64.30.1/24 | **default | **- | *False | **- | **- |

*Inherited from Port-Channel Interface

#### Ethernet Interfaces Device Configuration

Expand Down Expand Up @@ -345,11 +347,37 @@ interface Ethernet7
ip address 100.64.21.1/24
!
interface Ethernet8
description site3-wan1-Ethernet4
no shutdown
no switchport
channel-group 8 mode active
```

### Port-Channel Interfaces

#### Port-Channel Interfaces Summary

##### L2

| Interface | Description | Mode | VLANs | Native VLAN | Trunk Group | LACP Fallback Timeout | LACP Fallback Mode | MLAG ID | EVPN ESI |
| --------- | ----------- | ---- | ----- | ----------- | ------------| --------------------- | ------------------ | ------- | -------- |

##### IPv4

| Interface | Description | MLAG ID | IP Address | VRF | MTU | Shutdown | ACL In | ACL Out |
| --------- | ----------- | ------- | ---------- | --- | --- | -------- | ------ | ------- |
| Port-Channel8 | site3-wan1-Port-Channel4 | - | 100.64.30.1/24 | default | - | False | - | - |

#### Port-Channel Interfaces Device Configuration

```eos
!
interface Port-Channel8
description site3-wan1-Port-Channel4
no shutdown
no switchport
ip address 100.64.30.1/24
dhcp server ipv4

```

### Loopback Interfaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- [Interfaces](#interfaces)
- [DPS Interfaces](#dps-interfaces)
- [Ethernet Interfaces](#ethernet-interfaces)
- [Port-Channel Interfaces](#port-channel-interfaces)
- [Loopback Interfaces](#loopback-interfaces)
- [VXLAN Interface](#vxlan-interface)
- [Routing](#routing)
Expand Down Expand Up @@ -287,7 +288,7 @@ daemon TerminAttr

| Tracker Name | Record Export On Inactive Timeout | Record Export On Interval | Number of Exporters | Applied On |
| ------------ | --------------------------------- | ------------------------- | ------------------- | ---------- |
| FLOW-TRACKER | 70000 | 5000 | 1 | Dps1<br>Ethernet1.666<br>Ethernet1.42<br>Ethernet4 |
| FLOW-TRACKER | 70000 | 5000 | 1 | Dps1<br>Ethernet1.666<br>Ethernet1.42<br>Port-Channel4 |

##### Exporters Summary

Expand Down Expand Up @@ -430,7 +431,9 @@ interface Dps1
| --------- | ----------- | ------------- | ---------- | ----| ---- | -------- | ------ | ------- |
| Ethernet1.42 | RED-TEST | - | 10.42.3.1/24 | RED | - | False | - | - |
| Ethernet1.666 | BLUE-TEST | - | 10.66.3.1/24 | BLUE | - | False | - | - |
| Ethernet4 | REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Ethernet8 | - | dhcp | default | - | False | ACL-INTERNET-IN_Ethernet4 | - |
| Ethernet4 | REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud | 4 | *dhcp | **default | **- | *False | *ACL-INTERNET-IN_Port-Channel4 | **- |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the ACL be there? I think it should not be inherited?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might be correct here.
The generated config itself does not have any ACL being applied to Ethernet4 interface.
ACL-INTERNET-IN_Port-Channel4 is being applied for Port-Channel4 interface. So that seems fine.

Issue is with documentation table being generated.
This documentation related snippet appears to be being generated via logic in python-avd/pyavd/_eos_cli_config_gen/j2templates/documentation/ethernet-interfaces.j2 lines 430-440
In the case when ethernet intf is a member of a port-channel, we seem to be setting ip_address, vrf, mtu, shutdown, acl_in, acl_out for ethernet_interface based on values derived from corresponding Port-Channel<> interface.
Would it be correct to inherit values for such attributes?


*Inherited from Port-Channel Interface

#### Ethernet Interfaces Device Configuration

Expand Down Expand Up @@ -459,13 +462,39 @@ interface Ethernet1.666
ip address 10.66.3.1/24
!
interface Ethernet4
description REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Ethernet8
description REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud
no shutdown
no switchport
channel-group 4 mode active
```

### Port-Channel Interfaces

#### Port-Channel Interfaces Summary

##### L2

| Interface | Description | Mode | VLANs | Native VLAN | Trunk Group | LACP Fallback Timeout | LACP Fallback Mode | MLAG ID | EVPN ESI |
| --------- | ----------- | ---- | ----- | ----------- | ------------| --------------------- | ------------------ | ------- | -------- |

##### IPv4

| Interface | Description | MLAG ID | IP Address | VRF | MTU | Shutdown | ACL In | ACL Out |
| --------- | ----------- | ------- | ---------- | --- | --- | -------- | ------ | ------- |
| Port-Channel4 | REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Port-Channel8 | - | dhcp | default | - | False | ACL-INTERNET-IN_Port-Channel4 | - |

#### Port-Channel Interfaces Device Configuration

```eos
!
interface Port-Channel4
description REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Port-Channel8
no shutdown
no switchport
flow tracker hardware FLOW-TRACKER
ip address dhcp
dhcp client accept default-route
ip access-group ACL-INTERNET-IN_Ethernet4 in
ip access-group ACL-INTERNET-IN_Port-Channel4 in
```

### Loopback Interfaces
Expand Down Expand Up @@ -1011,7 +1040,7 @@ ip extcommunity-list ECL-EVPN-SOO permit soo 192.168.255.11:203

```eos
!
ip access-list ACL-INTERNET-IN_Ethernet4
ip access-list ACL-INTERNET-IN_Port-Channel4
1 remark Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface
10 permit udp any host 100.64.30.2 eq isakmp non500-isakmp
30 permit icmp any host 100.64.30.2
Expand Down Expand Up @@ -1168,7 +1197,7 @@ application traffic recognition

| Interface name | Public address | STUN server profile(s) |
| -------------- | -------------- | ---------------------- |
| Ethernet4 | - | INTERNET-pf1-Ethernet2<br>INTERNET-pf2-Ethernet2 |
| Port-Channel4 | - | INTERNET-pf1-Ethernet2<br>INTERNET-pf2-Ethernet2 |

###### Dynamic Peers Settings

Expand Down Expand Up @@ -1206,7 +1235,7 @@ router path-selection
path-group INTERNET id 102
ipsec profile CP-PROFILE
!
local interface Ethernet4
local interface Port-Channel4
stun server-profile INTERNET-pf1-Ethernet2 INTERNET-pf2-Ethernet2
!
peer dynamic
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ wan_router:
id: 11
mgmt_ip: 192.168.17.20/24
uplink_switches: [site3-leaf1]
l3_interfaces:
- name: Ethernet4
peer_interface: Ethernet8
l3_port_channels:
- name: Port-Channel4
mode: active
member_interfaces:
- name: Ethernet4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's set peer_interface here for the example

peer: inet-cloud
ip_address: dhcp
dhcp_ip: 100.64.30.2
profile: INTERNET-WAN-INTERFACE
dhcp_accept_default_route: true
ipv4_acl_in: ACL-INTERNET-IN
peer_port_channel: Port-Channel8
wan_carrier: REGION2-INTERNET-CORP
wan_circuit_id: inet-site3-wan1
flow_tracking:
enabled: true
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,15 @@ spine:
- name: Ethernet7
description: site2-wan2-Ethernet4
ip_address: 100.64.21.1/24
- name: Ethernet8
description: site3-wan1-Ethernet4
l3_port_channels:
- name: Port-Channel8
mode: active
description: site3-wan1-Port-Channel4
member_interfaces:
- name: Ethernet8
ip_address: 100.64.30.1/24
structured_config:
dhcp_server_ipv4: true
raw_eos_cli: |
dhcp server ipv4
Comment on lines +60 to +61
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we move this back to structured_config? If not lets open an issue to add this in eos_cli_config_gen

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

confirmed it is not there - lets open an issue to support this

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue has been opened for eos_cli_config_gen to support dhcp_server_ipv4 attribute when populated for Port-Channel interface within structured config
#4875

Once we have the fix, we could replace raw_eos_cli with block below
structured_config: dhcp_server_ipv4: true

structured_config:
router_bgp:
# Neighbor definition for site2-wan2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,14 @@ management api http-commands
no shutdown
!
aaa authorization exec default local
!
interface Port-Channel8
description site3-wan1-Port-Channel4
no shutdown
no switchport
ip address 100.64.30.1/24
dhcp server ipv4

!
interface Ethernet1
description pf1-Ethernet2
Expand Down Expand Up @@ -87,11 +95,9 @@ interface Ethernet7
ip address 100.64.21.1/24
!
interface Ethernet8
description site3-wan1-Ethernet4
no shutdown
no switchport
ip address 100.64.30.1/24
dhcp server ipv4
channel-group 8 mode active
!
interface Loopback0
description ROUTER_ID
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ router path-selection
path-group INTERNET id 102
ipsec profile CP-PROFILE
!
local interface Ethernet4
local interface Port-Channel4
stun server-profile INTERNET-pf1-Ethernet2 INTERNET-pf2-Ethernet2
!
peer dynamic
Expand Down Expand Up @@ -196,6 +196,15 @@ ip security
key controller
profile DP-PROFILE
!
interface Port-Channel4
description REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Port-Channel8
no shutdown
no switchport
flow tracker hardware FLOW-TRACKER
ip address dhcp
dhcp client accept default-route
ip access-group ACL-INTERNET-IN_Port-Channel4 in
!
interface Dps1
description DPS Interface
mtu 9194
Expand Down Expand Up @@ -225,13 +234,10 @@ interface Ethernet1.666
ip address 10.66.3.1/24
!
interface Ethernet4
description REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud_Ethernet8
description REGION2-INTERNET-CORP_inet-site3-wan1_inet-cloud
no shutdown
no switchport
flow tracker hardware FLOW-TRACKER
ip address dhcp
dhcp client accept default-route
ip access-group ACL-INTERNET-IN_Ethernet4 in
channel-group 4 mode active
!
interface Loopback0
description ROUTER_ID
Expand Down Expand Up @@ -296,7 +302,7 @@ application traffic recognition
field-set l4-port VOICE-PORTS
666-667
!
ip access-list ACL-INTERNET-IN_Ethernet4
ip access-list ACL-INTERNET-IN_Port-Channel4
1 remark Not for PRODUCTION: This ACL is built this way because the lab has an out-of-band interface
10 permit udp any host 100.64.30.2 eq isakmp non500-isakmp
30 permit icmp any host 100.64.30.2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ ethernet_interfaces:
switchport:
enabled: false
- name: Ethernet8
description: site3-wan1-Ethernet4
shutdown: false
ip_address: 100.64.30.1/24
dhcp_server_ipv4: true
peer_type: l3_interface
channel_group:
id: 8
mode: active
peer_type: l3_port_channel_member
switchport:
enabled: false
hostname: inet-cloud
Expand Down Expand Up @@ -112,6 +112,17 @@ ntp:
- name: 0.pool.ntp.org
preferred: true
vrf: MGMT
port_channel_interfaces:
- name: Port-Channel8
description: site3-wan1-Port-Channel4
shutdown: false
ip_address: 100.64.30.1/24
peer_type: l3_port_channel
switchport:
enabled: false
eos_cli: 'dhcp server ipv4

'
router_bgp:
as: '65666'
router_id: 172.31.255.23
Expand Down
Loading
Loading