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 IOS enable autostate for extended VLANs #8596

Merged
merged 2 commits into from
Nov 22, 2022
Merged

Conversation

rynogawa
Copy link
Contributor

#8569
PR for the above issues.

@batfish-bot
Copy link

This change is Reviewable

Copy link
Member

@arifogel arifogel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @rynogawa)

a discussion (no related file):
First of all thanks for your contribution!

I did some research on this issue. It looks like the non-autostate behavior for extended VLANs was added a long time ago for a nexus issue. At the time, both nexus and IOS used the same data model in Batfish, so the changes incorrectly applied to both vendors.

In the PR where this happened, this nexus doc is referenced: http://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus5000/sw/configuration/guide/cli/CLIConfigurationGuide/VLANs.html

I was unable to find any IOS documentation stating that extended vlans are always on as in nexus. This combined with your investigation in your linked issue suggest that IOS uses autostate for extended vlans as well as regular vlans by default.

IOS still has a separation between regular and extended VLANs, but that is out of scope for this PR; the only thing I'd request from you in this PR is that you add some clarifying documentation to your changes. I've provided suggested text in separate comments.



projects/batfish/src/main/java/org/batfish/representation/cisco/CiscoConfiguration.java line 315 at r1 (raw file):

  public static final String RESOLUTION_POLICY_NAME = "~RESOLUTION_POLICY~";

  private static final int VLAN_NORMAL_MAX_CISCO = 4096;

Please add the following javadoc comment above this line:

/** Maximum VLAN number for which autostate is applied by default on IOS */

projects/batfish/src/main/java/org/batfish/representation/cisco/CiscoConfiguration.java line 317 at r1 (raw file):

  private static final int VLAN_NORMAL_MAX_CISCO = 4096;

  private static final int VLAN_NORMAL_MIN_CISCO = 2;

Please add following javadoc comment above this line:

/** Minimum VLAN number for which autostate is applied by default on IOS */

@codecov
Copy link

codecov bot commented Nov 22, 2022

Codecov Report

Merging #8596 (72f127c) into master (9e8679e) will increase coverage by 0.00%.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8596   +/-   ##
=======================================
  Coverage   71.29%   71.29%           
=======================================
  Files        3276     3276           
  Lines      169105   169137   +32     
  Branches    19607    19616    +9     
=======================================
+ Hits       120565   120590   +25     
- Misses      39274    39276    +2     
- Partials     9266     9271    +5     
Impacted Files Coverage Δ
...tfish/representation/cisco/CiscoConfiguration.java 81.38% <ø> (ø)
...fish/bddreachability/BDDLoopDetectionAnalysis.java 76.81% <0.00%> (-13.05%) ⬇️
...ish/datamodel/bgp/community/ExtendedCommunity.java 82.22% <0.00%> (-0.85%) ⬇️
...col/src/main/java/org/batfish/role/InferRoles.java 73.63% <0.00%> (-0.46%) ⬇️
.../batfish/representation/frr/RouteMapConvertor.java 96.06% <0.00%> (-0.20%) ⬇️
..._policy/communities/OpaqueExtendedCommunities.java 100.00% <0.00%> (+46.66%) ⬆️

Copy link
Member

@arifogel arifogel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @rynogawa)

@rynogawa
Copy link
Contributor Author

@arifogel
Thank you for your quick and polite response.
I have responded to your instructions.

@arifogel arifogel changed the title Set extended VLAN port to "False" when physical port goes down Cisco IOS enable autostate extended VLANs Nov 22, 2022
@arifogel arifogel changed the title Cisco IOS enable autostate extended VLANs Cisco IOS enable autostate for extended VLANs Nov 22, 2022
@arifogel arifogel merged commit ae2f3a8 into batfish:master Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants