Token导航 LogoToken导航TokenDH.com
效率external-serviceclawhub未标认证来源可访问clear审计通过

bgp-analysis边界网关协议分析

Agent Skill

bgp-analysis 用于补充效率相关能力,适合在 OpenClaw 中需要让 Agent 承接效率相关任务时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,586

周安装

197

GitHub Stars

公开资料未说明

下载量

1,608
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bgp-analysis(边界网关协议分析)
来源仓库:https://github.com/vahagn-madatyan/bgp-analysis
安装命令:
openclaw skills install bgp-analysis
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install bgp-analysis

简介

用于补充效率相关能力支持。适用宿主包括 OpenClaw,接入前应确认版本、权限和运行环境要求。

  • 适合在 OpenClaw 中承接效率相关任务。
  • 可结合来源仓库和原始 README 继续核验用法。
  • 安装前建议确认权限范围和维护状态。
  • bgp-analysis 属于效率类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

name
bgp-analysis
description
>-
license
Apache-2.0
metadata
safety
read-only
author
network-security-skills-suite
version
1.0.0
openclaw
{"emoji":"🔍","safetyTier":"read-only","requires":{"bins":["ssh"],"env":[]},"tags":["bgp","routing","protocol"],"mcpDependencies":[],"egressEndpoints":[]}

BGP Protocol Analysis

Protocol-reasoning-driven analysis skill for BGP peering, path selection, and route propagation. Unlike device health checks that compare metrics against thresholds, BGP analysis requires interpreting protocol state machines, walking the best-path algorithm, and validating policy application across the control plane.

Commands are labeled [Cisco], [JunOS], or [EOS] where syntax diverges. Unlabeled statements apply to all three vendors.

When to Use

  • BGP peer reported down or stuck in a non-Established state
  • Suspected route leak — prefixes appearing in tables where they should not
  • Path selection not matching expectations after policy changes
  • Convergence too slow after planned maintenance or unplanned failover
  • Post-change verification of BGP configuration (new peers, policy updates, community changes)
  • Capacity planning for prefix table growth or session scaling
  • Investigating asymmetric routing caused by inconsistent BGP attributes

Prerequisites

  • SSH or console access to the router (read-only privilege sufficient)
  • BGP process running on the device with at least one configured peer
  • Knowledge of expected peer topology: which neighbors should be up, expected

prefix counts per peer, intended path selection outcomes

  • Awareness of configured routing policy: route-maps, prefix-lists, community

filters, AS-path access lists, and local-preference assignments

  • For iBGP: understanding of the route-reflector or full-mesh topology

Procedure

Follow this diagnostic flow sequentially. Each step builds on the data from prior steps. The procedure moves from broad inventory to targeted diagnosis.

Step 1: BGP Session Inventory

Collect all peer states and compare against expected topology.

[Cisco]

show bgp ipv4 unicast summary

[JunOS]

show bgp summary

[EOS]

show ip bgp summary

Record each neighbor: address, AS number, state, prefixes received, up/down time. Compare against expected topology — every configured peer should appear. A peer missing from output means it was never configured or was removed. Any peer not showing a numeric prefix count is not Established — proceed to Step 2 for that peer.

Step 2: Peer State Diagnosis

For any peer not in Established state, the BGP FSM state reveals the failure domain. This is the core diagnostic reasoning step.

[Cisco]

show bgp ipv4 unicast neighbors [addr] | include state|last reset|error

[JunOS]

show bgp neighbor [addr] | match "State|Last Error|Last State"

[EOS]

show ip bgp neighbors [addr] | include state|last reset|error

Interpret the FSM state to isolate the failure:

  • Idle → BGP process not attempting connection. Causes: administratively

shut down, no route to peer address, configured remote AS does not match, or maximum-prefix limit hit triggering teardown.

  • Connect → TCP SYN sent, waiting for response. Peer is unreachable at

Layer 3 or a firewall is blocking TCP port 179.

  • Active → TCP connection attempt failed, retrying. Same causes as Connect

but the router has cycled back. Check: ACLs blocking port 179, peer not configured for this neighbor, peer address unreachable.

  • OpenSent → TCP connected, OPEN message sent, no reply. Remote end

accepted TCP but is not sending OPEN — typically remote BGP not configured for this neighbor or remote peer in admin shutdown.

  • OpenConfirm → OPEN received but parameters rejected. Check: AS number

mismatch, capability negotiation failure (AFI/SAFI mismatch), hold timer negotiation failure, authentication (MD5/TCP-AO) mismatch.

Check "last reset reason" and "last error" fields — they often provide the definitive cause. Reference: references/state-machine.md for full FSM detail.

