Commit graph

148 commits

Author SHA1 Message Date
b29332 27413dd24a isisd: 'tiebreaker' command line funtionality is inconsistent with its implementation
The command fast-reroute lfa tiebreaker [downstream | lowest-backup-metric | node-protecting] index (1-255) [level-1 | level-2] will overwrite configurations with the same index but different types. This is because the index is set as the key in frr-isisd.yang. However, the lfa_tiebreaker_cmp function uses a tuple (index, type) as the key. Therefore, the yang file should be modified to stay in sync with the business logic.

Test Scenario:
On RouterA, first configure fast-reroute lfa tiebreaker downstream index 100 level-1, then configure fast-reroute lfa tiebreaker lowest-backup-metric index 100 level-1, and check the configuration:

!
router isis 10
 fast-reroute lfa tiebreaker lowest-backup-metric index 100 level-1
exit
!

Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
2025-02-04 11:33:02 +00:00
Russ White 8168dd931d
Merge pull request #17725 from opensourcerouting/fix/full_no_form_for_area-password
isisd: Allow full `no` form for `domain-password` and `area-password`
2025-01-07 09:41:39 -05:00
Donatas Abraitis a696547d6c isisd: Allow full no form for domain-password and area-password
Before:

```
LR1.wue3(config)# router isis VyOS
LR1.wue3(config-router)# no  area-password clear
% Unknown command: no  area-password clear
LR1.wue3(config-router)# no  area-password clear foo
% Unknown command: no  area-password clear foo
LR1.wue3(config-router)#
```

Closes https://github.com/FRRouting/frr/issues/17722

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-12-26 17:42:14 +02:00
Jonathan Voss dcb03c44e7 isisd: fix srv6 exit statements
Fix missing and misplaced `exit` statements to `show running-config` output.

Before:
```
router isis ISIS_CORE
 [...]
 segment-routing srv6
  locator ISIS_LOC
 exit    <<<<<<< always placed after locator
  node-msd
    [...]
  exit    <<<<<<< missng
  interface dum6
exit
```

After:
```
router isis ISIS_CORE
 [...]
 segment-routing srv6
  locator ISIS_LOC
  node-msd
   [...]
  exit
  interface dum6
 exit
exit
```

Related #16694

Signed-off-by: Jonathan Voss <jvoss@onvox.net>
2024-12-25 00:46:17 +00:00
Philippe Guibert 8e861a75e8 isisd: fix change flex-algorithm number from uint32 to uint8
The algorithm number is encoded on 8 bits and does not require
an unsigned 32 bit value to store the value.

Fixes: cc4926c128 ("isisd,yang: add algorithm-prefix-sid configuration tree")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-25 22:17:29 +02:00
Carmine Scarpitta 8be8864ffd isisd: Add missing exit statement
Add missing `exit` statement to `show running-config` output.

```
router isis ISIS_CORE
 is-type level-2-only
 net 49.0001.0000.0000.0004.00
 lsp-mtu 1300
 topology ipv6-unicast
 log-adjacency-changes
 segment-routing srv6
  locator ISIS_LOC
 exit   <<<<<<<<<<<<<<<<<<<<<<<<
exit
```

Fixes https://github.com/FRRouting/frr/issues/16694

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-09-03 00:03:32 +02:00
Igor Ryzhov a594cda8ce lib: remove leaf-list xpath hack from northbound
Currently, when editing a leaf-list, `nb_candidate_edit` expects to
receive it's xpath without a predicate and the value in a separate
argument, and then creates the full xpath. This hack is complicated,
because it depends on the operation and on the caller being a backend or
not. Instead, let's require to always include the predicate in a
leaf-list xpath. Update all the usages in the code accordingly.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2024-01-23 12:33:39 +02:00
Christian Hopps 2c01083d35 lib: all: remove './' from xpath 22% speedup
fixes #8299

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-11-29 14:37:23 -05:00
Carmine Scarpitta bfec26bc7a isisd: Make SRv6 interface configurable
Add CLI command and functions to configure the interface used for
installing SRv6 SIDs into Linux data plane

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 22:11:51 +02:00
Carmine Scarpitta bdbbb26d55 isisd: Make SRv6 Node MSDs customizable
Add CLI commands to customize SRv6 Node MSD values.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 22:11:50 +02:00
Carmine Scarpitta 70fba45daf isisd: Add CLI command to unset SRv6 locator
Add a CLI command to unset a previously configured SRv6 locator for a
specific IS-IS instance.

Example:

