
alibabacloud-network-reachability-analysis
Perform Alibaba Cloud NIS (Network Intelligence Service) network path reachability analysis with forward/reverse path diagnosis, topology visualization, and resource monitoring. Use when analyzing network connectivity, diagnosing unreachable paths, checking security groups or route tables, or visualizing network topology between cloud resources. Triggers: "reachability analysis", "network path analysis", "NIS analysis", "connectivity diagnosis", "path reachable", "network troubleshooting", "可达性分析", "网络路径分析", "NIS分析", "连通性诊断", "路径可达", "网络排障".
- Installs
- 275
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-network-reachability-analysis- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads alibabacloud-network-reachability-analysis automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
NIS Network Reachability Analysis / NIS 网络可达性分析
Language / 语言: Respond in the same language the user uses. If the user speaks Chinese, use the Chinese (zh-CN) prompts below. If the user speaks English, use the English (en) prompts below.
Guides an agent through interactive network reachability analysis using Alibaba Cloud NIS. Covers forward/reverse path analysis, topology visualization (Mermaid), and monitoring diagnostics for resources along the path.
Architecture: NIS (CreateAndAnalyzeNetworkPath + GetNetworkReachableAnalysis) + CloudMonitor (DescribeMetricData)
⚠️ CRITICAL / 关键: READ-ONLY OPERATIONS ONLY
This skill performs read-only network diagnostics. DO NOT create, modify, or delete any cloud resources.
本技能仅执行只读网络诊断操作。严禁创建、修改或删除任何云资源。
Allowed:
CreateAndAnalyzeNetworkPath,GetNetworkReachableAnalysis,DescribeMetricData,Describe*APIs允许:分析任务创建与查询、监控数据查询、Describe* 类查询 API
Forbidden:
Create*(exceptCreateAndAnalyzeNetworkPath),Modify*,Delete*,Start*,Stop*,Run*APIs禁止:创建类 API(除
CreateAndAnalyzeNetworkPath外)、修改、删除、启停、执行类 API
Installation
Pre-check: Aliyun CLI >= 3.3.1 required Run
aliyun versionto verify >= 3.3.1. If not installed or version too low, see references/cli-installation-guide.md for installation instructions. Then [MUST] runaliyun configure set --auto-plugin-install trueto enable automatic plugin installation.
aliyun version
aliyun configure set --auto-plugin-install true
Authentication
Pre-check: Alibaba Cloud Credentials Required
Security Rules:
- NEVER read, echo, or print AK/SK values (e.g.,
echo $ALIBABA_CLOUD_ACCESS_KEY_IDis FORBIDDEN)- NEVER ask the user to input AK/SK directly in the conversation or command line
- NEVER use
aliyun configure setwith literal credential values- ONLY use
aliyun configure listto check credential statusaliyun configure list --user-agent AlibabaCloud-Agent-SkillsCheck the output for a valid profile (AK, STS, or OAuth identity).
If no valid profile exists, STOP here.
- Obtain credentials from Alibaba Cloud Console
- Configure credentials outside of this session (via
aliyun configurein terminal or environment variables in shell profile)- Return and re-run after
aliyun configure listshows a valid profile
RAM Permissions
See references/ram-policies.md for the full RAM policy.
Required actions: nis:CreateAndAnalyzeNetworkPath, nis:GetNetworkReachableAnalysis, cms:DescribeMetricData.
Parameter Confirmation
IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., RegionId, instance IDs, IP addresses, protocol, ports, resource types, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.
Collect the following parameters interactively:
| Parameter | Required | Description (EN) | 说明 (ZH) | Default |
|---|---|---|---|---|
| RegionId | Yes | Region of the analysis task | 分析任务所在地域 | — |
| SourceType | Yes | ecs, vsw, internetIp, vpn, vbr | 源端类型 | — |
| SourceId | Yes | Source resource ID (or public IP if internetIp) | 源资源 ID(公网 IP 类型直接填 IP) | — |
| SourceIpAddress | Conditional | On-Premise IP, required for vpn/vbr | 云下私网 IP,vpn/vbr 时必填 | — |
| TargetType | Yes | ecs, vsw, internetIp, vpn, vbr, clb | 目的端类型 | — |
| TargetId | Yes | Target resource ID (or public IP if internetIp) | 目的资源 ID(公网 IP 类型直接填 IP) | — |
| TargetIpAddress | Conditional | On-Premise IP, required for vpn/vbr | 云下私网 IP,vpn/vbr 时必填 | — |
| Protocol | Yes | tcp, udp, or icmp | 协议类型 | — |
| TargetPort | Conditional | Required for tcp/udp | tcp/udp 时必填 | — |
| SourcePort | Optional | Source port | 源端口 | — |
Interactive Collection Logic / 交互收集逻辑
Use the prompts matching the user's language:
Step 1 — Ask resource types / 询问资源类型
| EN | ZH |
|---|---|
| "What is the source resource type? (ecs / vsw / internetIp / vpn / vbr)" | "请问源端资源类型是什么?(ecs / vsw / internetIp / vpn / vbr)" |
| "What is the target resource type? (ecs / vsw / internetIp / vpn / vbr / clb)" | "请问目的端资源类型是什么?(ecs / vsw / internetIp / vpn / vbr / clb)" |
Step 2 — Type-specific prompts / 按类型提示
| Condition | EN Prompt | ZH Prompt |
|---|---|---|
internetIp | "For public IP analysis, please provide the public IP address directly as the ID." | "分析公网路径时,请直接提供公网 IP 地址作为 ID 传入。" |
vpn / vbr | "For hybrid cloud analysis, besides the resource ID, please also provide the On-Premise IP (private IP on your side)." | "连接云下环境时,除了资源 ID,请务必提供您的云下私网 IP (On-Premise IP) 以确保分析准确。" |
Step 3 — Protocol & ports / 协议和端口
| EN | ZH |
|---|---|
| "What protocol? (tcp / udp / icmp) And what is the target port?" | "请问使用什么协议?(tcp / udp / icmp)目的端口是多少?" |
Core Workflow
Step 1: Forward Path Analysis / 正向路径分析
aliyun nis create-and-analyze-network-path \
--source-id <SourceId> \
--source-type <SourceType> \
--target-id <TargetId> \
--target-type <TargetType> \
--protocol <Protocol> \
--target-port <TargetPort> \
--source-ip-address <SourceIpAddress> \
--target-ip-address <TargetIpAddress> \
--region <RegionId> \
--user-agent AlibabaCloud-Agent-Skills
Omit
--source-ip-address/--target-ip-addressif SourceType/TargetType is notvpnorvbr. Omit--target-portif Protocol isicmp.
Record the returned NetworkReachableAnalysisId.
⚠️ MANDATORY / 强制: ALWAYS perform reverse path analysis after forward analysis completes.
MUST execute Step 3 (Reverse Path Analysis) immediately after Step 2 finishes. Do NOT skip or omit reverse path check.
必须在正向分析完成后立即执行 Step 3(反向路径分析)。严禁跳过或省略反向路径检查。
Step 2: Poll for Forward Result / 轮询正向结果
aliyun nis get-network-reachable-analysis \
--network-reachable-analysis-id <ForwardAnalysisId> \
--region <RegionId> \
--user-agent AlibabaCloud-Agent-Skills
Repeat until NetworkReachableAnalysisStatus is finish. Extract Reachable, NetworkReachableAnalysisResult.
Step 3: Reverse Path Analysis / 反向路径分析
Swap source and target / 交换源和目的:
- Forward
SourceId/Type→ ReverseTargetId/Type - Forward
TargetId/Type→ ReverseSourceId/Type - Forward
SourceIpAddress→ ReverseTargetIpAddress - Forward
TargetIpAddress→ ReverseSourceIpAddress
Port handling / 端口处理:
- Reverse
--source-port= ForwardTargetPort(server listening port / 服务端监听端口) - Reverse
--target-port= Random ephemeral port in range 49152 ~ 65535 (client ephemeral port / 客户端随机端口)
Since the client initiates the connection with a dynamically assigned ephemeral port, the reverse path (server → client) should use a random port in the ephemeral range (49152-65535) as the target port to simulate real return traffic.
由于客户端发起连接时使用动态分配的临时端口,反向路径(服务端→客户端)的目的端口应使用临时端口范围(49152-65535)内的随机值来模拟真实回程流量。
aliyun nis create-and-analyze-network-path \
--source-id <OriginalTargetId> \
--source-type <OriginalTargetType> \
--target-id <OriginalSourceId> \
--target-type <OriginalSourceType> \
--protocol <Protocol> \
--source-port <OriginalTargetPort> \
--target-port <RandomPort_49152_to_65535> \
--source-ip-address <OriginalTargetIpAddress> \
--target-ip-address <OriginalSourceIpAddress> \
--region <RegionId> \
--user-agent AlibabaCloud-Agent-Skills
Omit
--source-ip-address/--target-ip-addressif SourceType/TargetType is notvpnorvbr. 若源/目的类型不是vpn或vbr,可省略--source-ip-address/--target-ip-address。
Step 4: Poll for Reverse Result / 轮询反向结果
Same as Step 2, using the reverse NetworkReachableAnalysisId.
Step 5: Result Interpretation / 结果解读
CRITICAL / 关键: Always use
topologyData.positivefrom the actively initiated analysis task. IGNOREtopologyData.reversein any response — it is unreliable.始终使用主动发起的分析任务返回的
topologyData.positive。 忽略任何响应中的topologyData.reverse——它不可靠。
For each direction (forward/reverse) / 对正向和反向分别:
- Check
Reachablefield. Iftrue, path is connected. / 检查Reachable字段,true表示可达。 - If
false, analyze fromNetworkReachableAnalysisResult: / 若为false,分析以下字段定位阻断点:errorCode— root cause code / 根因错误码securityGroupData— security group rules blocking traffic / 安全组拦截规则routeData— route table entries causing drops / 路由表丢包条目
Step 6: Topology Visualization / 拓扑可视化 (Mermaid)
Generate a Mermaid diagram from topologyData.positive:
graph LR
- Nodes: Extract
nodeTypeandbizInsIdfromnodeList - Links: Build directional edges from
linkList
Example:
graph LR
ECS_i-src["ECS: i-bp1xxx"] --> VRouter_vrt-1["VRouter: vrt-xxx"]
VRouter_vrt-1 --> VSW_vsw-1["VSW: vsw-xxx"]
VSW_vsw-1 --> ENI_eni-1["ENI: eni-xxx"]
ENI_eni-1 --> ECS_i-dst["ECS: i-bp2xxx"]
Step 7: Resource Monitoring Diagnostics / 途经资源监控诊断
For resource IDs found in topologyData, if they match the prefixes below, query monitoring data for the last 1 hour:
对 topologyData 中途经的资源 ID,若匹配以下前缀,查询最近 1 小时监控数据:
| Prefix | Namespace | Metrics |
|---|---|---|
ecs- | acs_ecs_dashboard | CPUUtilization, ConnectionUtilization, DiskReadWriteIOPSUtilization, BurstCredit, DiskIOQueueSize |
eip- | acs_vpc_eip | out_ratelimit_drop_speed, net_out.rate_percentage, net_rxPkgs.rate |
nat- | acs_nat_gateway | ErrorPortAllocationCount, SessionLimitDropConnection, SessionActiveConnectionWaterLever, SessionNewConnectionWaterLever, BWRateOutToOutside, DropTotalPps |
clb- | acs_slb_dashboard | UnhealthyServerCount, UpstreamCode5xx, InstanceQpsUtilization, InstanceMaxConnectionUtilization, UpstreamRt, StatusCode4xx |
vbr- | acs_physical_connection | VbrHealthyCheckLossPercent, VbrHealthyCheckLatency, PkgsRateLimitDropOutFromVpcToVbr, RateOutFromVpcToIDC |
Query command (CMS uses PascalCase API-style, not plugin mode):
aliyun cms DescribeMetricData \
--Namespace <Namespace> \
--MetricName <MetricName> \
--Dimensions '[{"instanceId":"<ResourceId>"}]' \
--StartTime <1HourAgoTimestamp> \
--EndTime <NowTimestamp> \
--Period 60 \
--user-agent AlibabaCloud-Agent-Skills
Rate limit: 10 calls/second per account. Batch queries across multiple metrics should be paced accordingly.
Cleanup / 清理
NIS reachability analysis is read-only — no cloud resources are created or modified. No cleanup is required. NIS 可达性分析为只读操作——不会创建或修改任何云资源,无需清理。
Constraints / 使用限制
- IPv4 only / 仅支持 IPv4 — Only IPv4 path analysis is supported.
- Unidirectional / 单向分析 — Each analysis is one-way; reverse path requires a separate task with swapped source/target.
- CMS quota / CMS 配额 —
DescribeMetricDatashares 1,000,000 free calls/month with other CMS query APIs. - CMS rate limit / CMS 频控 — 10 calls/second per account (including RAM users).
Best Practices / 最佳实践
- Always perform both forward and reverse analysis to confirm bidirectional connectivity. / 始终执行正向+反向分析以确认双向连通性。
- When path is unreachable, check security group rules and route tables first. / 路径不可达时,优先检查安全组规则和路由表。
- For
vpn/vbrscenarios, always provide On-Premise IP. /vpn/vbr场景务必提供云下私网 IP。 - Use Mermaid topology diagrams to visualize traffic paths. / 使用 Mermaid 拓扑图帮助用户可视化流量路径。
- Query monitoring data only for resources on the actual path. / 仅查询实际路径上的资源监控数据以减少 API 调用。
- Present monitoring anomalies alongside reachability results. / 将监控异常与可达性结果一并呈现,提供完整诊断。
References / 参考文件
| Reference | Contents (EN) | 内容 (ZH) |
|---|---|---|
| references/ram-policies.md | Required RAM permissions | 所需 RAM 权限策略 |
| references/verification-method.md | Step-by-step verification commands | 逐步验证命令 |
| references/acceptance-criteria.md | Correct/incorrect CLI patterns | 正确/错误 CLI 模式对照 |
| references/cli-installation-guide.md | Aliyun CLI installation guide | 阿里云 CLI 安装指南 |
FAQ
What does the alibabacloud-network-reachability-analysis skill do?
Perform Alibaba Cloud NIS (Network Intelligence Service) network path reachability analysis with forward/reverse path diagnosis, topology visualization, and resource monitoring. Use when analyzing network connectivity, diagnosing unreachable paths, checking security groups or route tables, or visualizing network topology between cloud resources. Triggers: "reachability analysis", "network path analysis", "NIS analysis", "connectivity diagnosis", "path reachable", "network troubleshooting", "可达性分析", "网络路径分析", "NIS分析", "连通性诊断", "路径可达", "网络排障".
How do I install alibabacloud-network-reachability-analysis?
Run npx skills add https://github.com/aliyun/alibabacloud-aiops-skills --skill alibabacloud-network-reachability-analysis in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/alibabacloud-network-reachability-analysis/ (personal) or .claude/skills/alibabacloud-network-reachability-analysis/ (project).
Which AI agents can use alibabacloud-network-reachability-analysis?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is alibabacloud-network-reachability-analysis safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains alibabacloud-network-reachability-analysis?
It is published by aliyun in aliyun/alibabacloud-aiops-skills. It has 275 recorded installs.
More from aliyun/alibabacloud-aiops-skills
alibabacloud-find-skills
aliyun/alibabacloud-aiops-skills
Use this skill when users want to search, discover, browse, or find Alibaba Cloud (阿里云) agent skills. Triggers include: "find a skill for X", "search alicloud skills", "阿里云有什么 skill","阿里云", "搜索阿里云技能", "有没有管理 ECS/RDS/OSS 的 skill", "阿里云 skills 有哪些类目", "帮我找一个 skill", "browse alicloud skills", "list alicloud skill categories", "is there an alicloud skill that can...", "what alicloud skills are available", "XX Skill 的内容是什么", "我想了解阿里云 XX Skill 具体做什么","帮我安装阿里云 Skill","使用阿里云相关的skill", "阿里云 agent skill 市场", "搜一下阿里云的 skill", "建一个数据分析项目有没有相关 skill".
alibabacloud-dms-skill
aliyun/alibabacloud-aiops-skills
Alibaba Cloud DMS Database Read/Write Skill. Use this skill to search for target databases in DMS and execute SQL queries and data modifications. Triggers: "DMS query", "database query", "execute SQL", "search database", "DMS SQL", "insert data", "update data".
alibabacloud-sls-query
aliyun/alibabacloud-aiops-skills
Alibaba Cloud SLS (Simple Log Service) log query & analysis skill. Use this skill to help users write, explain, optimize, execute, or troubleshoot SLS index search, SQL analytics, and SPL scan/pipeline statements through the aliyun CLI. Triggers: "SLS 查询", "SLS 分析", "日志查询", "日志分析", "log query", "analyze sls logs", "aliyun log query".
alibabacloud-workbench-cli
aliyun/alibabacloud-aiops-skills
Agent-native CLI for managing ECS instances without public IPs, primarily for single-instance operations. It supports millisecond-level remote command execution, large file transfers up to 1GB, and TCP port forwarding. It offers four authentication modes: AK, RamRoleArn, CredentialsCmd, and CredentialsURI. Use it to run commands, deploy code, view logs, check processes, transfer files, set up port forwarding, or query and filter ECS instance lists.
alibabacloud-ecs-diagnose
aliyun/alibabacloud-aiops-skills
Comprehensive Alibaba Cloud ECS instance diagnostics skill. Performs systematic troubleshooting including cloud platform status checks and GuestOS internal diagnostics via Cloud Assistant. Use when users report server connectivity issues, SSH timeout, instance lag, website unavailability, disk full, CPU/memory alerts, system event notifications, or abnormal instance status. Triggers: "ECS", "instance", "server", "cannot connect", "SSH", "timeout", "slow", "disk full", "network", "CPU high", "memory high", "status check", "system event", "diagnose", "troubleshoot", "disk performance", "disk IO slow", "IOPS", "IO latency"
alibabacloud-cli-guidance
aliyun/alibabacloud-aiops-skills
Guide users to manage Alibaba Cloud resources using the Aliyun CLI command-line tool. Covers CLI installation, credential configuration, plugin management, command construction, and error troubleshooting. Use this skill when the user wants to operate Alibaba Cloud services from the terminal — including ECS (云服务器, cloud servers), Function Compute (函数计算, serverless), RDS (云数据库, databases), OSS (对象存储, object storage), SLS (日志服务, log service), VPC (专有网络, networking), ESS (弹性伸缩, auto scaling), and any other Alibaba Cloud product. Also use when the user mentions "aliyun", "阿里云", "阿里云CLI", "命令行", asks about CLI plugin installation, encounters Aliyun CLI errors (InvalidAccessKeyId, SignatureDoesNotMatch, Throttling), or needs help constructing aliyun commands with correct parameter syntax.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.