iproute2

Reference the argument structure, object types, and subcommands of Linux iproute2 networking commands.

1.9k|142|Updated Apr 20, 2020
One-click install
npx skills add https://github.com/carapace-sh/carapace-bin --skill iproute2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: iproute2
Source: https://github.com/carapace-sh/carapace-bin/tree/main/skills/iproute2
Command: npx skills add https://github.com/carapace-sh/carapace-bin --skill iproute2

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The iproute2 toolkit (ip, ss, bridge, tc) has a dense, hard-to-remember syntax with dozens of object types, selectors, and value formats. This Skill provides structured reference material so you can construct correct iproute2 commands without digging through man pages.

Core Features & Use Cases

  • Complete ip object coverage: Documents all ip object types including address, link, route, rule, neighbour, tunnel, xfrm, netns, mptcp, l2tp, vrf, and more.
  • Keyword-driven reference routing: A lookup table maps keywords (e.g. NUD state, SELECTOR, IFADDR, ENCAP) to the correct reference file for fast answers.
  • Syntax and value tables: Each reference lists commands, aliases, value-taking keywords, boolean flags, and valid enumerated values.
  • Use Case: When writing a shell script that adds a policy routing rule with fwmark and a specific table, consult the rule reference to get the exact SELECTOR and ACTION syntax right the first time.

Quick Start

Ask the AI to show the correct syntax for adding an IP address with a specific scope and lifetime using the ip command.

Frequently Asked Questions about iproute2

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an IP address with the ip command?

Use ip address add with a PREFIX like 192.168.1.1/24 followed by dev and the interface name. Optional keywords include broadcast, label, scope (host, link, global), lifetime values, and flags such as nodad or noprefixroute.

What object types does the ip command support?

The ip command supports objects including address, link, route, rule, neighbour, tunnel, xfrm, netns, maddress, mroute, mptcp, l2tp, vrf, tuntap, nexthop, ntable, token, tcp_metrics, ioam, fou, macsec, netconf, sr, stats, and monitor.

What NUD states are valid for ip neighbour entries?

Valid NUD states are permanent, noarp, reachable, stale, none, incomplete, delay, probe, and failed. These states describe the reachability lifecycle of ARP and NDISC cache entries and can be used for filtering with show or flush.

How do I create a policy routing rule with ip rule?

Use ip rule add with selectors such as from, to, fwmark, iif, oif, ipproto, sport, or dport, then an action like table, nat, or goto. Selectors match packets while actions determine which routing table is consulted.

What tunnel modes does ip tunnel support?

Supported tunnel modes are ipip, gre, sit, isatap, vti, ip6ip6, ipip6, ip6gre, vti6, and any. Each mode is set with the mode keyword alongside remote and local endpoint addresses, keys, TTL, and checksum options.

Does the ip command support JSON output?

Yes, the -j or -json global option produces JSON output, and -p or -pretty pretty-prints it. Other global options include -brief for tabular output, -oneline for single-line records, and -color for colored output.