r1# configure
r1(config)# router isis FOO
r1(config-router)# segment-routing srv6
r1(config-router-srv6)# no locator loc1

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 17:34:57 +02:00
Carmine Scarpitta bdebc79d50 isisd: Add CLI command to configure SRv6 locator
Add a CLI command to configure an SRv6 locator for a specific IS-IS
instance.

Example:

r1# configure
r1(config)# router isis FOO
r1(config-router)# segment-routing srv6
r1(config-router-srv6)# locator loc1

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 17:34:57 +02:00
Carmine Scarpitta 7af35808f4 isisd: Add nb command to show SRv6 locator info
Add a northbound command to show information about the SRv6 locator
configured in IS-IS.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-09-11 17:34:56 +02:00
Carmine Scarpitta 9c2191903a isisd: Add CLI command to disable SRv6
r1# conf
r1(config)# router isis <area-tag>
r1(config-router)# no segment-routing srv6

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04 09:29:16 +02:00
Carmine Scarpitta c57ff2d123 isisd: Add CLI command to enable SRv6
r1# conf
r1(config)# router isis <area-tag>
r1(config-router)# segment-routing srv6

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04 09:29:16 +02:00
Carmine Scarpitta eb918dbd25 isisd: Add nb command to show if SRv6 is enabled
Add a northbound command to show whether SRv6 is enabled or not.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-08-04 09:29:16 +02:00
Philippe Guibert 2150647069 isisd: add redistribute table identifier in nb configuration
The yang model does not handle the table identifier in IS-IS.
For each redistributed each address family, a new list of
table elements is added to store the table identifier to
redistribute, and also the optional metric and route-map values
for each table identifier.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-07-12 14:06:00 +02:00
Hiroki Shirokura f46e34f838 isisd: add isis flex-algo configuration frontend
Add the frontend functions for the flex-algo configuration.

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18 11:33:15 +02:00
Hiroki Shirokura 46fb37cf67 lib,vtysh,isisd,yang: algo cli/yang/callbacks
Define the IS-IS flex-algo structure in yang, the CLI configuration
commands and the skeletons of frontend and backend functions that are
called by the CLI code.

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Eric Kinzie <ekinzie@labn.net>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18 10:13:59 +02:00
Hiroki Shirokura 67409447ff isisd: add cli to configure algorithm-prefix-sid
Add the ability to configure a Segment-Routing prefix SID for a given
algorithm. For example:

> segment-routing prefix 10.10.10.10/32 algorithm 128 index 100

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18 10:11:53 +02:00
Hiroki Shirokura cc4926c128 isisd,yang: add algorithm-prefix-sid configuration tree
Add the ability to configure a Segment-Routing prefix SID for a given
algorithm. For example:

> segment-routing prefix 10.10.10.10/32 algorithm 128 index 100

Signed-off-by: Hiroki Shirokura <hiroki.shirokura@linecorp.com>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-04-18 10:11:53 +02:00
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
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
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
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
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 ae08de9f42 *: fix non-const northbound XPath format strings
Passing a pre-formatted buffer in these places needs a `"%s"` in front
so it doesn't get formatted twice.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2023-01-27 12:01:20 +01:00
David Lamparter 89cb86aeb0 build, vtysh: extract vtysh commands from .xref
Rather than running selected source files through the preprocessor and a
bunch of perl regex'ing to get the list of all DEFUNs, use the data
collected in frr.xref.

This not only eliminates issues we've been having with preprocessor
failures due to nonexistent header files, but is also much faster.
Where extract.pl would take 5s, this now finishes in 0.2s.  And since
this is a non-parallelizable build step towards the end of the build
(dependent on a lot of other things being done already), the speedup is
actually noticeable.

Also files containing CLI no longer need to be listed in `vtysh_scan`
since the .xref data covers everything.  `#ifndef VTYSH_EXTRACT_PL`
checks are equally obsolete.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-10-26 17:12:34 +01: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
Louis Scalbert 4c94922c4b isisd: fix prefix-sid last-hop-behavior
The php value is defined in yang but not properly set.

Fixes: 8f6c893629 ("isisd: add segment-routing CLI commands")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2022-07-20 19:25:52 +02:00
Donatas Abraitis 70dd370f5a *: Use autocomplete for route-maps under commands that require it
For example:

