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

Selecting specific router only shows routes from a single BMP session #18

Open
v0tti opened this issue Mar 20, 2024 · 3 comments
Open
Assignees

Comments

@v0tti
Copy link

v0tti commented Mar 20, 2024

In our setup, we utilize Nokia routers within an MPLS network configuration. This necessitates configuring BMP sessions from our Internet VRF for EBGP routes and on our Base router for IBGP (VPN) routes. Our routers establish two separate BMP sessions originating from the same IP address but using different source ports. This setup leads to a problem with fernglas, specifically when selecting a single router in the frontend. In this scenario, only the routes from one of the two BMP sessions are displayed. However, when selecting "on all", all routes are shown correctly.

Excepted behavior

When selecting a single router in the frontend, I expect to see all routes known by this particular router, irrespective of the BMP session source port.

Observed behavior

When selecting a single router in the frontend, only the routes from one of the BMP sessions are displayed, leading to incomplete data.

Examples with truncated output:

GET /api/query?MostSpecific=8.8.8.8:

...
{"Route":{"state":"Seen","net":"8.8.8.0/24","table":"PrePolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.25","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[15169],"communities":[[34953,10003],[65101,1082],[65102,1000],[65103,276],[65104,150]],"large_communities":[[6695,1000,1]],"med":0,"local_pref":110,"nexthop":"192.168.128.25"}}
{"Route":{"state":"Seen","net":"8.8.8.0/24","table":"PrePolicyAdjIn","from_client":"192.168.128.39:61445","peer_distinguisher":{"RD":[34953,10000]},"peer_address":"213.198.92.112","client_name":"swbb01-ams","router_id":"93.159.250.3","origin":"Igp","as_path":[2914,6453,15169],"communities":[[2914,420],[2914,1206],[2914,2203],[2914,3200]],"large_communities":null,"med":2001,"local_pref":null,"nexthop":"213.198.92.112"}}
{"Route":{"state":"Seen","net":"8.0.0.0/12","table":"PrePolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.37","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[1299,3356],"communities":[[1299,20000],[34953,10004]],"large_communities":null,"med":null,"local_pref":100,"nexthop":"192.168.128.37"}}
{"Route":{"state":"Accepted","net":"8.8.8.0/24","table":"PostPolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.25","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[15169],"communities":[[34953,10003],[65101,1082],[65102,1000],[65103,276],[65104,150]],"large_communities":[[6695,1000,1]],"med":0,"local_pref":110,"nexthop":"192.168.128.25"}}
{"Route":{"state":"Accepted","net":"8.8.8.0/24","table":"PostPolicyAdjIn","from_client":"192.168.128.39:61445","peer_distinguisher":{"RD":[34953,10000]},"peer_address":"213.198.92.112","client_name":"swbb01-ams","router_id":"93.159.250.3","origin":"Igp","as_path":[2914,6453,15169],"communities":[[2914,420],[2914,1206],[2914,2203],[2914,3200],[34953,10004]],"large_communities":null,"med":2001,"local_pref":null,"nexthop":"213.198.92.112"}}
{"Route":{"state":"Accepted","net":"8.0.0.0/12","table":"PostPolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.37","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[1299,3356],"communities":[[1299,20000],[34953,10004]],"large_communities":null,"med":null,"local_pref":100,"nexthop":"192.168.128.37"}}
...

GET /api/query?Router=192.168.128.39&MostSpecific=8.8.8.8:

...
{"Route":{"state":"Accepted","net":"8.8.8.0/24","table":"PostPolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.25","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[15169],"communities":[[34953,10003],[65101,1082],[65102,1000],[65103,276],[65104,150]],"large_communities":[[6695,1000,1]],"med":0,"local_pref":110,"nexthop":"192.168.128.25"}}
{"Route":{"state":"Seen","net":"8.8.8.0/24","table":"PrePolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.25","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[15169],"communities":[[34953,10003],[65101,1082],[65102,1000],[65103,276],[65104,150]],"large_communities":[[6695,1000,1]],"med":0,"local_pref":110,"nexthop":"192.168.128.25"}}
{"Route":{"state":"Accepted","net":"8.0.0.0/12","table":"PostPolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.37","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[1299,3356],"communities":[[1299,20000],[34953,10004]],"large_communities":null,"med":null,"local_pref":100,"nexthop":"192.168.128.37"}}
{"Route":{"state":"Seen","net":"8.0.0.0/12","table":"PrePolicyAdjIn","from_client":"192.168.128.39:61415","peer_distinguisher":"Global","peer_address":"192.168.128.37","client_name":"swbb01-ams","router_id":"192.168.128.39","origin":"Igp","as_path":[1299,3356],"communities":[[1299,20000],[34953,10004]],"large_communities":null,"med":null,"local_pref":100,"nexthop":"192.168.128.37"}}
...

Upon querying for a specific router, it becomes apparent that only the routes from client 192.168.128.39:61415 are returned, whereas those from client 192.168.128.39:61445 are omitted.

@yu-re-ka
Copy link
Collaborator

The "Router=192.168.128.39" parameter has nothing to do with the source of the BMP stream. Instead, it attempts to catch the BGP router id from one of the BGP handshakes encapsulated within the stream.
We can of course add a field to hard-code this mapping, which would work around your issue.

@v0tti
Copy link
Author

v0tti commented Mar 26, 2024

Thanks for the input.

We have added an option in our fork to override the router-id, would this patch be appreciated upstream?

@ChrisDeh
Copy link
Contributor

ChrisDeh commented Sep 3, 2024

Absolutely! Feel free to submit a PR!

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

No branches or pull requests

3 participants