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

IOS:Advertise ConnectedRoute when redistributing between different EIGRP #8590

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

NobutakaNiiya
Copy link
Contributor

#8567
PR for the above issues.

@batfish-bot
Copy link

This change is Reviewable

Copy link
Member

@dhalperi dhalperi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 7 files reviewed, 1 unresolved discussion (waiting on @NobutakaNiiya)


projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/ConnectedRoute.java line 22 at r1 (raw file):

public final class ConnectedRoute extends AbstractRoute {

  static final String PROP_EIGRP_METRIC = "eigrp-metric";

Changing ConnectedRoute to have EIGRP properties is a non-starter.

You need to make a different design to somehow enable the connected route to get these properties only when redistributed into EIGRP.

One place to look might be something like the ConnectedRouteMetadata and how that is used in the VI Model and Dataplane.

But I don't think that's precisely the right approach for the underlying problem -- because, e.g., Juniper has similar concepts where you can put BGP properties on static routes.

Need a more general solution.

@NobutakaNiiya
Copy link
Contributor Author

@dhalperi
Thank you for confirming the contents.

By similar concept do you mean properties such as:

set routing-options static route 192.168.10.1/32 discard
set routing-options static route 192.168.20.1/32 discard

set policy-options policy-statement EXPORTSTATIC term 1 from protocol static
set policy-options policy-statement EXPORTSTATIC term 1 from route-filter 192.168.0.0/19 orlonger
set policy-options policy-statement EXPORTSTATIC term 1 then accept

set protocols bgp group internal-peers neighbor 10.0.12.2 export EXPORTSTATIC
set protocols bgp group internal-peers neighbor 10.0.23.3

For Juniper's processing, should I use the following as a reference?

/*
* Juniper allows setting BGP communities for static routes. Rather than add communities to VI
* routes, add statements to peer export policies that set the appropriate communities.
*/
List<If> staticRouteCommunitySetters = getStaticRouteCommunitySetters(routingInstance);

@codecov
Copy link

codecov bot commented Jan 13, 2023

Codecov Report

Merging #8590 (0cd0d3f) into master (8c770ef) will increase coverage by 0.00%.
The diff coverage is 91.66%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #8590   +/-   ##
=======================================
  Coverage   71.86%   71.86%           
=======================================
  Files        3277     3277           
  Lines      168696   168725   +29     
  Branches    19686    19693    +7     
=======================================
+ Hits       121226   121249   +23     
- Misses      38196    38197    +1     
- Partials     9274     9279    +5     
Impacted Files Coverage Δ
...datamodel/routing_policy/expr/MatchProcessAsn.java 72.41% <88.88%> (+12.41%) ⬆️
...java/org/batfish/dataplane/ibdp/VirtualRouter.java 87.60% <88.88%> (-0.02%) ⬇️
...main/java/org/batfish/datamodel/Configuration.java 95.75% <100.00%> (+0.02%) ⬆️
...rg/batfish/dataplane/ibdp/EigrpRoutingProcess.java 89.27% <100.00%> (-0.13%) ⬇️
...batfish/representation/cisco/CiscoConversions.java 86.60% <100.00%> (ø)

... and 5 files with indirect coverage changes

@NobutakaNiiya
Copy link
Contributor Author

@dhalperi
I uploaded the fix, please check it.

@NobutakaNiiya
Copy link
Contributor Author

projects/batfish-common-protocol/src/main/java/org/batfish/datamodel/ConnectedRoute.java line 22 at r1 (raw file):

Previously, dhalperi (Dan Halperin) wrote…

Changing ConnectedRoute to have EIGRP properties is a non-starter.

You need to make a different design to somehow enable the connected route to get these properties only when redistributed into EIGRP.

One place to look might be something like the ConnectedRouteMetadata and how that is used in the VI Model and Dataplane.

But I don't think that's precisely the right approach for the underlying problem -- because, e.g., Juniper has similar concepts where you can put BGP properties on static routes.

Need a more general solution.

I thought of having a Map<String, EigrpInterfaceSettings> variable in the Configuration class, referencing the Juniper implementation, to store ASN information.
Then, for the ConnectedRoute case, I considered an approach to retrieve the ASN from that variable in the implementation of MatchProcessAsn.evaluate().

If this approach is not good, could you please suggest another way to solve the problem?

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

3 participants