Commit Graph

111 Commits

Author SHA1 Message Date
Renato Westphal
28315916a2 isisd: fix build errors when EXTREME_DEBUG is defined
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-11-04 17:12:30 -03:00
Renato Westphal
d47d6089e0 isisd: refactor handling of SR Prefix-SIDs
Embed Prefix-SID information inside SPF data structures so that
Prefix-SIDs can be installed together with their associated routes
at the end of the SPF algorithm. This is different from the current
implementation where Prefix-SIDs are parsed and processed separately,
which is vastly suboptimal.

Advantages of the new code:
* No need to parse the LSPDB an additional time to detect and process
  SR-related changes;
* Routes are installed with their Prefix-SID labels in the same ZAPI
  message. This can prevent packet dropping for a few milliseconds
  after each SPF run if there are BGP-labeled routes (e.g. L3VPN) that
  recurse on IGP labeled routes;
* Much easier to support Anycast-SIDs, as the SPF code will naturally
  figure out the best nexthops and use only them (that can't be done
  in any reasonable way if the Prefix-SID Sub-TVLs are processed
  separately);
* Less code to maintain and reduced memory footprint;

The "show isis segment-routing prefix-sids" command was removed as
it doesn't make sense anymore now that "show isis route" exists.
Prefix-SIDs are a property of routes, so what was done was to extend
the "show isis route" command with a new "prefix-sid" option that
changes the output table to show the Prefix-SID information associated
to each route.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-23 10:31:39 -03:00
Donatas Abraitis
2dbe669bdf :* Convert prefix2str to %pFX
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-10-22 09:07:41 +03:00
Renato Westphal
054fda12f0 isisd: implement TI-LFA protection for Adj-SIDs
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14 16:27:37 -03:00
Renato Westphal
c951ee6eee isisd: add support for Topology Independent LFA (TI-LFA)
TI-LFA is a modern fast-reroute (FRR) solution that leverages Segment
Routing to pre-compute backup nexthops for all destinations in the
network, helping to reduce traffic restoration times whenever a
failure occurs. The backup nexthops are expected to be installed
in the FIB so that they can be activated as soon as a failure
is detected, making sub-50ms recovery possible (assuming an
hierarchical FIB).

TI-LFA is a huge step forward compared to prior IP-FRR solutions,
like classic LFA and Remote LFA, as it guarantees 100% coverage
for all destinations. This is possible thanks to the source routing
capabilities of SR, which allows the backup nexthops to steer traffic
around the failures (using as many SIDs as necessary). In addition
to that, the repair paths always follow the post-convergence SPF
tree, which prevents transient congestions and suboptimal routing
from happening.

Deploying TI-LFA is very simple as it only requires a single
configuration command for each interface that needs to be protected
(both link protection and node protection are available). In addition
to IPv4 and IPv6 routes, SR Prefix-SIDs and Adj-SIDs are also
protected by the backup nexthops computed by the TI-LFA algorithms.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-10-14 16:27:37 -03:00
Igor Ryzhov
62f30dccb8 isisd: move debug variables under ifdef
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-08 23:14:54 +03:00
Igor Ryzhov
115f8f5692 isisd: check for circuit existence on interface addr change
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2020-10-08 23:14:54 +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
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
Kaushik
eab88f3655 isisd : Transformational changes to support different VRFs.
1. Created a structure "isis master".
2. All the changes are related to handle ISIS with different vrf.
3. A new variable added in structure "isis" to store the vrf name.
4. The display commands for isis is changed to support different VRFs.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-08-14 13:46:22 -07:00
Renato Westphal
3f3391e5f4
Merge pull request #6451 from Orange-OpenSource/dev_isis_sr
ISISd: Add Segment Routing local block (SRLB)
2020-06-24 02:20:12 -03:00
Olivier Dugeon
58fbcdf2fa isisd: Start Label Manager safer
Initial attempt to connect to the Label Manager used an infinite loop with
a sleep statement which block isisd until Label Manager connection fire up.

This commit changes the way Label Manager connection is established and uses
a `thread_add_timer()` call to re-attempt to establish the connection in case
of failure (zebra or label manager not ready).

