From cd0597f04e29e17fe76013ba19581d9eaeea611c Mon Sep 17 00:00:00 2001 From: Cheeze_It Date: Sun, 6 Dec 2020 00:06:10 -0700 Subject: mpls-conf: T915: Add LDP local label allocation control. In this commit we added the ability to control the local label allocation control for FECs. It allows for the router to not allocate a label for every interface, just the interfaces that are desired by the operator. --- data/templates/frr/ldpd.frr.tmpl | 20 +++++++++++++ interface-definitions/protocols-mpls.xml.in | 45 +++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) diff --git a/data/templates/frr/ldpd.frr.tmpl b/data/templates/frr/ldpd.frr.tmpl index 280df41eb..86342b3eb 100644 --- a/data/templates/frr/ldpd.frr.tmpl +++ b/data/templates/frr/ldpd.frr.tmpl @@ -33,7 +33,17 @@ neighbor {{neighbors}} session holdtime {{ldp.neighbor[neighbors].session_holdti {% if ldp.discovery is defined %} {% if ldp.discovery.transport_ipv4_address is defined %} address-family ipv4 +{% if ldp.allocation is defined %} +{% if ldp.allocation.ipv4 is defined %} +{% if ldp.allocation.ipv4.access_list is defined %} +label local allocate for {{ ldp.allocation.ipv4.access_list }} +{% endif %} +label local allocate host-routes +{% endif %} label local allocate host-routes +{% else %} +label local allocate host-routes +{% endif %} {% if ldp.discovery.transport_ipv4_address is defined %} discovery transport-address {{ ldp.discovery.transport_ipv4_address }} {% endif %} @@ -77,7 +87,17 @@ no address-family ipv4 {% if ldp.discovery is defined %} {% if ldp.discovery.transport_ipv6_address is defined %} address-family ipv6 +{% if ldp.allocation is defined %} +{% if ldp.allocation.ipv6 is defined %} +{% if ldp.allocation.ipv6.access_list6 is defined %} +label local allocate for {{ ldp.allocation.ipv6.access_list6 }} +{% endif %} +label local allocate host-routes +{% endif %} label local allocate host-routes +{% else %} +label local allocate host-routes +{% endif %} {% if ldp.discovery.transport_ipv6_address is defined %} discovery transport-address {{ ldp.discovery.transport_ipv6_address }} {% endif %} diff --git a/interface-definitions/protocols-mpls.xml.in b/interface-definitions/protocols-mpls.xml.in index 16286f2c4..e91db12de 100644 --- a/interface-definitions/protocols-mpls.xml.in +++ b/interface-definitions/protocols-mpls.xml.in @@ -26,6 +26,51 @@ + + + Forwarding equivalence class (FEC) allocation from local routes + + + + + IPv4 routes + + + + + Access-list number + + 1-2699 + Access list number + + + + + + + + + + + IPv6 routes + + + + + Access-list6 number + + 1-2699 + Access list number + + + + + + + + + + LDP neighbor parameters -- cgit v1.2.3