gateway-diagnostics
Skill235 starsChanged 6 months agoApache-2.0View on GitHub
Show and ping the gateway of a network interface, on a Kubernetes node or inside a pod's network namespace. Auto-detects the gateway from the routing table (ip -j route), reports interface type (RoCE / Ethernet / IB), and tests reachability with ping. Use for default-route / gateway questions, network reachability checks, RoCE/RDMA data-path validation, and "can this node/pod reach its gateway" investigations.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- kbc/CLAUDE.mdCLAUDE.md
- cluster-eventsSkill
- deployment-rollout-debugSkill
- dns-debugSkill
- hpa-debugSkill
- http-log-statsSkill
- image-pull-debugSkill
- ingress-debugSkill
- job-debugSkill
- networkpolicy-debugSkill
- node-health-checkSkill
- node-logsSkill
- pod-crash-debugSkill
- pod-pending-debugSkill
- pvc-debugSkill
- quota-debugSkill
- service-debugSkill
- statefulset-debugSkill
- volcano-diagnose-podSkill
- volcano-gang-schedulingSkill
- volcano-job-diagnoseSkill
- volcano-node-resourcesSkill
- volcano-queue-diagnoseSkill
- volcano-resource-insufficientSkill
- volcano-scheduler-configSkill
- volcano-scheduler-logsSkill
- manage-skillSkill
- skill-authoringSkill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 32
Prefer host_script when the node is a bound SSH host (check host_list) — it runs over SSH with no debug pod.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Gateway Diagnostics
Inspect and test the gateway of a network interface. Two operations, one script each; both run identically on a node or inside a pod — the only difference is how you launch them (see Targets below).
Router
| Need | Action |
| See the gateway / default route for an interface (with TYPE) | scripts/show-gateway.sh |
| Test whether the gateway is reachable | scripts/ping-gateway.sh |
| Target is a node (or a bound SSH host) | run directly — see Node target |
| Target is a pod | resolve the netns first — see Pod target |
| Switchdev PF caveat, or what RoCE/Ethernet/IB means | read references/switchdev-and-interface-types.md |
Targets
Node target
Prefer host_script when the node is a bound SSH host (check host_list) — it
runs over SSH with no debug pod. Fall back to node_script otherwise. Both take
the same skill / script / args.
host_script: host="<host>", skill="gateway-diagnostics", script="show-gateway.sh", args="<args>"
node_script: node="<node>", skill="gateway-diagnostics", script="show-gateway.sh", args="<args>"Pod target
Runs in the pod's network namespace using host tools — one step: pass pod
(+ namespace) and node_script resolves the node and enters the pod's netns
for you:
node_script: pod="<pod>", namespace="<ns>", skill="gateway-diagnostics", script="ping-gateway.sh", args="<args>"
node_scriptresolves the pod → node + netns internally and runs the script in the pod's network namespace. The same script file serves both node and pod targets.
Parameters
show-gateway.sh
| Parameter | Required | Description |
--interface IFACE | no | Network interface name. If omitted, shows all. |
--json | no | Output in JSON format (adds a type field per gateway). |
ping-gateway.sh
| Parameter | Required | Description |
--interface IFACE | yes | Network interface to find the gateway for |
--source-ip | no | flag — auto-detect IP from the interface, use as ping source (-I <ip>) |
--source-dev | no | flag — use the interface name as ping source (-I <iface>) |
--count N | no | Number of ping packets (default: 3) |
--source-ip and --source-dev are mutually exclusive flags (no value needed).
Examples
Show all gateways on a node:
node_script: node="nodepool-061", skill="gateway-diagnostics", script="show-gateway.sh"Show one interface's gateway on a bound host:
host_script: host="nodepool-061", skill="gateway-diagnostics", script="show-gateway.sh", args="--interface eth0"Ping a node's gateway, sourcing from the interface IP:
node_script: node="nodepool-061", skill="gateway-diagnostics", script="ping-gateway.sh", args="--interface bond0 --source-ip"Show / ping a pod's gateway (one step — pod resolves node + netns):
node_script: pod="rdma-pod", namespace="rdma-test", skill="gateway-diagnostics", script="show-gateway.sh", args="--interface net1 --json"
node_script: pod="rdma-pod", namespace="rdma-test", skill="gateway-diagnostics", script="ping-gateway.sh", args="--interface net1 --source-dev"Interface types & switchdev
The output includes a TYPE column (RoCE / Ethernet / IB). If a target interface
is a PF in switchdev mode, gateway routes are not meaningful and ping will
always fail — this is expected, not a network problem. For the detection logic
and what to do instead (use a RoCE pod + the pod target), read
references/switchdev-and-interface-types.md.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

