bgp-config

bgp-config is a skill for Claude Code, Codex from nanxiaoyao/network-huawei-skills. It costs 103 tokens per session (1,913 once invoked), scanned A, original, MIT.

A guide to configuring BGP, a routing protocol that exchanges network paths between routers, on supported Huawei devices. It covers EBGP between different networks and IBGP within one network.

In plain words
What is it for?
Use it for Huawei data-centre spine-leaf networks, VXLAN EVPN underlay routing, dual-ISP connections, cross-network links and large campus core routing.
Why use it?
It provides a structured starting point for setting up BGP without guessing the command sequence or device support. It also flags Huawei device families and scenarios where BGP is unsuitable.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it for Huawei data-centre spine-leaf networks, VXLAN EVPN underlay routing, dual-ISP connections, cross-network links and large campus core routing.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/nanxiaoyao/network-huawei-skills/bgp-config
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add nanxiaoyao/network-huawei-skills --skill bgp-config
Clone the repo
git clone --depth 1 https://github.com/nanxiaoyao/network-huawei-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for bgp-config

README.md
[![agentmods](https://agentmods.dev/badge/skills/nanxiaoyao/network-huawei-skills/bgp-config/github.svg)](https://agentmods.dev/skills/nanxiaoyao/network-huawei-skills/bgp-config)
Your own site
<a href="https://agentmods.dev/skills/nanxiaoyao/network-huawei-skills/bgp-config"><img src="https://agentmods.dev/badge/skills/nanxiaoyao/network-huawei-skills/bgp-config/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for bgp-config

Your own site · 80×15
<a href="https://agentmods.dev/skills/nanxiaoyao/network-huawei-skills/bgp-config"><img src="https://agentmods.dev/badge/skills/nanxiaoyao/network-huawei-skills/bgp-config.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 103 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,913 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00103 $0.01913
Opus 5 $0.00051 $0.00957
Sonnet 5 $0.00021 $0.00383
Haiku 4.5 $0.00010 $0.00191

Measured 12d ago against content hash 2357f6857dda, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-12, from the pricing page.

Security

Grade A, and why

bgp-config scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 12d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

bgp-config/SKILL.md · 163 lines

How it starts

The opening of the file, as written. The whole thing — 163 lines — stays where its author put it; the contents beside it link to each section on GitHub.

BGP 动态路由配置(华为)

触发场景

  • 数据中心 Spine-Leaf 跑 EBGP / IBGP 做底层路由
  • VXLAN EVPN 用 BGP 做控制面
  • 企业出口跑双 ISP 多线接入
  • 跨 AS 互联、与运营商对接
  • 大型园区核心层用 BGP 替代 OSPF 做路由汇聚

平台适用

设备类型 是否支持 典型场景
CloudEngine 数据中心交换机 ✅ 主战场 DCN Spine-Leaf、VXLAN EVPN
USG6000E 防火墙 ✅ 常用 双 ISP 接入、跨地域互联
S 系列接入/汇聚交换机 ❌ 不建议 一般跑 OSPF/静态路由即可

配置六步走(基础 EBGP 邻居建立)

Step 1:规划 AS 号与 router-id

本端 AS:65001
对端 AS:65002(EBGP)/ 65001(IBGP)
Router-ID:建议用 Loopback0 地址(稳定)

Step 2:进入 BGP 视图

[~SwitchA] bgp 65001
[*SwitchA-bgp] router-id 1.1.1.1

Step 3:建立邻居

# EBGP(不同 AS)
[*SwitchA-bgp] peer 10.1.1.2 as-number 65002

# IBGP(相同 AS,通常用 Loopback 建立)
[*SwitchA-bgp] peer 2.2.2.2 as-number 65001
[*SwitchA-bgp] peer 2.2.2.2 connect-interface LoopBack0

Step 4:进入地址族,激活邻居

[*SwitchA-bgp] ipv4-family unicast
[*SwitchA-bgp-af-ipv4] peer 10.1.1.2 enable
[*SwitchA-bgp-af-ipv4] peer 2.2.2.2 enable

Step 5:通告本地路由

# 方式 1:network 精确通告
[*SwitchA-bgp-af-ipv4] network 192.168.10.0 24

# 方式 2:import-route 引入其他协议
[*SwitchA-bgp-af-ipv4] import-route ospf 1
[*SwitchA-bgp-af-ipv4] import-route direct

Step 6:CE 设备必须 commit 提交

[*SwitchA-bgp-af-ipv4] commit

⚠️ CE V200R022+ 是两阶段提交,不 commit 配置不生效。USG 防火墙和 S 交换机不需要。

核心命令体系

类别 命令 说明
启用 bgp <as-number> 启动 BGP 进程
标识 router-id <ip> 设置 router-id(必配)
邻居 peer <ip> as-number <as> 指定邻居 AS
邻居 peer <ip> connect-interface LoopBack0 用 Loopback 建邻居
邻居 peer <ip> ebgp-max-hop <n> EBGP 多跳(Loopback 必配)
激活 peer <ip> enable 在地址族内激活
通告 network <ip> <mask-len> 精确通告路由
引入 import-route <protocol> 引入其他协议路由
反射器 peer <ip> reflect-client 配置路由反射器客户端
团体 peer <ip> advertise-community 通告团体属性
联盟 confederation id <as> 配置 BGP 联盟
认证 peer <ip> password cipher <pwd> MD5 认证
BFD peer <ip> bfd enable 启用 BFD 联动快速收敛

典型场景

场景 1:EBGP + IBGP 全互联(CE 数据中心)

  • SwitchA (AS65001) ←EBGP→ SwitchB (AS65002)
  • SwitchB / SwitchC / SwitchD 之间 IBGP 全互联
  • 关键:IBGP 必须全互联或用反射器,否则路由不传递

Read the full file on GitHub · 163 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 12d ago First seen · 163 lines · 103 tokens per session scan A 2357f6857dda

Subscribe to this mod's changes

bgp-config is a skill published in the GitHub repository nanxiaoyao/network-huawei-skills (2 stars, last pushed 1mo ago), licensed MIT. It adds 103 tokens to every session and 1,913 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

chinese-git-workflow

A reference for configuring Git with Chinese code-hosting services such as Gitee, Coding.net, GitLab China, and CNB, including SSH, HTTPS, credentials, CI, and repository mirroring.

jnMetaCode/superpowers-zh · 69 tokens

chinese-documentation

A Chinese technical-documentation style guide covering spacing, punctuation, numbers, terminology, and links when Chinese and English appear together.

jnMetaCode/superpowers-zh · 62 tokens

patent-map

A tool for making a visual map of stored patent case notes in an Obsidian vault. Obsidian is a note-taking application that stores linked text files.

handsomestWei/patent-disclosure-skill · 48 tokens

seedance-vocab-zh

This skill should be used when the user asks for Chinese Seedance 2.0 prompt wording, Mandarin cinematic vocabulary, Chinese prompt compression, or translation of camera, lighting, action, VFX, audio, and production terms into Chinese.

Emily2040/seedance-2.0 · 55 tokens

percepxion-oob

Manage Lantronix out-of-band (OOB) infrastructure via Percepxion central management platform: device inventory, serial port inspection via SLC CLI, firmware compliance, config management, security auditing, and closed-loop incident remediation. Use during outages, maintenance windows, compliance cycles, and…

automateyournetwork/netclaw · 70 tokens

fmc-firewall-ops

Cisco Secure Firewall FMC — access policy search, rule inspection, FTD device targeting, multi-FMC profile management. Use when searching firewall rules by IP or FQDN, checking if host A can reach host B through the firewall, auditing FMC access policies, or reviewing SGT-based segmentation rules.

automateyournetwork/netclaw · 67 tokens