Commit graph

491 commits

Author SHA1 Message Date
Isabella de Leon 9ace83b952 isisd: Add log-pdu-drops CLI/YANG support
New config functionality:

r1# conf
r1(config)# router isis 1
r1(config-router)# log-
  log-adjacency-changes  Log changes in adjacency state
  log-pdu-drops          Log any dropped PDUs
r1(config-router)# log-pdu-drops
r1(config-router)# end

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-04-04 09:23:16 -07:00
Donatas Abraitis d58e6dbc71 bgpd: Do not allow setting set distance via route-maps to zero
It's not allowed to install routes with zero distance, let's disallow this
for route-maps as well.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-03-21 22:09:50 +02:00
Russ White 2c50f65f1c
Merge pull request #12968 from pguibert6WIND/asn_aggregator_counter_prop
yang: Fix "aggregator-asn" to support asdot
2023-03-21 10:12:01 -04:00
Russ White 55cf5ea672
Merge pull request #12688 from dorDiogo/isis_hello_padding_sometimes
isisd: Add support for IS-IS hello padding during-adjacency-formation
2023-03-20 17:00:57 -04:00
anlan_cs 5b498ae7ec yang, bgpd: Fix "aggregator-asn" to support asdot
The following command is not working:

 > (routemap)  set aggregator as ASNUM A.B.C.D

Since "aggregator-asn" has already supported asdot,
fixed it with new yang type. Extra ASN validation
(leading zeroes for instance) are done in the validate
hook of the yang leaf.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-03-16 07:00:53 +01:00
Isabella de Leon d74f913c5f isisd: Add advertise-high-metrics CLI/YANG support, modify show output
New config and show functionality:

r1# conf
r1(config)# router isis 1
r1(config-router)#
  advertise-high-metrics  Advertise high metric value on all interfaces
  area-password           Configure the authentication password for an area
  ...
r1(config-router)# advertise-high-metrics
r1(config-router)# end
r1# show isis summary
...
Area 1:
  Net: 49.0001.1720.1700.0002.00
  TX counters per PDU type:
     L2 IIH: 1
    P2P IIH: 36
   LSP RXMT: 0
  RX counters per PDU type:
  Advertise high metrics: Enabled
  Level-2:
   ...
r1# conf
r1(config)# router isis 1
r1(config-router)# no advertise-high-metrics
r1(config-router)# end
r1# show isis summary
...
Area 1:
  Net: 49.0001.1720.1700.0002.00
  TX counters per PDU type:
     L2 IIH: 1
    P2P IIH: 45
   LSP RXMT: 0
  RX counters per PDU type:
  Advertise high metrics: Disabled
  Level-2:
   ...
r1#

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2023-02-28 11:39:12 -08:00
Diogo Oliveira 06fbbf2935 isisd,tests,doc: Rename hello padding sometimes to hello padding during-adjacency-formation
Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
2023-02-28 09:54:02 -08:00
Diogo Oliveira e36ec6acbc isisd: Add support for isis hello padding sometimes
New configuration to pad ISIS hello packets during adjacency formation only.

Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
2023-02-28 08:48:30 -08:00
Russ White 617d2b71c0
Merge pull request #12840 from dorDiogo/isis_advertise_passive_only
isisd: Add support for IS-IS advertise-passive-only
2023-02-28 09:22:32 -05:00
Diogo Oliveira 3f3608d8d7 isisd,doc: Add support for isis advertise-passive-only
Signed-off-by: Diogo Oliveira <14191454+dorDiogo@users.noreply.github.com>
2023-02-22 13:44:48 -08:00
Russ White ba755d35e5
Merge pull request #12248 from pguibert6WIND/bgpasdot
lib, bgp: add initial support for asdot format
2023-02-21 08:01:03 -05:00
Donald Sharp 8383d53e43
Merge pull request #12780 from opensourcerouting/spdx-license-id
*: convert to SPDX License identifiers
2023-02-17 09:43:05 -05:00
Louis Scalbert 158332617d lib,yang,zebra: add extended admin-group support
Add the support of Extended Admin-Group (RFC7308) to the zebra interface
link-params Traffic-Engineering context.

Extended admin-groups can be configured with the affinity-map:

> affinity-map blue bit-position 221
> int eth-rt1
>  link-params
>   affinity blue
>  exit-link-params

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-10 11:31:05 +01:00
Philippe Guibert ad45cb7c04 yang: route-distinguisher typedef support asdot notation
Some route-distinguisher notation is not supported today.
route-map rmap permit 1
 match evpn rd 1.1:1
 match evpn rd 0.65000:1
!

Add support for this.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-02-10 10:27:23 +01:00
Philippe Guibert bebda8a143 yang: route-distinguisher typedef for route-maps reworked
Some route-distinguisher combinations were not possible under
route-maps:
route-map rmap permit 1
 match evpn rd 65540:44
 match evpn rd 1.2.3.4:44
 match evpn rd 2000000:44

Do not use the ietf definition for route-distinguisher by overriding
a new definition in bgp-route-map.yang itself. When the BGP northbound
API will be done, this route-distinguisher definition will have to
be used too.

Fixes: ("48cb7ea99d10") bgpd: North-bound implementation for bgp rmaps

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-02-10 10:27:23 +01:00
Louis Scalbert 05a12619dd lib,yang,zebra: add affinity-map support
Add the affinity-map global command to zebra. The syntax is:

> affinity-map NAME bit-position (0-1023)

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-02-09 15:48:21 +01:00
David Lamparter 41db488c25 yang: add SPDX License IDs
YANG files get to keep their license boilerplate in addition to the SPDX
header, since they are likely to be copied around individually.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
David Lamparter acddc0ed3c *: auto-convert to SPDX License IDs
Done with a combination of regex'ing and banging my head against a wall.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:11 +01:00
David Lamparter 47a3a82770 *: manual SPDX License ID conversions
The files converted in this commit either had some random misspelling or
formatting weirdness that made them escape automated replacement, or
have a particularly "weird" licensing setup (e.g. dual-licensed.)

This also marks a bunch of "public domain" files as SPDX License "NONE".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 14:09:07 +01:00
David Lamparter 47b6d5406f *: sort out & explain licenses used in FRR
New "introduction" note in `COPYING`, and all the licenses moved into
`doc/licenses/`.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-02-09 12:46:13 +01:00
David Lamparter 05a13c2cd4 yang: fix race condition in embedmodel.py mkdir
Parallel build may be executing another copy of embedmodel.py at the
same time, with both getting "False" on the isdir check, and then both
trying to mkdir - one of which will error out.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-24 18:19:18 +01:00
Russ White 9cff2d526e
Merge pull request #10405 from kanaya516/feature/adj-sid-yang
isisd: yang for adjacency-sid and lan-adjacency-sid
2023-01-24 10:26:07 -05:00
Rafael Zalamena 73df597f5e yang: static route BFD monitoring
Define a generic BFD monitoring group template and use it to add support
for static route monitoring.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2023-01-13 15:32:12 -03:00
kanaya516 4747dddbea isisd: changed to output the LAN-adjacency-sid in yang format
Signed-off-by: kanaya516 <abcs516tk1@gmail.com>
2023-01-04 15:47:43 +00:00
kanaya516 098737293c isisd: changed to output the adjacency-sid in yang format
Signed-off-by: kanaya516 <abcs516tk1@gmail.com>
2023-01-04 15:41:25 +00:00
Siger Yang 9f2379bdd2
vrrpd: add IPv4 pseudoheader option for VRRPv3
This commit adds a new option to control whether a VRRPv3 group
accepts / computes its checksum with a prepended IPv4 pseudoheader.
This should improve interoperability with other devices.

Signed-off-by: Siger Yang <siger.yang@outlook.com>
2022-11-25 16:21:59 +08:00
Donatas Abraitis 97a52c82a5 bgpd: Implement Accumulated IGP Metric Attribute for BGP
https://www.rfc-editor.org/rfc/rfc7311.html

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-10-26 11:26:57 +03:00
Isabella de Leon 01ea9b035e isisd: Add set-overload on-startup CLI/YANG support
Before:
r1# conf
r1(config)# router isis <area-tag>
r1(config-router)# set-overload-bit
  <cr>
r1(config-router)# end

After:
r1# conf
r1(config)# router isis <area-tag>
r1(config-router)# set-overload-bit
  <cr>
  on-startup  Set overload bit on startup
r1(config-router)# set-overload-bit on-startup
  (0-86400)  Set overload time in seconds
r1(config-router)# set-overload-bit on-startup 300
r1(config-router)# end

Signed-off-by: Isabella de Leon <ideleon@microsoft.com>
2022-09-21 15:41:38 -07:00
Russ White 7fa5e07b1c
Merge pull request #11899 from opensourcerouting/feature/route_validation_extended_community
bgpd: Implement Origin Validation State via extended communities
2022-09-13 11:30:54 -04:00
Philippe Guibert 1bb550b63c bgpd: add resolution for l3vpn traffic over gre interfaces
When a route imported from l3vpn is analysed, the nexthop from default
VRF is looked up against a valid MPLS path. Generally, this is done on
backbones with a MPLS signalisation transport layer like LDP. Generally,
the BGP connection is multiple hops away. That scenario is already
working.

There is case where it is possible to run L3VPN over GRE interfaces, and
where there is no LSP path over that GRE interface: GRE is just here to
tunnel MPLS traffic. On that case, the nexthop given in the path does not
have MPLS path, but should be authorized to convey MPLS traffic provided
that the user permits it via a configuration command.

That commit introduces a new command that can be activated in route-map:
 > set l3vpn next-hop encapsulation gre

That command authorizes the nexthop tracking engine to accept paths that
o have a GRE interface as output, independently of the presence of an LSP
path or not.

