Skip to content
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

Flexalgo mpls frrbot #1

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
0e2bd95
isisd: update struct isis_spftree with algorithm id
slankdev Dec 11, 2021
0cb4464
isisd: update struct sr_prefix_cfg with algorithm id
slankdev Dec 11, 2021
3e41a89
isisd: update struct isis_sr_psid_info with algorithm id
slankdev Dec 11, 2021
7a0f8a9
isisd: update SR_ALGORITHM_COUNT to 256
slankdev Dec 18, 2021
f7666d8
isisd: update isis_tlvs_add_*_reach() with multi algorithm
slankdev Dec 11, 2021
493a407
isisd: update struct isis_sr_psid_info with nh context
slankdev Jan 4, 2022
09243bb
isisd: update struct isis_route_info has multiple sr info by algorithm
slankdev Dec 12, 2021
a007dee
isisd: refactor enum tail comma
slankdev Jan 3, 2022
2da73c5
lib,ospfd,isisd: refactor igp-agnostic sr misc functions
slankdev Jan 22, 2022
c163387
isisd: add TLV_SIZE_MISMATCH for tlvs length mismatch
slankdev Jan 4, 2022
1ac95a7
lib: extend length of SR algorithm array in ls_node
eklabn Mar 13, 2022
941515b
isisd,yang: add algorithm-prefix-sid configuration tree
slankdev Dec 12, 2021
7bbe087
isisd: add cli to configure algorithm-prefix-sid
slankdev Dec 12, 2021
34aac02
lib: add copy function for bitfield_t
slankdev Dec 30, 2021
237398e
lib: add library for igp flexible-algorithm
slankdev Jan 22, 2022
05376a6
lib,vtysh,isisd,yang: algo cli/yang/callbacks
slankdev Dec 18, 2021
7fe58a5
lib: add a function to print flex-algo metric-type
louis-6wind Aug 31, 2022
5fd879a
isisd: dummy frrbot
louis-6wind Sep 12, 2022
c79cc7c
isisd: add isis flex-algo base interface
slankdev Dec 12, 2021
74804c3
isisd: dummy frrbot
louis-6wind Sep 12, 2022
cdcdf50
isisd: add isis flex-algo configuration backend
slankdev Dec 18, 2021
9c55b05
isisd: add isis flex-algo configuration frontend
slankdev Dec 18, 2021
b4db55d
isisd: add isis flex-algo lsp advertisement
slankdev Jan 4, 2022
ff535a7
isisd: calculate flex-algo constraint spf
slankdev Jan 21, 2022
1e08e75
isisd: merge algorithm tables
slankdev Jan 21, 2022
d0e9da5
tests: add isis_sr_flex_algo_topo1 for flex-algo
slankdev Nov 21, 2021
efceac9
tests: add isis_sr_flex_algo_topo2 for flex-algo
slankdev Nov 21, 2021
cce23f5
isisd: fix merging flex-algo route nodes
eklabn Apr 1, 2022
4bad77f
lib: convert termtable to json
eklabn Sep 2, 2022
b39efba
isisd: show non-zero algos in "show isis route prefix-sid" (1/2)
louis-6wind Sep 12, 2022
656aa4c
isisd: show non-zero algos in "show isis route prefix-sid" (2/2)
eklabn Sep 2, 2022
9ba58ab
isisd: add option to display isis routes as json
eklabn Sep 2, 2022
4d3c6a7
isisd: add flex-algo info to spf extreme debug
louis-6wind Aug 30, 2022
e561618
isisd: add an algorithm argument to show isis topology
louis-6wind Sep 6, 2022
0a5ea19
isisd: add an algorithm argument to show isis route
louis-6wind Sep 6, 2022
66fd73b
lib: add functions to compare flex-algo definitions
louis-6wind Aug 31, 2022
dab8697
lib: add a function to print list of ext admin-group bit-position
louis-6wind Sep 6, 2022
6da1737
isisd: add "show isis flex-algo" command
louis-6wind Aug 31, 2022
52b9072
isisd: add a function to check if FAD is locally supported
louis-6wind Aug 31, 2022
93bc696
isisd: add a function to find the elected and supported FAD
louis-6wind Sep 6, 2022
e655548
isisd: do not compute SPF tree in the elected FAD is unsupported
louis-6wind Sep 6, 2022
993d4ce
isisd: do not consider an unsupported FAD in constraint SPF
louis-6wind Sep 6, 2022
e8eb555
isisd: clear the SPF tree when there is no running FAD (1/2)
louis-6wind Sep 9, 2022
b8fafef
isisd: clear the SPF tree when there is no running FAD (2/2)
louis-6wind Sep 1, 2022
573b149
isisd: do not advertise algo prefix-SID if FAD disabled
louis-6wind Sep 6, 2022
ecc5510
isisd: add a local FAD argument to isis_flex_algo_elected()
louis-6wind Sep 13, 2022
f19f665
isisd: only advertise enabled SR algo in router capability TLV
louis-6wind Sep 13, 2022
ea6cc42
isisd: add algorithm to show isis segment-routing node
louis-6wind Sep 6, 2022
902dabd
isisd: read flex-algo definition exclude SRLG sub-sub-TLVs
louis-6wind Sep 6, 2022
98b9519
isisd: display exclude SRLG state in show isis flex-algo
louis-6wind Sep 6, 2022
6d71f51
isisd: allow packing multiple router capability TLV
louis-6wind Sep 7, 2022
0be4db9
isisd: allow unpacking multiple router capability TLV
louis-6wind Sep 7, 2022
468a98d
isisd: fix calculation of router capability TLV size
louis-6wind Sep 8, 2022
2e295fc
isisd: fix display of all routers in show isis database json
louis-6wind Sep 2, 2022
596e438
isisd: fix display of router in show isis database <rtr> json
louis-6wind Sep 5, 2022
46247ca
isisd: fix multiple values display in show isis database detail json
louis-6wind Sep 2, 2022
509cb03
isisd: fix keys display in show isis database detail json
louis-6wind Sep 5, 2022
6927a46
isisd: display MT name in show isis database detail json
louis-6wind Sep 5, 2022
071733d
isisd: fix non present level display is show isis database detail json
louis-6wind Sep 5, 2022
3b8173d
isisd: fix lsp ID display is show isis database json
louis-6wind Sep 5, 2022
944a66d
isisd: fix boolean display is show isis database detail json
louis-6wind Sep 5, 2022
13d7839
isisd: add admin_group_tab function
louis-6wind Sep 5, 2022
04666f8
isisd: add flex-algo tlvs display in json
louis-6wind Sep 1, 2022
949fcac
doc: fix debugging-isis reference
louis-6wind Sep 6, 2022
da3b7a9
doc: add isisd flex-algo documentation
louis-6wind Aug 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 159 additions & 6 deletions doc/user/isisd.rst
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,12 @@ Showing ISIS information
Show the ISIS database globally, for a specific LSP id without or with
details.