New variables are added to the SRDB in order to control the request of SRGB
and SRLB to the Label Manager to start Segment Routing in a safe way.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-06-23 16:36:56 +02: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
Kaushik
dc18b3b032 ISIS VRF: Route info with vrf_id from ISIS to Zebra
1. The "VRF_DEFAULT" param is changed to "isis->vrf_id" before
   sending the routes to zebra.

Signed-off-by: Kaushik <kaushik@niralnetworks.com>
2020-06-19 11:46:12 -07:00
Olivier Dugeon
f2333421ff isisd: IS-IS-SR preparation for master 5/5
Update comments (doxygen style) for all functions.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-05-14 16:36:43 +02:00
Olivier Dugeon
c3f7b406b1 isisd: IS-IS-SR preparation for master 4/5
* Regroup fonctions to install label for Prefix and Adjacency SID
 * Change 'replace_semantics' variable name by 'make_before_break' in
   sr_prefix_reinstall() function and adjust comments
 * Call directly lsp_regenerate_schedule() from isis_nb_config.c when MSD
   is updated

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-05-14 16:36:43 +02:00
Olivier Dugeon
b1d80d434c isisd: IS-IS-SR preparation for master 2/5
* Rename functions following rules: isis_sr_XXX is kept for external functions
   and isis_sr prefix remove for static ones
 * Rename local_label & remote_label variables by input_label & output_label
 * Change parameter order (to follow other functions) in sr_node_srgb_update()

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-05-14 16:23:50 +02:00
Olivier Dugeon
774e3570e9 isisd: Update IS-IS SR Label Manager
This change modify the way IS-IS is connected to the Label Manager:
 - Add emission of Hello Message prior to the connection as per
   modification introduced by PR #5925
 - Add 'session_id' as per modification introduced by PR #6224
 - Add Doxygen documentation to Label Manager functions

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-04-30 12:15:47 +02:00
Olivier Dugeon
e0e8a84fd8 isisd: Update ISIS-SR with new ZAPI message
Update label enforcement due to modification in zapi message:
zapi_nexthop_label becomes zapi_nexthop as per PR #5813

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2020-04-30 12:15:47 +02:00
Renato Westphal
26f6acafc3 isisd: add support for segment routing
This is an implementation of the IS-IS SR draft [1] for FRR.

The following features are supported:
* IPv4 and IPv6 Prefix-SIDs;
* IPv4 and IPv6 Adj-SIDs and LAN-Adj-SIDs;
* Index and absolute labels;
* The no-php and explicit-null Prefix-SID flags;
* Full integration with the Label Manager.

Known limitations:
* No support for Anycast-SIDs;
* No support for the SID/Label Binding TLV (required for LDP interop).
* No support for persistent Adj-SIDs;
* No support for multiple SRGBs.

[1] draft-ietf-isis-segment-routing-extensions-25

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-04-30 12:15:47 +02:00
Mark Stapp
68a02e06e5 *: revise zapi nexthop encoding
Use a per-nexthop flag to indicate the presence of labels; add
some utility zapi encode/decode apis for nexthops; use the zapi
apis more consistently.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-12-06 10:17:20 -05:00
Donald Sharp
721c08573a *: Convert connected_free to a double pointer
Set the connected pointer to set the pointer to NULL.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-11-02 16:13:44 -04:00
Donald Sharp
3c3c325203 *: Convert zapi->interface_delete to ifp callback
Convert the callback of the interface_delete to the new
ifp callback.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19 13:34:06 -04:00
Donald Sharp
b0b69e59f4 *: Convert interface_down to interface down callback
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19 13:34:06 -04:00
Donald Sharp
ddbf3e6060 *: Convert from ->interface_up to the interface callback
For all the places we have a zclient->interface_up convert
them to use the interface ifp_up callback instead.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19 13:34:06 -04:00
Donald Sharp
ef7bd2a3d5 *: Switch all zclient->interface_add to interface create callback
Switch the zclient->interface_add functionality to have everyone
use the interface create callback in lib/if.c

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-09-19 13:34:06 -04:00
Olivier Dugeon
1b3f47d04c isisd: Update TLVs processing for TE, RI & SR
In preparation to Segment Routing:
 - Update the management of Traffic Engineering subTLVs to the new tlvs parser
 - Add Router Capability TLV 242 as per RFC 4971 & 7981
 - Add Segment Routing subTLVs as per draft-isis-segment-routing-extension-25