A configuration example is given below. When bgp incoming vpnv4 updates
are received, the nexthop of NLRI is 192.168.0.2. Based on nexthop
tracking service from zebra, BGP knows that the output interface to reach
192.168.0.2 is r1-gre0. Because that interface is not MPLS based, but is
a GRE tunnel, then the update will be using that nexthop to be installed.

    interface r1-gre0
     ip address 192.168.0.1/24
    exit
    router bgp 65500
     bgp router-id 1.1.1.1
     neighbor 192.168.0.2 remote-as 65500
     !
     address-family ipv4 unicast
      no neighbor 192.168.0.2 activate
     exit-address-family
     !
     address-family ipv4 vpn
      neighbor 192.168.0.2 activate
      neighbor 192.168.0.2 route-map rmap in
     exit-address-family
    exit
    !
    router bgp 65500 vrf vrf1
     bgp router-id 1.1.1.1
     no bgp network import-check
     !
     address-family ipv4 unicast
      network 10.201.0.0/24
      redistribute connected
      label vpn export 101
      rd vpn export 444:1
      rt vpn both 52:100
      export vpn
      import vpn
     exit-address-family
    exit
    !
    route-map rmap permit 1
     set l3vpn next-hop encapsulation gre
    exit

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-09-05 22:26:25 +02:00
Donatas Abraitis 324e8b1f79 bgpd: Handle Origin Validation State extended community via route-map match
Add an ability to match via route-maps. An additional route-map command

`match rpki-extcommunity <invalid|notfound|valid>` added.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-09-04 21:54:47 +03:00
Philippe Guibert a15014f317 isisd: replace ipv4-unicast with standard in config and oper contexts
Only the multi-topology command can use 'ipv4-unicast' keyword to
configure standard topology.
The remaining code: dump from show commands, and yang definition,
uses 'standard' keyword instead.

The test have not been modified. The change would consists in
modifying test_fuzz_isis_tlv_tests.h.gz:
- replacing ipv4-unicast occurences with standard
\x69\x70\x76\x34\x2d\x75\x6e\x69\x63\x61\x73\x74
with
\x73\x74\x61\x6e\x64\x61\x72\x64

- align the buffer length by removing 4 bytes per occurence
Instead, a specific isis_mtid2str_fake() routing has been
put in place in isis_tlvs.c file.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2022-06-02 21:20:45 +02:00
Donald Sharp 8a8ad459af
Merge pull request #10775 from opensourcerouting/pim6-mld-pr
pim6d: MLD code
2022-05-17 07:20:08 -04:00
sarita patra 9726536d1d pimd: Northbound support for pim passive enable
Added nothbound callbacks for pim-passive-enable

Signed-off-by: sarita patra <saritap@vmware.com>
2022-05-12 23:51:21 -07:00
David Lamparter 5afe22f5bc pim6d: show MLD in running-config
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-05-06 16:02:02 +02:00
Donatas Abraitis 77e3d82167 bgpd: Add set as-path replace <any|ASN> cmd for route-maps
```
route-map tstas permit 10
 set as-path replace 1
exit
```

Before:

```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 13
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 1 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
      Last update: Mon Apr 25 10:39:50 2022
```

After:

