Files
infix/test/case/routing/ospf_default_route_advertise
Joachim Wiberg 1bbd80d8c7 test: drop leading ietf/infix prefix from directories
Let's drop the leading IETF or Infix prefixes from tests.  Initially the
idea was to mimnic the YANG models, but it's difficult to navigate and
does not provide any real benefit to developers or end-users.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2025-11-20 20:23:23 +01:00
..

=== OSPF Default route advertise

ifdef::topdoc[:imagesdir: {topdoc}../../test/case/routing/ospf_default_route_advertise]

==== Description

Verify _default-route-advertising_ in OSPF, sometimes called 'redistribute origin'. Verify both
always (regardless if a local default route exist or not) and only redistribute
when local default route exist.

The test is performed by setting a default route on R1 to 192.168.10.2, and setting
_default-route-advertising_ in OSPF, this will result that R2 will see a default route.

When set interface R1:data down, OSPF will no longer redistribute default route to R2,
unless _always_ is set for _default-route-advertising_.
....
 +-------------------+      Area 0            +------------------+
 |       R1          |.1  192.168.50.0/24   .2|      R2          |
 | 192.169.100.1/32  +------------------------+  192.168.200.1/32|
 | 10.10.10.10/32    |R1:link         R2:link |                  |
 +--------------+----+                        +---+--------------+
        R1:data |.1                       R2:data |.1
                |                                 |
                | 192.168.10.0/24                 | 192.168.20.0/24
                |                                 |
    host:data1  |.2                    host:data2 |.2
          +-----+---------------------------------+-------+
          |                                               |
          |             host                              |
          |                                               |
          +-----------------------------------------------+
....

==== Topology

image::topology.svg[OSPF Default route advertise topology, align=center, scaledwidth=75%]

==== Sequence

. Set up topology and attach to target DUTs
. Configure targets
. Verify R2 has a default route and 192.168.100.1/32 from OSPF
. Verify connectivity from PC:data2 to 10.10.10.10
. Disable link PC:data1 <--> R1:data (take default gateway down)
. Verify R2 does not have a default route but a 192.168.100.1/32 from OSPF
. Verify no connectivity from PC:data2 to 10.10.10.10
. Enable redistribute default route 'always' on R1
. Wait for all neighbors to peer
. Verify R2 has a default route and 192.168.100.1/32 from OSPF
. Verify connectivity from PC:data2 to 10.10.10.10