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

Cisco OSPF Session Compatibility Status flagged as AREA_MISMATCH in configuration #924

Open
Jtown0011 opened this issue Sep 9, 2024 · 5 comments
Labels
blocked-on-requestor Unable to make progress without feedback or more information

Comments

@Jtown0011
Copy link

Found a false positive for the OSPF Session Compatibility question when using a router ospf network statement with the area defined "network 192.168.1.0 0.0.0.255 area 10" configuration. See config example below:

result = bf.q.ospfSessionCompatibility().answer()

interface Vlan 1
  description test-point-to-point-connection
  ip address 192.168.1.1 255.255.255.0
  ip ospf network point-to-point

router ospf 1
  network 192.168.1.0 0.0.0.255 area 10

If you configure the command ip router ospf 1 area 0.0.0.10 under the interface configuration in Cisco IOS, here's what will happen:

Direct Interface Area Assignment: This command directly assigns the interface to OSPF process 1 and OSPF area 0.0.0.10 (which is equivalent to area 10). This bypasses the need for the OSPF network statement under the router ospf 1 configuration to assign the interface to an area. The interface will participate in OSPF and will be directly placed into area 0.0.0.10.

Overrides Network Statement: If you have both the network statement under the router ospf configuration and the ip router ospf command under the interface, the interface-level OSPF configuration will take precedence for that specific interface. This means the interface will always belong to the area specified at the interface level, regardless of any matching network statements in the global OSPF configuration.

Key Points:

  • The ip router ospf 1 area 0.0.0.10 command at the interface level overrides any area assignments made by network statements for that specific interface.

  • If you want more granular control of which area each interface belongs to, configuring OSPF at the interface level is a valid approach.

  • However, if you already have a network statement covering the interface's IP range, the interface-level OSPF configuration isn't necessary unless you want to specifically manage the area at the interface level.

@dhalperi
Copy link
Member

Hi @Jtown0011 -- I tried running your example and I got no warnings on that question. Here's what I ran:

#!/usr/bin/env python
# coding: utf-8

# In[1]:


from pybatfish.client.session import Session


# In[2]:


bf = Session()


# In[3]:


bf.init_snapshot_from_text("""
interface Vlan 1
  description test-point-to-point-connection
  ip address 192.168.1.1 255.255.255.0
  ip ospf network point-to-point

router ospf 1
  network 192.168.1.0 0.0.0.255 area 10
""")


# In[4]:


bf.q.fileParseStatus().answer()


# In[5]:


bf.q.ospfSessionCompatibility().answer()


# In[ ]:

And I got no output from ospfSessionCompatibility. Can you please flesh our your report to make it reproducible?

@Jtown0011
Copy link
Author

Jtown0011 commented Sep 13, 2024

Hi @dhalperi,

Sorry I forgot to include the R2 configuration along with the results.

Issue that I'm seeing:

Found a false positive for the OSPF Session Compatibility question when using a router ospf network statement with the area defined "network 192.168.1.0 0.0.0.255 area 10" configuration. See config example below:

result = bf.q.ospfSessionCompatibility().answer()

R1.cfg

interface Vlan 1
  description test-point-to-point-connection
  ip address 192.168.1.1 255.255.255.252
  ip ospf network point-to-point

router ospf 1
  network 192.168.1.0 0.0.0.3 area 10

R2.cfg

interface Vlan 2
  description test-point-to-point-connection
  ip address 192.168.1.2 255.255.255.252
  ip ospf network point-to-point

router ospf 1
  network 192.168.1.2 0.0.0.0 area 10

Results

Interface VRF IP Area Remote_Interface Remote_VRF Remote_IP Remote_Area Session_Status
R1[Vlan1] default 192.168.1.1 0 R2[Vlan2] default 192.168.1.2 10 AREA_MISMATCH

@dhalperi
Copy link
Member

Hi @Jtown0011 - sorry, but I'm still getting no useful output on this snapshot. Can you please take another look?

Screenshot 2024-09-16 at 11 07 02 PM

@dhalperi
Copy link
Member

I'll expect the next one to be a snapshot you've tried in your environment and confirmed reproduces the issue, please.

@dhalperi
Copy link
Member

dhalperi commented Oct 8, 2024

Hi @Jtown0011 - any update here?

@dhalperi dhalperi added the blocked-on-requestor Unable to make progress without feedback or more information label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked-on-requestor Unable to make progress without feedback or more information
Projects
None yet
Development

No branches or pull requests

2 participants