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-neighbour.8 (6286B)


  1. .TH IP\-NEIGHBOUR 8 "20 Dec 2011" "iproute2" "Linux"
  2. .SH "NAME"
  3. ip-neighbour \- neighbour/arp tables management.
  4. .SH "SYNOPSIS"
  5. .sp
  6. .ad l
  7. .in +8
  8. .ti -8
  9. .B ip
  10. .RI "[ " OPTIONS " ]"
  11. .B neigh
  12. .RI " { " COMMAND " | "
  13. .BR help " }"
  14. .sp
  15. .ti -8
  16. .BR "ip neigh" " { " add " | " del " | " change " | " replace " } { "
  17. .IR ADDR " [ "
  18. .B lladdr
  19. .IR LLADDR " ] [ "
  20. .B nud
  21. .IR STATE " ] |"
  22. .B proxy
  23. .IR ADDR " } [ "
  24. .B dev
  25. .IR DEV " ] [ "
  26. .BR router " ] [ "
  27. .BR use " ] [ "
  28. .BR managed " ] [ "
  29. .BR extern_learn " ]"
  30. .ti -8
  31. .BR "ip neigh" " { " show " | " flush " } [ " proxy " ] [ " to
  32. .IR PREFIX " ] [ "
  33. .B dev
  34. .IR DEV " ] [ "
  35. .B nud
  36. .IR STATE " ] [ "
  37. .B vrf
  38. .IR NAME " ] ["
  39. .BR nomaster " ]"
  40. .ti -8
  41. .B ip neigh get
  42. .IR ADDR
  43. .B dev
  44. .IR DEV
  45. .ti -8
  46. .IR STATE " := {"
  47. .BR permanent " | " noarp " | " stale " | " reachable " | " none " |"
  48. .BR incomplete " | " delay " | " probe " | " failed " }"
  49. .SH DESCRIPTION
  50. The
  51. .B ip neigh
  52. command manipulates
  53. .I neighbour
  54. objects that establish bindings between protocol addresses and
  55. link layer addresses for hosts sharing the same link.
  56. Neighbour entries are organized into tables. The IPv4 neighbour table
  57. is also known by another name - the ARP table.
  58. .P
  59. The corresponding commands display neighbour bindings
  60. and their properties, add new neighbour entries and delete old ones.
  61. .TP
  62. ip neighbour add
  63. add a new neighbour entry
  64. .TP
  65. ip neighbour change
  66. change an existing entry
  67. .TP
  68. ip neighbour replace
  69. add a new entry or change an existing one
  70. .RS
  71. .PP
  72. These commands create new neighbour records or update existing ones.
  73. .TP
  74. .BI to " ADDRESS " (default)
  75. the protocol address of the neighbour. It is either an IPv4 or IPv6 address.
  76. .TP
  77. .BI dev " NAME"
  78. the interface to which this neighbour is attached.
  79. .TP
  80. .BI proxy
  81. indicates whether we are proxying for this neighbour entry
  82. .TP
  83. .BI router
  84. indicates whether neighbour is a router
  85. .TP
  86. .BI use
  87. this neigh entry is in "use". This option can be used to indicate to
  88. the kernel that a controller is using this dynamic entry. If the entry
  89. does not exist, the kernel will resolve it. If it exists, an attempt
  90. to refresh the neighbor entry will be triggered.
  91. .TP
  92. .BI managed
  93. this neigh entry is "managed". This option can be used to indicate to
  94. the kernel that a controller is using this dynamic entry. In contrast
  95. to "use", if the entry does not exist, the kernel will resolve it and
  96. periodically attempt to auto-refresh the neighbor entry such that it
  97. remains in resolved state when possible.
  98. .TP
  99. .BI extern_learn
  100. this neigh entry was learned externally. This option can be used to
  101. indicate to the kernel that this is a controller learnt dynamic entry.
  102. Kernel will not gc such an entry.
  103. .TP
  104. .BI lladdr " LLADDRESS"
  105. the link layer address of the neighbour.
  106. .I LLADDRESS
  107. can also be
  108. .BR "null" .
  109. .TP
  110. .BI nud " STATE"
  111. the state of the neighbour entry.
  112. .B nud
  113. is an abbreviation for 'Neighbour Unreachability Detection'.
  114. The state can take one of the following values:
  115. .RS
  116. .TP
  117. .B permanent
  118. the neighbour entry is valid forever and can be only
  119. be removed administratively.
  120. .TP
  121. .B noarp
  122. the neighbour entry is valid. No attempts to validate
  123. this entry will be made but it can be removed when its lifetime expires.
  124. .TP
  125. .B reachable
  126. the neighbour entry is valid until the reachability
  127. timeout expires.
  128. .TP
  129. .B stale
  130. the neighbour entry is valid but suspicious.
  131. This option to
  132. .B ip neigh
  133. does not change the neighbour state if it was valid and the address
  134. is not changed by this command.
  135. .TP
  136. .B none
  137. this is a pseudo state used when initially creating a neighbour entry or after
  138. trying to remove it before it becomes free to do so.
  139. .TP
  140. .B incomplete
  141. the neighbour entry has not (yet) been validated/resolved.
  142. .TP
  143. .B delay
  144. neighbor entry validation is currently delayed.
  145. .TP
  146. .B probe
  147. neighbor is being probed.
  148. .TP
  149. .B failed
  150. max number of probes exceeded without success, neighbor validation has
  151. ultimately failed.
  152. .RE
  153. .RE
  154. .TP
  155. ip neighbour delete
  156. delete a neighbour entry
  157. .RS
  158. .PP
  159. The arguments are the same as with
  160. .BR "ip neigh add" ,
  161. except that
  162. .B lladdr
  163. and
  164. .B nud
  165. are ignored.
  166. .PP
  167. .B Warning:
  168. Attempts to delete or manually change a
  169. .B noarp
  170. entry created by the kernel may result in unpredictable behaviour.
  171. Particularly, the kernel may try to resolve this address even
  172. on a
  173. .B NOARP
  174. interface or if the address is multicast or broadcast.
  175. .RE
  176. .TP
  177. ip neighbour show
  178. list neighbour entries
  179. .RS
  180. .TP
  181. .BI to " ADDRESS " (default)
  182. the prefix selecting the neighbours to list.
  183. .TP
  184. .BI dev " NAME"
  185. only list the neighbours attached to this device.
  186. .TP
  187. .BI vrf " NAME"
  188. only list the neighbours for given VRF.
  189. .TP
  190. .BI nomaster
  191. only list neighbours attached to an interface with no master.
  192. .TP
  193. .BI proxy
  194. list neighbour proxies.
  195. .TP
  196. .B unused
  197. only list neighbours which are not currently in use.
  198. .TP
  199. .BI nud " STATE"
  200. only list neighbour entries in this state.
  201. .I NUD_STATE
  202. takes values listed below or the special value
  203. .B all
  204. which means all states. This option may occur more than once.
  205. If this option is absent,
  206. .B ip
  207. lists all entries except for
  208. .B none
  209. and
  210. .BR "noarp" .
  211. .RE
  212. .TP
  213. ip neighbour flush
  214. flush neighbour entries
  215. .RS
  216. This command has the same arguments as
  217. .B show.
  218. The differences are that it does not run when no arguments are given,
  219. and that the default neighbour states to be flushed do not include
  220. .B permanent
  221. and
  222. .BR "noarp" .
  223. .PP
  224. With the
  225. .B -statistics
  226. option, the command becomes verbose. It prints out the number of
  227. deleted neighbours and the number of rounds made to flush the
  228. neighbour table. If the option is given
  229. twice,
  230. .B ip neigh flush
  231. also dumps all the deleted neighbours.
  232. .RE
  233. .TP
  234. ip neigh get
  235. lookup a neighbour entry to a destination given a device
  236. .RS
  237. .TP
  238. .BI proxy
  239. indicates whether we should lookup a proxy neighbour entry
  240. .TP
  241. .BI to " ADDRESS " (default)
  242. the prefix selecting the neighbour to query.
  243. .TP
  244. .BI dev " NAME"
  245. get neighbour entry attached to this device.
  246. .RE
  247. .SH EXAMPLES
  248. .PP
  249. ip neighbour
  250. .RS
  251. Shows the current neighbour table in kernel.
  252. .RE
  253. .PP
  254. ip neigh flush dev eth0
  255. .RS
  256. Removes entries in the neighbour table on device eth0.
  257. .RE
  258. .PP
  259. ip neigh get 10.0.1.10 dev eth0
  260. .RS
  261. Performs a neighbour lookup in the kernel and returns
  262. a neighbour entry.
  263. .RE
  264. .SH SEE ALSO
  265. .br
  266. .BR ip (8)
  267. .SH AUTHOR
  268. Original Manpage by Michail Litvak <mci@owl.openwall.com>