.. clicmd:: show isis topology [level-1|level-2]
.. clicmd:: show isis topology [level-1|level-2] [algorithm (128-255)]

Show topology IS-IS paths to Intermediate Systems, globally, in area
(level-1) or domain (level-2).

.. clicmd:: show isis route [level-1|level-2] [prefix-sid|backup]
.. clicmd:: show isis route [level-1|level-2] [prefix-sid|backup] [algorithm (128-255)]

Show the ISIS routing table, as determined by the most recent SPF
calculation.
Expand Down Expand Up @@ -368,8 +368,7 @@ Traffic Engineering

:ref:`ospf-traffic-engineering`


.. _debugging-isis:
.. _isis-segment-routing:

Segment Routing
===============
Expand Down Expand Up @@ -402,7 +401,7 @@ Known limitations:
MPLS dataplane. E.g. for Linux kernel, since version 4.13 the maximum value
is 32.

.. clicmd:: segment-routing prefix <A.B.C.D/M|X:X::X:X/M> <absolute (16-1048575)|index (0-65535) [no-php-flag|explicit-null] [n-flag-clear]
.. clicmd:: segment-routing prefix <A.B.C.D/M|X:X::X:X/M> [algorithm (128-255)] <absolute (16-1048575)|index (0-65535) [no-php-flag|explicit-null] [n-flag-clear]