Modified files:
 - isis_tlvs.h: add new structure to manage TE subTLVs, TLV 242 & SR subTLVs
 - isis_tlvs.c: add new functions (pack, copy, free, unpack & print) to process
   TE subTLVs, Router Capability TLV and SR subTLVs
 - isis_circuit.[c,h] & isis_lsp.[c,h]: update to new subTLVs & TLV processing
 - isis_te.[c,h]: remove all old TE structures and managment functions,
   and add hook call to set local and remote IP addresses as wellas update TE
   parameters
 - isis_zebra.[c,h]: add hook call when new interface is up
 - isis_mt.[c,h], isis_pdu.c & isis_northbound.c: adjust to new TE subTLVs
 - tests/isisd/test_fuzz_isis_tlv_tests.h.gz: adapte fuuz tests to new parser

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2019-09-17 17:35:50 +02:00
Renato Westphal
0a5f3f4fb9 isisd: move management of route flags out of isis_zebra.c
For better modularity, isis_zebra.c should only contain code used
to communicate with zebra. The management of route flags belongs
to isis_route.c.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-09-17 00:35:39 -03:00
Renato Westphal
363be4dd90 isisd: unify isis_nexthop and isis_nexthop6 into a single struct
This unification allows us to write code that works for both IPv4 and
IPv6, reducing duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 01:04:03 -03:00
Quentin Young
121f9dee7c *: use ZAPI_CALLBACK_ARGS macro for zapi handlers
This macro:
- Marks ZAPI callbacks for readability
- Standardizes argument names
- Makes it simple to add ZAPI arguments in the future
- Ensures proper types
- Looks better
- Shortens function declarations

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-03 20:57:35 +00:00
Lou Berger
31e944a8a7
Merge pull request #3045 from opensourcerouting/atoms
READY: lists/skiplists/rb-trees new API & sequence lock & atomic lists
2019-04-30 10:26:35 -04:00
David Lamparter
4bef0ec4fb isisd: replace dict_* with DECLARE_RBTREE
Historically, isisd has been carrying around its own red-black tree to
manage its LSP DB in.  This replaces that with the newly-added
DECLARE_RBTREE_*.  This allows completely removing the dict_* code.

Signed-off-by: David Lamparter <equinox@diac24.net>
2019-04-27 19:33:45 +02:00
Olivier Dugeon
2e2a8b9136 isisd: Add IS-IS-TE support per Area
Solve issue #4032

 - Change MPLS-TE from global to per Area
 - Add new mpls_te_area structure to area in replacement of global variable
isisMPLS_TE
 - Move mpls-te from global to instance in frr-isisd.yang
 - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c,
isis_lsp.c and isis_zebra.c accordingly

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2019-04-25 18:59:26 +02:00
Russ White
231e94e32a
Revert "isisd: Add IS-IS-TE support per Area" 2019-04-23 09:24:18 -04:00
Olivier Dugeon
9c95fe6986 Issue #4032: Add IS-IS-TE support per Area
- Change MPLS-TE from global to per Area
 - Add new mpls_te_area structure to area in replacement of global variable
isisMPLS_TE
 - Move mpls-te frmo global to instance in frr-isisd.yang
 - Change code in isis_te.c, isis_northbound.c, isis_cli.c, isis_pdu.c,
isis_lsp.c and isis_zebra.c accordingly

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
2019-04-15 16:22:38 +02:00
Donald Sharp
9fb2b87997 isisd, ospf6d, ripngd: Do not allow v6 LL's to be redist connected in
The rib process of handling routes has been unified a bit more
and as a result v6 LL routes are now showing up as a result
of a `redistribute connected`.  Doing anything with these
routes is a policy decision that should be enforced by the
individual routing daemons not by zebra.  As such add a bit
of code to isisd, ripngd and opsf6d to handle them.  The bgp daemon
already handles this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-03-27 16:22:22 -04:00
Donald Sharp
fe85601c96 *: The onlink attribute should be owned by the nexthop not the route.
The onlink attribute was being passed from upper level protocols
as an attribute of the route *not* the individual nexthop.  When
we pass this data to the kernel, we treat the onlink as a attribute
of the nexthop.  This commit modifies the code base to allow
us to pass the ONLINK attribute as an attribute of the nexthop.

