All scripts
isp
Advanced
2–6 min

T-ISP-008 · BGP Graceful-Shutdown Automator

Drain traffic from a router or peer before maintenance using RFC 8326 GRACEFUL_SHUTDOWN community + local-pref lowering, verify traffic has moved, and provide a one-command rollback.

Cisco IOS-XR
Cisco IOS/XE
Juniper Junos
Arista EOS
Open in GeneratorOpen in Platform
You're viewing a preview

The full script, parameters, and execution console are available with a free account.

Already have access? Sign in →

Capabilities

  • RFC 8326 GSHUT community
  • Local-pref drain policy
  • Pre/post traffic check
  • Per-neighbor or device-wide
  • Saved rollback bundle
  • Confirmation gate

Required inputs

Parameters the script accepts. Defaults shown; some are vendor- or context-gated.

ParameterTypeDefaultNotes
Scope (device|neighbor)
scope
stringneighbor
Drain wait (s)
drain_wait_s
number60

Hint 1Name your vendors and OS versions

Mention the exact platforms you run (Cisco IOS-XR, Cisco IOS/XE, Juniper Junos, …) so the generated isp & peering logic uses the right CLI/NETCONF syntax.

Hint 2State your real thresholds

Provide concrete values for Scope (device|neighbor), Drain wait (s) instead of the defaults — they shape what counts as a fault.

Hint 3Prioritize the checks you need

This tool can rFC 8326 GSHUT community and local-pref drain policy. Ask for the subset relevant to your incident to keep output focused.

Hint 4Describe your inventory format

Tell the assistant whether your device list is CSV, YAML, or JSON and which columns it has, so parsing matches your data.

Sample inventory schema

Authoritative shape of the device/policy data this script consumes.

No bundled inventory sample. The script accepts standard device lists (CSV/YAML) with hostname, mgmt IP, vendor, and credentials.

Expected output

Reference terminal output the script should produce — used as a stylistic and structural target.

terminal
2026-06-15 16:45:00 INFO  Applying GRACEFUL_SHUTDOWN to neighbor 198.51.100.7
2026-06-15 16:45:01 INFO  Set local-pref 0 + community 65535:0
2026-06-15 16:46:01 INFO  Egress on Gi0/0/1 dropped 94% — drained
2026-06-15 16:46:01 INFO  Rollback saved to rollback-198.51.100.7.txt