Page MenuHomePhabricator

Outbound BGP graceful shutdown
Closed, ResolvedPublic

Description

Thought about it for T211715

This is to be able to smoothly drain traffic before disabling the BGP session/interface to a providers that support BGP graceful shutdown (eg. NTT, Telia, Tele2).
To be pushed to all routers:

[edit policy-options]
+   policy-statement BGP_graceful_shutdown_out {
+       then {
+           community add GRACEFUL_SHUTDOWN;
+           next policy;
+       }
+   }

And then to specific peers (v4 or v6), when the need arises:

[edit protocols bgp group Transit4 neighbor 80.239.192.65]
+     export [ BGP_graceful_shutdown_out BGP_outfilter ];

The 2nd policy, (Eg. BGP_outfilter) needs to be adapted to match the export policy of the current peer or its parent group.

Event Timeline

ayounsi triaged this task as Medium priority.Dec 11 2018, 9:49 PM
ayounsi created this task.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
ayounsi lowered the priority of this task from Medium to Low.
ayounsi updated the task description. (Show Details)

Over to @faidon for review/feedback.

Have a look at https://github.com/mwiget/bgp_graceful_shutdown for a JunOS op script (SLAX) that does this fully automatically for all peers with a single command.

It does unfortunately seem to need a much newer JunOS version though, 16.1R3 or newer.

Interesting! This would be useful before doing maintenance on a whole router.
I opened an issue upstream asking for a per AS option, see https://github.com/mwiget/bgp_graceful_shutdown/issues/1

My suggestion above should still be a possibility the time we upgrade to Junos >= 16 and they implement this feature.

FYI I tested the policy from the description successfully during T226422 and T226424.

Reviving this... is this still waiting for my feedback? If so, LGTM :)

Change 550550 had a related patch set uploaded (by Ayounsi; owner: Ayounsi):
[operations/homer/public@master] Add policy-statement BGP_graceful_shutdown_out

https://gerrit.wikimedia.org/r/550550

Change 550550 merged by Ayounsi:
[operations/homer/public@master] Add policy-statement BGP_graceful_shutdown_out

https://gerrit.wikimedia.org/r/550550

ayounsi claimed this task.

All good!