This commit also fixes static routes that have multiple nexthops
some onlink and some not.

ip route 4.5.6.7/32 192.168.41.1 eveth1 onlink
ip route 4.5.6.7/32 192.168.42.2

S>* 4.5.6.7/32 [1/0] via 192.168.41.1, eveth1 onlink, 00:03:04
  *                  via 192.168.42.2, eveth2, 00:03:04

sharpd@robot ~/frr2> sudo ip netns exec EVA ip route show
4.5.6.7 proto 196 metric 20
	nexthop via 192.168.41.1 dev eveth1 weight 1 onlink
	nexthop via 192.168.42.2 dev eveth2 weight 1

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-01-26 21:02:26 -05:00
Renato Westphal
edc127627d lib: use the correct VRF ID when parsing INTERFACE_LINK_PARAMS messages
Bug found during code inspection.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-01-18 16:06:00 -02:00
Renato Westphal
49db7a7b05 lib, zebra: add AFI parameter to the ZEBRA_REDISTRIBUTE_DEFAULT_* messages
Some daemons like ospfd and isisd have the ability to advertise a
default route to their peers only if one exists in the RIB. This
is what the "default-information originate" commands do when used
without the "always" parameter.

For that to work, these daemons use the ZEBRA_REDISTRIBUTE_DEFAULT_ADD
message to request default route information to zebra. The problem
is that this message didn't have an AFI parameter, so a default route
from any address-family would satisfy the requests from both daemons
(e.g. ::/0 would trigger ospfd to advertise a default route to its
peers, and 0.0.0.0/0 would trigger isisd to advertise a default route
to its IPv6 peers).

Fix this by adding an AFI parameter to the
ZEBRA_REDISTRIBUTE_DEFAULT_{ADD,DELETE} messages and making the
corresponding code changes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-01-14 11:41:33 -02:00
Donald Sharp
26f63a1ec6 *: Replace zclient_new with zclient_new_notify
It's been a year since we added the new optional parameters
to instantiation.  Let's switch over to the new name.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-11-12 09:16:23 -05:00
Christian Franke
26687d255d isisd: Remove unused debug flags
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-11-08 20:30:55 +01:00
Christian Franke
4141588823 fabricd: add support for completely unnumbered operation
With this commit, fabricd can run without any IPv4 addresses configured
except on loopback. There are two changes to achieve this:

a) If a circuit has no IPv4 address configured, fabricd will resort to
advertise the routers loopback IP in the OpenFabric hellos.

b) All the routes from OpenFabric are sent with ZEBRA_FLAG_ONLINK set,
so that zebra will install them into the fib without checking whether
the nexthop is reachable

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:13 +02:00
Christian Franke
7c0cbd0e88 fabricd: add new daemon as build of isisd
fabricd is built using the sources of isisd. To allow differentiation
in the code, -DFABRICD=1 is added to its preprocessor flags.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-09-05 11:38:12 +02:00
Christian Franke
321c1bbb94 isisd: make spf code dst-src aware
Take the source-prefix sub-TLV into consideration when running SPF
and support creation/deletion of dst-src routes as result.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Christian Franke
d43d2df5f3 isisd: learn and advertise IPv6 dst-src routes
Receive IPv6 dst-src routes from zebra and advertise them in our LSPs
if so configured.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
2018-08-03 13:25:39 +02:00
Donald Sharp
4a7371e9e2 *: Track vrfs per nexthop not per route entry
Track the vfrs on a per nexthop basis instead
of on a per route entry basis.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-02-08 19:35:53 -05:00
Donald Sharp
d5b2119cb4 *: Send/receive the nexthop vrf_id
Modify the code to send and receive to/from zebra
the nexthops vrf_id.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2018-01-12 09:22:07 -05:00
Donald Sharp
e1a1880de3 *: Make zapi route install Notifications optional
Allow the higher level protocol to specify if it would
like to receive notifications about it's routes that
it has installed.

I've purposely made it part of zclient_new_notify because
we need to track the routes on a per daemon basis only.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-27 09:09:35 -05:00
Donald Sharp
342213eac0 *: Modify zclient_init to require privs data
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-10-23 18:12:29 -04:00