From c29fa4e27440e68088052fd41f2b6a677d95b28b Mon Sep 17 00:00:00 2001 From: bbs2web Date: Thu, 16 Jan 2020 15:14:06 +0200 Subject: [PATCH 1/6] Add matching by local-preference Signed-off-by: bbs2web --- scripts/frr/configs/commands/policy.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/frr/configs/commands/policy.json b/scripts/frr/configs/commands/policy.json index 1844825..1903609 100644 --- a/scripts/frr/configs/commands/policy.json +++ b/scripts/frr/configs/commands/policy.json @@ -13,6 +13,7 @@ "/policy/route/route-map/@element/rule/@element/match/ipv6/address/access-list":"match ipv6 address {@text}", "/policy/route/route-map/@element/rule/@element/match/ipv6/address/prefix-list":"match ipv6 address prefix-list {@text}", "/policy/route/route-map/@element/rule/@element/match/ipv6/source-protocol":"match source-protocol $if|ospf6,{@text}|{@text}==ospfv3$", + "/policy/route/route-map/@element/rule/@element/match/local-preference":"match local-preference {@text}", "/policy/route/route-map/@element/rule/@element/match/metric":"match metric {@text}", "/policy/route/route-map/@element/rule/@element/match/origin":"match origin {@text}", "/policy/route/route-map/@element/rule/@element/match/tag":"match tag {@text}", From 0f9de04608fcf1a87140bc35053ae117f663c59c Mon Sep 17 00:00:00 2001 From: bbs2web Date: Thu, 16 Jan 2020 15:54:17 +0200 Subject: [PATCH 2/6] Fix IPv4 route-map access-list and prefix-list matching Signed-off-by: bbs2web --- scripts/frr/configs/commands/policy.json | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/scripts/frr/configs/commands/policy.json b/scripts/frr/configs/commands/policy.json index 1903609..374ab6a 100644 --- a/scripts/frr/configs/commands/policy.json +++ b/scripts/frr/configs/commands/policy.json @@ -1,14 +1,12 @@ { "/policy/route/route-map/@enter": "!", "/policy/route/route-map/@element/rule/@element":"route-map {/../../tagnode/@text} {/action/@text} {/tagnode/@text}", - "/policy/route/route-map/@element/rule/@element/match/as-path":"match as-path {@text}", + "/policy/route/route-map/@element/rule/@element/match/as-path":"match as-path {@text}", "/policy/route/route-map/@element/rule/@element/match/interface":"match interface {@text}", - "/policy/route/route-map/@element/rule/@element/match/ip/address/standard-acl":"match ip address {@text}", - "/policy/route/route-map/@element/rule/@element/match/ip/address/extended-acl":"match ip address {@text}", - "/policy/route/route-map/@element/rule/@element/match/ip/address/prefix-lists":"match ip address prefix-list {@text}", - "/policy/route/route-map/@element/rule/@element/match/ip/nexthop/standard-acl":"match ip next-hop {@text}", - "/policy/route/route-map/@element/rule/@element/match/ip/nexthop/extended-acl":"match ip next-hop {@text}", - "/policy/route/route-map/@element/rule/@element/match/ip/nexthop/prefix-lists":"match ip next-hop prefix-list {@text}", + "/policy/route/route-map/@element/rule/@element/match/ip/address/access-list":"match ip address {@text}", + "/policy/route/route-map/@element/rule/@element/match/ip/address/prefix-list":"match ip address prefix-list {@text}", + "/policy/route/route-map/@element/rule/@element/match/ip/nexthop/access-list":"match ip next-hop {@text}", + "/policy/route/route-map/@element/rule/@element/match/ip/nexthop/prefix-list":"match ip next-hop prefix-list {@text}", "/policy/route/route-map/@element/rule/@element/match/ip/source-protocol":"match source-protocol {@text}", "/policy/route/route-map/@element/rule/@element/match/ipv6/address/access-list":"match ipv6 address {@text}", "/policy/route/route-map/@element/rule/@element/match/ipv6/address/prefix-list":"match ipv6 address prefix-list {@text}", From 08e21bc351fa9abecd619d0622956c20e23a0f6f Mon Sep 17 00:00:00 2001 From: bbs2web Date: Fri, 17 Jan 2020 16:11:39 +0200 Subject: [PATCH 3/6] Allow setting preferred source Signed-off-by: bbs2web --- scripts/frr/configs/commands/policy.json | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/frr/configs/commands/policy.json b/scripts/frr/configs/commands/policy.json index 374ab6a..f4dcec4 100644 --- a/scripts/frr/configs/commands/policy.json +++ b/scripts/frr/configs/commands/policy.json @@ -36,6 +36,7 @@ "/policy/route/route-map/@element/rule/@element/set/ip-next-hop":"set ip next-hop {/@text}", "/policy/route/route-map/@element/rule/@element/set/weight":"set weight {/@text}", "/policy/route/route-map/@element/rule/@element/set/metric":"set metric {/@text}", + "/policy/route/route-map/@element/rule/@element/set/src":"set src {/@text}", "/policy/route/prefix-list/@element/rule/@element":"ip prefix-list {/../../tagnode/@text} seq {/tagnode/@text} {/action/@text} {/prefix/@text} [ge {/ge/@text},] [le {/le/@text},]", "/policy/route/prefix-list/@element/description":"ip prefix-list {/../tagnode/@text} description {/@text}", "/policy/route/prefix-list6/@element/rule/@element":"ipv6 prefix-list {/../../tagnode/@text} seq {/tagnode/@text} {/action/@text} {/prefix/@text} [ge {/ge/@text},] [le {/le/@text},]", From f15b071ee1650885965116de66c88596c7bb5efd Mon Sep 17 00:00:00 2001 From: bbs2web Date: Sat, 18 Jan 2020 15:29:20 +0200 Subject: [PATCH 4/6] Allow multiple-paths to set FRR BGP maximum-paths Signed-off-by: bbs2web --- scripts/frr/configs/commands/bgp.json | 4 ++++ yang/vyatta-protocols-frr-bgp-v1.yang | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/scripts/frr/configs/commands/bgp.json b/scripts/frr/configs/commands/bgp.json index e9d25d8..b720926 100644 --- a/scripts/frr/configs/commands/bgp.json +++ b/scripts/frr/configs/commands/bgp.json @@ -51,6 +51,8 @@ "/protocols/bgp/@element/address-family/ipv4-unicast/redistribute/rip": "redistribute rip [route-map {/route-map/@text},]", "/protocols/bgp/@element/address-family/ipv4-unicast/parameters/dampening": "bgp dampening $if|{/half-life/@text},|half-life in {/@dict}$", "/protocols/bgp/@element/address-family/ipv4-unicast/parameters/distance/global": "distance bgp {/external/@text} {/internal/@text} {/local/@text}", + "/protocols/bgp/@element/address-family/ipv4-unicast/parameters/multiple-paths/ebgp": "maximum-paths {/@text}", + "/protocols/bgp/@element/address-family/ipv4-unicast/parameters/multiple-paths/ibgp": "maximum-paths ibgp {/@text}", "/protocols/bgp/@element/address-family/ipv4-unicast/network/@element": "network {/tagnode/@text} [route-map {/route-map/@text},] $if|backdoor,|backdoor in {/@dict}$", "/protocols/bgp/@element/address-family/ipv6-unicast/@enter": "address-family ipv6 unicast", @@ -63,6 +65,8 @@ "/protocols/bgp/@element/address-family/ipv6-unicast/redistribute/ripng": "redistribute ripng [route-map {/route-map/@text},]", "/protocols/bgp/@element/address-family/ipv6-unicast/parameters/dampening": "bgp dampening $if|{/half-life/@text},|half-life in {/@dict}$", "/protocols/bgp/@element/address-family/ipv6-unicast/parameters/distance/global": "distance bgp {/external/@text} {/internal/@text} {/local/@text}", + "/protocols/bgp/@element/address-family/ipv6-unicast/parameters/multiple-paths/ebgp": "maximum-paths {/@text}", + "/protocols/bgp/@element/address-family/ipv6-unicast/parameters/multiple-paths/ibgp": "maximum-paths ibgp {/@text}", "/protocols/bgp/@element/address-family/ipv6-unicast/network/@element": "network {/tagnode/@text} [route-map {/route-map/@text},]", "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/@enter": "address-family ipv4 unicast", diff --git a/yang/vyatta-protocols-frr-bgp-v1.yang b/yang/vyatta-protocols-frr-bgp-v1.yang index 6552eed..ff8e7f5 100644 --- a/yang/vyatta-protocols-frr-bgp-v1.yang +++ b/yang/vyatta-protocols-frr-bgp-v1.yang @@ -216,6 +216,25 @@ module vyatta-protocols-frr-bgp-v1 { } } + grouping parameters-multiple-paths { + container multiple-paths { + description "Forward packets over multiple paths"; + configd:help "Forward packets over multiple paths"; + leaf ebgp { + type uint32 { + range 2..256; + } + configd:help "Maximum number of parallel eBGP paths to consider, default is 1."; + } + leaf ibgp { + type uint32 { + range 2..256; + } + configd:help "Maximum number of parallel iBGP paths to consider, default is 1."; + } + } + } + grouping network-ipv4 { list network { description "BGP network"; @@ -1625,6 +1644,7 @@ module vyatta-protocols-frr-bgp-v1 { configd:help "BGP parameters for the ipv4-unicast address family"; uses parameters-distance; uses parameters-dampening; + uses parameters-multiple-paths; } uses ipv4-aggregate-address; uses network-ipv4; @@ -1640,6 +1660,7 @@ module vyatta-protocols-frr-bgp-v1 { configd:help "BGP parameters for the ipv6-unicast address family"; uses parameters-distance; uses parameters-dampening; + uses parameters-multiple-paths; } uses ipv6-aggregate-address; uses network-ipv6; From d80971d6efad34bef088de3da4ab8ed31d114e9a Mon Sep 17 00:00:00 2001 From: bbs2web Date: Sat, 18 Jan 2020 15:34:26 +0200 Subject: [PATCH 5/6] Allow BGP addpath for all or bestpath per AS Signed-off-by: bbs2web --- scripts/frr/configs/commands/bgp.json | 8 ++++++++ yang/vyatta-protocols-frr-bgp-v1.yang | 16 +++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/scripts/frr/configs/commands/bgp.json b/scripts/frr/configs/commands/bgp.json index b720926..324a362 100644 --- a/scripts/frr/configs/commands/bgp.json +++ b/scripts/frr/configs/commands/bgp.json @@ -72,6 +72,8 @@ "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/@enter": "address-family ipv4 unicast", "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/@exit": "exit-address-family", "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast": ["[neighbor {/../../tagnode/@text} peer-group {/peer-group/@text},]", "neighbor {/../../tagnode/@text} activate"], + "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/addpath-tx-all-paths": "neighbor {/../../../tagnode/@text} addpath-tx-all-paths", + "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/addpath-tx-bestpath-per-AS": "neighbor {/../../../tagnode/@text} addpath-tx-bestpath-per-AS", "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/allowas-in": "neighbor {/../../../tagnode/@text} allowas-in", "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/allowas-in/number": "neighbor {/../../../../tagnode/@text} allowas-in {/@text}", "/protocols/bgp/@element/neighbor/@element/address-family/ipv4-unicast/attribute-unchanged": "neighbor {/../../../tagnode/@text} attribute-unchanged $if|as-path,|as-path in {/@dict}$ $if|med,|med in {/@dict}$ $if|next-hop,|next-hop in {/@dict}$", @@ -101,6 +103,8 @@ "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/@enter": "address-family ipv6 unicast", "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/@exit": "exit-address-family", "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast": ["[neighbor {/../../tagnode/@text} peer-group {/peer-group/@text},]", "neighbor {/../../tagnode/@text} activate"], + "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/addpath-tx-all-paths": "neighbor {/../../../tagnode/@text} addpath-tx-all-paths", + "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/addpath-tx-bestpath-per-AS": "neighbor {/../../../tagnode/@text} addpath-tx-bestpath-per-AS", "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/allowas-in": "neighbor {/../../../tagnode/@text} allowas-in", "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/allowas-in/number": "neighbor {/../../../../tagnode/@text} allowas-in {/@text}", "/protocols/bgp/@element/neighbor/@element/address-family/ipv6-unicast/attribute-unchanged": "neighbor {/../../../tagnode/@text} attribute-unchanged $if|as-path,|as-path in {/@dict}$ $if|med,|med in {/@dict}$ $if|next-hop,|next-hop in {/@dict}$", @@ -152,6 +156,8 @@ "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/@enter": "address-family ipv4 unicast", "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/@exit": "exit-address-family", "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast": ["[neighbor {/../../tagnode/@text} neighbor {/neighbor/@text},]", "neighbor {/../../tagnode/@text} activate"], + "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/addpath-tx-all-paths": "neighbor {/../../../tagnode/@text} addpath-tx-all-paths", + "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/addpath-tx-bestpath-per-AS": "neighbor {/../../../tagnode/@text} addpath-tx-bestpath-per-AS", "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/allowas-in": "neighbor {/../../../tagnode/@text} allowas-in", "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/allowas-in/number": "neighbor {/../../../../tagnode/@text} allowas-in {/@text}", "/protocols/bgp/@element/peer-group/@element/address-family/ipv4-unicast/attribute-unchanged": "neighbor {/../../../tagnode/@text} attribute-unchanged $if|as-path,|as-path in {/@dict}$ $if|med,|med in {/@dict}$ $if|next-hop,|next-hop in {/@dict}$", @@ -181,6 +187,8 @@ "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/@enter": "address-family ipv6 unicast", "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/@exit": "exit-address-family", "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast": ["[neighbor {/../../tagnode/@text} neighbor {/neighbor/@text},]", "neighbor {/../../tagnode/@text} activate"], + "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/addpath-tx-all-paths": "neighbor {/../../../tagnode/@text} addpath-tx-all-paths", + "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/addpath-tx-bestpath-per-AS": "neighbor {/../../../tagnode/@text} addpath-tx-bestpath-per-AS", "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/allowas-in": "neighbor {/../../../tagnode/@text} allowas-in", "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/allowas-in/number": "neighbor {/../../../../tagnode/@text} allowas-in {/@text}", "/protocols/bgp/@element/peer-group/@element/address-family/ipv6-unicast/attribute-unchanged": "neighbor {/../../../tagnode/@text} attribute-unchanged $if|as-path,|as-path in {/@dict}$ $if|med,|med in {/@dict}$ $if|next-hop,|next-hop in {/@dict}$", diff --git a/yang/vyatta-protocols-frr-bgp-v1.yang b/yang/vyatta-protocols-frr-bgp-v1.yang index ff8e7f5..6e5eadf 100644 --- a/yang/vyatta-protocols-frr-bgp-v1.yang +++ b/yang/vyatta-protocols-frr-bgp-v1.yang @@ -1064,7 +1064,9 @@ module vyatta-protocols-frr-bgp-v1 { - unsuppress-map - capability orf prefix-list (both|receive|send)) - route-server-client - - nexthop-self*/ + - nexthop-self + - addpath-tx-all-paths + - addpath-tx-bestpath-per-AS*/ /* This grouping contains relative path to nodes outside the group scope. It can only be used at a specific config level matching the relative path. @@ -1226,6 +1228,18 @@ module vyatta-protocols-frr-bgp-v1 { type empty; configd:help "Peer-group as route server client"; } + + leaf addpath-tx-all-paths { + description "Advertise all paths to this peer-group"; + type empty; + configd:help "Advertise all paths to this peer-group"; + } + + leaf addpath-tx-bestpath-per-AS { + description "Advertise the bestpath per each neighboring AS"; + type empty; + configd:help "Advertise the bestpath per each neighboring AS"; + } } /* BGP Global parameters supported under default VRF */ From 2cd4e7e6c1089d49fb8fef7ef9f826e0188df1d1 Mon Sep 17 00:00:00 2001 From: bbs2web Date: Sun, 19 Jan 2020 08:41:34 +0200 Subject: [PATCH 6/6] Amend MPLS LDP interface minimum timers Signed-off-by: bbs2web --- yang/vyatta-protocols-frr-ldp-v1.yang | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yang/vyatta-protocols-frr-ldp-v1.yang b/yang/vyatta-protocols-frr-ldp-v1.yang index 92881be..6a9d057 100644 --- a/yang/vyatta-protocols-frr-ldp-v1.yang +++ b/yang/vyatta-protocols-frr-ldp-v1.yang @@ -103,7 +103,7 @@ module vyatta-protocols-frr-ldp-v1 { "Basic discovery timer attributes."; leaf hello-holdtime { type uint16 { - range 15..3600; + range 3..3600; } units seconds; default 15; @@ -115,7 +115,7 @@ module vyatta-protocols-frr-ldp-v1 { } leaf hello-interval { type uint16 { - range 5..1200; + range 1..1200; } units seconds; default 5; @@ -130,7 +130,7 @@ module vyatta-protocols-frr-ldp-v1 { description "Neighbor configuration attributes."; leaf session-ka-holdtime { type uint16 { - range 30..3600; + range 15..3600; } units seconds; default 30;