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

Support for Routing Instances #21

Merged
merged 7 commits into from
Sep 3, 2024

Conversation

Istvan91
Copy link

@Istvan91 Istvan91 commented Jul 8, 2024

This MR enhances fernglas to support routing-instances for BGP and BMP Sessions. Following three methods to gather routing-instance information have been implemented:

  • BMP: evaluate RD in the MessagePeerHeader - no configuration necessary
  • MP-BGP: routing-instances are signaled over VPNv4/VPNv6 address families - no configuration necessary
  • BGP: Session itself belongs to a routing instance - BGP Session has to be assigned to a routing-instance in configuration

There has been a breaking change in the API to expose the routing-instance information. The frontend has been updated accordingly.

Possible outstanding improvement: Make Routing-Instance names configurable. Currently the Route-Distinguisher associated with the routing-instance is used as the name.

Istvan Ruzman added 2 commits July 1, 2024 15:57
@@ -23,6 +24,8 @@ pub async fn run_peer(
let mut caps = vec![
BgpCapability::SafiIPv4u,
BgpCapability::SafiIPv6u,
BgpCapability::SafiVPNv4u,
Copy link

@yu-re-ka yu-re-ka Aug 15, 2024

Choose a reason for hiding this comment

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

Needs the additional capabilities for the add_path case too

Copy link
Author

Choose a reason for hiding this comment

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

I've added them; unfortunately I don't have a setup to test add-path.

src/store.rs Outdated
let rd = RouteDistinguisher::try_from(labeled.prefix.rd.clone())
.inspect_err(|_| warn!("invalid Bgp Route distinguisher"))
.ok()?;
match Ipv4Net::new(prefix.addr, prefix.prefixlen) {

Choose a reason for hiding this comment

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

At this point the ipv4net and ipv6net parsing can be moved to an external function

<option value=${name} ?selected=${(new URLSearchParams(optionsString)).get("Router") === name}>on ${name}</option>
`)}
</select>
<select name="table-sel" id="table-sel" @change=${() => document.getElementById("input-submit").click()}>

Choose a reason for hiding this comment

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

I would like this field to be hidden when only a single routing instance is known to fernglas (or, alternatively, when the only routing instance is the default instance).

Copy link
Author

Choose a reason for hiding this comment

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

makes sense: now it's only displayed when there are more than one routing-instances.

@Istvan91 Istvan91 force-pushed the routing-instance-support branch from 8ef256f to 11ddc63 Compare August 19, 2024 07:19
@yu-re-ka
Copy link

yu-re-ka commented Sep 3, 2024

Hi, sorry for the long delay. I can not properly test this at the moment (or for a while), but we'll just take it as-is and then fix any breakages as they appear.

@yu-re-ka yu-re-ka merged commit 25e55f0 into wobcom:main Sep 3, 2024
8 checks passed
@yu-re-ka
Copy link

yu-re-ka commented Sep 3, 2024

Thanks!

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.

2 participants