-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
isisd: IS-IS Segment Routing support #6413
Conversation
Parameters should be const whenever possible to improve code readability and remove the need to cast away the constness of const arguments. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
The 'isis_adj_ip_enabled_hook' hook will be called whenever an adjacency goes from zero to one or more IPv4 or IPv6 addresses. Conversely, the 'isis_adj_ip_disabled_hook' hook will be called whenever an adjacency goes from one or more IPv4/IPv6 addresses to no addresses at all. These hooks will be used by the upcoming SR code to add/delete Adj-SIDs depending on the IP addresses present in the remote adjacencies. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
The new log_uptime() function logs an UNIX timestamp to a buffer provided by the user. It's very flexibile and can be used in a variety of contexts, different from vty_out_timestr() which is too tied to the VTY code. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
isisd implements an optimization that allows multiple routes to share the same nexthop (using a refcount) in order to save memory. Now that SR support is coming, however, it will be necessary to embed additional SR-related information inside the isis_nexthop structure. But this can only be done if the nexthops aren't shared among routes anymore. Removing this memory optimization should have minimal impact since the isis_nexthop structure is really small. On large networks with thousands of routes, the memory saving would be in the order of a few kilobytes. Not something we should be concerned about nowadays. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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>
In the name of consistency, these commands are very similar to the ospfd SR configuration commands. Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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>
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
This commit introduces a comprehensive test for IS-IS Segment Routing. It features the following network topology: +---------+ | | | RT1 | | 1.1.1.1 | | | +---------+ |eth-sw1 | | | +---------+ | +---------+ | | | | | | RT2 |eth-sw1 | eth-sw1| RT3 | | 2.2.2.2 +----------+----------+ 3.3.3.3 | | | 10.0.1.0/24 | | +---------+ +---------+ eth-rt4-1| |eth-rt4-2 eth-rt5-1| |eth-rt5-2 | | | | 10.0.2.0/24| |10.0.3.0/24 10.0.4.0/24| |10.0.5.0/24 | | | | eth-rt2-1| |eth-rt2-2 eth-rt3-1| |eth-rt3-2 +---------+ +---------+ | | | | | RT4 | 10.0.6.0/24 | RT5 | | 4.4.4.4 +---------------------+ 5.5.5.5 | | |eth-rt5 eth-rt4| | +---------+ +---------+ eth-rt6| |eth-rt6 | | 10.0.7.0/24| |10.0.8.0/24 | +---------+ | | | | | | | RT6 | | +----------+ 6.6.6.6 +-----------+ eth-rt4| |eth-rt5 +---------+ Each router has both an IPv4 and an IPv6 loopback address, each of which has a corresponding Prefix-SID configured. Basic SR functionality is tested. First, the topotest ensures that all expected Prefix-SIDs and Adj-SIDs are flooded and installed correctly in all routers of the network. Later, network failures are simulated and configuration changes are performed in several different routers. The topotest then checks if IS-IS has converged as expected in the network according to the network failures and configuration changes that happened. The topotest comprises 11 different steps, each with four individual tests (for a total of 44 tests). A summary of what each step does is provided below: --- STEP 1: -Initial network convergence --- Step 2: Action(s): -Disable IS-IS on the eth-rt5 interface on rt4 Expected changes: -rt4 should uninstall the Adj-SIDs pointing to rt5 -rt5 should uninstall the Adj-SIDs pointing to rt4 -rt2 should reinstall rt5's Prefix-SIDs (2 nexthops deleted) -rt3 should reinstall rt4's Prefix-SIDs (2 nexthops deleted) -rt4 should reinstall rt3's Prefix-SIDs (1 nexthop deleted) -rt4 should reinstall rt5's Prefix-SIDs (1 nexthop changed) -rt5 should reinstall rt2's Prefix-SIDs (1 nexthop deleted) -rt5 should reinstall rt4's Prefix-SIDs (1 nexthop changed) --- Step 3: Action(s): -Shut down the eth-rt4 interface on rt6 -Shut down the eth-rt5 interface on rt6 Expected changes: -All routers should uninstall rt6's Prefix-SIDs -rt4 and rt5 should uninstall the Adj-SIDs pointing to rt6 -rt4 should reconverge rt5's Prefix-SIDs through rt2 using ECMP -rt5 should reconverge rt4's Prefix-SIDs through rt3 using ECMP -rt6 should uninstall all its IS-IS routes, Prefix-SIDs and Adj-SIDs --- Step 4: Action(s): -Bring up the eth-rt4 interface on rt6 -Bring up the eth-rt5 interface on rt6 -Change rt6's SRGB Expected changes: -All routers should install rt6's Prefix-SIDs -rt4 and rt5 should install Adj-SIDs for rt6 -rt4 should reconverge rt5's Prefix-SIDs through rt6 using the new SRGB -rt5 should reconverge rt4's Prefix-SIDs through rt6 using the new SRGB -rt6 should reinstall all IS-IS routes and Prefix-SIDs from the network, and Adj-SIDs for rt4 and rt5 --- Step 5: Action(s): -Disable SR on rt6 Expected changes: -All routers should uninstall rt6's Prefix-SIDs -rt4 should uninstall rt5's Prefix-SIDs since the nexthop router hasn't SR enabled anymore -rt5 should uninstall rt4's Prefix-SIDs since the nexthop router hasn't SR enabled anymore -rt6 should uninstall all Prefix-SIDs from the network, and the Adj-SIDs for rt4 and rt5 --- Step 6: Action(s): -Enable SR on rt6 Expected changes: -All routers should install rt6's Prefix-SIDs -rt4 should install rt5's Prefix-SIDs through rt6 -rt5 should install rt4's Prefix-SIDs through rt6 -rt6 should install all Prefix-SIDs from the network, and Adj-SIDs for rt4 and rt5 --- Step 7: Action(s): -Delete rt1's Prefix-SIDs Expected changes: -All routers should uninstall rt1's Prefix-SIDs --- Step 8: Action(s): -Re-add rt1's Prefix-SIDs Expected changes: -All routers should install rt1's Prefix-SIDs --- Step 9: Action(s): -Change rt1's Prefix-SIDs to use the no-php option -Change rt6's Prefix-SIDs to stop using the explicit-null option Expected changes: -rt2 and rt3 should reinstall rt1's Prefix-SIDs accordingly -rt4 and rt5 should reinstall rt6's Prefix-SIDs accordingly --- Step 10: Action(s): -Remove the IPv4 address from rt4's eth-rt2-1 interface Expected changes: -rt2 should uninstall the IPv4 Adj-SIDs attached to the eth-rt4-1 interface -rt2 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt4 (ECMP shouldn't be used anymore) -rt4 should reinstall all IPv4 Prefix-SIDs whose nexthop router is rt2 (ECMP shouldn't be used anymore) --- Step 11: Action(s): -Restore the original network setup Expected changes: -All routes, Prefix-SIDs and Adj-SIDs should be the same as they were after the initial network convergence (step 1) Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
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>
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>
* Rename RB-TREE variable from tree_sr_XXX to srdb_XXX * Replace parse_flags by an enum and rename it srdb_state which reflects more the role of this flag: determined the state of SR-Node and SR-Prefix stored in the SRDB: VALIDATED, NEW, MODIFIED, UNCHANGED Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* 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>
Add debug macro and debug messages Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* 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>
Update comments (doxygen style) for all functions. Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
* Improve `show isis segment-routing prefix-sids` output * Add new `show isis segment-routing node' command Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
isisd: Preparation to merge Segment-Routing into master
Continuous Integration Result: SUCCESSFULCongratulations, this patch passed basic tests Tested-by: NetDEF / OpenSourceRouting.org CI System CI System Testrun URL: https://ci1.netdef.org/browse/FRR-FRRPULLREQ-12306/ This is a comment from an automated CI system. Warnings Generated during build:Checkout code: Successful with additional warnings
Warnings Generated during build:Debian 10 amd64 build: Successful with additional warningsDebian Package lintian failed for Debian 10 amd64 build:
|
This PR add Segment Routing support to IS-IS.
It corresponds to the backport of dev_isis_sr branch. Look to this branch for the complete historic of commit.