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

bgpd not sending NOTIFICATION (cease/Peer De-configured) message when neighbor unconfigured #5262

Closed
arunsesh opened this issue Nov 1, 2019 · 3 comments · Fixed by #5285
Closed
Assignees
Labels

Comments

@arunsesh
Copy link

arunsesh commented Nov 1, 2019

  • When reporting a crash, provide a backtrace
  • When pasting configs, logs, shell output, backtraces, and other large chunks of text use Markdown code blocks
  • Include the FRR version; if you built from Git, please provide the commit hash
  • Write your issue in English

Describe the bug
When a neighbor is unconfigured/removed, BGPD (speaker) is properly closing TCP connection by sending TCP FIN message. However, it is expected to send NOTIFICATION message with error code: Cease and error subcode : Peer De-configured (3).

Refer https://tools.ietf.org/html/rfc4486.
If a BGP speaker decides to de-configure a peer, then the speaker SHOULD send a NOTIFICATION message with the Error Code Cease and the Error Subcode "Peer De-configured".

This is working fine when BGPD is sent SIGTERM signal (closure of bgpd daemon).

(put "x" in "[ ]" if you already tried following)
[ ] Did you check if this is a duplicate issue?
[ ] Did you test it on the latest FRRouting/frr master branch?

To Reproduce
Steps to reproduce the behavior:

  1. Do a BGP peering with another router.
  2. Delete (unconfigure the peered neighbour) - no neighbor x.x.x.x

Note: Doing a "systemctl restart frr.service" or ""systemctl stop frr.service" or "kill -SIGTERM --- sends Notification cease/peer unconfigured to the peer.

Expected behavior
BGP Peering will be lost/terminated. (TCP closure)
However, it is expected to send NOTIFICATION message with error code: Cease and error subcode : Peer De-configured (3) before tearing down the connection.

Screenshots
None

Versions

  • OS Kernel: CentOS 7
  • FRR Version : 7.1
    Additional context
    Add any other context about the problem here.
@arunsesh arunsesh added the triage Needs further investigation label Nov 1, 2019
@ton31337 ton31337 self-assigned this Nov 2, 2019
@ton31337 ton31337 added bgp and removed triage Needs further investigation labels Nov 2, 2019
@amodmish
Copy link

amodmish commented Nov 4, 2019

There are implementation which does not allow [no] neighbor and instead execute neighbor shutdown first and post that [no] neighbor commands would be allowed. Would it be good to follow that ?

@amodmish
Copy link

amodmish commented Nov 5, 2019

if you shutdown the neighbor prior how will it receive de-configure message?
I meant - As part of neighbor shutdown send de-confiugure message to peer. And on no neighbor remove the peer from config.

@arunsesh
Copy link
Author

Not sure if the changes done is causing regression. On termination of bgpd (kill of bgpd process) --- 2 cease Notification messages sent to peer.

1st NOTIFICATION cease message sent with minor-code = Peer-DeConfigured.
2nd NOTIFICATION cease message sent with minor-code = Administratively Shutdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants