The OSPF TE topotest is using switches to interconnect router. During the test,
interfaces are shutdown on some routers to simulate link failure and check that
the TED is correctly updated. However, the switche between router avoid the
detection by the neighbor router that the interface is down i.e. the interface
line remains up as it is conneted to the switch and not to the router.
This patch update the tested topology by removing the switch and connect
directly the router excepted the inter AS link on R3. Interface are also
renamed accordingly.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
Traffic Engineering Database (TED) is fulfill from the various LSA advertised
and received by the router. To remove information on the TED, 2 mechanisms are
used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of
prefixes advertised in the Router LSA with the list of corresponding edges and
subnets contained in the TED. However, this second mechanism assumes that the
Router LSA is unique and contains all prefixes of the advertised router.
But, this is wrong. Prefixes could be advertised with several Router LSA.
This conduct to remove edge and subnet in the TED while it should be maintained.
The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy
loaded.
This simple patch removed deletion of edges and subnets when parsing the Router
LSA and only removed them when the corresponding TE Opaque LSA is flushed. In
addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This
patch also correct this second problem.
Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
The test_ospf_suppres_fa.py script is using straight
up sleeps before testing that the next step worked properly.
On a unloaded test system this will work 100% of the time
on a loaded test system this will have random failures.
Convert the test to use run_and_expect and give each
section of the test 30 seconds to get to the next state
appropriately instead of 10.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
The t_dequeue was being enqueued with a timer of 0
this is really an event instead of a timer. Let's
use that instead.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
An operator is reporting that the dplane_fpm_nl connection has
started to accumulate contexts. One such path that could cause
this is that the obuf used is full and stays full. This would
imply that what ever is on the receiving end has gotten wedged
and is not reading from the stream of data being sent it's way.
If after 15 seconds of no response, let's declare the connection
dead and reset it.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
When zebra is started, someone may have configured an SRv6 encap source
address different from the default address ( :: ) in the kernel.
On startup, zebra should not assume that the actual SRv6 encap source
address is the default address ( :: ), but should retrieve the actual
source address from the kernel and put it in zebra configuration. In
other words, on startup we expect the actual SRv6 encap source
address and the configured one to be the same.
This commit makes the necessary changes to support the above.
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
The `show segment-routing srv6 manager` CLI command allows users to
print the SRv6 information. Currently, the SRv6 information includes
only the SRv6 encapsulation source address.
In this commit, we add the documentation for the
`show segment-routing srv6` command.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Add a new topotest `srv6_encap_src_addr` which verifies that the
`source-address` command works properly.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
When writing the SRv6 config from zebra, we must also include the source
address of outer encapsulating IPv6 header.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Add a new CLI command `show segment-routing srv6 manager [json]` to
verify the overall SRv6 state. The current output displays only the
configured source address of outer encapsulating IPv6 header. The output
can be extended in the future to show more information, including
summary SRv6 information and supported capabilities.
Example:
```
r1# show segment-routing srv6 manager
Parameters:
Encapsulation:
Source Address:
Configured: fc00:0:1::1
r1# show segment-routing srv6 manager json
{
"parameters":{
"encapsulation":{
"sourceAddress":{
"configured":"fc00:0:1::1"
}
}
}
}
```
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
- Add a new node `SRV6_ENCAP_NODE` to the CLI graph. This node allows
users to configure encapsulation parameters for SRv6, including the
source address of the outer encapsulating IPv6 header.
- Install a new CLI command `source-address` under the
`SRV6_ENCAP_NODE` node. This command is used to configure the source
address of the outer encapsulating IPv6 header.
- Install a new CLI command `no source-address` under the
`SRV6_ENCAP_NODE` node. This command is used to unset the
source address of the outer encapsulating IPv6 header and restore the
default source address.
Examples:
```
router# segment-routing
router(sr)# srv6
router(srv6)# encapsulation
router(srv6-encap)# source-address fc00:0:1::1
```
```
router# segment-routing
router(sr)# srv6
router(srv6)# encapsulation
router(srv6-encap)# no source-address
```
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Add a bunch of set functions and associated data structure in
zebra_dplane to allow the configuration of the source address for SRv6
encap in the data plane.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Generic Netlink is an extension of Netlink meant for kernel-user space
communications. It supports the dynamic allocation of communication
channels. Kernel and user space applications register their services
with a Generic Netlink controller. The Generic Netlink controller is
responsible for assigning a unique channel number with each service.
Clients who want to use a service query the controller to see if
the service exists and to determine the correct channel number. The
channel number is used to access the requested service.
This commit adds the base functionality to get the channel number
assigned to a specific service. More precisely, this commit adds a
function `genl_resolve_family()` that takes the service name (called
family in the Generic Netlink terminology) as an input parameter and
queries the Generic Netlink controller to get the channel number
assigned with the requested service.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
zebra already supports several Netlink sockets which allow it to
communicate with the kernel. Each Netlink socket has a specific purpose:
we have a socket for incoming events from the kernel, a socket for
programming the dataplane, a socket for the kernel messages, a socket
used as the command channel. All the currently supported sockets are
based on the `NETLINK_ROUTE` protocol.
This commit adds a new Netlink socket that allows zebra to send
commands to the kernel using the `Generic Netlink` protocol.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
The `netlink_socket()` function is used in many places to create and
initialize Netlink sockets. Currently, it can only create
`NETLINK_ROUTE` Netlink sockets.
This commit generalizes the behavior of the `netlink_socket()` function,
enabling it to generate Netlink sockets of any type. Specifically, it
extends the `netlink_socket()` function with a new argument `nl_family`,
which allows developers to specify the Netlink family of the socket to
be created.
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
Convert bgp_prefix_sid2 to exabgp 4
Do not advertise prefixes to exabgp to avoid an issue where exabgp
resets the bgp session with the following notification:
> invalid ipv6 mpls-vpn next-hop length 48 expected 24 or 40
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Create reate exabgp cli fifo even it is not used in topotests to avoid
this error message:
> 16:21:42 | 2290205 | cli | could not find the named pipes (exabgp.in and exabgp.out) required for the cli
> 16:21:42 | 2290205 | cli | we scanned the following folders (the number is your PID):
> 16:21:42 | 2290205 | cli control | - /run/exabgp/
> 16:21:42 | 2290205 | cli control | - /run/0/
> 16:21:42 | 2290205 | cli control | - /run/
> 16:21:42 | 2290205 | cli control | - /var/run/exabgp/
> 16:21:42 | 2290205 | cli control | - /var/run/0/
> 16:21:42 | 2290205 | cli control | - /var/run/
> 16:21:42 | 2290205 | cli control | - /usr/local/run/exabgp/
> 16:21:42 | 2290205 | cli control | - /usr/local/run/0/
> 16:21:42 | 2290205 | cli control | - /usr/local/run/
> 16:21:42 | 2290205 | cli control | - /usr/local/var/run/exabgp/
> 16:21:42 | 2290205 | cli control | - /usr/local/var/run/0/
> 16:21:42 | 2290205 | cli control | - /usr/local/var/run/
> 16:21:42 | 2290205 | cli control | please make them in one of the folder with the following commands:
> 16:21:42 | 2290205 | cli control | > mkfifo //run/exabgp.{in,out}
> 16:21:42 | 2290205 | cli control | > chmod 600 //run/exabgp.{in,out}
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Log exabgp by default in /tmp/topotests/<testname>/<peername>/exabgp.log
Level is INFO.
Note that in case the configuration syntax is invalid, exabgp does not
log into the file and exits at startup. You can check a configuration
syntax by running:
> exabgp <exabgp.cfg>
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Require exabgp >= 4.2.11 to allow to newer version to run exabgp
topotests. Next commits will adapt the exabgp topotests when needed.
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Before:
```
ton# sh bgp summary
IPv4 Unicast Summary (VRF default):
BGP router identifier 0.0.0.2, local AS number 65001 VRF default vrf-id 0
```
After:
```
ton# sh bgp summary
IPv4 Unicast Summary:
BGP router identifier 0.0.0.2, local AS number 65001 VRF default vrf-id 0
```
After 5be4ee9634, we don't need to duplicate that
info.
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Whenever a link up change was detected on a macvlan device where
the linked device wasn't visible in the namespace zebra was
running in, the linked zebra interface was NULL. This was already
handled in the event of a link down, but was ommitted from the
upside. Added the same null check to the up-side.
Signed-off-by: Tomi Salminen <tlsalmin@gmail.com>