From c820d8f282d5769defe6c82a5e8534dd4366a95e Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <ak@geant.org> Date: Thu, 16 Jan 2025 15:13:30 +0000 Subject: [PATCH 1/3] Add local address in BGP neigbor template --- geant/gap_ansible/roles/bgp_config/templates/bgp_neighbor.j2 | 3 ++- geant/gap_ansible/roles/bgp_config/vars/main.yml | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/geant/gap_ansible/roles/bgp_config/templates/bgp_neighbor.j2 b/geant/gap_ansible/roles/bgp_config/templates/bgp_neighbor.j2 index f5f2e069..71b3d4d9 100644 --- a/geant/gap_ansible/roles/bgp_config/templates/bgp_neighbor.j2 +++ b/geant/gap_ansible/roles/bgp_config/templates/bgp_neighbor.j2 @@ -5,11 +5,12 @@ {% if neighbor.bfd_enabled %} <bfd-liveness>true</bfd-liveness> {% endif %} - {% if neighbor.ip_type == 'ipv4' %} + <local-address>{{ ipv4_local_addr }}</local-address> <description>-- Peering with {{ partner_name | upper }} --</description> <group>{{ bgp.group.ipv4 }}</group> {% elif neighbor.ip_type == 'ipv6' %} + <local-address>{{ ipv6_local_addr }}</local-address> <description>-- IPv6 Peering with {{ partner_name | upper }} --</description> <group>{{ bgp.group.ipv6 }}</group> {% endif %} diff --git a/geant/gap_ansible/roles/bgp_config/vars/main.yml b/geant/gap_ansible/roles/bgp_config/vars/main.yml index 5bdb6c9d..3f988693 100644 --- a/geant/gap_ansible/roles/bgp_config/vars/main.yml +++ b/geant/gap_ansible/roles/bgp_config/vars/main.yml @@ -3,3 +3,5 @@ is_standalone_run: false bgp_obj: "{{ ap.sbp.bgp_session_list }}" +ipv4_local_addr: "{{ ap.sbp.ipv4_address }}" +ipv6_local_addr: "{{ ap.sbp.ipv6_address }}" -- GitLab From 032f963737447cb18c02b3cb975f8b9517b4895b Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <ak@geant.org> Date: Thu, 16 Jan 2025 16:45:42 +0000 Subject: [PATCH 2/3] VPRN template updates - add aggregates if defined - add BGP stanza description == VPRN name --- .../roles/bc_templates/routers/nokia/router/vprn.j2 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2 b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2 index 9f7be1fb..62e377e5 100644 --- a/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2 +++ b/geant/gap_ansible/roles/bc_templates/routers/nokia/router/vprn.j2 @@ -26,7 +26,19 @@ </auto-bind-tunnel> </mpls> </bgp-ipvpn> + {% if vprn.aggregates is defined %} + <aggregates> + {% for ag in vprn.aggregates %} + <aggregate> + <ip-prefix>{{ ag.ip_prefix }}</ip-prefix> + <community>{{ ag.community }}</community> + <discard-component-communities>{{ ag.dcc }}</discard-component-communities> + </aggregate> + {% endfor %} + </aggregates> + {% endif %} <bgp> + <description>{{ vprn.name }}</description> {% with bgp_base_obj=vprn.bgp, bgp_context='vprn' %} {% include 'router/bgp_base.j2' %} {% endwith %} -- GitLab From 9573cf1c66c41f5a9a6a6e8fcdcb0ae083480fc8 Mon Sep 17 00:00:00 2001 From: Aleksandr Kurbatov <ak@geant.org> Date: Thu, 16 Jan 2025 16:46:10 +0000 Subject: [PATCH 3/3] SBP template update - add cflowd static config --- geant/gap_ansible/roles/sbp/templates/deploy_sbp.j2 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/geant/gap_ansible/roles/sbp/templates/deploy_sbp.j2 b/geant/gap_ansible/roles/sbp/templates/deploy_sbp.j2 index 07b1b5d4..90c4faef 100644 --- a/geant/gap_ansible/roles/sbp/templates/deploy_sbp.j2 +++ b/geant/gap_ansible/roles/sbp/templates/deploy_sbp.j2 @@ -19,6 +19,14 @@ <description>SRV_L3VPN CUSTOMER {{ partner_name }} {{ '#'+ap.custom_service_name if ap.custom_service_name is string }} ${{ ap.sbp.gs_id }} | ASN{{ partner.asn }} | </description> {% endif %} <ip-mtu>{{ sbp_params.ip_mtu }}</ip-mtu> + <cflowd-parameters> + <sampling> + <sampling-type>unicast</sampling-type> + <type>interface</type> + <direction>ingress-only</direction> + <sample-profile>1</sample-profile> + </sampling> + </cflowd-parameters> <sap> {% if ap.sbp.is_tagged %} <sap-id>{{ lag_name }}:{{ ap.sbp.vlan_id }}</sap-id> -- GitLab