logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

ip.8 (9259B)


  1. .TH IP 8 "20 Dec 2011" "iproute2" "Linux"
  2. .SH NAME
  3. ip \- show / manipulate routing, network devices, interfaces and tunnels
  4. .SH SYNOPSIS
  5. .ad l
  6. .in +8
  7. .ti -8
  8. .B ip
  9. .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
  10. .BR help " }"
  11. .sp
  12. .ti -8
  13. .B ip
  14. .RB "[ " -force " ] "
  15. .BI "-batch " filename
  16. .sp
  17. .ti -8
  18. .IR OBJECT " := { "
  19. .BR address " | " addrlabel " | " fou " | " help " | " ila " | " ioam " | "\
  20. l2tp " | " link " | " macsec " | " maddress " | " monitor " | " mptcp " | "\
  21. mroute " | " mrule " | " neighbor " | " neighbour " | " netconf " | "\
  22. netns " | " nexthop " | " ntable " | " ntbl " | " route " | " rule " | "\
  23. sr " | " tap " | " tcpmetrics " | " token " | " tunnel " | " tuntap " | "\
  24. vrf " | " xfrm " }"
  25. .sp
  26. .ti -8
  27. .IR OPTIONS " := { "
  28. \fB\-V\fR[\fIersion\fR] |
  29. \fB\-h\fR[\fIuman-readable\fR] |
  30. \fB\-s\fR[\fItatistics\fR] |
  31. \fB\-d\fR[\fIetails\fR] |
  32. \fB\-r\fR[\fIesolve\fR] |
  33. \fB\-iec\fR |
  34. \fB\-f\fR[\fIamily\fR] {
  35. .BR inet " | " inet6 " | " link " } | "
  36. \fB-4\fR |
  37. \fB-6\fR |
  38. \fB-B\fR |
  39. \fB-0\fR |
  40. \fB-l\fR[\fIoops\fR] { \fBmaximum-addr-flush-attempts\fR } |
  41. \fB\-o\fR[\fIneline\fR] |
  42. \fB\-rc\fR[\fIvbuf\fR] [\fBsize\fR] |
  43. \fB\-t\fR[\fIimestamp\fR] |
  44. \fB\-ts\fR[\fIhort\fR] |
  45. \fB\-n\fR[\fIetns\fR] name |
  46. \fB\-N\fR[\fIumeric\fR] |
  47. \fB\-a\fR[\fIll\fR] |
  48. \fB\-c\fR[\fIolor\fR] |
  49. \fB\-br\fR[\fIief\fR] |
  50. \fB\-j\fR[son\fR] |
  51. \fB\-p\fR[retty\fR] }
  52. .SH OPTIONS
  53. .TP
  54. .BR "\-V" , " -Version"
  55. Print the version of the
  56. .B ip
  57. utility and exit.
  58. .TP
  59. .BR "\-h", " \-human", " \-human-readable"
  60. output statistics with human readable values followed by suffix.
  61. .TP
  62. .BR "\-b", " \-batch " <FILENAME>
  63. Read commands from provided file or standard input and invoke them.
  64. First failure will cause termination of ip.
  65. .TP
  66. .BR "\-force"
  67. Don't terminate ip on errors in batch mode. If there were any errors
  68. during execution of the commands, the application return code will be
  69. non zero.
  70. .TP
  71. .BR "\-s" , " \-stats" , " \-statistics"
  72. Output more information. If the option
  73. appears twice or more, the amount of information increases.
  74. As a rule, the information is statistics or some time values.
  75. .TP
  76. .BR "\-d" , " \-details"
  77. Output more detailed information.
  78. .TP
  79. .BR "\-l" , " \-loops " <COUNT>
  80. Specify maximum number of loops the 'ip address flush' logic
  81. will attempt before giving up. The default is 10.
  82. Zero (0) means loop until all addresses are removed.
  83. .TP
  84. .BR "\-f" , " \-family " <FAMILY>
  85. Specifies the protocol family to use. The protocol family identifier
  86. can be one of
  87. .BR "inet" , " inet6" , " bridge" , " mpls"
  88. or
  89. .BR link .
  90. If this option is not present,
  91. the protocol family is guessed from other arguments. If the rest
  92. of the command line does not give enough information to guess the
  93. family,
  94. .B ip
  95. falls back to the default one, usually
  96. .B inet
  97. or
  98. .BR "any" .
  99. .B link
  100. is a special family identifier meaning that no networking protocol
  101. is involved.
  102. .TP
  103. .B \-4
  104. shortcut for
  105. .BR "-family inet" .
  106. .TP
  107. .B \-6
  108. shortcut for
  109. .BR "\-family inet6" .
  110. .TP
  111. .B \-B
  112. shortcut for
  113. .BR "\-family bridge" .
  114. .TP
  115. .B \-M
  116. shortcut for
  117. .BR "\-family mpls" .
  118. .TP
  119. .B \-0
  120. shortcut for
  121. .BR "\-family link" .
  122. .TP
  123. .BR "\-o" , " \-oneline"
  124. output each record on a single line, replacing line feeds
  125. with the
  126. .B '\e'
  127. character. This is convenient when you want to count records
  128. with
  129. .BR wc (1)
  130. or to
  131. .BR grep (1)
  132. the output.
  133. .TP
  134. .BR "\-r" , " \-resolve"
  135. use the system's name resolver to print DNS names instead of
  136. host addresses.
  137. .TP
  138. .BR "\-n" , " \-netns " <NETNS>
  139. switches
  140. .B ip
  141. to the specified network namespace
  142. .IR NETNS .
  143. Actually it just simplifies executing of:
  144. .B ip netns exec
  145. .IR NETNS
  146. .B ip
  147. .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | "
  148. .BR help " }"
  149. to
  150. .B ip
  151. .RI "-n[etns] " NETNS " [ " OPTIONS " ] " OBJECT " { " COMMAND " | "
  152. .BR help " }"
  153. .TP
  154. .BR "\-N" , " \-Numeric"
  155. Print the number of protocol, scope, dsfield, etc directly instead of
  156. converting it to human readable name.
  157. .TP
  158. .BR "\-a" , " \-all"
  159. executes specified command over all objects, it depends if command
  160. supports this option.
  161. .TP
  162. .BR \-c [ color ][ = { always | auto | never }
  163. Configure color output. If parameter is omitted or
  164. .BR always ,
  165. color output is enabled regardless of stdout state. If parameter is
  166. .BR auto ,
  167. stdout is checked to be a terminal before enabling color output. If
  168. parameter is
  169. .BR never ,
  170. color output is disabled. If specified multiple times, the last one takes
  171. precedence. This flag is ignored if
  172. .B \-json
  173. is also given.
  174. Used color palette can be influenced by
  175. .BR COLORFGBG
  176. environment variable
  177. (see
  178. .BR ENVIRONMENT ).
  179. .TP
  180. .BR "\-t" , " \-timestamp"
  181. display current time when using monitor option.
  182. .TP
  183. .BR "\-ts" , " \-tshort"
  184. Like
  185. .BR \-timestamp ,
  186. but use shorter format.
  187. .TP
  188. .BR "\-rc" , " \-rcvbuf" <SIZE>
  189. Set the netlink socket receive buffer size, defaults to 1MB.
  190. .TP
  191. .BR "\-iec"
  192. print human readable rates in IEC units (e.g. 1Ki = 1024).
  193. .TP
  194. .BR "\-br" , " \-brief"
  195. Print only basic information in a tabular format for better
  196. readability. This option is currently only supported by
  197. .BR "ip addr show ", " ip link show " & " ip neigh show " commands.
  198. .TP
  199. .BR "\-j", " \-json"
  200. Output results in JavaScript Object Notation (JSON).
  201. .TP
  202. .BR "\-p", " \-pretty"
  203. The default JSON format is compact and more efficient to parse but
  204. hard for most users to read. This flag adds indentation for
  205. readability.
  206. .TP
  207. .BR "\-echo"
  208. Request the kernel to send the applied configuration back.
  209. .SH IP - COMMAND SYNTAX
  210. .SS
  211. .I OBJECT
  212. .TP
  213. .B address
  214. - protocol (IP or IPv6) address on a device.
  215. .TP
  216. .B addrlabel
  217. - label configuration for protocol address selection.
  218. .TP
  219. .B fou
  220. - Foo-over-UDP receive port configuration.
  221. .TP
  222. .B ila
  223. - manage identifier locator addresses (ILA).
  224. .TP
  225. .B ioam
  226. - manage IOAM namespaces and IOAM schemas.
  227. .TP
  228. .B l2tp
  229. - tunnel ethernet over IP (L2TPv3).
  230. .TP
  231. .B link
  232. - network device.
  233. .TP
  234. .B macsec
  235. - MACsec device configuration.
  236. .TP
  237. .B maddress
  238. - multicast address.
  239. .TP
  240. .B monitor
  241. - watch for netlink messages.
  242. .TP
  243. .B mptcp
  244. - manage MPTCP path manager.
  245. .TP
  246. .B mroute
  247. - multicast routing cache entry.
  248. .TP
  249. .B mrule
  250. - rule in multicast routing policy database.
  251. .TP
  252. .B neighbour
  253. - manage ARP or NDISC cache entries.
  254. .TP
  255. .B netconf
  256. - network configuration monitoring.
  257. .TP
  258. .B netns
  259. - manage network namespaces.
  260. .TP
  261. .B nexthop
  262. - manage nexthop objects.
  263. .TP
  264. .B ntable
  265. - manage the neighbor cache's operation.
  266. .TP
  267. .B route
  268. - routing table entry.
  269. .TP
  270. .B rule
  271. - rule in routing policy database.
  272. .TP
  273. .B sr
  274. - manage IPv6 segment routing.
  275. .TP
  276. .B stats
  277. - manage and show interface statistics.
  278. .TP
  279. .B tcp_metrics/tcpmetrics
  280. - manage TCP Metrics.
  281. .TP
  282. .B token
  283. - manage tokenized interface identifiers.
  284. .TP
  285. .B tunnel
  286. - tunnel over IP.
  287. .TP
  288. .B tuntap
  289. - manage TUN/TAP devices.
  290. .TP
  291. .B vrf
  292. - manage virtual routing and forwarding devices.
  293. .TP
  294. .B xfrm
  295. - manage IPSec policies.
  296. .PP
  297. The names of all objects may be written in full or
  298. abbreviated form, for example
  299. .B address
  300. can be abbreviated as
  301. .B addr
  302. or just
  303. .B a.
  304. .SS
  305. .I COMMAND
  306. Specifies the action to perform on the object.
  307. The set of possible actions depends on the object type.
  308. As a rule, it is possible to
  309. .BR "add" , " delete"
  310. and
  311. .B show
  312. (or
  313. .B list
  314. ) objects, but some objects do not allow all of these operations
  315. or have some additional commands. The
  316. .B help
  317. command is available for all objects. It prints
  318. out a list of available commands and argument syntax conventions.
  319. .sp
  320. If no command is given, some default command is assumed.
  321. Usually it is
  322. .B list
  323. or, if the objects of this class cannot be listed,
  324. .BR "help" .
  325. .SH ENVIRONMENT
  326. .TP
  327. .B COLORFGBG
  328. If set, it's value is used for detection whether background is dark or
  329. light and use contrast colors for it.
  330. COLORFGBG environment variable usually contains either two or three
  331. values separated by semicolons; we want the last value in either case.
  332. If this value is 0-6 or 8, chose colors suitable for dark background:
  333. COLORFGBG=";0" ip -c a
  334. .SH EXIT STATUS
  335. Exit status is 0 if command was successful, and 1 if there is a syntax error.
  336. If an error was reported by the kernel exit status is 2.
  337. .SH "EXAMPLES"
  338. .PP
  339. ip addr
  340. .RS 4
  341. Shows addresses assigned to all network interfaces.
  342. .RE
  343. .PP
  344. ip neigh
  345. .RS 4
  346. Shows the current neighbour table in kernel.
  347. .RE
  348. .PP
  349. ip link set x up
  350. .RS 4
  351. Bring up interface x.
  352. .RE
  353. .PP
  354. ip link set x down
  355. .RS 4
  356. Bring down interface x.
  357. .RE
  358. .PP
  359. ip route
  360. .RS 4
  361. Show table routes.
  362. .RE
  363. .SH HISTORY
  364. .B ip
  365. was written by Alexey N. Kuznetsov and added in Linux 2.2.
  366. .SH SEE ALSO
  367. .BR ip-address (8),
  368. .BR ip-addrlabel (8),
  369. .BR ip-fou (8),
  370. .BR ip-ioam (8),
  371. .BR ip-l2tp (8),
  372. .BR ip-link (8),
  373. .BR ip-macsec (8),
  374. .BR ip-maddress (8),
  375. .BR ip-monitor (8),
  376. .BR ip-mptcp (8),
  377. .BR ip-mroute (8),
  378. .BR ip-neighbour (8),
  379. .BR ip-netconf (8),
  380. .BR ip-netns (8),
  381. .BR ip-nexthop (8),
  382. .BR ip-ntable (8),
  383. .BR ip-route (8),
  384. .BR ip-rule (8),
  385. .BR ip-sr (8),
  386. .BR ip-stats (8),
  387. .BR ip-tcp_metrics (8),
  388. .BR ip-token (8),
  389. .BR ip-tunnel (8),
  390. .BR ip-vrf (8),
  391. .BR ip-xfrm (8)
  392. .br
  393. .RB "IP Command reference " ip-cref.ps
  394. .SH REPORTING BUGS
  395. Report any bugs to the Network Developers mailing list
  396. .B <netdev@vger.kernel.org>
  397. where the development and maintenance is primarily done.
  398. You do not have to be subscribed to the list to send a message there.
  399. .SH AUTHOR
  400. Original Manpage by Michail Litvak <mci@owl.openwall.com>