```
donatas-laptop# show bgp ipv4 unicast neighbors 127.0.0.2 advertised-routes route-map ?
  RMAP_NAME  Name of the route map
       testas2 testas

donatas-laptop(config)# router bgp
donatas-laptop(config-router)# address-family ipv4
donatas-laptop(config-router-af)# redistribute connected route-map ?
  RMAP_NAME  Pointer to route-map entries
       testas2 testas

donatas-laptop(config-router-af)# network 192.168.0.0/23 route-map ?
  RMAP_NAME  Name of the route map
       testas2 testas
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-06-13 21:00:51 +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
Donatas Abraitis ec37d09855 isisd: Drop deprecated segment-routing local-block command
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2022-02-23 08:45:54 +02:00
Igor Ryzhov b040d06f1f isisd: remove deprecated command
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2022-01-27 21:12:22 +03: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
Igor Ryzhov 32931e1af8 isisd: fix running-config for fast-reroute
YANG leaf means "enable" while CLI command is "disable".
So we should use "no" when the leaf is "true", not "false".

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-12-03 18:16:24 +03: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
Russ White b761cb131a
Merge pull request #9864 from ton31337/feature/access_list_autocomplete
lib: Add autocomplete for access-lists
2021-11-11 08:03:33 -05:00
Donatas Abraitis c60dec369a lib: Add autocomplete for access-lists
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-10-31 20:26:06 +02:00
Igor Ryzhov 2f9a06f060 isisd: fix circuit is-type configuration
Currently, we have a lot of checks in CLI and NB layer to prevent
incompatible IS-types of circuits and areas. All these checks become
completely meaningless when the interface is moved between VRFs. If the
area IS-type is different in the new VRF, previously done checks mean
nothing and we still end up with incorrect circuit IS type. To actually
prevent incorrect IS type, all checks must be done in the processing
code.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-30 03:17:49 +03:00
Igor Ryzhov 67486f32ae isisd: remove useless checks when configuring passive interfaces
Currently, we have some checks in the CLI and NB layer to "protect" from
setting loopback interfaces into non-passive mode. These checks are not
correct, because we can not rely on operational data during config
reading and validation stage as this data doesn't exist yet. There's
nothing wrong in allowing "incorrect" configuration – it is already
correctly handled by the actual code.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-30 03:17:38 +03:00
Igor Ryzhov 8fcdc286ae isisd: don't remove interface config when isis router is deleted
In previous releases, it was not possible to configure ISIS on an
interfaces without configuring the ISIS router first. Therefore, we had
to delete the ISIS config from all interfaces when the router config was
deleted. This is fixed since version 8.0 – interface and router configs
are completely separate and don't depend on each other, so now we can
remove this hack and preserve the interface config when the router
config is deleted.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-30 03:17:34 +03:00
Igor Ryzhov 2560505196 lib: northbound cli show/cmd functions must not modify data nodes
To ensure this, add a const modifier to functions' arguments. Would be
great do this initially and avoid this large code change, but better
late than never.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-13 20:12:35 +03:00
Igor Ryzhov 1bfee9368a isisd: fix redistribute CLI
Currently, it is possible to configure IPv6 protocols for IPv4
redistribution and vice versa in CLI. The YANG model doesn't allow this
so the user receives the following error:
```
nfware(config-router)# redistribute ipv4 ospf6 level-1
% Failed to edit configuration.

YANG error(s):
 Invalid enumeration value "ospf6".
 Invalid enumeration value "ospf6".
 Invalid enumeration value "ospf6".
 YANG path: Schema location /frr-isisd:isis/instance/redistribute/ipv4/protocol.
```

Let's make CLI more user-friendly and allow only supported protocols in
redistribution commands.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-10-05 17:38:21 +03:00
Igor Ryzhov 07679ad98a *: explicitly print "exit" at the end of every node config
There is a possibility that the same line can be matched as a command in
some node and its parent node. In this case, when reading the config,
this line is always executed as a command of the child node.

For example, with the following config:
```
router ospf
 network 193.168.0.0/16 area 0
!
mpls ldp
 discovery hello interval 111
!
```
Line `mpls ldp` is processed as command `mpls ldp-sync` inside the
`router ospf` node. This leads to a complete loss of `mpls ldp` node
configuration.

To eliminate this issue and all possible similar issues, let's print an
explicit "exit" at the end of every node config.

This commit also changes indentation for a couple of existing exit
commands so that all existing commands are on the same level as their
corresponding node-entering commands.

Fixes #9206.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-08-23 22:08:20 +03:00
Igor Ryzhov dab1fb8dc8 isisd: fix extra space in the mpls-te config output
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-06-23 15:39:56 +03:00
Donald Sharp d64162ce84
Merge pull request #8210 from LabNConsulting/chopps/always-batch
northbound: KISS always batch yang config, it's faster.
2021-06-02 18:13:42 -04:00