```
donatas-laptop(config-router-af)# do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 15
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 65010 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
      Last update: Mon Apr 25 10:40:16 2022
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-04-25 14:05:22 +03:00
Donald Sharp 94202742fb lib, yang: Fix spellinig of miliseconds
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-04-02 07:48:18 -04:00
Mobashshera Rasool 3a7ef7a7b6 yang: Fix the ipv6 multicast pattern in frr-route-types
The pattern defined for ipv6-multicast-group-prefix is wrong.
This is leading to mismatch for all the valid ipv6 multicast
addresses.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-07 23:40:02 -08:00
Chirag Shah 2514d23190 bgpd: evpn route-map match esr type-4 route-type
Testing:

After fix:

bharat(config-route-map)# match evpn route-type
  1          EAD (Type-1) route
  2          MAC-IP (Type-2) route
  3          Multicast (Type-3) route
  4          Ethernet Segment (Type-4) route <----
  5          Prefix (Type-5) route
  ead        EAD (Type-1) route
  es         Ethernet Segment (Type-4) route
  macip      MAC-IP (Type-2) route
  multicast  Multicast (Type-3) route
  prefix     Prefix (Type-5) route

bharat(config-route-map)# match evpn route-type 4
bharat(config-route-map)# do show running-config
Building configuration...
...
!
route-map ALLOW_EVPN_R permit 10
 match evpn route-type es    <----
exit

BGP:
route-map: ALLOW_EVPN_R Invoked: 0 Optimization: enabled Processed Change: false
 permit, sequence 10 Invoked 0
  Match clauses:
    evpn route-type es  <-----
  Set clauses:
  Call clause:
  Action:
    Exit routemap

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-02-17 09:55:00 -08:00
Chirag Shah bd44ab0831 bgpd: evpn route-map match ead type-1 route-type
Add evpn mh route type-1 (EAD) to match clause
of route-map.

Ticket: issue#10461
Reviewed By:
Testing Done:

With fix:

vtep1(config-route-map)# match evpn route-type
  1          EAD (Type-1) route
  2          MAC-IP (Type-2) route
  3          Multicast (Type-3) route
  5          Prefix (Type-5) route
  ead        EAD (Type-1) route
  macip      MAC-IP (Type-2) route
  multicast  Multicast (Type-3) route
  prefix     Prefix (Type-5) route

vtep1# show running-config bgpd
....
route-map HOST_ALLOW_1 permit 1
 match evpn route-type ead

vtep1# show route-map HOST_ALLOW_1

BGP:
route-map: HOST_ALLOW_1 Invoked: 6 Optimization: disabled Processed Change: false
 permit, sequence 1 Invoked 6
  Match clauses:
    ip address prefix-list LOCAL_HOST_VRF1
    evpn route-type ead

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-02-17 09:55:00 -08:00
Donald Sharp dfd4f44ffc yang: Fix spelling mistake
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-02-14 12:56:21 -05:00
anlan_cs ebf8b885de bfdd,yang: optimize nb with YANG
A few optimizations for bfd NB:
    - Remove unuseful checks for parameters with the same values
    - Replace checking values of bfd parameters with YANG's "range"
    - Append "required-echo-receive-interval" with 0 for it can be disabled

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-01-25 04:00:49 -05:00
anlan_cs 0c91b419fd yang: fix "minimum-ttl" missing default value
Just like other parameters of bfd, "minimum-ttl" should also have
a default value. Parameters with default value will not be displayed
in running configuration.

Additionly adjust the other "range" with double quotation marks.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2022-01-24 02:54:02 -05:00
Russ White 18ed776ca2
Merge pull request #9938 from Orange-OpenSource/isis_ls
isisd: Add Link State Traffic Engineering support
2022-01-18 10:12:08 -05:00
sarita patra 3051f4438d pim: Keeping list of address-family under gmp container
Renamed frr-igmp.yang to frr-gmp.yang, igmp to gmp container.
to support IGMP and MLD protocol.

frr-gmp.yang, created a list of address family under mgmd
container. For PIMV4 the key is IPV4, where as for PIMV6
the key is IPV6. This is done for PIMV6 development.

This commit will have all the northbound changes to support
IPV4 address family.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-01-17 05:10:20 -08:00
sarita patra 698f414748 pim: Northbound changes accomodating IPV4 address family
frr-pim.yang, created a list of address family under pim
container. For PIMV4 the key is IPV4, where as for PIMV6
the key is IPV6. This is done for PIMV6 development.

This commit will have all the northbound changes to support
IPV4 address family.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-01-13 02:50:49 -08:00
Russ White 90f88bbc94
Merge pull request #10110 from idryzhov/if-yang-remove-vrf
lib, yang: remove vrf from the interface list key
2021-12-02 08:33:05 -05:00
Olivier Dugeon ed6189a9b5 isisd: Add Link State Traffic Engineering support
Add Link State TED features to isis_te.c and new CLI to export LS TED and
show LS TED to IS-IS.

IS-IS LSPs are parse each time a new LSP event occurs in order to update
accordingly the Link State Traffic Engineering Database. LS TED could be
exported through the ZAPI Opaque message (see sharpd as example).

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Olivier Dugeon 173f8887cc isisd: Add support for RFC6119 (IPv6 TE in IS-IS)
- Add advertisement of Global IPv6 address in IIH pdu
 - Add new CLI to set IPv6 Router ID
 - Add advertisement of IPv6 Router ID
 - Correctly advertise IPv6 local and neighbor addresses in Extended IS and MT
   Reachability TLVs
 - Correct output of Neighbor IPv6 address in 'show isis database detail'
 - Manage IPv6 addresses advertisement and corresponiding Adjacency SID when
   IS-IS is not using Multi-Topology by introducing a new ISIS_MT_DISABLE
   value for mtid (== 4096 i.e. first reserved flag set to 1)

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2021-11-30 15:22:28 +01:00
Quentin Young 23b2f11a47
Merge pull request #9798 from abuibrahim/master
fix broken northbound confd
2021-11-30 00:17:28 -05:00
Donatas Abraitis 82f191a213 bgpd: Add an ability to match ipv6 next-hop by prefix-list
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-24 16:28:31 +02:00
Donatas Abraitis bc63ba980f bgpd: Add an ability to match ipv6 next-hop by access-list
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-11-23 13:47:26 +02:00
Igor Ryzhov 574445ecaf lib, yang: remove vrf from the interface list key
This is needed for the following two reasons:

1. To be able to remove the northbound HACK in if_update_to_new_vrf. It
   is totally wrong to rewrite the configuration datastore when some
   operational state changes. It is a hard blocker for storing a
   configuration data in a management daemon which knows nothing about
   the operational state.
2. To allow changing the VRF of the interface using FRR CLI or any other
   frontend in the future. If the VRF is a part of the key, it can't be
   changed. If the VRF is a simple leaf, it becomes possible to change
   it and thus move the interface between VRFs. For now I mark the leaf
   as a "config false" as it's not yet possible to control it from FRR.

But we can't simply remove the VRF from the key, because it is needed to
distinguish interfaces when using netns based VRFs, as it is possible to
have multiple interfaces with the same name in different namespaces. To
handle this, I came up with an idea to store both VRF and an interface
name in the "name" leaf using the pattern "vrfname:ifname". For example,
if there's an interface "eth0" in VRF "red" then its "name" leaf will be
"red:eth0".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-11-23 12:57:52 +03:00
Ruslan Babayev 99d0e85479 yang: fix frr-routing prefix
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2021-11-11 23:05:46 -08:00
Ruslan Babayev 56fd4d3460 yang, ospfd: build frr-ospfd.yang when ospfd is enabled
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2021-11-11 23:05:46 -08:00
Ruslan Babayev 3f5af3d50b yang, bgpd: add missing includes
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2021-11-11 23:05:46 -08:00
Ruslan Babayev 084dfdc03c yang, ripd, ripngd: fix annotate statements
Add missing annotate-statement for the 'instance' list.

Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2021-11-11 23:05:46 -08:00
Ruslan Babayev 688c536fb3 yang: confd: compile yang modules to fxs
Signed-off-by: Ruslan Babayev <ruslan@babayev.com>
2021-11-11 23:05:46 -08:00
Igor Ryzhov 405ebe45cf yang: replace an empty pattern with a zero-length restriction
No functional difference, but `length "0"` is more comprehensible.

Suggested-by: Christian Hopps <chopps@labn.net>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-05 14:03:37 +03:00
Russ White ce4f3813f0
Merge pull request #9439 from ton31337/feature/set_ext_community_to_none
bgpd: Route-map `set extcommunity none`
2021-09-01 12:55:45 -04:00
Christian Hopps 11ca35875c pimd: change ranges to 1..max, type align with IETF YANG.
While defaults are good picks for "reasonable" guesses, min and max
range values really aren't. Operators and experimenters often like to
configure "unreasonable" values to stress test, tests boundary
conditions and explore innovations.

With that in mind, change all ranges to 1..max (of type).

While we're here add optional ignored values in the "no" CLI forms.

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-08-18 22:08:33 -04:00
Donatas Abraitis bb4dcdd13e bgpd: Add an ability to set extcommunity to none in route-maps
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-08-18 14:14:52 +03:00
Igor Ryzhov 2831ade3c2 yang: mark a couple of prefix-list/access-list leafs as mandatory
The code assumes that these leafs always exist when their complementary
leafs exist. For example, when processing `ipv4-exact-match`, the code
always expects to have access to `ipv4-prefix`. If those leafs are not
provided, code crashes. It doesn't happen when using the CLI because it
always does the right thing, but it can happen when using other
frontends.

Also fix incorrect description for prefix-list sequence leaf.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-10 22:39:32 +03:00
Donald Sharp 53dc1b16aa pimd: Allow join prune intervals to be as small as 5 seconds
Allow the join-prune interval to be as small as 5 seconds instead
of limiting the value to 60.

This can and will come at a price of being able to converge less
mroutes.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-07-26 10:02:21 -04:00
Donald Sharp 6afa0b137a
Merge pull request #8983 from mobash-rasool/pim-upstreaming-activity
pimd: Minor fixes for BSM Show CLI and Hold Timer CLI
2021-07-22 08:35:06 -04:00
Donatas Abraitis 2690f18cc8 bgpd: Add route-map match alias command
Will be handy to filter BGP prefixes by using BGP community alias
instead of numerical community values.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-07-21 09:26:14 +03:00
github login name 142774530a pimd: make pim interface hold interval range 1-630
Making the interface holdtime range to 3.5 times the hello-time

As per 7761, Section 4.11:
The Holdtime in a Hello message should be set to
   (3.5 * Hello_Period), giving a default value of 105 seconds.

Therefore providing the user also to configure max upto 3.5 times
the hello timer interval.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-07-06 22:51:10 -07:00
Rafael Zalamena 67aea150fe yang: add MSDP timer configuration
Allow users to configure global MSDP timers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-07-01 08:40:09 -03:00
Rafael Zalamena 36df8a84f7 yang: simplify MSDP peer handling
Make the source address mandatory since it doesn't work without it. The
CLI already mandated it before so it makes sense to change this here as
well.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-25 15:06:20 -03:00
Patrick Ruddy fa855f8fa3
Merge pull request #6695 from adharkar/frr-master-gateway_ip
EVPN route type-5 gateway IP overlay Index
2021-06-23 09:23:54 +01:00
Rafael Zalamena 0213a65800 yang: rework PIM MSDP mesh group
Allow PIM MSDP configuration to support multiple MSDP mesh groups per
PIM instance.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-06-09 12:32:24 -03:00
Ameya Dharkar d0a4ee6010 bgpd: Add "set evpn gateway-ip" clause for route-map
- Add following set clause for route-maps
  "set evpn gateway-ip <ipv4|ipv6 >A.B.C.D|X:X::X:X"
- When this route-map is applied as outboubd policy in BGP, it will set the
  gateway-ip in BGP attribute For EVPN type-5 routes.

Example configuration:

route-map RMAP-EVPN_GWIP permit 5
 set evpn gateway-ip ipv4 50.0.2.12
 set evpn gateway-ip ipv6 50:0:2::12

router bgp 101
 bgp router-id 10.100.0.1
 neighbor 10.0.1.2 remote-as 102
 !
 address-family l2vpn evpn
  neighbor 10.0.1.2 activate
  neighbor 10.0.1.2 route-map RMAP-EVPN_GWIP out
  advertise-all-vni
 exit-address-family

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2021-06-07 17:58:22 -07:00
Igor Ryzhov 874ca76997 bfdd: forbid setting interface for multihop sessions
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-01 18:08:29 +03:00
Christian Hopps d267d77668 bgpd: fix default for extended-nexthop-capability
The default for extended-nexthop-capability is true for
unnumbered (interface) neighbors, false for other types. Break the inner
grouping out of the outer neighbor-parameters grouping so that we can
refine the default in that uses case.

Signed-off-by: Christian Hopps <chopps@gmail.com>
2021-05-23 20:30:04 +00:00
Rafael Zalamena 684a5c8a6b yang: fix BGP multicast prefix type
Fix many of the commands in the `address-family ipv4 multicast` to use
the proper type to avoid wrong YANG model validation failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-05-21 07:56:01 -03:00
Rafael Zalamena e51da3f817 yang: move multicast prefix type definition
Move the multicast prefix type to a common YANG model so other models
can use it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-05-21 07:55:51 -03:00
Igor Ryzhov ba51dd2605 bgpd, yang: fix replace-as yang leaf
The leaf is called "no-replace-as" in the model but is used reversed in
all the code. Let's rename it to comply with the actual behavior.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-05-14 17:00:11 +03:00
Christian Hopps 3bb513c399 lib: adapt to version 2 of libyang
Compile with v2.0.0 tag of `libyang2` branch of:
https://github.com/CESNET/libyang

staticd init load time of 10k routes now 6s vs ly1 time of 150s

Signed-off-by: Christian Hopps <chopps@labn.net>
2021-05-13 16:24:48 -04:00
Javier Garcia f2b9485d6f pathd. TED support . Validation of candidate path - [part 2/4]
- Explicit segment list nai will be resolved to corresponded sid.
    - Dynamic segment list (from pce) will be validated.
    - If segment list could not be resolved or validated won't be used.
    - Now this new config is supported

segment-list sl-1
 index 10  nai prefix 10.1.2.1/32 iface 1
 index 30  nai adjacency 10.2.5.2 10.2.5.5
 index 40  nai prefix 10.10.10.5/32 algorithm 0

Signed-off-by: Javier Garcia <javier.garcia@voltanet.io>
2021-05-10 15:24:59 +02:00
Fredi Raspall ce4eccfa80 isisd: link protection optional fallback in ti-lfa
The current implementation of TI-LFA computes link-protecting
repair paths (even when node protection is enabled) to have repair
paths to all destinations when no node-protecting repair has been
found. This may be desired or not. E.g. the link-protecting paths
may use the protected node and be, therefore, useless if the node
fails. Also, computing link-protecting repairs incurs extra
calculations.

With this patch, when node protection is enabled, link protecting
repair paths are only computed if "link-fallback" is specified in
the configuration, on a per interface and IS-IS level.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
2021-05-03 17:27:37 +02:00
Igor Ryzhov 1457b1d5df isisd, yang: remove vrf leaf from isis interface node
This is very confusing and incorrect. We can and should use vrf leaf of
the interface itself instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Igor Ryzhov ec62fbaa07 isisd: fix ldp-sync configuration
YANG model and CLI commands allow user to configure LDP-sync per area.
But the actual implementation is incorrect - all commands are changing
the config for the whole VRF instead of a single area. This commit fixes
this issue by actually implementing per area configuration.

Fixes #8578.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-29 17:05:21 +03:00
Rafael Zalamena 3544d257b7 yang: add PIM BFD profile support
Allow users to configure BFD profile for the peers in a interface.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2021-04-23 09:29:00 -03:00
Renato Westphal b6241291ee
Merge pull request #8389 from idryzhov/route-map-optimization-nb
lib: convert route-map optimization to NB
2021-04-13 00:26:20 -03:00
Igor Ryzhov 3ebeec9446 lib: convert route-map optimization to NB
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-06 19:00:21 +03:00
Igor Ryzhov c3f84751a9
Merge pull request #8348 from chiragshah6/mdev
yang, bgpd: add northbound transactional callbacks for neighbor route-map for af l2vpn-evpn
2021-04-05 19:32:43 +03:00
Philippe Guibert 5b1b6b8bb2 bgpd: increase the maximum number of neighbors
increase the maximum number of neighbors in a bgp group.
Set the maximum value to 50000 instead of 5000.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2021-04-02 09:01:02 +02:00
Sarita Patra b702f42445 lib,zebra,bgpd,ospfd,ospf6d: Route-map yang defns
This commit includes the following:
1) Modifications to the frr-route-map.yang to enable addition of
   bgpd, ospfd, ospf6d and zebra specific route map match/set clauses.
2) Yang definitions for bgpd match/set clauses.
3) Yang definitions for ospfd and ospf6d match/set clauses.
4) Yang definitions for zebra match/set clauses.

Signed-off-by: NaveenThanikachalam <nthanikachal@vmware.com>
Signed-off-by: Sarita Patra <saritap@vmware.com>
2021-03-30 22:58:42 +03:00
Chirag Shah 36ace674c4 yang: add policy support for l2vpn-evpn nbr tree
Add bgp routing policy support for unnumbered and peer-group.
For numbered peer the policy support is already present.

+--rw bgp!
       +--rw neighbors
       |  +--rw unnumbered-neighbor* [interface]
       |     +--rw afi-safis
       |        +--rw afi-safi* [afi-safi-name]
                   +--rw l2vpn-evpn
       |  |        |  +--rw filter-config
       |  |        |     +--rw rmap-import?                  frr-route-map:route-map-ref
       |  |        |     +--rw rmap-export?                  frr-route-map:route-map-ref
       |  |        |     +--rw plist-import?                 frr-bgp-types:plist-ref
       |  |        |     +--rw plist-export?                 frr-bgp-types:plist-ref
       |  |        |     +--rw access-list-import?           frr-bgp-types:access-list-ref
       |  |        |     +--rw access-list-export?           frr-bgp-types:access-list-ref
       |  |        |     +--rw as-path-filter-list-import?   frr-bgp-types:as-path-filter-ref
       |  |        |     +--rw as-path-filter-list-export?   frr-bgp-types:as-path-filter-ref
       |  |        |     +--rw unsuppress-map-import?        frr-route-map:route-map-ref
       |  |        |     +--rw unsuppress-map-export?        frr-route-map:route-map-ref
       ...
       +--rw peer-groups
          +--rw peer-group* [peer-group-name]
       |     +--rw afi-safis
       |        +--rw afi-safi* [afi-safi-name]
                   +--rw l2vpn-evpn
       |  |        |  +--rw filter-config
       |  |        |     +--rw rmap-import?                  frr-route-map:route-map-ref
       |  |        |     +--rw rmap-export?                  frr-route-map:route-map-ref
       |  |        |     +--rw plist-import?                 frr-bgp-types:plist-ref
       |  |        |     +--rw plist-export?                 frr-bgp-types:plist-ref
       |  |        |     +--rw access-list-import?           frr-bgp-types:access-list-ref
       |  |        |     +--rw access-list-export?           frr-bgp-types:access-list-ref
       |  |        |     +--rw as-path-filter-list-import?   frr-bgp-types:as-path-filter-ref
       |  |        |     +--rw as-path-filter-list-export?   frr-bgp-types:as-path-filter-ref
       |  |        |     +--rw unsuppress-map-import?        frr-route-map:route-map-ref
       |  |        |     +--rw unsuppress-map-export?        frr-route-map:route-map-ref
       ...

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-25 18:37:39 -07:00
David Lamparter d8701d6a9a
Merge pull request #8332 from donaldsharp/yang_clean
yang: Allow `make clean` to actually clean up dependant files
2021-03-25 15:50:18 +01:00
Donald Sharp 89bf9d220d
Merge pull request #8333 from mobash-rasool/pim-fixes-2
pimd: Fix hold time related issues
2021-03-25 10:19:12 -04:00
Mobashshera Rasool 899dd3392a pimd: Validation that hello should be less than hold time config.
Also included display of hold time in CLI 'show ip pim int <intf>' cmd
and json commands.

Issue:
PIM neighbor not coming up if hold time is less than hello timer
since hello is sent every 4 sec and hold is 1 sec,
because of this nbr is flapping

Fix:
Do not allow configuration of hold timer less than hello timer
Also reset the value of hold timer to 3.5 times to hello whenever
only hello is modified so that the relationship holds good.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2021-03-25 10:27:40 +00:00
Donald Sharp db2f330bae yang: Allow make clean to actually clean up dependant files
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-03-24 19:27:20 -04:00
Renato Westphal b1c875d692
Merge pull request #8250 from idryzhov/fix-nb-running-get-entry
Fix aborts when using nb_running_get_entry during validation stage
2021-03-24 19:39:09 -03:00
Santosh P K de40463b54
Merge pull request #8008 from chiragshah6/yang_nb5
[lib, yang] : multiple fixes in prefix-list northbound conversion
2021-03-17 16:25:54 +05:30
Igor Ryzhov 4df3e31c3d bfdd: separate echo rx/tx timers
Currently there is a single interval for both RX and TX echo functions.
This commit introduces separate RX and TX timers for echo packets.

The main advantage is to be able to set the receive interval to zero
when we don't want to receive echo packets from the remote system.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-16 22:14:57 +03:00
Igor Ryzhov 6c38095749 zebra: make ribs config false
Zebra routing tables are not controlled by the user and can not be
created/deleted manually. Current NB create/destroy callbacks are
incorrectly implemented because instead of creating/deleting the RIB
they are only checking for it's existence. YANG model should reflect
the real situation.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-16 17:25:49 +03:00
Igor Ryzhov 59dad8137e bfdd: make sessions administratively up by default
Current behavior is inconsistent. When the session is created by another
daemon, it is up by default. When we later configure peer in bfdd, the
session is still up, but the NB layer thinks that it is down.

More than that, even when the session is created in bfdd using peer
command, it is created in DOWN state, not ADM_DOWN. And it actually
starts sending and receiving packets. The sessions is marked with
SHUTDOWN flag only when we try to reconfigure some parameter. This
behavior is also very unexpected.

Fixes #7780.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-03-15 00:44:08 +03:00
Emanuele Di Pascale 01d431418b isisd, yang, doc: combine config cmd for SRGB+SRLB
when changing both ranges at the same time the order of the commands
matters, as we need to make sure that the intermediate state is valid.
This represents a problem when pushing configuration via frr-reload.
To fix this, the global-block command was extended to optionally
allow setting the local-block range as well. The local-block command
is deprecated with a 1-year notice.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2021-03-10 11:02:30 +01:00
Chirag Shah 6440741834 yang: remove when statement from prefix-list
Remove when statements from prefix-list yang OM,
and do the same check in frr validation phase.
This helps a bit in perfomance of prefix-lists
scale config.

Ticket:CM-32035
Reviewed By:CCR-11096
Testing Done:

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-03-01 16:04:31 -08:00
lynne f3abc412a5 isisd: Fix Attach-bit processing
The purpose of the Attach-bit is to accomplish inter-area routing.  In other
venders, the Attached-bit is automatically set when a router is configured
as a L1|L2 router and has two adjacencies.  When a L1 router receives a LSP
with the Attached-bit set it is supposed to create a default route pointing
toward the neighbor to provide a default path out of the L1 area.

ISIS implementation has been fixed to support the above definition:
Setting the Attach-bit is now the default behavior and we allow the user to
turn it off.

We will only set the Default Attach-bit when creating a L1 LSP, if we are
a L1|L2 router and have a L2 adjacency up.

When a L1 router receives a LSP with the Attach-bit set, we will create a
default route pointing to the L1|L2 router as the nexthop.

The default route will be removed if the LSP is received with the Attach-bit
cleared.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
2021-01-20 09:24:35 -05:00
Russ White 619a77da10
Merge pull request #7781 from chiragshah6/evpn_dev
[yang,bgpd]  convert neighbor prefix-list and route-map to transactional clis
2021-01-19 11:26:34 -05:00
Russ White 21a7815dc1
Merge pull request #7863 from chiragshah6/mdev
[yang,staticd]: remove when condition from static nexthop om
2021-01-19 07:48:28 -05:00
Mark Stapp 0189d02fe1
Merge pull request #7844 from vishaldhingra/static
staticd: correct table-id handling for static routes.
2021-01-15 09:35:12 -05:00
Chirag Shah dc40d33703 yang: remove when condition from static nexthop om
Remove when conditions from the yang OM as it degrades
the performance in libyang.
Instead do the same when conditional check in frr northbound
validate phase. Reject the config if condiion do not meet.

Ticket:CM-32530
Testing Done:

Co-developed-by: VishalDhingra <vdhingra@vmware.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-01-13 09:24:25 -08:00
vdhingra ad6149e39d staticd: make table-id as the key for path-list
modified the yang model for path-list.
table-id should be a key, as one route can have
multiple table-ids.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2021-01-09 23:22:32 -08:00
Chirag Shah f4eac84c5a yang: nbr plist nb conversion for more afi-safis
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2021-01-09 23:06:02 -08:00
Renato Westphal 381200be9d yang, isisd: add RLFA nodes, skeleton callbacks and CLI commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2021-01-08 22:22:11 -03:00
Russ White cec0e51e25
Merge pull request #7807 from logbob0401/vrrpd_yang_bug_fix
Fix augment path problem in frr-vrrpd.yang to comply with rfc 7950
2021-01-05 10:30:55 -05:00
Russ White ee117a8bd6
Merge pull request #7507 from ton31337/fix/bgpd_do_not_send_update_if_path_really_did_not_change
bgpd: Do not send BGP UPDATE if the route actually not changed
2021-01-05 10:26:18 -05:00
Bo Zhang 8cf813c5ea vrrpd.yang bug fix: modify augment path to comply with rfc 7950
Signed-off-by: Bo Zhang <logbob0401@gmail.com>
2021-01-02 17:47:11 -08:00
Sebastien Merle 4d7b695d3a pathd: New SR-TE policy management daemon
This new daemon manages Segment-Routing Traffic-Engineering
(SR-TE) Policies and installs them into zebra. It provides
the usual yang support and vtysh commands to define or change
SR-TE Policies.

In a nutshell SR-TE Policies provide the possibility to steer
traffic through a (possibly dynamic) list of Segment Routing
segments to the endpoint of the policy. This list of segments
is part of a Candidate Path which again belongs to the SR-TE
Policy. SR-TE Policies are uniquely identified by their color
and endpoint. The color can be used to e.g. match BGP
communities on incoming traffic.

There can be multiple Candidate Paths for a single
policy, the active Candidate Path is chosen according to
certain conditions of which the most important is its
preference. Candidate Paths can be explicit (fixed list of
segments) or dynamic (list of segment comes from e.g. PCEP, see
below).

Configuration example:

segment-routing
 traffic-eng
  segment-list SL
   index 10 mpls label 1111
   index 20 mpls label 2222
  !
  policy color 4 endpoint 10.10.10.4
   name POL4
   binding-sid 104
   candidate-path preference 100 name exp explicit segment-list SL
   candidate-path preference 200 name dyn dynamic
  !
 !
!

There is an important connection between dynamic Candidate
Paths and the overall topic of Path Computation. Later on for
pathd a dynamic module will be introduced that is capable
of communicating via the PCEP protocol with a PCE (Path
Computation Element) which again is capable of calculating
paths according to its local TED (Traffic Engineering Database).
This dynamic module will be able to inject the mentioned
dynamic Candidate Paths into pathd based on calculated paths
from a PCE.

https://tools.ietf.org/html/draft-ietf-spring-segment-routing-policy-06

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-12-18 16:34:02 +01:00
Donatas Abraitis 2adac2562a bgpd: Do not send BGP UPDATE if the route actually not changed
Reference: https://www.cmand.org/communityexploration

                     --y2--
                    /  |   \
  c1 ---- x1 ---- y1   |   z1
                    \  |   /
                     --y3--

1. z1 announces 192.168.255.254/32 to y2, y3.
2. y2 and y3 tags this prefix at ingress with appropriate
communities 65004:2 (y2) and 65004:3 (y3).
3. x1 filters all communities at the egress to c1.
4. Shutdown the link between y1 and y2.
5. y1 will generate a BGP UPDATE message regarding the next-hop change.
6. x1 will generate a BGP UPDATE message regarding community change.

To avoid sending duplicate BGP UPDATE messages we should make sure
we send only actual route updates. In this example, x1 will skip
BGP UPDATE to c1 because the actual route is the same
(filtered communities - nothing changes).

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-12-11 14:51:05 +02:00
Donald Sharp cb5a294642
Merge pull request #7590 from opensourcerouting/isisd-lfa
isisd: add support for classic LFA
2020-12-02 20:43:51 -05:00
Igor Ryzhov de4132bfe5 yang: fix cisco access list source value
Source value must be a choice between host, network and any, not a set
of all three.

Fixes #7599.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-11-27 21:53:25 +03:00
Renato Westphal d20b14bcd7 yang, isisd: add LFA nodes, NB skeleton callbacks and CLI commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-24 20:15:52 -03:00
Donald Sharp cac886dd53
Merge pull request #6145 from patrasar/pim_nb_code_upstream
pimd: northbound backend code
2020-11-19 11:03:00 -05:00
Donatas Abraitis 7c98d487b8 *: Replace typo (supress => suppress)
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-11-17 12:13:38 +02:00
Chirag Shah cc4440c317 bgpd: shorten names for default originate nb callbacks
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:29:16 -07:00
Chirag Shah afe03f6094 *: shorten name of prefix-limit options
shorten prefix-limit's option name in yang model.
change restart timer to uint16.
Stubbed northbound callbacks with above changes.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:27:49 -07:00
Chirag Shah f4b8ec0721 bgpd: neighbor peergrp config to transactional cli
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-27 11:27:03 -07:00
Chirag Shah 90e21f3535 bgpd: add nb support for suppress-map in aggregate cmd
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:15 -07:00
Chirag Shah fa423774ff bgpd: add match-med nb support in aggregate cmd
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:15 -07:00
Chirag Shah 3b66fcef58 yang: update bgp module afi-safi parameters
add vnc-direct route-type.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-26 08:57:14 -07:00
Renato Westphal 01983712cc isisd: add support for Anycast-SIDs
Add the "n-flag-clear" option to the "segment-routing prefix"
command. The only thing that option does is to clear the node
flag of the Prefix-SID, even if it corresponds to a local loopback
address. No changes are necessary other than that in order to fully
support Anycast-SIDs.  isisd already supports multiple routers
advertising the same route with the same Prefix-SID after the recent
refactoring. Clearing the node flag for such anycast routes isn't
strictly required, but failure to do so can lead to problems like
TI-LFA picking the wrong Prefix-SID when calculating repair paths.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23 10:31:39 -03:00
Sarita Patra 9dc9724ee6 yang: modifications to frr-pim.yang, frr-igmp.yang
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-10-22 23:41:51 -07:00
Renato Westphal d6160c0acf yang: fix circular chain of leafrefs
Fix the following libyang error when trying to load the "frr-nexthop"
module explicitly (e.g. using the 'gen_northbound_callbacks' tool):

libyang: A circular chain of leafrefs detected. (/frr-nexthop:frr-nexthop-group/nexthop-groups/name)
libyang: Invalid value "frr-nexthop-grouping" of "uses". (/frr-nexthop:frr-nexthop-group/frr-nexthop-grouping)
libyang: Copying data from grouping failed. (/frr-nexthop:frr-nexthop-group/frr-nexthop-grouping)
libyang: Module "frr-nexthop" parsing failed.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-19 23:46:19 -03:00
Santosh P K 421791c5b6
Merge pull request #7235 from opensourcerouting/acl-wildcard-fix
lib,yang: cisco acl network wildcard fixes
2020-10-16 21:28:39 +05:30
Renato Westphal ed5d703279 yang, isisd: add TI-LFA YANG nodes and corresponding skeleton callbacks
Add CLI wrapper commands as well...

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14 16:27:37 -03:00
whitespace 701a01920e *: reformat python files
We are now using black.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2020-10-07 17:22:26 -04:00
Rafael Zalamena 4c213457dd yang: fix cisco access list network information
Don't attempt to put the wildcard information into a 1 byte field
otherwise we'll lose information.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-10-04 07:05:17 -03:00
Chirag Shah 5e42cb2fb0 bgpd: move router bgp nb callback
move `router bgp` nb callback at `bgp` node level
to have access to bgp context at neighbor and peer-group
level and align create/destroy callbacks call during
no router bgp.

Earlier `no router bgp` is performed first global destroy
callback is called which essentially removes `bgp context`
then it calls to remove (parallel nodes) neighbor and peer-group
which does not have access to bgp context.
Moving router bgp at bgp solves this destroy callback ordering issue.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03 11:25:38 -07:00
Chirag Shah ff8a8a7ac1 bgpd: convert global config to transactional cli
Convert global congigurations clis to transactional
clis using northbound plugin callbacks.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03 11:25:37 -07:00
Chirag Shah bc8c00cca1 *: add bgp yang files into makefiles
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2020-10-03 11:25:37 -07:00
Renato Westphal e4d09f608d
Merge pull request #7063 from idryzhov/yang-leafref
yang: use leafref instead of string
2020-09-26 15:12:13 -03:00
Donald Sharp 0b8125588a
Merge pull request #7069 from opensourcerouting/fix-set-metric
lib: fix the "set metric" route-map command
2020-09-19 08:06:36 -04:00
Igor Ryzhov 45c70d4aa3 yang: replace dummy rmap-ref with actual route-map leafref
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-09-17 18:00:06 +03:00
Igor Ryzhov 806defc8fe yang: use leafref instead of string
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-09-17 18:00:06 +03:00
Renato Westphal beb91114ec
Merge pull request #6789 from volta-networks/feat_ldp_igp_sync
ldpd: Add support for LDP-IGP Synchronization
2020-09-11 15:55:04 -03:00
lynne 1cbf96a8ad isisd: ldp-igp-sync feature: adding isis support
Signed-off-by: Lynne Morrison <lynne@voltanet.io>
Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-09-09 14:38:44 -04:00
Renato Westphal add39cde9d lib: fix the "set metric" route-map command
The "set metric" command wasn't processing metric additions and
subtractions (using + and -) correctly. Fix those problems.

Also, remove the "+metric" and "-metric" options since they don't
work and don't make any sense (they could be interpreted as unitary
increments/decrements but that was never supported).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-09-09 14:53:26 -03:00
Donald Sharp 9dc0503345
Merge pull request #6376 from opensourcerouting/bump-libyang-req-version-1.x
build, yang: bump libyang minimum required version to 1.0.184
2020-09-08 12:06:10 -04:00
Renato Westphal b686742e2b
Merge pull request #6934 from Niral-Networks/niral_dev_vrf_isis_core_pr4
isisd, yang, doc : Support for different VRF in ISIS.
2020-09-04 18:44:56 -03:00
harios_niral 65251ce80f doc, yang, isisd : Support for different VRF in isisd
1. Added isis with different vrf and it's dependecies.
2. Added new vrf leaf in yang.
3. A minor change for IF_DOWN_FROM_Z passing argrument is
   replaced with ifp pointer in api "isis_if_delete_hook()".
4. Minor fix in the isisd spf unit test.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>"
Signed-off-by: harios_niral <hari@niralnetworks.com>
2020-09-01 00:48:05 -07:00
Rafael Zalamena 55251492d0 yang: fix cisco extended access list mistake
The extended value must be a part of the cisco choice otherwise it will
be possible to create a destination only part which will cause a crash
when trying to access the assumed mandatory source.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-25 10:35:41 -03:00
Rafael Zalamena 310451ba97
Merge pull request #6948 from xThaid/proactive_arp
ospfd: make proactive ARP configurable
2020-08-24 11:35:34 +00:00
Jakub Urbańczyk a92706bb83 ospfd: make proactive ARP configurable
OSPFD sends ARP proactively to speed up convergence for /32 networks
on a p2p connection. It is only an optimization, so it can be disabled.

It is enabled by default.

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
2020-08-20 17:19:25 +02:00
Quentin Young f088c4e77d
Merge pull request #5702 from vishaldhingra/bgp_nb
bgpd : bgp yang definition
2020-08-18 11:50:09 -04:00
vdhingra 2228b116fa bgpd: yang defination
Yang files for bgpd to use northbound APIs

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: vishaldhingra <vdhingra@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-08-14 07:44:39 -07:00
Donald Sharp bbbfa7f77d
Merge pull request #6899 from opensourcerouting/bfd-knobs
bfdd: support passive mode and minimum TTL
2020-08-14 08:54:36 -04:00
Sebastien Merle 065276ae1f staticd: add support for SR Policies
Configuration example:

    ip route 9.9.9.9/32 6.6.6.6 color 123

The SR Policy to be chosen is uniquely identified by the policy
endpoint (6.6.6.6) and the SR-TE color (123). Traffic will be
augmented with an MPLS label stack according to the active
candidate path of that particular policy.

Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
2020-08-12 13:28:48 +02:00
Rafael Zalamena 8733bc48ea yang: add new BFD configuration leaves
The two new configurations knobs are:

* Passsive mode
* Minimum TTL

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-08-11 16:46:10 -03:00
Renato Westphal 240b7826f6 build, yang: bump libyang minimum required version to 1.0.184
It's time to say good bye to libyang 0.16.105. The recently
released libyang 1.0.184 includes numerous bug fixes and performance
improvements that we need.

Despite the major version bump from 0.x to 1.x, the libyang API is
the same except for a single backward-incompatible change in the
user types interface (which we're currently not using). Hence no
code changes were necessary to adapt FRR to libyang 1.x.

This commit also reintroduces some leafrefs that needed to be
removed from our YANG modules due to a bug that was present on
libyang 0.16.105.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-08-07 14:07:46 -03:00
Donald Sharp 690e4f9dff
Merge pull request #6517 from vishaldhingra/submodule
lib: Add support to load submodules in embedded modules framework
2020-08-07 11:09:25 -04:00
Mobashshera Rasool 3152fdfd93 ospfd: YANG Model definition for OSPFv2
Initial version of OSPF configuration Yang.

Raised new PR with review comment fixes on top of PR
https://github.com/FRRouting/frr/pull/6055

Revision History:
1. Fixed review comments.
2. Removed ospf list with id as key, name can be used as key
3. Corrected the alignment

Co-authored-by : Santosh P K <sapk@vmware.com>
Co-authored-by : Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2020-08-06 15:07:57 +00:00
Chirag Shah 15435a3ce7 yang: route-map model description format
Added "." at the enf of each description of fields.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-07-31 16:21:45 -07:00
Chirag Shah 1cbba4b0bd yang: route-map style format
Align to yanglint format

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-07-31 16:21:45 -07:00
Chirag Shah 37746447c1 yang: create route-map leafref reference type
Create leafref reference type for route-map name.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-07-31 16:21:45 -07:00
Donald Sharp 93d08879ad
Merge pull request #6769 from opensourcerouting/acl-regress
lib,yang: merge cisco/zebra access list styles
2020-07-29 09:57:39 -04:00
David Lamparter fd2edd5ac1
Merge pull request #6792 from chiragshah6/pim_dev
*: pim igmp yang registery to appropriate makefile
2020-07-28 15:13:00 +02:00
Russ White 996b789193
Merge pull request #6758 from chiragshah6/yang_nb6
EVPN northbound conversion for vrf l3vni mapping command
2020-07-28 07:22:24 -04:00
vdhingra 65de8bc8d0 lib: Add support to load submodules in embedded modules framework
BGP Yang is using sub modules and at present FRR is not processing
submodules in embedded framework yang

Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2020-07-28 00:39:32 -07:00
Chirag Shah b37e4b282d *: pim igmp yang registery to appropriate makefile
Move pim and igmp yang files registery to appropriate makefiles.

In yang directory makefile move under `PIMD`
Remove pimd yang files from library makefile instead move them
to pimd makefile.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-07-22 23:22:23 -07:00
Quentin Young 65b86778c1
Merge pull request #6711 from GalaxyGorilla/bfd_isis_profiles
Add BFD profiles for IS-IS
2020-07-21 14:45:31 -04:00
Chirag Shah ee4b89c784 yang: move evpn l3vni config under vrf
Move EVPN L3VNI configuration under vrf tree.

augment /frr-vrf:lib/frr-vrf:vrf:
  +--rw zebra
     |
     +--rw vni-id?        vni-id-type
     +--rw prefix-only?   boolean

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-07-20 08:39:14 -07:00
Rafael Zalamena 375d157f0e lib,yang: merge cisco/zebra access list styles
Merge the cisco style access list with zebra's logic so we can mix both
types of rules while keeping the commands.

With this the cisco style limitation of having 'destination-*' only for
specific number ranges no longer exist for users of YANG/northbound (the
CLI still has this limitation).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-07-19 15:27:56 -03:00
vdhingra 314825ff91 staticd: Added afi-safi as a key in route-list
To address the ip mroute command there is a need to add
safi as a key. So adding the afi-safi-type identityref
as a key.

Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2020-07-16 08:40:45 -07:00
vdhingra 755100ac89 zebra: Moving afi-safi identity to lib
afi-safi identity handling should be in the common place.

Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2020-07-16 08:40:42 -07:00
vdhingra 565f463e30 yang : removed leafref to run CI/CD
Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2020-07-16 08:33:00 -07:00
vdhingra eac8547afe yang : nexthop yang modification
nexthop vrf is addded as a key along with nh-type, gateway,
interface.

Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2020-07-16 08:33:00 -07:00
vdhingra 556d500694 yang: staticd yang modification
staticd yang has been modified to support below use cases
1. src-table for IPV6 address family.
2. distance,tag and table-id would be the key for a given prefix.

Signed-off-by: VishalDhingra <vdhingra@vmware.com>
2020-07-16 08:33:00 -07:00
GalaxyGorilla 4affdba79e *: add BFD profile support for IS-IS
BFD profiles can now be used on the interface level like this:

	interface eth1
	  ip router isis 1
          isis bfd
          isis bfd profile default

Here the 'default' profile needs to be specified as usual in the
bfdd configuration.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
2020-07-10 11:28:43 +00:00
Olivier Dugeon d839131273 isisd: Add Segment Routing Local Block support
Segment Routing Local Block (SRLB) is part of RFC8667. This change introduces
the possibility for isisd to advertize SRLB in LSP. Base and Range of SRLB
could be configured through CLI or Yang.

Adjacency-SID are now using this SRLB for label allocation. SRLB could also
be used for SID-Binding (e.g. LDP to SR).

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-06-23 16:36:56 +02:00
Chirag Shah 9670b0b399 yang: redefine nexthop operational model
Separate out nexthop config and operational models.
nexthop-group config model has list of nexthop-groups
where else operational nexthop group is single entity
underneath list of nexthops.

The common code is fectored into grouping to use among
config and operational model.

nexthop operational model caters to RIB operational model.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-06-10 16:25:18 -07:00
Rafael Zalamena cc82bcc161 lib: fix prefix list description command
Changes:
- Use `description` on CLI but `remark` on YANG like access-list (also
  because `description` is a reserved word).
- Rename YANG model field and northbound code.
- Fix wrong sequence type get.
- Fix wrong action XPath in action callback.
- Fix wrong concat in (ipv6|mac) access-list.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05 14:36:53 -03:00
Rafael Zalamena a4d7621fc8 yang: update filter yang model
Important changes:

*   Limit the access-list name length according to header definition;
*   Add another list (sequence) inside instances to avoid repeated fields;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-06-05 14:31:26 -03:00
Donald Sharp 080bfc6530
Merge pull request #6432 from opensourcerouting/bfd-profiles
bfdd: support pre configured peer profiles
2020-05-21 07:01:40 -04:00
Donald Sharp edb2c56c19
Merge pull request #6425 from opensourcerouting/nb-state-cbs-fixes
northbound state callbacks fixes
2020-05-20 19:27:41 -04:00
Rafael Zalamena abf1ba08e3 yang: support BFD session profiles
Allow sessions to use BFD profile configurations instead of having to
clone the configuration per peer.

If using a profile and setting a peer configuration, the peer
configuration will take precedence over the profile.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-20 10:39:34 -03:00
Quentin Young e3ad2197e3
Merge pull request #6417 from opensourcerouting/bfdd-duplicated
bfdd: remove duplicated code and fix comment
2020-05-19 13:37:26 -04:00
Renato Westphal 2717192853 isisd, yang: move IS-IS interface state data to the appropriate place
Now that the "frr-interface" list has a "state" container, move the
IS-IS interface state nodes underneath it using a new augmentation.

Also, update the IS-IS SR topotest to account for this change. Make
use of symlinks where possible to avoid having multiple files with
the same content.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-05-15 23:47:43 -03:00
Donald Sharp 36caef199a
Merge pull request #6404 from FRRouting/dev_isis_sr
isisd: IS-IS Segment Routing support
2020-05-15 08:38:06 -04:00
Rafael Zalamena 0ff1fb5333 yang: fix BFD multi hop RFC number
The RFC for multi hop is 5883 and not 5882.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-15 09:25:23 -03:00
Chirag Shah 00ebe5b5f9 yang: align keys and leafs
Align leafs according to keys order.
Fix some of the nits seen in yanglint -f yang format.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-05-12 14:52:08 -07:00
Chirag Shah 748a972c03 yang: add unified protocol types in rib model
Add v4/v6 unified protocol list to rib operational
model.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-05-12 14:52:08 -07:00
Chirag Shah 56a88b9e1c zebra: add zebra container to rib model
Add zebra container in rib tree.
When displaying RIB under vrf, it displays
zebra module name.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-05-12 14:31:37 -07:00
Chirag Shah 9d86e091bb zebra: northbound changes for the rib model
This commit implements:
RIB operational list create/destroy.
Walk over RIB tables using keys.
The first RIB table will be IPV4/unicast (table-id 254)
will be fetched.
Create a new api to fetch RIB table based on
afi-safi and table id as the keys.

remove mandatory true statement from the leaf which
is part of the list key.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-05-12 13:25:10 -07:00
Renato Westphal fe3b629a68 yang: adopt the BSD-2-Clause license for our YANG modules
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-05-04 21:10:43 -03:00
Renato Westphal 7e405d3b19 isisd: add segment-routing YANG nodes and skeleton callbacks
Most definitions were borrowed from the IETF IS-IS SR YANG module,
with a few adaptations. Of particular notice are the following:
* No support for the configuration of multiple SRGBs.
* No distinction between local and connected Prefix-SIDs, both are
  configured the same way.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-30 11:37:38 +02:00
Donald Sharp 78891caff6 yang: Convert to FRRouting for organization
We should be using `FRRouting` as our organization.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-04-22 12:45:37 -04:00
Sarita Patra da787004cc yang: Defining yang files for pim
Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-04-22 09:21:28 -07:00
Chirag Shah d9d6232fb6 yang: add weight in nexthop operational model
add weight field to operational model.
add leafref to nexthopgroup.
format according to yanglint.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:51:41 -07:00
Chirag Shah 93a6af756c yang: update zebra interface model
Modify interface config model
and add zebra specific interface state operational data.

augment /frr-interface:lib/frr-interface:interface:
  +--rw zebra
     +--rw ip-addrs* [address-family ip-prefix]
     |  +--rw address-family    identityref
     |  +--rw ip-prefix         ietf-inet-types:ip-prefix
     |  +--rw label?            string
     |  +--rw ip4-peer?         ietf-inet-types:ipv4-prefix
     +--rw multicast?     boolean
     +--rw link-detect?   boolean
     +--rw shutdown?      boolean
     +--rw bandwidth?     uint32
     +--ro state
        +--ro up-count?      uint16
        +--ro down-count?    uint16
        +--ro zif-type?      identityref
        +--ro ptm-status?    string <disabled>
        +--ro vlan-id?       uint16
        +--ro vni-id?        vni-id-type
        +--ro remote-vtep?   ietf-inet-types:ipv4-address
        +--ro mcast-group?   ietf-routing-types:ipv4-multicast-group-address

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Chirag Shah 219dabe8d4 yang: add operational data to frr-interface model
module: frr-interface
  +--rw lib
     +--rw interface* [name vrf]
        +--rw name           string
        +--rw vrf            frr-vrf:vrf-ref
        +--rw description?   string
        +--ro state
           +--ro if-index?      int32
           +--ro mtu?           uint16
           +--ro mtu6?          uint32
           +--ro speed?         uint32
           +--ro metric?        uint32
           +--ro flags?         if-flags-type
           +--ro type?          identityref
           +--ro phy-address?   ietf-yang-types:mac-address

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Chirag Shah b0f502c521 yang: add ietf interface yang model
Add ietf interface yant model.
Also include it in the makefile.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:26:36 -07:00
Sarita Patra 7fd139b523 yang: igmp yang definition
Defined frr-igmp.yang file for IGMP protocol.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Co-authored-by: Santosh P K <sapk@vmware.com>

Signed-off-by: Sarita Patra <saritap@vmware.com>
2020-04-16 08:26:29 -07:00
Chirag Shah 303cfba626 yang: zebra rib model add route entry
FRR rib model need to accomodate route entries for
a given destination prefix.

Add a list of route entry under the list of prefix.

+--rw ribs
   +--rw rib* [afi-safi-name table-id]
      +--rw table-id         uint32
      +--rw afi-safi-name    identityref
      +--ro route* [prefix]
         +--ro prefix         ietf-inet-types:ip-prefix
         +--ro route-entry* [protocol]
            +--ro protocol           frr-route-types:frr-route-types-v4
            +--ro instance?          uint16
            +--ro distance?          uint8
            +--ro metric?            uint32
            +--ro tag?               uint32
            +--ro selected?          empty
            +--ro installed?         empty
            +--ro failed?            empty
            +--ro queued?            empty
            +--ro internal-flags?    int32
            +--ro internal-status?   int32
            +--ro uptime?            ietf-yang-types:date-and-time
            +--ro nexthop-group* [name]
               +--ro name            string
               +--ro frr-nexthops
                  +--ro nexthop* [nh-type gateway interface]
                     +--ro nh-type             frr-nexthop:nexthop-type
                     +--ro vrf?                frr-vrf:vrf-ref
                     +--ro gateway             frr-nexthop:optional-ip-address
                     +--ro interface           frr-interface:interface-ref
                     +--ro bh-type?            frr-nexthop:blackhole-type
                     +--ro onlink?             boolean <false>
                     +--ro mpls-label-stack
                     |  +--ro entry* [id]
                     |     +--ro id               uint8
                     |     +--ro label?           ietf-routing-types:mpls-label
                     |     +--ro ttl?             uint8
                     |     +--ro traffic-class?   uint8
                     +--ro duplicate?          empty
                     +--ro recursive?          empty
                     +--ro active?             empty
                     +--ro fib?                empty

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:17:59 -07:00
Chirag Shah 1fca062a25 yang: zebra rib model remove grouping for ip route
Grouping is referencing leaves outside the grouping
from where it is used. Removing it and defining leaves
at the used place.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:17:59 -07:00
Chirag Shah 0d2e2bd138 yang: add zebra model in makefile
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:11:51 -07:00
Chirag Shah 4218384d6f yang: zebra rib operational model
augment /frr-vrf:lib/frr-vrf:vrf:
  +--rw ribs
     +--rw rib* [afi-safi-name table-id]
        +--rw table-id         uint32
        +--rw afi-safi-name    identityref
        +--ro route* [prefix]
           +--ro prefix             ietf-inet-types:ip-prefix
           +--ro protocol?          frr-route-types:frr-route-types-v4
           +--ro protocol-v6?       frr-route-types:frr-route-types-v6
           +--ro vrf?               frr-vrf:vrf-ref
           +--ro distance?          uint8
           +--ro metric?            uint32
           +--ro tag?               uint32
           +--ro selected?          empty
           +--ro installed?         empty
           +--ro failed?            empty
           +--ro queued?            empty
           +--ro internal-flags?    int32
           +--ro internal-status?   int32
           +--ro uptime?            ietf-yang-types:date-and-time
           +--ro nexthop-group* [name]
              +--ro name            string
              +--ro frr-nexthops
                 +--ro nexthop* [nh-type gateway interface]
                    +--ro nh-type             frr-nexthop:nexthop-type
                    +--ro vrf?                frr-vrf:vrf-ref
                    +--ro gateway             frr-nexthop:optional-ip-address
                    +--ro interface           frr-interface:interface-ref
                    +--ro bh-type?            frr-nexthop:blackhole-type
                    +--ro onlink?             boolean <false>
                    +--ro mpls-label-stack
                    |  +--ro entry* [id]
                    |     +--ro id               uint8
                    |     +--ro label?           ietf-routing-types:mpls-label
                    |     +--ro ttl?             uint8
                    |     +--ro traffic-class?   uint8
                    +--ro duplicate?          empty
                    +--ro recursive?          empty
                    +--ro active?             empty
                    +--ro fib?                empty

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:05:04 -07:00
Chirag Shah 115232e252 yang: revert leafref to get interface cmd working
Unable to access interface command:
root@bharat:~/stash/libyang/build# dpkg-query -W | grep libyang
libyang-dev	0.16.105-3~ubuntu18.04.1
libyang0.16	0.16.105-3~ubuntu18.04.1
root@bharat:~/stash/libyang/build# vtysh
bharat# config t
bharat(config)# interface lo
% Configuration failed: validation error.

Please check the logs for more details.

Logfile:
2020/03/21 16:48:55 ZEBRA: libyang: Leafref
"/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default"
points to a non-existing leaf.
(/frr-interface:lib/interface[name='lo'][vrf='default']/vrf)
2020/03/21 16:48:55 ZEBRA: [EC 100663337]
nb_candidate_commit_prepare: failed to validate
candidate configuration

CI system failure:
2020/03/21 18:53:18 ZEBRA: libyang: Leafref
"/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default"
points to a non-existing leaf.
(/frr-interface:lib/interface[name='r1-eth0'][vrf='default']/vrf)
2020/03/21 18:53:18 ZEBRA: [EC 100663337] nb_candidate_commit_prepare:
failed to validate candidate configuration
2020/03/21 18:53:18 ZEBRA: libyang: Leafref
"/frr-vrf:lib/frr-vrf:vrf/frr-vrf:name" of value "default"
points to a non-existing leaf.
(/frr-interface:lib/interface[name='r1-eth1'][vrf='default']/vrf)

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 08:00:18 -07:00
Chirag Shah bc867a5d30 lib: vrf northbound callbacks
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 07:55:56 -07:00
vdhingra 8b04316627 lib: yang defination for basic frr-routing
Yang files for basic frr-routing used by other
daemons like staticd and pim

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: vishaldhingra <vdhingra@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-04-16 07:55:53 -07:00
vdhingra 56822e76fd staticd: yang defination
Yang files for staticd to use northbound APIs

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: vishaldhingra <vdhingra@vmware.com>
Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2020-04-16 07:49:10 -07:00
Santosh P K f8614910a5 lib: FRR next-hop yang data model.
A common nexthop and group nexthop yang data model
for all protocols in FRR.

Co-authored-by: Santosh P K <sapk@vmware.com>
Co-authored-by: Vishaldhingra <vdhingra@vmware.com>
Signed-off-by: Santosh P K <sapk@vmware.com>
2020-04-16 07:49:10 -07:00
Chirag Shah cc9f7265a8 yang: add vrf ref to interface model
module: frr-interface
  +--rw lib
     +--rw interface* [name vrf]
        +--rw name           string
        +--rw vrf            frr-vrf:vrf-ref
        +--rw description?   string

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 07:49:10 -07:00
Chirag Shah 3a7262b6a9 *: add frr-vrf yang module in makefile
lib: Adding frr-vrf yang module to common place
so it can be accessed from all frr modules.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 07:49:06 -07:00
Chirag Shah 85bb733513 yang: add vrf model
module: frr-vrf
  +--rw lib
     +--rw vrf* [name]
        +--rw name      string
        +--ro id?       uint32
        +--ro active?   boolean <false>
        +--rw netns {netns}?
           +--rw name?   string

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-04-16 07:41:56 -07:00
Renato Westphal e2a56663c0 yang: use the correct type for EIGRP neighbors
Fixes #6193.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-12 00:12:54 -03:00
Donald Sharp c189a11d7f
Merge pull request #6185 from opensourcerouting/build-assorted-20200408
assorted build fixes
2020-04-08 13:29:45 -04:00
David Lamparter 261e765345 yang/embedmodel.py: create output dir if needed
For builds with separate build directory, just to be on the safe side.

Signed-off-by: David Lamparter <equinox@diac24.net>
2020-04-08 16:30:10 +02:00
Donald Sharp f7688027d8 yang: Temp change interface type to string to allow configuration
Temporarily change the interface types in rip and ripng to
strings to allow us to work, since the yang uplift to 1.0
is proving difficult.

Signed-off-by: Donald Sharp sharpd@cumulusnetworks.com>
2020-04-08 10:18:31 -04:00
Emanuele Di Pascale d2c970ffb2 isisd, yang: unified lsp-timers command
Yang constraints enforced by the northbound callbacks require that
the maximum lifetime be >= than (refresh interval + 300). When we are
moving from one config to another through frr-reload.py, we issue
a number of vtysh -c commands ('no lsp-refresh-interval level-1 500',
'no max-lsp-lifetime level-1 1000'), which reset these parameters to their
default values, respectively 900 and 1200. Depending on the actual
values in the current config, the order in which these commands are sent
might be the wrong one, in that we hit an invalid intermediate state and
make vtysh (and by extension frr-reload.py) return an error.

As a workaround, let's add a one-liner command that sets all these
inter-related parameters in one go, and make isisd display them as a
single line too, so that the diff will be computed as a single command.
The old individual commands are kept to ensure backwards compatibility.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2020-04-06 17:38:27 +02:00
Santosh P K 3a021e0fc6 lib: [YANG] Route-map inteface forward ref
To satisfy forward reference for interface in route-map.
Libyang 0.16 does not support leafref yet.

Signed-off-by: Santosh P K <sapk@vmware.com>
2020-04-03 12:15:20 -07:00
Quentin Young e0bf2057b4
Merge pull request #5183 from opensourcerouting/zebra-route-map-nb
yang/zebra: migrate route map to northbound
2020-03-31 14:21:20 -04:00
Lou Berger 8678d6387c *: use the current project name (FRRouting)
Signed-off-by: Lou Berger <lberger@labn.net>
2020-03-25 17:38:56 -04:00
Rafael Zalamena 2c3e1f1f38 yang: unionize IPv4/IPv6 route types
Use a union to join the route types declaration instead of
copying/pasting them.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-03-25 12:26:14 -03:00
Rafael Zalamena f8978cc871 yang: zebra route map fixes based on feedback
Fix copy & paste on YANG description and add new route types that
appeared.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-03-23 10:38:34 -03:00
Rafael Zalamena b87fa24d08 zebra: implement zebra route map northbound
Add skeleton code for zebra northbound, but implement route map
commands.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-03-23 07:55:13 -03:00
Rafael Zalamena bc77245fa1 yang: add zebra specific route map options
*   Extend the route map yang model to have zebra enumerations;
*   Add zebra route map specific match/set values;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-03-23 07:55:13 -03:00
Rafael Zalamena fe362bf415 yang: add all route types enumeration
This new type will be used by zebra route map match command which is IP
version agnostic.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-03-23 07:55:13 -03:00
Rafael Zalamena a513824c34 yang/lib: add filter model to code
This fixes a warning on daemons that use route map about filter yang
model not being included in the binary.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04 14:05:43 -03:00
Rafael Zalamena 686d244f00 lib: implement route map northbound
Based on the route map old CLI, implement the route map handling using
the exported functions.

Use a curry-like programming pattern avoid code repetition when
destroying match/set entries. This is needed by other daemons that
implement custom route map functions and need to pass to lib their
specific destroy functions.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04 14:05:43 -03:00
Rafael Zalamena 0c0e73045b yang: update route map model
Important changes:

  * Rename top container `route-map` to `lib`;
  * Rename list `instance` to `route-map`;
  * Move route map repeated data to list `entry`;
  * Use interface reference instead of typedef'ed string;
  * Remove some zebra specific route map conditions;
  * Protect `tag` set value with `when "./action = 'tag'"`;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-02-04 14:05:43 -03:00
Renato Westphal 5d860e1dac
Merge pull request #5314 from qlyoung/yang-vrrp
VRRP northbound conversion
2020-01-07 21:36:46 -03:00
Emanuele Di Pascale 26eb18e259 isisd, yang: set default is-type to level-1-2
Currently isisd has this strange (legacy) behavior where the
first area is created by default with level-1-2, while every
other subsequent area uses the default defined in the yang model,
which is level-1. This is a source of confusion when trying to
configure the daemon programatically, either with frr-reload
or using the transactional cli. Given how rare having multiple
IS-IS instances is anyway, the easiest solution is to remove
this behavior and default to level-1-2 for every area.

Note that this does not affect fabricd, which continues using
exclusively level-2-only areas.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
2019-12-17 16:54:47 +01:00
Quentin Young 534b98f925 vrrpd, yang: cleanup vrrp nb conversion
- Use correct units and conversions in model & code
- Fix incorrect CLI help string for V6 virtual addrs
- Fix nb get-entry callback for virtual router
- Fix a couple style nits
- Simplify some CLI code
- Remove unused code
- Remove unused YANG definitions
- Update sighup() to handle reloads
- Update interface level config writer to use NB callbacks
- Add simplified `no` forms for priority and advertisement-interval
  commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 16:05:01 -05:00
Quentin Young 4c5b9faef5 yang: add org, description data to vrrp model
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young e6a70ae8f1 yang: add opderdata & slight reorg for vrrp
- Move virtual address configs to be under the version specific (v4/v6)
  nodes
- Add lots of operdata

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young 4d12b27efe yang: add v2 support to vrrp yang model
This adds support for VRRPv2 to the VRRP YANG model, which entails the
following changes:

- Add a version leaf with a default of 3
- Split v4 and v6 vritual addresses into separate lists, with
  constraints on v6 addresses to only exist when the version is 3

General improvements:

- Remove unused config groupings
- Add administrative shutdown leaf
- Split state reporting into v4 and v6 blocks, since these are
  considered separate virtual routers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young 2ea09c7379 yang: update vrrp yang model
Remove config / state blocks; this is an OpenConfig-ism that is not
relevant for FRR

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Quentin Young 21a22f4cd2 yang: add vrrp yang model
Adapted from OpenConfig. Changes:
- Interface tracking commented out (unsupported)
- Preemption delay commented out (unsupported)
- Accept_Mode default changed to 'true'

Also linted and stylized.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-12-09 14:39:18 -05:00
Chirag Shah 1b9468cc7c yang: add range to string nodes in zebra modules
Add range to few of the string nodes
(including vrf, iptable names)
Use interface reference instead of interface string.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-10-10 07:44:33 -07:00
Chirag Shah 3d2ab385ca yang: align indent zebra modules
Align zebra yang files based on pyang lint format.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-10-10 07:42:05 -07:00
Chirag Shah e6a0538b40 *: add ietf routing types yang module in makefile
Adding ietf routing types yang module to makefile

lib: Adding this yang module to common place
so it can be accessed from all frr modules.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-10-09 15:46:37 -07:00
Chirag Shah 4b5cb97042 yang: add ietf routing types module
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2019-10-09 13:15:04 -07:00
Donald Sharp 59aa96313a
Merge pull request #5052 from mjstapp/zebra_yang_model
libs: add yang models for zebra and nexthop
2019-09-25 09:27:57 -04:00
Mark Stapp fdd5c6e855 libs: add yang models for zebra and nexthop
Add a yang model for some of zebra's functionality,
but the model is not integrated into the build at all yet. Also
add a model for nexthop and nexthop-group.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-09-24 16:31:12 -04:00
Renato Westphal c32496ee5c isisd, yang: implement interface counters
The new "event-counters" grouping is almost a 1:1 copy of the same
grouping from the IETF IS-IS module, except for the "lan-dis-changes"
leaf which was skipped (more work needs to be done to support it).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-23 09:38:05 -03:00
Renato Westphal aec5ef490c isisd, yang: implement read-only list of adjacencies
The new "adjacency-state" grouping is almost a 1:1 copy of the
same grouping from the IETF IS-IS module, except for the "usage"
and "lastuptime" leafs that were skipped (more work needs to be
done to support those).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-23 09:38:05 -03:00
Renato Westphal e206450bd9 yang: create new interface-config grouping in the frr-isisd module
Do this to better separate config data from state data (coming in
the next commits) like done in the IETF IS-IS module.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-23 09:38:05 -03:00
Renato Westphal eed84494b4 lib: add yang wrappers for IP prefixes
We had wrappers for IPv4 and IPv6 prefixes, but not for IP (version
agnostic) prefixes. This commit addresses this issue.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-18 13:38:28 -03:00
Quentin Young b0584ad3c6 yang: add user type for ip-address
Convert ietf-inet-types:ip-address to struct ipaddr.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-12 21:39:43 +00:00
Quentin Young f22b925085 yang: create interface reference type
Instead of copy-pasting a 16 character string type for use as an
interface reference, create a new typedef that leafref's the name node
of an interface. This way the constraints change with the constraints on
an interface name itself, and it's self documenting.

Incidentally ripd and ripngd forgot the 16 character constraint in their
offset-list configs and IS-IS forgot it entirely, so this also fixes
minor bugs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-09-10 20:29:10 +00:00
Donald Sharp f79f7a7bb2 *: Fix spelling errors pointed out by debian packaging
Debian packaging when run finds a bunch of spelling errors:

I: frr: spelling-error-in-binary usr/bin/vtysh occurences occurrences
I: frr: spelling-error-in-binary usr/lib/frr/bfdd Amount of times Number of times
I: frr: spelling-error-in-binary usr/lib/frr/bgpd occurences occurrences
I: frr: spelling-error-in-binary usr/lib/frr/bgpd recieved received
I: frr: spelling-error-in-binary usr/lib/frr/isisd betweeen between
I: frr: spelling-error-in-binary usr/lib/frr/ospf6d Infomation Information
I: frr: spelling-error-in-binary usr/lib/frr/ospfd missmatch mismatch
I: frr: spelling-error-in-binary usr/lib/frr/pimd bootsrap bootstrap
I: frr: spelling-error-in-binary usr/lib/frr/pimd Unknwon Unknown
I: frr: spelling-error-in-binary usr/lib/frr/zebra Requsted Requested
I: frr: spelling-error-in-binary usr/lib/frr/zebra uknown unknown
I: frr: spelling-error-in-binary usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0 overriden overridden

This commit fixes all of them except the bgp `recieved` issue due to
it being part of json output.  That one will need to go through
a deprecation cycle.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-19 10:36:53 -04:00
Donald Sharp 1825b8a216
Merge pull request #4781 from opensourcerouting/eigrpd-northbound
eigrpd: migrate to northbound
2019-08-06 19:38:30 -04:00
Rafael Zalamena f25c244b75 eigrpd: migrate old CLI to northbound
Move all configuration commands to the new CLI code (`eigrp_cli.c`),
implement the northbound and do all the necessary wiring to get it
working.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-08-03 14:52:45 -03:00
Rafael Zalamena 9008789aa4 yang: change EIGRP authentication enum name
In order to keep compatibility with the initial CLI, the enumeration
name for sha2 was changed. No CLI code workarounds required.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-08-03 08:31:09 -03:00
Rafael Zalamena bec0aa85b1 yang: simplify filter choice by removing cases
Based on @rwestphal feedback, lets remove `case`s where we don't expect
to add more items or items with more than one `leaf`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-08-01 19:58:52 -03:00
Rafael Zalamena 04ef6e7555 yang: use filter types in route-map
Import the new YANG model filter and use its types.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2019-08-01 19:58:52 -03:00