prefix. The 'no-php-flag' means NO Penultimate Hop Popping that allows SR
node to request to its neighbor to not pop the label. The 'explicit-null'
Expand All @@ -411,10 +410,164 @@ Known limitations:
clear the Node flag that is set by default for Prefix-SIDs associated to
loopback addresses. This option is necessary to configure Anycast-SIDs.

.. clicmd:: show isis segment-routing node
.. clicmd:: show isis segment-routing node [algorithm (128-255)]

Show detailed information about all learned Segment Routing Nodes.

.. _isis-flex-algo:

Flex-Algos (Flex-Algo)
===============================

*isisd* supports some features of :t:`draft-ietf-lsr-Flex-Algo` on an MPLS
Segment-Routing dataplane. The compatibility has been tested against Cisco.

IS-IS uses by default the `Shortest-Path-First` algorithm that basically
calculates paths based on the shortest total metric to the destinations.
Flex-Algo allows new algorithms to run in parallel to compute paths in different
manners, based on metrics (IGP metric or a new type of metrics such as Traffic
Engineering (TE) metric and minimum delay...) and constraints. New metric types
are not yet implemented but constraints are already operational. Constraints can
restrict paths to links with specific affinities or avoid links with specific
affinities. Combinations of these are also possible.

The administrator can configure up to 128 Flex-Algos in an IS-IS area.
To do so, it defines a set of Flex-Algo Definitions (FAD) which
have the following characteristics:

- a numeric identifier (ID) between 128 and 255 inclusive
- a set of constraints (basically, include or exclude a certain given set of
links, designated by a admin-group)
- the calculation type (only the `Shortest-Path-First` is currently supported)
- the metric type (only the IGP inherited metric type is currently supported)
- some additional flags (not supported for the moment).

A subset of routers advertises the Flex-Algo Definitions (FAD) to the other
routers within an area. In order to use a common set of FADs, each router runs a
FAD election process for each locally configured algorithm, using the following
rules:

- If a locally configured FAD is not advertised to the area, the router does not
participate in the particular flex algorithm.
- If a given flex algorithm is running, the participation in this particular
flex algorithm stops when its advertisements are over.
- A router includes its own FAD in the election process if and only if it is
advertised to the other routers.
- If only one router advertises the FAD, the FAD is elected.
- If several FADs are advertised with different priorities, the one with the
highest priority value is selected.
- If there are multiple advertisements of the FAD with the same highest
priority, the FAD of the router with the highest IS-IS system-ID is
selected.


Routers only use the specifications of the elected FAD regardless of the locally
configured definitions. If a router does not support one of the FAD
characteristics, it stops participating in the Flex-Algo.

For each running Flex-Algo, the Segment-Routing SIDs must be
configured with values unique to the algorithm. It allows routers to identify
which flex algorithm they must use for a given packet.

The following commands configure Flex-Algo at the 'router isis' configuration
level. Segment-Routing prefixes must be configured for the Flex-Algo.

.. clicmd:: flexible-algorithm (128-255)

Add a Flex-Algo Definition (FAD) and enter the FAD configuration
level. The algorithm ID value is in the range of 128 to 255 inclusive.

.. clicmd:: no flexible-algorithm (128-255)

Unconfigure a Flex-Algo Definition.

.. clicmd:: affinity-map NAME bit-position (0-255)

Add the specified 'affinity-map'. Affinity-map definitions are used in
FADs and in interfaces admin-group definition.

Affinity-maps format in advertisement TLVs use the extended admin-group
format defined in the RFC7308 section 2.2. The extended admin-group uses a
256 bits field. If an affinity-map is set, the bit at the extended
admin-group 'bit-position' is set 1, else it is set to 0.

The following commands configure Flex-Algo at the 'router isis' and
'flexible-algorithm (128-255)' configuration level.

.. clicmd:: advertise-definition

Advertise the current FAD to other IS-IS routers by using specific IS-IS
TLVs. By default, the definition is is not shared with other routers.

   A router can advertise a FAD without participating in the Flex-Algo.

.. clicmd:: priority (0-255)

Set the specified 'priority' in the current FAD advertisements .

.. clicmd:: metric-type [igp|te|delay]

Set the 'metric-type' for the current FAD. 'igp' is
the default value and refers to the classic 'Shortest-Path-First' algorithm.
If the 'te' or the 'delay' metric is selected, the value is advertised but
the flex algorithm is disabled locally because these types are not currently
supported.