Step 3: Route Table Analysis

For Established peers, verify prefix exchange matches expectations.

[Cisco]

show bgp ipv4 unicast neighbors [addr] routes | include Total

[JunOS]

show route receive-protocol bgp [addr] table summary

[EOS]

show ip bgp neighbors [addr] received-routes | include Total

Compare received prefix count against baseline. Significant deviation indicates:

  • Drop >10% → upstream is withdrawing routes (maintenance, filter change, or failure)
  • Increase >10% → route leak or new prefixes originated upstream
  • Zero received → peer is Established but sending no routes (missing export policy

on JunOS, or outbound filter on remote blocking everything)

Check advertised prefix count similarly — confirm this router is sending the expected number of routes to each peer.

Step 4: Path Selection Verification

When traffic takes an unexpected path, walk the BGP best-path algorithm to identify which attribute is making the selection.

[Cisco]

show bgp ipv4 unicast [prefix] bestpath

[JunOS]

show route [prefix] detail | match "AS path|Local|MED|Weight|preference"

[EOS]

show ip bgp [prefix] detail

The best-path algorithm evaluates in this order (first difference wins):

  1. Weight (Cisco/EOS local, highest wins — JunOS does not use weight)
  2. Local Preference (highest wins, default 100)
  3. Locally originated (network/aggregate preferred over learned)
  4. AS Path length (shortest wins)
  5. Origin (IGP < EGP < Incomplete)
  6. MED (lowest wins, compared only within same neighbor AS by default)
  7. eBGP over iBGP (external preferred)
  8. IGP metric to next-hop (lowest wins)
  9. Router ID (lowest wins, tiebreaker)

Identify which attribute selects the current best path. If unexpected, check the route-map or policy applying that attribute on ingress.

Step 5: Route Filtering Validation

Verify that route-maps, prefix-lists, and community filters apply as intended.

[Cisco]

show bgp ipv4 unicast neighbors [addr] policy

[JunOS]

show policy [policy-name] | display detail

[EOS]

show route-map [name]

For suspected route leaks: examine the RIB for prefixes that should not be present. Check inbound filters on the peer that is the source. Common leak causes: missing or misordered prefix-list entry, regex error in AS-path filter, community match that is too broad.

For missing routes: verify the outbound policy on the advertising peer is not filtering the prefix. On JunOS, a peer with no export policy sends nothing by default — this is the most common JunOS-specific omission.

Step 6: Convergence Assessment

Evaluate convergence behavior and route stability.

[Cisco]

show bgp ipv4 unicast dampening dampened-paths

[JunOS]

show route damping suppressed

[EOS]

show ip bgp dampening dampened-paths

Check for dampened (suppressed) routes — these indicate persistent flapping. Review the BGP update activity: high update/withdrawal rates indicate churn. After a planned change, measure convergence time from the change event to the last BGP update. Compare against the target convergence window.

Threshold Tables

Operational parameter norms for BGP — these are protocol-level expectations, not device resource thresholds.

ParameterCisco DefaultJunOS DefaultEOS DefaultNotes
Hold Timer180s90s180sNegotiated to lower value
Keepalive Interval60s30s60sHold/3 by convention
ConnectRetry Timer120sVaries120sTime between TCP attempts
MRAI (eBGP)30s0s (immediate)30sMinimum Route Advertisement Interval
MRAI (iBGP)5s0s5sLower than eBGP for faster iBGP convergence
Default Local Pref100100100Same across vendors

Table Size Norms (IPv4 unicast):

Deployment TypeExpected PrefixesWarningCritical
Internet edge (full table)~950K>1M>1.1M
Internet edge (partial)5K–100KVariesPer design
Enterprise WAN100–10K>2x baseline>5x baseline
Data center leaf50–5K>2x baseline>5x baseline

Convergence Targets:

ScenarioTargetAcceptableDegraded
eBGP failover< 90s90–180s> 180s
iBGP reconvergence< 30s30–60s> 60s
Full table reload< 5min5–10min> 10min

Decision Trees

Peer Not Established

