Skip to content

carapace-sh/carapace-bin / skills/iproute2

iproute2

Verified

Use when working with the Linux iproute2 networking commands — ip, ss, bridge, tc, and related tools. Covers the ip command argument structure, object types (address, link, route, rule, neighbour, tunnel, xfrm, netns, mptcp, ioam, l2tp, etc.), subcommands, selectors, and value types. Triggers on: "iproute2", "ip command", "ip address", "ip link", "ip route", "ip rule", "ip neighbour", "ip neigh", "ip tunnel", "ip xfrm", "ip netns", "ip mptcp", "ip ioam", "ip l2tp", "ip vrf", "ip token", "ip ntable", "ip tcp_metrics", "ip maddress", "ip mroute", "ip mrule", "ip addrlabel", "ip tuntap", "ip monitor", "ip stats", "ip nexthop", "ip netconf", "ip fou", "ip macsec", "ip sr", "ss command", "bridge command", "tc command", "IFADDR", "CONFFLAG", "SELECTOR", "ROUTE", "NUD state", "addrlabel", "ipproto".

FileKindSize
SKILL.mdskill md5.7 KB
references/address.mdmarkdown3.7 KB
references/link.mdmarkdown4.6 KB
references/misc.mdmarkdown10.1 KB
references/neighbour.mdmarkdown2.3 KB
references/netns.mdmarkdown1.4 KB
references/overview.mdmarkdown4.7 KB
references/route.mdmarkdown5.4 KB
references/rule.mdmarkdown4.3 KB
references/tunnel.mdmarkdown2.8 KB
references/xfrm.mdmarkdown2.7 KB

references/xfrm.md

View on GitHub
# ip xfrm — IPsec Transform Management

Manage IPsec Security Associations (SAD) and Security Policies (SPD).

## Object Structure

```
ip xfrm { state | policy | monitor } { COMMAND | help }
```

## state (Security Association Database — SAD)

### Commands

| Command | Description |
|---------|-------------|
| `add` | Add a new SA |
| `update` | Update an existing SA |
| `allocspi` | Allocate an SPI |
| `delete` | Delete an SA |
| `get` | Get an SA |
| `deleteall` | Delete all SAs matching criteria |
| `list` | List SAs |
| `flush` | Flush all SAs |
| `count` | Count SAs |

### ID

```
ID := [ src ADDR ] [ dst ADDR ] [ proto XFRM-PROTO ] [ spi SPI ]
```

### XFRM-PROTO

| Value | Description |
|-------|-------------|
| `esp` | Encapsulating Security Payload |
| `ah` | Authentication Header |
| `comp` | IP Payload Compression |
| `route2` | Route header (IPv6) |
| `hao` | Home Address Option (IPv6) |

### MODE

| Value | Description |
|-------|-------------|
| `transport` | Transport mode |
| `tunnel` | Tunnel mode |
| `beet` | Bound End-to-End Tunnel |
| `ro` | Route Optimization |
| `in_trigger` | In trigger |

### ALGO

```
ALGO := { enc | auth } ALGO-NAME ALGO-KEYMAT |
        auth-trunc ALGO-NAME ALGO-KEYMAT ALGO-TRUNC-LEN |
        aead ALGO-NAME ALGO-KEYMAT ALGO-ICV-LEN |
        comp ALGO-NAME
```

### FLAG

`noecn` | `decap-dscp` | `nopmtudisc` | `wildrecv` | `icmp` | `af-unspec` | `align4` | `esn`

### ENCAP

```
ENCAP := { espinudp | espinudp-nonike | espintcp } SPORT DPORT OADDR
```

### dir (SA direction)

`in` | `out`

## policy (Security Policy Database — SPD)

### Commands

| Command | Description |
|---------|-------------|
| `add` | Add a new policy |
| `update` | Update a policy |
| `delete` | Delete a policy |
| `get` | Get a policy |
| `deleteall` | Delete all policies |
| `list` | List policies |
| `flush` | Flush all policies |
| `count` | Count policies |
| `set` | Set policy thresholds (`hthresh4 LBITS RBITS`, `hthresh6 LBITS RBITS`) |
| `setdefault` | Set default policy |
| `getdefault` | Get default policy |

### SELECTOR

```
SELECTOR := [ src ADDR[/PLEN] ] [ dst ADDR[/PLEN] ] [ dev DEV ] [ UPSPEC ]
```

### dir (policy direction)

`in` | `out` | `fwd`

### ptype

`main` | `sub`

### action

`allow` | `block`

### TMPL

```
TMPL := ID [ mode MODE ] [ reqid REQID ] [ level LEVEL ]
LEVEL := required | use
```

### LIMIT

```
LIMIT := { time-soft | time-hard | time-use-soft | time-use-hard } SECONDS |
         { byte-soft | byte-hard } SIZE |
         { packet-soft | packet-hard } COUNT
```

## monitor

```
ip xfrm monitor [ all-nsid ] [ nokeys ] [ all | LISTofXFRM-OBJECTS ]
LISTofXFRM-OBJECTS := acquire | expire | SA | policy | aevent | report
```

## References

- [ip-xfrm(8)](https://man7.org/linux/man-pages/man8/ip-xfrm.8.html)
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall