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

Deleting area in OSPF does not removes it from system at all #17415

Closed
2 tasks done
c0r4ik opened this issue Nov 12, 2024 · 2 comments
Closed
2 tasks done

Deleting area in OSPF does not removes it from system at all #17415

c0r4ik opened this issue Nov 12, 2024 · 2 comments
Assignees
Labels
triage Needs further investigation

Comments

@c0r4ik
Copy link

c0r4ik commented Nov 12, 2024

Description

Removing an area from the configuration leaves it active in show ip ospf

Version

FRRouting 10.1.1 (deb-tests) on Linux(6.1.0-27-amd64).
Copyright 1996-2005 Kunihiro Ishiguro, et al.
configured with:
    '--build=x86_64-linux-gnu' '--prefix=/usr' '--includedir=${prefix}/include' '--mandir=${prefix}/share/man' '--infodir=${prefix}/share/info' '--sysconfdir=/etc' '--localstatedir=/var' '--disable-option-checking' '--disable-silent-rules' '--libdir=${prefix}/lib/x86_64-linux-gnu' '--libexecdir=${prefix}/lib/x86_64-linux-gnu' '--disable-maintainer-mode' '--sbindir=/usr/lib/frr' '--with-vtysh-pager=/usr/bin/pager' '--libdir=/usr/lib/x86_64-linux-gnu/frr' '--with-moduledir=/usr/lib/x86_64-linux-gnu/frr/modules' '--disable-dependency-tracking' '--enable-rpki' '--disable-scripting' '--disable-pim6d' '--with-libpam' '--enable-doc' '--enable-doc-html' '--enable-snmp' '--enable-fpm' '--disable-protobuf' '--disable-zeromq' '--enable-ospfapi' '--enable-bgp-vnc' '--enable-multipath=256' '--enable-user=frr' '--enable-group=frr' '--enable-vty-group=frrvty' '--enable-configfile-mask=0640' '--enable-logfile-mask=0640' 'build_alias=x86_64-linux-gnu' 'LIBS= -latomic' 'PYTHON=python3'

How to reproduce

  1. Run vtysh

  2. configure ospf area
    deb-tests# conf
    deb-tests(config)# router ospf
    deb-tests(config-router)# area 0 range 0.0.0.0/0
    deb-tests#

  3. delete ospf area
    deb-tests# configure
    deb-tests(config)# router ospf
    deb-tests(config-router)# no area 0 range 0.0.0.0/0
    deb-tests(config-router)# end
    deb-tests#

Expected behavior

show ip ospf should have no areas running

deb-tests# show ip ospf
OSPF Routing Process, Router ID: 192.168.5.113
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm has not been run
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 256
Administrative distance 110
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 0

Actual behavior

area 0 deleted in configuration but still exists in frr

deb-tests# show ip ospf
OSPF Routing Process, Router ID: 192.168.5.113
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm has not been run
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 256
Administrative distance 110
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 1
Area ID: 0.0.0.0 (Backbone)
Number of interfaces in this area: Total: 0, Active: 0
Number of fully adjacent neighbors in this area: 0
Area has no authentication
SPF algorithm executed 0 times
Number of LSA 0
Number of router LSA 0. Checksum Sum 0x00000000
Number of network LSA 0. Checksum Sum 0x00000000
Number of summary LSA 0. Checksum Sum 0x00000000
Number of ASBR summary LSA 0. Checksum Sum 0x00000000
Number of NSSA LSA 0. Checksum Sum 0x00000000
Number of opaque link LSA 0. Checksum Sum 0x00000000
Number of opaque area LSA 0. Checksum Sum 0x00000000

Additional context

If I add other area - 1 or 2 - and then delete them - they are also exists
Only restart of frr service deletes areas.

Checklist

  • I have searched the open issues for this bug.
  • I have not included sensitive information in this report.
@c0r4ik c0r4ik added the triage Needs further investigation label Nov 12, 2024
@aceelindem
Copy link
Collaborator

This works for me in ubuntu 24.02 with that lastest.

acee-ubuntu(config-router)# area 0
authentication Enable authentication
default-cost Set the summary-default cost of a NSSA or stub area
export-list Set the filter for networks announced to other areas
filter-list Filter networks between OSPF areas
flood-reduction Enable flood reduction for area
import-list Set the filter for networks from other areas announced to the specified one
nssa Configure OSPF area as nssa
range Summarize routes matching address/mask (border routers only)
shortcut Configure the area's shortcutting mode
stub Configure OSPF area as stub
virtual-link Configure a virtual link
acee-ubuntu(config-router)# area 0 range
A.B.C.D/M Area range prefix
acee-ubuntu(config-router)# area 0 range 0.0.0.0/0
acee-ubuntu(config-router)# end
acee-ubuntu# show ip ospf
OSPF Routing Process, Router ID: 172.17.0.1
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm has not been run
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 64
Administrative distance 110
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 1
Area ID: 0.0.0.0 (Backbone)
Number of interfaces in this area: Total: 0, Active: 0
Number of fully adjacent neighbors in this area: 0
Area has no authentication
SPF algorithm executed 0 times
Number of LSA 0
Number of router LSA 0. Checksum Sum 0x00000000
Number of network LSA 0. Checksum Sum 0x00000000
Number of summary LSA 0. Checksum Sum 0x00000000
Number of ASBR summary LSA 0. Checksum Sum 0x00000000
Number of NSSA LSA 0. Checksum Sum 0x00000000
Number of opaque link LSA 0. Checksum Sum 0x00000000
Number of opaque area LSA 0. Checksum Sum 0x00000000

acee-ubuntu# config t
acee-ubuntu(config)# router osfp
% Unknown command: router osfp
acee-ubuntu(config)# router ospf
acee-ubuntu(config-router)# no area 0 range 0.0.0.0/0
acee-ubuntu(config-router)# end
acee-ubuntu# show ip ospf
OSPF Routing Process, Router ID: 172.17.0.1
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm has not been run
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 64
Administrative distance 110
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 0

acee-ubuntu# show ip ospf area
% Command incomplete: show ip ospf area
acee-ubuntu# show ip ospf area
% There is no matched command.
acee-ubuntu# show ip ospf
OSPF Routing Process, Router ID: 172.17.0.1
Supports only single TOS (TOS0) routes
This implementation conforms to RFC2328
RFC1583Compatibility flag is disabled
OpaqueCapability flag is disabled
Initial SPF scheduling delay 0 millisec(s)
Minimum hold time between consecutive SPFs 50 millisec(s)
Maximum hold time between consecutive SPFs 5000 millisec(s)
Hold time multiplier is currently 1
SPF algorithm has not been run
SPF timer is inactive
LSA minimum interval 5000 msecs
LSA minimum arrival 1000 msecs
Write Multiplier set to 20
Refresh timer 10 secs
Maximum multiple paths(ECMP) supported 64
Administrative distance 110
Number of external LSA 0. Checksum Sum 0x00000000
Number of opaque AS LSA 0. Checksum Sum 0x00000000
Number of areas attached to this router: 0

acee-ubuntu#

@aceelindem
Copy link
Collaborator

This problem was fixed by:

commit baf6047
Author: Shbinging [email protected]
Date: Tue Oct 22 05:34:26 2024 +0000

ospfd:fix the bug that the empty area was not free after no area range command was executed

    When we use the no area X.X.X.X range A.B.C.D/M command, if the area no longer has an interface to which it belongs, then the area should be deleted from the LSDB. This processing logic is consistent with instructions such as no network area and no area authentication.

Signed-off-by: Shbinging <[email protected]>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage Needs further investigation
Projects
None yet
Development

No branches or pull requests

2 participants