1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
| Options: -h, -human, -human-readable 显示为可读形式 -b, -batch <FILENAME> 以批处理方式运行,即从文件或标准输入中读取命令,出现错误时将终止命令 -force 在批处理模式下,不要在出现错误时终止ip命令,返回非0状态码 -s, -stats, -statistics 显示更多信息,可重复使用,如-s -s将显示更多信息,注意不能合并为-ss -d, -details 显示详情 -l, -loops <COUNT> Specify maximum number of loops the 'ip address flush' logic will attempt before giving up. The default is 10. Zero (0) means loop until all addresses are removed. -f, -family <FAMILY> 指定协议,可选参数inet(默认), inet6, bridge, ipx, dnet, mpls or link. -4 等同于-family inet. -6 shortcut for -family inet6. -B shortcut for -family bridge. -D shortcut for -family decnet. -I shortcut for -family ipx. -M shortcut for -family mpls. -0 shortcut for -family link. -o, -oneline 在单行上输出每条记录,并用“\”字符替换换行符 -r, -resolve 显示为DNS解析的名称而非主机地址 -n, -netns <NETNS> switches ip to the specified network namespace NETNS. Actually it just simplifies executing of: ip netns exec NETNS ip [ OPTIONS ] OBJECT { COMMAND | help } to ip -n[etns] NETNS [ OPTIONS ] OBJECT { COMMAND | help } -a, -all executes specified command over all objects, it depends if command supports this option. -c, -color 突出显示关键字,如接口名称,IP地址,MAC地址,接口状态等 -t, -timestamp display current time when using monitor option. -ts, -tshort Like -timestamp, but use shorter format. -rc, -rcvbuf<SIZE> Set the netlink socket receive buffer size, defaults to 1MB. -iec print human readable rates in IEC units (e.g. 1Ki = 1024).
OBJECT: 子命令 address - 管理IP地址 addrlabel - 管理IPv6地址标签 l2tp - tunnel ethernet over IP (L2TPv3). link - 管理网络设备 maddress - 管理组播地址 monitor - watch for netlink messages. mroute - multicast routing cache entry. mrule - rule in multicast routing policy database. neighbour - 管理ARP记录 netns - manage network namespaces. ntable - manage the neighbor cache's operation. route - routing table entry. rule - rule in routing policy database. tcp_metrics/tcpmetrics - manage TCP Metrics token - manage tokenized interface identifiers. tunnel - tunnel over IP. tuntap - manage TUN/TAP devices. xfrm - manage IPSec policies.
The names of all objects may be written in full or abbreviated form, for example address can be abbreviated as addr or just a.
|