帮助排查 BGP 邻居状态、路由交换与策略问题,并安全收集诊断证据。
复制安装指令,让 AI 自动完成配置 · 推荐新手
请帮我安装 askskill 上的 "network-bgp-diagnostics" 技能: 1. 下载 https://raw.githubusercontent.com/affaan-m/ECC/main/skills/network-bgp-diagnostics/SKILL.md 2. 保存为 ~/.claude/skills/network-bgp-diagnostics/SKILL.md 3. 装好后重载技能,告诉我可以用了
请提供仅用于诊断的 BGP 排障步骤,分析邻居卡在 Idle/Active/Connect 状态的常见原因。按“先看什么命令、每条命令要关注什么字段、如何判断是对端配置、链路、ASN、认证或定时器问题”的结构输出,不要给出任何变更命令。
一份只读排障清单,说明应查看的状态、计时器、报文计数和错误线索,以及对应的可能根因。
我需要诊断某个前缀为什么没有从 BGP 邻居收到,或为什么没有被通告出去。请给出只读分析流程,覆盖 prefix-list、route-map、community、next-hop、max-prefix 和 address-family 方向的检查点,并说明每一步能排除什么问题。
一个按策略与路由传播路径组织的诊断流程,帮助定位过滤、属性或地址族配置相关问题。
请生成一套 BGP 取证与分析模板,用于检查某条路由的 AS Path、Local Preference、MED、Origin、下一跳和最佳路径选择依据。要求只包含安全的证据收集命令、输出解读方法,以及适合提交给网络团队的记录模板。
一套规范化的取证模板,包含只读命令、关键字段解释和便于升级处理的记录格式。
Use this skill when a BGP session is down, flapping, established with missing routes, or advertising unexpected prefixes. The default workflow is read-only evidence collection; policy and reset actions belong in a reviewed change window.
show bgp summary
show bgp neighbors <peer>
show ip route <peer>
show tcp brief | include <peer>|:179
show logging | include BGP|<peer>
show running-config | section router bgp
show ip prefix-list
show route-map
Use platform-specific address-family commands when the device uses VRFs, IPv6, VPNv4, or EVPN. Do not assume global IPv4 unicast.
| State | First checks |
|---|---|
| Established with prefix count | Route exchange is up; inspect policy and table selection |
| Established with zero prefixes | Check inbound policy, max-prefix, advertised routes, and AFI/SAFI |
| Active | TCP session is not completing; check routing, source, ACLs, and peer reachability |
| Connect | TCP connection is in progress; check path and remote listener |
| OpenSent/OpenConfirm | TCP works; check ASN, authentication, timers, capabilities, and logs |
| Idle | Neighbor may be disabled, missing config, blocked by policy, or backoff timer |
ping <peer> source <local-source>
traceroute <peer> source <local-source>
show ip route <peer>
show bgp neighbors <peer> | include BGP state|Last reset|Local host|Foreign host
If the peer is sourced from a loopback, confirm both directions route to the loopback addresses and that the neighbor config uses the expected update source.
Avoid disabling ACLs or firewall policy as a diagnostic shortcut. Read hit counters, logs, and path state first.
show bgp neighbors <peer> advertised-routes
show bgp neighbors <peer> routes
show ip prefix-list <name>
show route-map <name>
show bgp <prefix>
Some platforms require additional configuration before received-routes is
available. Do not add that configuration during incident triage unless the
operator approves the change.
show bgp regexp _65001_
show bgp regexp ^65001$
show bgp <prefix>
show bgp neighbors <peer> advertised-routes | include Network|Path|<prefix>
Use AS-path regex carefully. _65001_ matches AS 65001 as a token. Plain
65001 can match longer ASNs or unrelated text.
import re
from typing import Any
BGP_SUMMARY_RE = re.compile(
r"^(?P<neighbor>\d{1,3}(?:\.\d{1,3}){3})\s+"
r"(?P<version>\d+)\s+"
r"(?P<remote_as>\d+)\s+"
r"(?P<msg_rcvd>\d+)\s+"
r"(?P<msg_sent>\d+)\s+"
r"(?P<table_version>\d+)\s+"
r"(?P<input_queue>\d+)\s+"
r"(?P<output_queue>\d+)\s+"
r"(?P<uptime>\S+)\s+"
r"(?P<state_or_prefixes>\S+)$",
re.M,
)
def parse_bgp_summary(raw: str) -> list[dict[str, Any]]:
rows = []
for match in BGP_SUMMARY_RE.finditer(raw):
state_or_prefixes = match.group("state_or_prefixes")
if state_or_prefixes.isdigit():
state = "Established"
prefixes_received = int(state_or_prefixes)
else:
state = state_or_prefixes
prefixes_received = None
rows.append({
…
帮助你用 dmux 编排多智能体并行协作,加速开发与复杂任务执行。
帮助你分叉、脱敏并打包私有项目,安全发布为开源仓库。
为 Spring Boot 项目执行构建、测试、扫描与变更复核的发布前验证流程
帮助开发者在 iOS 26+ 中集成端侧大模型生成、工具调用与流式输出。
读取 ECC 实时仓库信息,指导用户了解代理、技能、命令与项目接入流程
帮助你在 Django 应用中设计、配置并测试 Celery 异步任务与定时作业。
帮助排查常见故障、版本兼容与会话流诊断问题,提升开发调试效率
帮助你定位常见故障、兼容性问题并诊断状态机异常
通过自然语言执行网络诊断与扫描,快速排查连通性、路由和 DNS 问题。
用自然语言查询 Mist 网络资产、客户端与告警信息,辅助日常运维排查。
在部署前校验路由器与交换机配置,提前发现安全与连通性风险。
帮助用户分析 DNP3 协议相关数据,辅助排查通信与协议问题。