Skip to content

Commit 81535a7

Browse files
Shivani-gslabMaheshGSLABlaxmikantchintakindigmuloc
authored
Feat(eos_designs): Add support for ipv6 addresses in l3_interfaces in network_services (#6876)
Co-authored-by: Mahesh Kumar <122076792+MaheshGSLAB@users.noreply.github.com> Co-authored-by: laxmikantchintakindi <159624484+laxmikantchintakindi@users.noreply.github.com> Co-authored-by: Guillaume Mulocher <gmulocher@arista.com>
1 parent f1b3115 commit 81535a7

19 files changed

Lines changed: 1167 additions & 104 deletions

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
# Minimum config to only test the specific feature.
3+
type: l3leaf
4+
l3leaf:
5+
defaults:
6+
loopback_ipv4_pool: 192.168.255.0/24
7+
loopback_ipv4_offset: 8
8+
vtep_loopback_ipv4_pool: 192.168.254.0/24
9+
virtual_router_mac_address: 00:dc:00:00:00:0a
10+
nodes:
11+
- name: net-srv-l3-interfaces-ipv6-addresses-length-mismatch
12+
id: 101
13+
bgp_as: 101
14+
15+
tenants:
16+
- name: TENANT_B
17+
vrfs:
18+
- name: TENANT_B_WAN
19+
vrf_id: 20
20+
l3_interfaces:
21+
- description: TENANT_B_SITE_3
22+
enabled: true
23+
interfaces:
24+
- Ethernet6
25+
# ipv6_addresses length (2) does not match nodes length (1)
26+
ip_addresses:
27+
- 192.168.48.4/31
28+
ipv6_addresses:
29+
- 2001:db8::1/64
30+
- 2001:db8::2/64
31+
nodes:
32+
- net-srv-l3-interfaces-ipv6-addresses-length-mismatch
33+
34+
expected_error_message: >-
35+
Length of 'ipv6_addresses' (2) must match length of 'nodes' (1)
36+
for l3_interfaces under VRF 'TENANT_B_WAN' in tenant 'TENANT_B'.

ansible_collections/arista/avd/extensions/molecule/eos_designs_negative_unit_tests/inventory/host_vars/net-srv-l3-po-sub-interface-without-ip.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,5 @@ tenants:
3838
node: net-srv-l3-po-sub-interface-without-ip
3939

4040
expected_error_message: >-
41-
'l3leaf.nodes[name=net-srv-l3-po-sub-interface-without-ip].l3_port_channels[name=Port-Channel1111.100].ip_address' is required but was not found.
41+
'l3leaf.nodes[name=net-srv-l3-po-sub-interface-without-ip].l3_port_channels[name=Port-Channel1111.100].ip_address or ipv6_addresses'
42+
is required but was not found.

ansible_collections/arista/avd/extensions/molecule/eos_designs_negative_unit_tests/inventory/hosts.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,7 @@ all:
484484
monitor-connectivity-local-interfaces-not-in-interface-sets:
485485
monitor-connectivity-vrf-host-local-interfaces-not-in-interface-sets:
486486
monitor-connectivity-vrf-local-interfaces-not-in-interface-sets:
487+
net-srv-l3-interfaces-ipv6-addresses-length-mismatch:
487488
net-srv-l3-po-sub-interface-with-members:
488489
net-srv-l3-po-sub-interface-with-mode:
489490
net-srv-l3-po-sub-interface-with-mtu:
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
!
2+
no enable password
3+
no aaa root
4+
!
5+
vlan internal order ascending range 1006 1199
6+
!
7+
transceiver qsfp default-mode 4x10G
8+
!
9+
service routing protocols model multi-agent
10+
!
11+
hostname network-services-l3-interfaces
12+
!
13+
vrf instance L3INTF_TEST
14+
!
15+
vrf instance MGMT
16+
!
17+
interface Ethernet10
18+
description ipv6-only-default-vrf
19+
no shutdown
20+
no switchport
21+
ipv6 address 2001:db8:10::1/64
22+
!
23+
interface Ethernet11
24+
description dual-stack-default-vrf
25+
no shutdown
26+
no switchport
27+
ip address 10.0.11.1/31
28+
ipv6 address 2001:db8:11::1/64
29+
ipv6 access-group TEST-IPV6-ACL-STATIC-IN in
30+
!
31+
interface Ethernet12
32+
description ipv6-only-non-default-vrf
33+
no shutdown
34+
no switchport
35+
vrf L3INTF_TEST
36+
ipv6 address 2001:db8:12::1/64
37+
ipv6 access-group TEST-IPV6-ACL-WITH-IP-FIELDS-OUT_Ethernet12 out
38+
!
39+
interface Loopback0
40+
description ROUTER_ID
41+
no shutdown
42+
ip address 192.168.200.1/32
43+
!
44+
interface Loopback1
45+
description VXLAN_TUNNEL_SOURCE
46+
no shutdown
47+
ip address 192.168.201.1/32
48+
!
49+
interface Vxlan1
50+
description network-services-l3-interfaces_VTEP
51+
vxlan source-interface Loopback1
52+
vxlan udp-port 4789
53+
vxlan vrf default vni 1
54+
vxlan vrf L3INTF_TEST vni 2
55+
!
56+
ip virtual-router mac-address 00:dc:00:00:00:0b
57+
!
58+
ipv6 access-list TEST-IPV6-ACL-STATIC-IN
59+
10 deny ipv6 any any
60+
!
61+
ipv6 access-list TEST-IPV6-ACL-WITH-IP-FIELDS-OUT_Ethernet12
62+
10 permit ipv6 host 2001:db8:12::1 any
63+
!
64+
ip routing
65+
ip routing vrf L3INTF_TEST
66+
no ip routing vrf MGMT
67+
!
68+
ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
69+
seq 10 permit 192.168.200.0/24 eq 32
70+
seq 20 permit 192.168.201.0/24 eq 32
71+
!
72+
ipv6 unicast-routing
73+
!
74+
ipv6 unicast-routing vrf L3INTF_TEST
75+
!
76+
route-map RM-CONN-2-BGP permit 10
77+
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
78+
!
79+
router bfd
80+
multihop interval 300 min-rx 300 multiplier 3
81+
!
82+
router bgp 200
83+
router-id 192.168.200.1
84+
update wait-install
85+
no bgp default ipv4-unicast
86+
maximum-paths 4
87+
redistribute connected route-map RM-CONN-2-BGP
88+
!
89+
vrf L3INTF_TEST
90+
rd 192.168.200.1:2
91+
route-target import evpn 2:2
92+
route-target export evpn 2:2
93+
router-id 192.168.200.1
94+
redistribute connected
95+
!
96+
end

ansible_collections/arista/avd/extensions/molecule/eos_designs_unit_tests/intended/configs/network-services-l3-port-channels.cfg

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,20 @@ interface Port-Channel23
7070
no shutdown
7171
no switchport
7272
!
73+
interface Port-Channel33
74+
description ipv6-cloud_Po33
75+
no shutdown
76+
no switchport
77+
ipv6 address 2001:db8:1::1/64
78+
!
79+
interface Port-Channel44
80+
description dual-stack-cloud_Po44
81+
no shutdown
82+
no switchport
83+
ip address 10.10.30.2/29
84+
ipv6 address 2001:db8:2::1/64
85+
ipv6 access-group in6ACL in
86+
!
7387
interface Port-Channel77
7488
description L3 Port-Channel without ip_address
7589
no shutdown
@@ -150,6 +164,14 @@ interface Port-Channel1113
150164
ip address 1.1.1.13/29
151165
ip ospf area 0.0.0.0
152166
!
167+
interface Port-Channel2000
168+
description ipv6-cloud-testing_Po2000
169+
no shutdown
170+
no switchport
171+
vrf TESTING
172+
ipv6 address 2001:db8:3::1/64
173+
ipv6 access-group out6ACL_Port-Channel2000 out
174+
!
153175
interface Ethernet4
154176
description man descr inet-clout eth8
155177
no shutdown
@@ -193,6 +215,21 @@ interface Ethernet24
193215
no shutdown
194216
channel-group 23 mode on
195217
!
218+
interface Ethernet33
219+
description ipv6-cloud_Ethernet33
220+
no shutdown
221+
channel-group 33 mode active
222+
!
223+
interface Ethernet45
224+
description dual-stack-cloud_Ethernet45
225+
no shutdown
226+
channel-group 44 mode active
227+
!
228+
interface Ethernet46
229+
description ipv6-cloud-testing_Ethernet46
230+
no shutdown
231+
channel-group 2000 mode active
232+
!
196233
interface Ethernet77
197234
description underlay-peer_Ethernet77
198235
no shutdown
@@ -228,6 +265,12 @@ interface Vxlan1
228265
!
229266
ip virtual-router mac-address 00:dc:00:00:00:0a
230267
!
268+
ipv6 access-list in6ACL
269+
10 deny ipv6 any any
270+
!
271+
ipv6 access-list out6ACL_Port-Channel2000
272+
10 permit ipv6 host 2001:db8:3::1 any
273+
!
231274
ip access-list inACL
232275
10 deny ip any any
233276
!
@@ -243,6 +286,9 @@ ip prefix-list PL-LOOPBACKS-EVPN-OVERLAY
243286
seq 10 permit 192.168.255.0/24 eq 32
244287
seq 20 permit 192.168.254.0/24 eq 32
245288
!
289+
ipv6 unicast-routing
290+
ipv6 unicast-routing vrf TESTING
291+
!
246292
route-map RM-CONN-2-BGP permit 10
247293
match ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
248294
!
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
aaa_root:
2+
disabled: true
3+
config_end: true
4+
enable_password:
5+
disabled: true
6+
ethernet_interfaces:
7+
- name: Ethernet10
8+
description: ipv6-only-default-vrf
9+
shutdown: false
10+
ipv6_addresses:
11+
- 2001:db8:10::1/64
12+
metadata:
13+
peer_type: l3_interface
14+
switchport:
15+
enabled: false
16+
- name: Ethernet11
17+
description: dual-stack-default-vrf
18+
shutdown: false
19+
ip_address: 10.0.11.1/31
20+
ipv6_addresses:
21+
- 2001:db8:11::1/64
22+
ipv6_access_group_in: TEST-IPV6-ACL-STATIC-IN
23+
metadata:
24+
peer_type: l3_interface
25+
switchport:
26+
enabled: false
27+
- name: Ethernet12
28+
description: ipv6-only-non-default-vrf
29+
shutdown: false
30+
vrf: L3INTF_TEST
31+
ipv6_addresses:
32+
- 2001:db8:12::1/64
33+
ipv6_access_group_out: TEST-IPV6-ACL-WITH-IP-FIELDS-OUT_Ethernet12
34+
metadata:
35+
peer_type: l3_interface
36+
switchport:
37+
enabled: false
38+
hostname: network-services-l3-interfaces
39+
ip_igmp_snooping:
40+
globally_enabled: true
41+
ip_routing: true
42+
ip_virtual_router_mac_address: 00:dc:00:00:00:0b
43+
ipv6_access_lists:
44+
- name: TEST-IPV6-ACL-STATIC-IN
45+
entries:
46+
- protocol: ipv6
47+
source: any
48+
destination: any
49+
sequence: 10
50+
action: deny
51+
- name: TEST-IPV6-ACL-WITH-IP-FIELDS-OUT_Ethernet12
52+
entries:
53+
- protocol: ipv6
54+
source: 2001:db8:12::1
55+
destination: any
56+
sequence: 10
57+
action: permit
58+
ipv6_unicast_routing: true
59+
loopback_interfaces:
60+
- name: Loopback0
61+
description: ROUTER_ID
62+
shutdown: false
63+
ip_address: 192.168.200.1/32
64+
- name: Loopback1
65+
description: VXLAN_TUNNEL_SOURCE
66+
shutdown: false
67+
ip_address: 192.168.201.1/32
68+
metadata:
69+
is_deployed: true
70+
fabric_name: EOS_DESIGNS_UNIT_TESTS
71+
prefix_lists:
72+
- name: PL-LOOPBACKS-EVPN-OVERLAY
73+
sequence_numbers:
74+
- sequence: 10
75+
action: permit 192.168.200.0/24 eq 32
76+
- sequence: 20
77+
action: permit 192.168.201.0/24 eq 32
78+
route_maps:
79+
- name: RM-CONN-2-BGP
80+
sequence_numbers:
81+
- sequence: 10
82+
type: permit
83+
match:
84+
- ip address prefix-list PL-LOOPBACKS-EVPN-OVERLAY
85+
router_bfd:
86+
multihop:
87+
interval: 300
88+
min_rx: 300
89+
multiplier: 3
90+
router_bgp:
91+
as: '200'
92+
router_id: 192.168.200.1
93+
maximum_paths:
94+
paths: 4
95+
updates:
96+
wait_install: true
97+
bgp:
98+
default:
99+
ipv4_unicast: false
100+
redistribute:
101+
connected:
102+
enabled: true
103+
route_map: RM-CONN-2-BGP
104+
vrfs:
105+
- name: L3INTF_TEST
106+
rd: 192.168.200.1:2
107+
route_targets:
108+
import:
109+
- address_family: evpn
110+
route_targets:
111+
- '2:2'
112+
export:
113+
- address_family: evpn
114+
route_targets:
115+
- '2:2'
116+
router_id: 192.168.200.1
117+
redistribute:
118+
connected:
119+
enabled: true
120+
service_routing_protocols_model: multi-agent
121+
transceiver_qsfp_default_mode_4x10: true
122+
vlan_internal_order:
123+
allocation: ascending
124+
range:
125+
beginning: 1006
126+
ending: 1199
127+
vrfs:
128+
- name: MGMT
129+
ip_routing: false
130+
- name: L3INTF_TEST
131+
ip_routing: true
132+
ipv6_routing: true
133+
metadata:
134+
tenants:
135+
- L3INTF
136+
vxlan_interface:
137+
vxlan1:
138+
description: network-services-l3-interfaces_VTEP
139+
vxlan:
140+
source_interface: Loopback1
141+
udp_port: 4789
142+
vrfs:
143+
- name: default
144+
vni: 1
145+
- name: L3INTF_TEST
146+
vni: 2

0 commit comments

Comments
 (0)