From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id CC14D1FF144 for ; Tue, 10 Mar 2026 13:08:47 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id E6A651AF0E; Tue, 10 Mar 2026 13:07:55 +0100 (CET) From: Gabriel Goller To: pve-devel@lists.proxmox.com Subject: [PATCH pve-network v5 2/9] test: add tests for frr.conf.local merging Date: Tue, 10 Mar 2026 13:06:38 +0100 Message-ID: <20260310120705.150425-12-g.goller@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260310120705.150425-1-g.goller@proxmox.com> References: <20260310120705.150425-1-g.goller@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1773144397181 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.019 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: HDQPLPL3QBBKS5ZRZ3X57O2JB53HVISZ X-Message-ID-Hash: HDQPLPL3QBBKS5ZRZ3X57O2JB53HVISZ X-MailFrom: g.goller@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Add tests that test the frr.conf.local merging. This should ensure we do not run into further regressions. Signed-off-by: Gabriel Goller --- src/test/run_test_zones.pl | 16 +- .../expected_controller_config | 192 ++++++++++++++++++ .../frr_local_merge/expected_sdn_interfaces | 53 +++++ .../zones/evpn/frr_local_merge/frr.conf.local | 120 +++++++++++ .../zones/evpn/frr_local_merge/interfaces | 7 + .../zones/evpn/frr_local_merge/sdn_config | 81 ++++++++ .../expected_controller_config | 109 ++++++++++ .../expected_sdn_interfaces | 38 ++++ .../frr.conf.local | 90 ++++++++ .../interfaces | 0 .../sdn_config | 53 +++++ 11 files changed, 756 insertions(+), 3 deletions(-) create mode 100644 src/test/zones/evpn/frr_local_merge/expected_controller_config create mode 100644 src/test/zones/evpn/frr_local_merge/expected_sdn_interfaces create mode 100644 src/test/zones/evpn/frr_local_merge/frr.conf.local create mode 100644 src/test/zones/evpn/frr_local_merge/interfaces create mode 100644 src/test/zones/evpn/frr_local_merge/sdn_config create mode 100644 src/test/zones/evpn/frr_local_merge_router_without_exit/expected_controller_config create mode 100644 src/test/zones/evpn/frr_local_merge_router_without_exit/expected_sdn_interfaces create mode 100644 src/test/zones/evpn/frr_local_merge_router_without_exit/frr.conf.local create mode 100644 src/test/zones/evpn/frr_local_merge_router_without_exit/interfaces create mode 100644 src/test/zones/evpn/frr_local_merge_router_without_exit/sdn_config diff --git a/src/test/run_test_zones.pl b/src/test/run_test_zones.pl index 905b2f42e1dc..806225735e6b 100755 --- a/src/test/run_test_zones.pl +++ b/src/test/run_test_zones.pl @@ -126,12 +126,22 @@ foreach my $test (@tests) { reload_controller => sub { return; }, - read_local_frr_config => sub { - return; - }, ); } + # Mock read_local_frr_config in PVE::Network::SDN::Frr to support testing frr.conf.local merging + my $frr_local_config; + my $frr_local_path = "./$test/frr.conf.local"; + if (-e $frr_local_path) { + $frr_local_config = read_file($frr_local_path); + } + my $mocked_frr = Test::MockModule->new('PVE::Network::SDN::Frr'); + $mocked_frr->mock( + read_local_frr_config => sub { + return $frr_local_config; + }, + ); + my $name = $test; my $expected = read_file("./$test/expected_sdn_interfaces"); diff --git a/src/test/zones/evpn/frr_local_merge/expected_controller_config b/src/test/zones/evpn/frr_local_merge/expected_controller_config new file mode 100644 index 000000000000..6589e6facada --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge/expected_controller_config @@ -0,0 +1,192 @@ +frr version 10.4.1 +frr defaults datacenter +hostname localhost +log syslog informational +service integrated-vtysh-config +! +! +vrf vrf_myzone + vni 1000 + vni 1005 + ip route 192.0.2.0/24 null0 +exit-vrf +! +vrf vrf_yourzone + ip route 198.51.100.0/24 null0 +exit-vrf +! +interface ens19 + no ip ospf passive +! +interface eth0 + ip router isis isis1 +! +interface eth1 + ip router isis isis1 + isis circuit-type level-2-only +! +interface iface2 + ip ospf area 0 +! +router bgp 65000 + bgp router-id 192.168.0.1 + no bgp default ipv4-unicast + coalesce-time 1000 + bgp disable-ebgp-connected-route-check + neighbor BGP peer-group + neighbor BGP remote-as external + neighbor BGP bfd + neighbor 172.16.0.254 peer-group BGP + neighbor 172.17.0.254 peer-group BGP + neighbor VTEP peer-group + neighbor VTEP remote-as 65000 + neighbor VTEP bfd + neighbor VTEP update-source dummy1 + neighbor 192.168.0.2 peer-group VTEP + neighbor 192.168.0.3 peer-group VTEP + neighbor 192.168.1.1 remote-as 65001 + neighbor 192.168.1.1 description "External Peer" + neighbor VTEP prefix-list MY_PREFIX_LIST out + neighbor VTEP allowas-in 1 + neighbor VTEP remote-as 64600 + no neighbor VTEP peer-group + ! + address-family ipv4 unicast + network 192.168.0.1/32 + neighbor BGP activate + neighbor BGP soft-reconfiguration inbound + neighbor VTEP activate + exit-address-family + ! + address-family l2vpn evpn + neighbor VTEP activate + neighbor VTEP route-map MAP_VTEP_IN in + neighbor VTEP route-map MAP_VTEP_OUT out + advertise-all-vni + advertise-svi-ip + no neighbor VTEP route-map MAP_VTEP_IN in + neighbor VTEP route-map MAP_VTEP_IN_CUSTOM in + exit-address-family +exit +! +router bgp 65000 vrf vrf_myzone + bgp router-id 192.168.0.1 + no bgp hard-administrative-reset + no bgp graceful-restart notification + bgp disable-ebgp-connected-route-check + ! + address-family ipv4 unicast + redistribute kernel + exit-address-family + ! + address-family ipv6 unicast + redistribute kernel + exit-address-family + ! + address-family l2vpn evpn + redistribute kernel + exit-address-family +exit +! +router bgp 65000 vrf vrf_yourzone + bgp router-id 172.31.2.1 + no bgp hard-administrative-reset + no bgp graceful-restart notification + ! + address-family ipv4 unicast + redistribute kernel + exit-address-family + ! + address-family ipv6 unicast + redistribute kernel + exit-address-family + ! + address-family l2vpn evpn + redistribute kernel + exit-address-family +exit +! +router eigrp 1 + network 10.0.0.0/8 +exit +! +router isis isis1 + net 47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00 + redistribute ipv4 connected level-1 + redistribute ipv6 connected level-1 + log-adjacency-changes +exit +! +router ospf + passive-interface default +exit +! +access-list filter seq 10 deny ip 10.0.20.0 0.0.0.255 232.1.1.0 0.0.0.255 +access-list filter seq 15 permit ip any any +access-list filter seq 5 permit ip host 10.0.20.2 232.1.1.0 0.0.0.128 +! +ip prefix-list PL_ALLOW seq 10 permit 10.0.0.0/8 le 24 +ip prefix-list loopbacks_ips seq 10 permit 0.0.0.0/0 le 32 +ip prefix-list loopbacks_ips seq 5 deny 8.8.8.0/0 le 32 +! +ipv6 prefix-list PL_ALLOW_6 seq 10 permit fd80:: le 64 +! +bgp community-list standard CL_LOCAL permit 65000:200 +! +route-map CUSTOM_MAP permit 1 + match ip address prefix-list PL_ALLOW +exit +! +route-map MAP_VTEP_IN permit 1 +exit +! +route-map MAP_VTEP_IN permit 2 + set community 65000:200 +exit +! +route-map MAP_VTEP_OUT permit 1 +exit +! +route-map MAP_VTEP_OUT permit 2 + set community 65000:100 +exit +! +route-map MAP_VTEP_OUT permit 3 + match ip next-hop LOCAL +exit +! +route-map correct_src permit 1 + match ip address prefix-list loopbacks_ips + set src 192.168.0.1 +exit +! +route-map correct_src deny 2 + match ip next-hop NOT_LOCAL +exit +! +ip protocol bgp route-map correct_src +router ospf + ospf router-id 172.20.30.1 +exit +! +interface dummy_test + ip ospf area 0 + ip ospf passive +exit +! +interface ens19 + ip ospf area 0 +exit +! +access-list pve_ospf_test_ips permit 172.20.30.0/24 +! +route-map pve_ospf permit 100 + match ip address pve_ospf_test_ips + set src 172.20.30.1 +exit +! +ip protocol ospf route-map pve_ospf +! +! +line vty +! diff --git a/src/test/zones/evpn/frr_local_merge/expected_sdn_interfaces b/src/test/zones/evpn/frr_local_merge/expected_sdn_interfaces new file mode 100644 index 000000000000..c7ddf44ef6d3 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge/expected_sdn_interfaces @@ -0,0 +1,53 @@ +#version:1 + +auto myvnet +iface myvnet + address 10.0.0.1/24 + hwaddress A2:1D:CB:1A:C0:8B + bridge_ports vxlan_myvnet + bridge_stp off + bridge_fd 0 + mtu 1450 + ip-forward on + arp-accept on + vrf vrf_myzone + +auto vrf_myzone +iface vrf_myzone + vrf-table auto + post-up ip route add vrf vrf_myzone unreachable default metric 4278198272 + +auto vrfbr_myzone +iface vrfbr_myzone + bridge-ports vrfvx_myzone + bridge_stp off + bridge_fd 0 + mtu 1450 + vrf vrf_myzone + +auto vrfvx_myzone +iface vrfvx_myzone + vxlan-id 1000 + vxlan-local-tunnelip 192.168.0.1 + bridge-learning off + bridge-arp-nd-suppress on + mtu 1450 + +auto vxlan_myvnet +iface vxlan_myvnet + vxlan-id 100 + vxlan-local-tunnelip 192.168.0.1 + bridge-learning off + bridge-arp-nd-suppress on + mtu 1450 + +auto dummy_test +iface dummy_test inet static + address 172.20.30.1/32 + link-type dummy + ip-forward 1 + +auto ens19 +iface ens19 inet static + address 172.16.3.10/31 + ip-forward 1 diff --git a/src/test/zones/evpn/frr_local_merge/frr.conf.local b/src/test/zones/evpn/frr_local_merge/frr.conf.local new file mode 100644 index 000000000000..b271cb08a06e --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge/frr.conf.local @@ -0,0 +1,120 @@ +! +! Custom FRR configuration to be merged +! +ip nht resolve-via-default +! +ip route 192.0.2.0/24 198.51.100.1 +! +ip protocol bgp route-map correct_src +! +vrf vrf_myzone + vni 1005 +! +router bgp 65000 + neighbor 192.168.1.1 remote-as 65001 + neighbor 192.168.1.1 description "External Peer" + address-family l2vpn evpn + advertise-svi-ip + exit-address-family + address-family ipv4 unicast + neighbor VTEP activate + exit-address-family +exit +! +route-map MAP_VTEP_OUT permit 1 + set community 65000:100 +exit +! +route-map MAP_VTEP_OUT permit 2 + match ip next-hop LOCAL +exit +! +route-map correct_src deny 1 + match ip next-hop NOT_LOCAL +exit +! +route-map MAP_VTEP_IN permit 2 + set community 65000:200 +exit +! +ip prefix-list PL_ALLOW seq 10 permit 10.0.0.0/8 le 24 +! +ip prefix-list loopbacks_ips seq 5 deny 8.8.8.0/0 le 32 +! +ipv6 prefix-list PL_ALLOW_6 seq 10 permit fd80:: le 64 +! +route-map CUSTOM_MAP permit 10 + match ip address prefix-list PL_ALLOW +exit +! +bgp community-list standard CL_LOCAL permit 65000:200 +! +interface eth1 + isis circuit-type level-2-only +exit +! +interface iface2 + ip ospf area 0 +exit +! +interface ens19 + no ip ospf passive +exit +! +router ospf + passive-interface default +exit +! +router bgp 65000 vrf vrf_yourzone + bgp router-id 172.31.2.1 + no bgp hard-administrative-reset + no bgp graceful-restart notification + address-family ipv4 unicast + redistribute kernel + exit-address-family + address-family ipv6 unicast + redistribute kernel + exit-address-family + address-family l2vpn evpn + redistribute kernel + exit-address-family +exit +! +router bgp 65000 vrf vrf_myzone + bgp disable-ebgp-connected-route-check + address-family ipv4 unicast + redistribute kernel + exit-address-family + address-family ipv6 unicast + redistribute kernel + exit-address-family + address-family l2vpn evpn + redistribute kernel + exit-address-family +exit +! +router bgp 65000 + neighbor VTEP prefix-list MY_PREFIX_LIST out + neighbor VTEP allowas-in 1 + neighbor VTEP remote-as 64600 + no neighbor VTEP peer-group + address-family l2vpn evpn + no neighbor VTEP route-map MAP_VTEP_IN in + neighbor VTEP route-map MAP_VTEP_IN_CUSTOM in + exit-address-family +exit +! +router eigrp 1 + network 10.0.0.0/8 +exit +! +vrf vrf_yourzone + ip route 198.51.100.0/24 null0 +! +vrf vrf_myzone + ip route 192.0.2.0/24 null0 +! +access-list filter seq 5 permit ip host 10.0.20.2 232.1.1.0 0.0.0.128 +access-list filter seq 10 deny ip 10.0.20.0 0.0.0.255 232.1.1.0 0.0.0.255 +access-list filter seq 15 permit ip any any +! diff --git a/src/test/zones/evpn/frr_local_merge/interfaces b/src/test/zones/evpn/frr_local_merge/interfaces new file mode 100644 index 000000000000..66bb826a44b3 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge/interfaces @@ -0,0 +1,7 @@ +auto vmbr0 +iface vmbr0 inet static + address 192.168.0.1/24 + gateway 192.168.0.254 + bridge-ports eth0 + bridge-stp off + bridge-fd 0 diff --git a/src/test/zones/evpn/frr_local_merge/sdn_config b/src/test/zones/evpn/frr_local_merge/sdn_config new file mode 100644 index 000000000000..4f90ab416495 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge/sdn_config @@ -0,0 +1,81 @@ +{ + version => 1, + vnets => { + ids => { + myvnet => { tag => "100", type => "vnet", zone => "myzone" }, + }, + }, + + zones => { + ids => { myzone => { ipam => "pve", type => "evpn", controller => "evpnctl", 'vrf-vxlan' => 1000, 'mac' => 'A2:1D:CB:1A:C0:8B' } }, + }, + controllers => { + ids => { + evpnctl => { + type => "evpn", + 'peers' => '192.168.0.1,192.168.0.2,192.168.0.3', + asn => "65000" + }, + bgplocalhost => { + type => "bgp", + 'peers' => '172.16.0.254,172.17.0.254', + ebgp => "1", + asn => "65000", + loopback => 'dummy1', + node => "localhost" + }, + localhost => { + type => "isis", + 'isis-domain' => 'isis1', + 'isis-ifaces' => 'eth1,eth0', + 'isis-net' => "47.0023.0000.0000.0000.0000.0000.0000.1900.0004.00", + loopback => 'dummy1', + node => "localhost", + }, + }, + }, + + subnets => { + ids => { + 'myzone-10.0.0.0-24' => { + 'type' => 'subnet', + 'vnet' => 'myvnet', + 'gateway' => '10.0.0.1', + } + } + }, + fabrics => { + ids => { + test_pathfinder => { + id => 'test_pathfinder', + interfaces => [ + 'name=ens19,ip=172.16.3.20/31' + ], + ip => '172.20.30.2', + type => 'ospf_node' + }, + test => { + ip_prefix => '172.20.30.0/24', + area => '0', + type => 'ospf_fabric', + id => 'test', + }, + test_localhost => { + id => 'test_localhost', + interfaces => [ + 'name=ens19,ip=172.16.3.10/31' + ], + ip => '172.20.30.1', + type => 'ospf_node' + }, + test_raider => { + type => 'ospf_node', + ip => '172.20.30.3', + id => 'test_raider', + interfaces => [ + 'name=ens19,ip=172.16.3.30/31' + ] + } + } + } +} diff --git a/src/test/zones/evpn/frr_local_merge_router_without_exit/expected_controller_config b/src/test/zones/evpn/frr_local_merge_router_without_exit/expected_controller_config new file mode 100644 index 000000000000..8797e3fd82b1 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge_router_without_exit/expected_controller_config @@ -0,0 +1,109 @@ +frr version 10.4.1 +frr defaults datacenter +hostname localhost +log syslog informational +service integrated-vtysh-config +! +! +vrf vrf_evpnz + vni 999 + vni 1233 + exit-vrf +exit-vrf +! +vrf vrf_qwe + vni 1234 + exit-vrf +exit-vrf +! +router bgp 65001 + bgp router-id 17.29.105.96 + no bgp hard-administrative-reset + no bgp default ipv4-unicast + coalesce-time 1000 + no bgp graceful-restart notification + neighbor VTEP peer-group + neighbor VTEP remote-as 65001 + neighbor VTEP bfd + neighbor 172.31.2.1 peer-group VTEP + neighbor 172.31.2.2 peer-group VTEP + neighbor 172.31.2.4 peer-group VTEP + bgp graceful-restart rib-stale-time 123 + ! + address-family ipv6 unicast + redistribute static + exit-address-family + ! + address-family l2vpn evpn + neighbor VTEP activate + neighbor VTEP route-map MAP_VTEP_IN in + neighbor VTEP route-map MAP_VTEP_OUT out + advertise-all-vni + redistribute static + exit-address-family +exit +! +router bgp 65001 vrf vrf_evpnz + bgp router-id 17.29.105.96 + no bgp hard-administrative-reset + no bgp graceful-restart notification + bgp graceful-restart rib-stale-time 123 + ! + address-family ipv4 unicast + redistribute connected + exit-address-family + ! + address-family ipv6 unicast + redistribute connected + redistribute static + exit-address-family + ! + address-family l2vpn evpn + advertise ipv4 unicast + advertise ipv6 unicast + redistribute static + exit-address-family +exit +! +router eigrp 1337 + network 203.0.113.0/27 +exit +! +bgp community-list 70 deny +bgp community-list 70 permit 7675:70 +bgp community-list 80 deny +bgp community-list 80 permit 7675:80 +bgp community-list 90 deny +bgp community-list 90 permit 7675:90 +bgp community-list expanded cme-prefmod-range permit 64512:2... +bgp community-list standard FILTER deny 1:1 +bgp community-list standard FILTER permit +bgp community-list standard cm-prefmod-100 permit 64512:2100 +bgp community-list standard cm-prefmod-200 permit 64512:2200 +bgp community-list standard cm-prefmod-300 permit 64512:2300 +bgp community-list standard cm-prefmod-400 permit 64512:2400 +! +route-map MAP_VTEP_IN permit 1 +exit +! +route-map MAP_VTEP_IN deny 2 +exit +! +route-map MAP_VTEP_IN permit 3 +exit +! +route-map MAP_VTEP_IN permit 4 + match community cm-prefmod-400 + set local-preference 400 +exit +! +route-map MAP_VTEP_IN permit 5 + match ip address 10 + set local-preference 200 +exit +! +route-map MAP_VTEP_OUT permit 1 +exit +! +line vty +! diff --git a/src/test/zones/evpn/frr_local_merge_router_without_exit/expected_sdn_interfaces b/src/test/zones/evpn/frr_local_merge_router_without_exit/expected_sdn_interfaces new file mode 100644 index 000000000000..169f32d38951 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge_router_without_exit/expected_sdn_interfaces @@ -0,0 +1,38 @@ +#version:1 + +auto vnet777 +iface vnet777 + address 192.0.2.1/24 + hwaddress BC:24:11:0B:D1:EE + bridge_ports vxlan_vnet777 + bridge_stp off + bridge_fd 0 + mtu 1450 + ip-forward on + arp-accept on + vrf vrf_evpnz + +auto vrf_evpnz +iface vrf_evpnz + vrf-table auto + post-up ip route add vrf vrf_evpnz unreachable default metric 4278198272 + +auto vrfbr_evpnz +iface vrfbr_evpnz + bridge-ports vrfvx_evpnz + bridge_stp off + bridge_fd 0 + mtu 1450 + vrf vrf_evpnz + +auto vrfvx_evpnz +iface vrfvx_evpnz + vxlan-id 999 + bridge-learning off + mtu 1450 + +auto vxlan_vnet777 +iface vxlan_vnet777 + vxlan-id 777 + bridge-learning off + mtu 1450 diff --git a/src/test/zones/evpn/frr_local_merge_router_without_exit/frr.conf.local b/src/test/zones/evpn/frr_local_merge_router_without_exit/frr.conf.local new file mode 100644 index 000000000000..43de2e011668 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge_router_without_exit/frr.conf.local @@ -0,0 +1,90 @@ +vrf vrf_qwe + vni 1234 +exit-vrf +! +vrf vrf_evpnz + vni 1233 +exit-vrf +! +router eigrp 1337 + network 203.0.113.0/27 +exit +! +bgp community-list 70 permit 7675:70 +bgp community-list 70 deny +bgp community-list 80 permit 7675:80 +bgp community-list 80 deny +bgp community-list 90 permit 7675:90 +bgp community-list 90 deny +bgp community-list standard FILTER deny 1:1 +bgp community-list standard FILTER permit +! +router bgp 65001 + bgp graceful-restart rib-stale-time 123 + address-family ipv6 unicast + redistribute static +exit-address-family + address-family l2vpn evpn + redistribute static +exit-address-family +exit +! + +router bgp 65001 vrf vrf_evpnz + bgp graceful-restart rib-stale-time 123 + address-family ipv6 unicast + redistribute static +exit-address-family + address-family l2vpn evpn + redistribute static +exit-address-family +exit +! +route-map MAP_VTEP_IN deny 1 +exit +! +route-map MAP_VTEP_IN permit 1 +exit +! +route-map MAP_VTEP_IN permit 1 + match community cm-prefmod-400 + set local-preference 400 +exit +! +route-map MAP_VTEP_IN permit 1 + match ip address 10 + set local-preference 200 +exit +! +ip prefix-list pl-peer2-network permit 10.6.1.0/24 +ip prefix-list pl-peer2-network permit 10.6.2.0/24 +ip prefix-list pl-peer2-network permit 192.168.1.0/24 +ip prefix-list pl-peer2-network permit 192.168.2.0/24 +ip prefix-list pl-peer2-network permit 172.16.1/24 +! +route-map rm-prefmod permit 10 + match community cm-prefmod-100 + set local-preference 100 +route-map rm-prefmod permit 20 + match community cm-prefmod-200 + set local-preference 200 +route-map rm-prefmod permit 30 + match community cm-prefmod-300 + set local-preference 300 +route-map rm-prefmod permit 40 + match community cm-prefmod-400 + set local-preference 400 +route-map rm-prefmod permit 50 +! +bgp community-list standard cm-prefmod-100 permit 64512:2100 +bgp community-list standard cm-prefmod-200 permit 64512:2200 +bgp community-list standard cm-prefmod-300 permit 64512:2300 +bgp community-list standard cm-prefmod-400 permit 64512:2400 +bgp community-list expanded cme-prefmod-range permit 64512:2... +! +route-map rm-blackhole permit 10 + description blackhole, up-pref and ensure it cannot escape this AS + set ip next-hop 127.0.0.1 + set local-preference 10 + set community additive no-export +route-map rm-blackhole permit 20 diff --git a/src/test/zones/evpn/frr_local_merge_router_without_exit/interfaces b/src/test/zones/evpn/frr_local_merge_router_without_exit/interfaces new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/src/test/zones/evpn/frr_local_merge_router_without_exit/sdn_config b/src/test/zones/evpn/frr_local_merge_router_without_exit/sdn_config new file mode 100644 index 000000000000..1d1c3076d5e8 --- /dev/null +++ b/src/test/zones/evpn/frr_local_merge_router_without_exit/sdn_config @@ -0,0 +1,53 @@ +{ + version => 1, + "vnets" => { + "ids" => { + "vnet777" => { + "type" => "vnet", + "tag" => 777, + "zone" => "evpnz" + } + } + }, + "zones" => { + "ids" => { + "evpnz" => { + "exitnodes" => { + "titan" => 1 + }, + "advertise-subnets" => 1, + "vrf-vxlan" => 999, + "controller" => "evpnctrl", + "disable-arp-nd-suppression" => 1, + "type" => "evpn", + "mac" => "BC:24:11:0B:D1:EE", + "ipam" => "pve" + } + } + }, + "subnets" => { + "ids" => { + "evpnz-192.0.2.0-24" => { + "type" => "subnet", + "vnet" => "vnet777", + "gateway" => "192.0.2.1" + } + } + }, + "controllers" => { + "ids" => { + "evpnctrl" => { + "asn" => 65001, + "type" => "evpn", + "peers" => "172.31.2.1,172.31.2.2,172.31.2.4" + }, + "isisberserker" => { + "type" => "isis", + "isis-ifaces" => "ens19,ens20", + "isis-net" => "49.0000.1234.0000.00", + "node" => "berserker", + "isis-domain" => "1" + } + } + } +} -- 2.47.3