Set interface MTU iproute2
Set jumbo MTU and bring link up; note: path MTU must match end-to-end
ip link set dev <name> mtu 9000 && ip link set dev <name> up
more iproute2
all 12 commands →
JSON addr to jq
ip -j a | jq -r '.[] | select(.operstate=="UP") | .ifname + " " + (.addr_info[]?.local // "-")'
Which route is chosen
ip route get <ip>
Source-based policy routing
ip rule add from <ip> table 100 && ip route add default via 192.168.1.1 dev <name> table 100
Run command in netns
ip netns add test && ip netns exec test ip -br a
Inject latency and loss
tc qdisc add dev <name> root netem delay 100ms loss 1% && tc -s qdisc show dev <name>