Gobgpd BMP Local-RIB PeerUp Notification Issue
It appears there's an issue with gobgpd not sending PeerUp notifications for new BMP local-rib sessions as defined in RFC9069. This document outlines the problem, observations, and a potential workaround.
The Issue: Missing PeerUp Notifications
According to the RFC, when a new BMP session is established, particularly a local-rib session, a PeerUp notification should be sent. However, in practical testing with gobgpd, this notification is not being observed. Specifically, the issue arises when starting up gobgpd and adding a new BMP local-rib session using the following command:
gobgp bmp add 192.168.127.254:11019 local-rib
After initiating this session, the expectation is to receive a peer-up BMP message. Unfortunately, this message is not being received, indicating a deviation from the expected behavior as defined in RFC9069. This absence of PeerUp notifications can hinder monitoring and debugging efforts, as it removes a key indicator of session establishment and status.
This behavior can impact network monitoring and troubleshooting workflows that rely on these notifications to track the establishment and status of BGP sessions. Without the PeerUp notification, it becomes more difficult to automatically detect and respond to changes in the network topology, potentially leading to delays in identifying and resolving network issues.
To further investigate this issue, it would be beneficial to examine the gobgpd codebase and identify the specific section responsible for sending PeerUp notifications in response to new BMP local-rib sessions. By tracing the execution path, it may be possible to pinpoint the reason why the notification is not being generated. Additionally, comparing the behavior of gobgpd with other BGP implementations may shed light on whether this is a unique issue or a more widespread problem. The investigation should also consider potential configuration options or settings that may affect the generation of PeerUp notifications. For example, it's possible that there is a specific configuration parameter that needs to be enabled in order for these notifications to be sent.
Observations
The core observation is the absence of the PeerUp BMP message after a new local-rib session is established. This directly contradicts the expected behavior as outlined in RFC9069, where the establishment of a new BMP session should trigger the transmission of a PeerUp notification. The absence of this notification complicates the monitoring and management of BGP sessions, as it removes a key event indicator that can be used to track session status and diagnose connectivity issues.
Specifically, the problem arises when the command gobgp bmp add 192.168.127.254:11019 local-rib is executed to start a new gobgpd instance. According to the RFC, this command should trigger the PeerUp BMP message. However, in practice, this message is not being observed. This suggests that there may be an issue with the way gobgpd is handling new BMP local-rib sessions, or with the configuration settings that govern the generation of PeerUp notifications. To further investigate this issue, it would be useful to examine the gobgpd codebase and identify the section responsible for sending these notifications. By tracing the execution path, it may be possible to pinpoint the reason why the notification is not being generated.
Another important aspect to consider is the potential impact of this issue on network monitoring and troubleshooting workflows. Many network management tools rely on PeerUp notifications to track the establishment and status of BGP sessions. Without these notifications, it becomes more difficult to automatically detect and respond to changes in the network topology. This can lead to delays in identifying and resolving network issues, potentially impacting network performance and availability. Therefore, resolving this issue is crucial to ensure the reliable and efficient operation of BGP networks.
Proposed (Temporary) Fix
While a comprehensive solution is needed, a basic fix has been created for testing purposes. This fix, available at https://github.com/aleksanderKopec/gobgp/commit/13b3703d573926cca694395607c8214bfeb6b584, is a barebones implementation and doesn't fully adhere to the RFC. It's important to note that this fix is intended only for testing BMP handling and isn't a production-ready solution.
This temporary fix provides a basic implementation to address the immediate need for PeerUp notifications in the testing environment. While it may not cover all aspects of the RFC or handle edge cases, it serves as a starting point for further investigation and development. By implementing this fix, users can gain a better understanding of the underlying issue and verify that the PeerUp notifications are being generated correctly in response to new BMP local-rib sessions. This can help to streamline the testing process and ensure that BMP handling is functioning as expected.
However, it's important to acknowledge the limitations of this temporary fix. As the author has stated, it's a barebones implementation and doesn't fully adhere to the RFC. This means that it may not be suitable for use in production environments, where strict adherence to standards and robust error handling are essential. Additionally, the fix may not cover all possible scenarios or edge cases, which could lead to unexpected behavior in certain situations. Therefore, it's crucial to carefully evaluate the risks and benefits before deploying this fix in a production environment.
A more comprehensive solution would involve a thorough review of the gobgpd codebase, as well as a deeper understanding of the RFC and the intended behavior of PeerUp notifications. This would enable the development of a robust and standards-compliant implementation that addresses the underlying issue and ensures the reliable generation of PeerUp notifications in all scenarios. This solution should also include comprehensive testing to verify its correctness and ensure that it doesn't introduce any new issues.
Next Steps and Considerations
- Investigate the gobgpd codebase: A thorough review of the gobgpd code is needed to pinpoint why the PeerUp notification isn't being sent for new BMP local-rib sessions.
- RFC Compliance: Ensure the fix fully complies with RFC9069 to guarantee proper implementation and avoid potential issues.
- Comprehensive Testing: Implement thorough testing to validate the fix and ensure it doesn't introduce regressions or other unforeseen problems.
- Community Contribution: Contribute the fix back to the gobgpd community to benefit other users and ensure long-term maintenance.
By addressing this issue, gobgpd can provide more reliable and informative BMP support, enhancing network monitoring and troubleshooting capabilities.
In conclusion, the missing PeerUp notification in gobgpd's BMP local-rib sessions represents a deviation from RFC9069 that can impact network monitoring. While a temporary fix exists, a comprehensive, RFC-compliant solution is necessary. You can learn more about BGP monitoring protocol on the RFC Editor Website.