.. clicmd:: no metric-type

Reset the 'metric-type' to the default 'igp' metric.

.. clicmd:: affinity exclude-any NAME

Add the specified affinity to the list of exclude-any affinities. The
Flex-Algo will compute paths that exclude the segments with any of
the specified affinities.

.. clicmd:: no affinity exclude-any NAME

Remove the specified affinity to the list of exclude-any affinities.

.. clicmd:: affinity include-all NAME

Add the specified affinity to the list of include-all affinities. The
Flex-Algo will compute paths that include the segments with all
the specified affinities.

.. clicmd:: no affinity include-all NAME

Remove the specified affinity to the list of include-all affinities.

.. clicmd:: affinity include-any NAME

Add the specified affinity to the list of include-any affinities. The
Flex-Algo will compute paths that include the segments with any of
the specified affinities.

.. clicmd:: no affinity include-any NAME

Remove the specified affinity to the list of include-any affinities.

The following commands configure Flex-Algo at the 'interface' configuration
level.

.. clicmd:: isis affinity flex-algo NAME

Add the specified affinity to the interface.

.. clicmd:: no isis affinity flex-algo NAME

Remove the specified affinity from the interface.

The following command show Flex-Algo information:

.. clicmd:: show isis flex-algo [(128-255)]

Show information about the elected FADs

'show isis route', 'show isis topology' and 'show isis segment-routing node'
includes an 'algorithm (128-255)' optional argument. See
:ref:`showing-isis-information` and :ref:`isis-segment-routing`.

Debugging ISIS
==============

Expand Down
8 changes: 4 additions & 4 deletions isisd/fabricd.c
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ struct fabricd *fabricd_new(struct isis_area *area)
rv->area = area;
rv->initial_sync_state = FABRICD_SYNC_PENDING;

rv->spftree =
isis_spftree_new(area, &area->lspdb[IS_LEVEL_2 - 1],
area->isis->sysid, ISIS_LEVEL2, SPFTREE_IPV4,
SPF_TYPE_FORWARD, F_SPFTREE_HOPCOUNT_METRIC);
rv->spftree = isis_spftree_new(
area, &area->lspdb[IS_LEVEL_2 - 1], area->isis->sysid,
ISIS_LEVEL2, SPFTREE_IPV4, SPF_TYPE_FORWARD,
F_SPFTREE_HOPCOUNT_METRIC, SR_ALGORITHM_SPF);
rv->neighbors = skiplist_new(0, neighbor_entry_list_cmp,
neighbor_entry_del_void);
rv->neighbors_neighbors = hash_create(neighbor_entry_hash_key,
Expand Down
2 changes: 2 additions & 0 deletions isisd/isis_circuit.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,7 @@ struct isis_circuit *isis_circuit_new(struct interface *ifp, const char *tag)
circuit_mt_init(circuit);
isis_lfa_excluded_ifaces_init(circuit, ISIS_LEVEL1);
isis_lfa_excluded_ifaces_init(circuit, ISIS_LEVEL2);
circuit->affinity_flex_algo = list_new();

circuit->ldp_sync_info = ldp_sync_info_create();
circuit->ldp_sync_info->enabled = LDP_IGP_SYNC_ENABLED;
Expand Down Expand Up @@ -212,6 +213,7 @@ void isis_circuit_del(struct isis_circuit *circuit)
circuit_mt_finish(circuit);
isis_lfa_excluded_ifaces_clear(circuit, ISIS_LEVEL1);
isis_lfa_excluded_ifaces_clear(circuit, ISIS_LEVEL2);
list_delete(&circuit->affinity_flex_algo);

list_delete(&circuit->ip_addrs);
list_delete(&circuit->ipv6_link);
Expand Down
8 changes: 8 additions & 0 deletions isisd/isis_circuit.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,14 @@ struct isis_circuit {
*/
struct list *snmp_adj_list; /* List in id order */

/*
* ASLA for Flex-Algo
* It records affinity color names as "const char *" used by the
* circuit. The resulting bitmap of interface admin group is
* generated on-demand when the lsp_build with affinity maps.
*/
struct list *affinity_flex_algo;

QOBJ_FIELDS;
};
DECLARE_QOBJ_TYPE(isis_circuit);
Expand Down
Loading