Peer not in Established state
├── State: Idle
│   ├── Admin shut? → Check config for "neighbor shutdown" / "deactivate"
│   ├── No route to peer? → Check IGP/static route to peer address
│   ├── Prefix-limit exceeded? → Check logs for max-prefix teardown
│   └── AS mismatch? → Verify "remote-as" matches peer's local AS
│
├── State: Connect / Active
│   ├── Peer reachable? → Ping/traceroute peer address
│   │   ├── No → Fix Layer 3 reachability (IGP, static route)
│   │   └── Yes → TCP port 179 blocked?
│   │       ├── ACL on local device? → Check interface/control-plane ACL
│   │       ├── ACL on remote device? → Check remote inbound ACL
│   │       └── Firewall between peers? → Verify TCP/179 permitted both directions
│   └── Peer configured? → Verify remote has this router as neighbor
│
├── State: OpenSent
│   ├── Remote not sending OPEN → Peer may not be configured for this neighbor
│   ├── TCP resets after connect → Check for TTL issues (eBGP multihop)
│   └── Authentication? → Verify MD5/TCP-AO passwords match both sides
│
├── State: OpenConfirm
│   ├── Capability mismatch? → Check AFI/SAFI (IPv4/IPv6/VPNv4) match
│   ├── AS mismatch in OPEN? → Verify configured AS matches OPEN AS
│   ├── Hold timer = 0 on one side? → Both peers must agree or both use 0
│   └── Check NOTIFICATION message → Decode error code/subcode
│
└── Established but dropping
    ├── Hold timer expiry? → Keepalives not arriving (CPU, QoS, path issue)
    ├── NOTIFICATION received? → Decode error code for root cause
    ├── Route refresh storm? → Peer sending excessive route-refresh requests
    └── Max-prefix limit? → Peer sending more prefixes than limit allows

Unexpected Route Selection

Wrong path selected for prefix
├── Check Weight (Cisco/EOS only)
│   └── Weight set via route-map? → Highest weight wins
├── Check Local Preference
│   └── Local pref differs? → Set via inbound route-map; highest wins
├── Check AS Path Length
│   ├── AS prepending applied? → Verify prepend count
│   └── AS path differs? → Shortest wins
├── Check Origin
│   └── IGP vs Incomplete? → IGP (network statement) preferred
├── Check MED
│   ├── MED comparison enabled across AS? → "always-compare-med"
│   └── MED set correctly? → Lowest wins within same neighbor AS
├── Check eBGP vs iBGP
│   └── External path preferred over internal if equal above
├── Check IGP metric to next-hop
│   └── Closest exit wins (hot-potato routing)
└── All equal → Lowest Router ID wins (or oldest route if stable)

Report Template

BGP ANALYSIS REPORT
====================
Device: [hostname]
Vendor: [Cisco | JunOS | EOS]
Check Time: [timestamp]
Performed By: [operator/agent]

SESSION STATUS:
- Total configured peers: [n]
- Established: [n] | Not Established: [n]
- Peers requiring attention: [list with FSM states]

FINDINGS:
1. [Severity] [Category] — [Description]
   Peer: [neighbor address / AS]
   Observed: [state or metric]
   Expected: [normal state or value]
   Root Cause: [diagnosis from decision tree]
   Action: [recommended remediation]

PATH ANALYSIS:
- Prefix: [prefix under review]
- Selected path via: [next-hop / AS path]
- Selecting attribute: [which best-path attribute decided]
- Expected path: [if different, what was expected and why]

ROUTE TABLE SUMMARY:
- IPv4 prefixes received: [total across all peers]
- Baseline deviation: [% change from expected]

RECOMMENDATIONS:
- [Prioritized action list]

NEXT CHECK: [based on severity — CRITICAL: 4hr, WARNING: 24hr, HEALTHY: 7d]

Troubleshooting

Session Flapping

Peer cycles between Established and Idle/Active repeatedly. Common causes: unstable underlying transport (IGP flap, link errors), aggressive hold timers on congested control planes, or MTU issues on the path causing fragmented keepalives to be dropped. Check last reset reason and correlate with interface or IGP events at the same timestamps.

Route Oscillation

The same prefix alternates between two or more paths. Caused by inconsistent MED comparison across route reflectors, or deterministic-MED not enabled when multiple exit points exist to the same neighbor AS. Enable always-compare-med and deterministic-med to stabilize.

Memory Pressure from Full Table

Full Internet table (~950K IPv4 prefixes) requires 1–2 GB of RIB memory depending on path diversity. Symptoms: slow convergence, peer resets during table reload. Mitigate with soft-reconfiguration inbound (trades memory for stability) or ORF (Outbound Route Filtering) to reduce inbound load.

Community Stripping

Routes arrive without expected communities. Check each transit AS in the path — many providers strip non-standard communities by default. Use large communities (RFC 8092) for end-to-end propagation across providers that strip standard communities.

JunOS Default Export Policy

JunOS sends no routes to a peer without an explicit export policy. If a peer shows Established with zero prefixes sent, add an export policy. This is the most common JunOS-specific BGP issue and does not occur on Cisco or EOS.

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

77.07%
按下载量换算1,239

安全审计

VirusTotal

通过

ClawScan

通过

Static analysis

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills