]>
Commit | Line | Data |
---|---|---|
985794ad SH |
1 | .TH IP 8 "17 January 2002" "iproute2" "Linux" |
2 | .SH NAME | |
3 | ip \- show / manipulate routing, devices, policy routing and tunnels | |
4 | .SH SYNOPSIS | |
5 | ||
6 | .ad l | |
7 | .in +8 | |
8 | .ti -8 | |
9 | .B ip | |
10 | .RI "[ " OPTIONS " ] " OBJECT " { " COMMAND " | " | |
11 | .BR help " }" | |
12 | .sp | |
13 | ||
14 | .ti -8 | |
15 | .IR OBJECT " := { " | |
4759758c YH |
16 | .BR link " | " addr " | " addrlabel " | " route " | " rule " | " neigh " | "\ |
17 | tunnel " | " maddr " | " mroute " | " monitor " }" | |
985794ad SH |
18 | .sp |
19 | ||
20 | .ti -8 | |
ae9b671d | 21 | .IR OPTIONS " := { " |
985794ad SH |
22 | \fB\-V\fR[\fIersion\fR] | |
23 | \fB\-s\fR[\fItatistics\fR] | | |
24 | \fB\-r\fR[\fIesolve\fR] | | |
25 | \fB\-f\fR[\fIamily\fR] { | |
26 | .BR inet " | " inet6 " | " ipx " | " dnet " | " link " } | " | |
27 | \fB\-o\fR[\fIneline\fR] } | |
28 | ||
df33d7a4 SH |
29 | .ti -8 |
30 | .BI "ip link add link " DEVICE | |
31 | .RB "[ " name " ]" | |
32 | .I NAME | |
33 | .br | |
34 | .RB "[ " txqueuelen | |
35 | .IR PACKETS " ]" | |
36 | .br | |
37 | .RB "[ " address | |
38 | .IR LLADDR " ]" | |
39 | .RB "[ " broadcast | |
40 | .IR LLADDR " ]" | |
41 | .br | |
42 | .RB "[ " mtu | |
43 | .IR MTU " ]" | |
44 | .br | |
45 | .BR type TYPE | |
46 | .RI "[ " ARGS " ]" | |
47 | ||
48 | .ti -8 | |
49 | .IR TYPE " := [ " | |
50 | .BR vlan " | " maclan " | " can " ]" | |
51 | ||
52 | .ti -8 | |
53 | .BI "ip link delete " DEVICE | |
54 | .BI type TYPE | |
55 | .RI "[ " ARGS " ]" | |
56 | ||
985794ad SH |
57 | .ti -8 |
58 | .BI "ip link set " DEVICE | |
59 | .RB "{ " up " | " down " | " arp " { " on " | " off " } |" | |
60 | .br | |
61 | .BR promisc " { " on " | " off " } |" | |
62 | .br | |
ea5dd59c | 63 | .BR allmulticast " { " on " | " off " } |" |
985794ad SH |
64 | .br |
65 | .BR dynamic " { " on " | " off " } |" | |
66 | .br | |
67 | .BR multicast " { " on " | " off " } |" | |
68 | .br | |
69 | .B txqueuelen | |
70 | .IR PACKETS " |" | |
71 | .br | |
72 | .B name | |
73 | .IR NEWNAME " |" | |
74 | .br | |
75 | .B address | |
76 | .IR LLADDR " |" | |
ae9b671d | 77 | .B broadcast |
985794ad SH |
78 | .IR LLADDR " |" |
79 | .br | |
80 | .B mtu | |
e2613dc8 BT |
81 | .IR MTU " |" |
82 | .br | |
83 | .B netns | |
46dab6e9 WM |
84 | .IR PID " |" |
85 | .br | |
86 | .B alias | |
87 | .IR NAME " |" | |
88 | .br | |
89 | .B vf | |
90 | .IR NUM " [" | |
91 | .B mac | |
92 | .IR LLADDR " ] [" | |
93 | .B vlan | |
94 | .IR VLANID " [ " | |
95 | .B qos | |
96 | .IR VLAN-QOS " ] ] [" | |
97 | .B rate | |
98 | .IR TXRATE " ]" | |
985794ad SH |
99 | |
100 | .ti -8 | |
101 | .B ip link show | |
102 | .RI "[ " DEVICE " ]" | |
103 | ||
104 | .ti -8 | |
ae9b671d | 105 | .BR "ip addr" " { " add " | " del " } " |
985794ad SH |
106 | .IB IFADDR " dev " STRING |
107 | ||
108 | .ti -8 | |
109 | .BR "ip addr" " { " show " | " flush " } [ " dev | |
110 | .IR STRING " ] [ " | |
111 | .B scope | |
112 | .IR SCOPE-ID " ] [ " | |
ae9b671d | 113 | .B to |
985794ad SH |
114 | .IR PREFIX " ] [ " FLAG-LIST " ] [ " |
115 | .B label | |
116 | .IR PATTERN " ]" | |
117 | ||
118 | .ti -8 | |
119 | .IR IFADDR " := " PREFIX " | " ADDR | |
120 | .B peer | |
121 | .IR PREFIX " [ " | |
122 | .B broadcast | |
123 | .IR ADDR " ] [ " | |
124 | .B anycast | |
125 | .IR ADDR " ] [ " | |
126 | .B label | |
127 | .IR STRING " ] [ " | |
128 | .B scope | |
129 | .IR SCOPE-ID " ]" | |
130 | ||
131 | .ti -8 | |
132 | .IR SCOPE-ID " := " | |
133 | .RB "[ " host " | " link " | " global " | " | |
134 | .IR NUMBER " ]" | |
135 | ||
136 | .ti -8 | |
137 | .IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG | |
138 | ||
139 | .ti -8 | |
140 | .IR FLAG " := " | |
141 | .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\ | |
a1b9ffcc | 142 | tentative " | " deprecated " | " dadfailed " | " temporary " ]" |
985794ad | 143 | |
4759758c | 144 | .ti -8 |
ae9b671d | 145 | .BR "ip addrlabel" " { " add " | " del " } " prefix |
4759758c YH |
146 | .BR PREFIX " [ " |
147 | .B dev | |
148 | .IR DEV " ] [ " | |
149 | .B label | |
150 | .IR NUMBER " ]" | |
151 | ||
152 | .ti -8 | |
153 | .BR "ip addrlabel" " { " list " | " flush " }" | |
154 | ||
985794ad SH |
155 | .ti -8 |
156 | .BR "ip route" " { " | |
157 | .BR list " | " flush " } " | |
158 | .I SELECTOR | |
159 | ||
160 | .ti -8 | |
ae9b671d | 161 | .B ip route get |
985794ad SH |
162 | .IR ADDRESS " [ " |
163 | .BI from " ADDRESS " iif " STRING" | |
ae9b671d | 164 | .RB " ] [ " oif |
985794ad SH |
165 | .IR STRING " ] [ " |
166 | .B tos | |
167 | .IR TOS " ]" | |
168 | ||
169 | .ti -8 | |
170 | .BR "ip route" " { " add " | " del " | " change " | " append " | "\ | |
171 | replace " | " monitor " } " | |
172 | .I ROUTE | |
173 | ||
174 | .ti -8 | |
175 | .IR SELECTOR " := " | |
176 | .RB "[ " root | |
177 | .IR PREFIX " ] [ " | |
178 | .B match | |
179 | .IR PREFIX " ] [ " | |
180 | .B exact | |
181 | .IR PREFIX " ] [ " | |
182 | .B table | |
183 | .IR TABLE_ID " ] [ " | |
184 | .B proto | |
185 | .IR RTPROTO " ] [ " | |
186 | .B type | |
187 | .IR TYPE " ] [ " | |
188 | .B scope | |
189 | .IR SCOPE " ]" | |
190 | ||
191 | .ti -8 | |
192 | .IR ROUTE " := " NODE_SPEC " [ " INFO_SPEC " ]" | |
193 | ||
194 | .ti -8 | |
195 | .IR NODE_SPEC " := [ " TYPE " ] " PREFIX " [" | |
196 | .B tos | |
197 | .IR TOS " ] [ " | |
198 | .B table | |
199 | .IR TABLE_ID " ] [ " | |
200 | .B proto | |
201 | .IR RTPROTO " ] [ " | |
202 | .B scope | |
203 | .IR SCOPE " ] [ " | |
204 | .B metric | |
205 | .IR METRIC " ]" | |
206 | ||
207 | .ti -8 | |
208 | .IR INFO_SPEC " := " "NH OPTIONS FLAGS" " [" | |
209 | .B nexthop | |
210 | .IR NH " ] ..." | |
211 | ||
212 | .ti -8 | |
213 | .IR NH " := [ " | |
214 | .B via | |
215 | .IR ADDRESS " ] [ " | |
216 | .B dev | |
217 | .IR STRING " ] [ " | |
218 | .B weight | |
219 | .IR NUMBER " ] " NHFLAGS | |
220 | ||
221 | .ti -8 | |
222 | .IR OPTIONS " := " FLAGS " [ " | |
223 | .B mtu | |
224 | .IR NUMBER " ] [ " | |
225 | .B advmss | |
226 | .IR NUMBER " ] [ " | |
227 | .B rtt | |
54e0b2e7 | 228 | .IR TIME " ] [ " |
985794ad | 229 | .B rttvar |
54e0b2e7 | 230 | .IR TIME " ] [ " |
985794ad SH |
231 | .B window |
232 | .IR NUMBER " ] [ " | |
233 | .B cwnd | |
234 | .IR NUMBER " ] [ " | |
235 | .B ssthresh | |
236 | .IR REALM " ] [ " | |
237 | .B realms | |
54e0b2e7 RJ |
238 | .IR REALM " ] [ " |
239 | .B rto_min | |
6299857d BB |
240 | .IR TIME " ] [ " |
241 | .B initcwnd | |
704f4df4 SH |
242 | .IR NUMBER " ] [ " |
243 | .B initrwnd | |
6299857d | 244 | .IR NUMBER " ]" |
985794ad SH |
245 | |
246 | .ti -8 | |
247 | .IR TYPE " := [ " | |
248 | .BR unicast " | " local " | " broadcast " | " multicast " | "\ | |
249 | throw " | " unreachable " | " prohibit " | " blackhole " | " nat " ]" | |
250 | ||
251 | .ti -8 | |
252 | .IR TABLE_ID " := [ " | |
253 | .BR local "| " main " | " default " | " all " |" | |
254 | .IR NUMBER " ]" | |
255 | ||
256 | .ti -8 | |
257 | .IR SCOPE " := [ " | |
258 | .BR host " | " link " | " global " |" | |
259 | .IR NUMBER " ]" | |
260 | ||
985794ad SH |
261 | .ti -8 |
262 | .IR NHFLAGS " := [ " | |
263 | .BR onlink " | " pervasive " ]" | |
264 | ||
265 | .ti -8 | |
266 | .IR RTPROTO " := [ " | |
267 | .BR kernel " | " boot " | " static " |" | |
268 | .IR NUMBER " ]" | |
269 | ||
270 | .ti -8 | |
271 | .B ip rule | |
890fe64e | 272 | .RB " [ " list " | " add " | " del " | " flush " ]" |
985794ad SH |
273 | .I SELECTOR ACTION |
274 | ||
275 | .ti -8 | |
276 | .IR SELECTOR " := [ " | |
277 | .B from | |
278 | .IR PREFIX " ] [ " | |
279 | .B to | |
280 | .IR PREFIX " ] [ " | |
281 | .B tos | |
282 | .IR TOS " ] [ " | |
283 | .B fwmark | |
be7f286e | 284 | .IR FWMARK[/MASK] " ] [ " |
85eae222 PM |
285 | .B iif |
286 | .IR STRING " ] [ " | |
287 | .B oif | |
985794ad SH |
288 | .IR STRING " ] [ " |
289 | .B pref | |
290 | .IR NUMBER " ]" | |
291 | ||
292 | .ti -8 | |
293 | .IR ACTION " := [ " | |
294 | .B table | |
295 | .IR TABLE_ID " ] [ " | |
296 | .B nat | |
297 | .IR ADDRESS " ] [ " | |
298 | .BR prohibit " | " reject " | " unreachable " ] [ " realms | |
299 | .RI "[" SRCREALM "/]" DSTREALM " ]" | |
300 | ||
301 | .ti -8 | |
302 | .IR TABLE_ID " := [ " | |
303 | .BR local " | " main " | " default " |" | |
304 | .IR NUMBER " ]" | |
305 | ||
306 | .ti -8 | |
307 | .BR "ip neigh" " { " add " | " del " | " change " | " replace " } { " | |
308 | .IR ADDR " [ " | |
309 | .B lladdr | |
310 | .IR LLADDR " ] [ " | |
311 | .BR nud " { " permanent " | " noarp " | " stale " | " reachable " } ] | " proxy | |
312 | .IR ADDR " } [ " | |
313 | .B dev | |
314 | .IR DEV " ]" | |
315 | ||
316 | .ti -8 | |
317 | .BR "ip neigh" " { " show " | " flush " } [ " to | |
318 | .IR PREFIX " ] [ " | |
319 | .B dev | |
320 | .IR DEV " ] [ " | |
321 | .B nud | |
322 | .IR STATE " ]" | |
323 | ||
324 | .ti -8 | |
a07e9912 | 325 | .BR "ip tunnel" " { " add " | " change " | " del " | " show " | " prl " }" |
985794ad SH |
326 | .RI "[ " NAME " ]" |
327 | .br | |
8a10d311 YH |
328 | .RB "[ " mode |
329 | .IR MODE " ] [ " | |
330 | .B remote | |
985794ad SH |
331 | .IR ADDR " ] [ " |
332 | .B local | |
333 | .IR ADDR " ]" | |
334 | .br | |
335 | .RB "[ [" i "|" o "]" seq " ] [ [" i "|" o "]" key | |
336 | .IR KEY " ] [ " | |
337 | .RB "[" i "|" o "]" csum " ] ]" | |
338 | .br | |
8a10d311 YH |
339 | .RB "[ " encaplimit |
340 | .IR ELIM " ]" | |
985794ad | 341 | .RB "[ " ttl |
8a10d311 YH |
342 | .IR TTL " ]" |
343 | .br | |
344 | .RB "[ " tos | |
985794ad | 345 | .IR TOS " ] [ " |
8a10d311 YH |
346 | .B flowlabel |
347 | .IR FLOWLABEL " ]" | |
985794ad | 348 | .br |
a07e9912 SH |
349 | .RB "[ " prl-default |
350 | .IR ADDR " ] [ " | |
351 | .B prl-nodefault | |
352 | .IR ADDR " ] [ " | |
353 | .B prl-delete | |
354 | .IR ADDR " ]" | |
355 | .br | |
8a10d311 | 356 | .RB "[ [" no "]" pmtudisc " ]" |
985794ad SH |
357 | .RB "[ " dev |
358 | .IR PHYS_DEV " ]" | |
8a10d311 YH |
359 | .RB "[ " "dscp inherit" " ]" |
360 | ||
361 | .ti -8 | |
362 | .IR MODE " := " | |
363 | .RB " { " ipip " | " gre " | " sit " | " isatap " | " ip6ip6 " | " ipip6 " | " any " }" | |
985794ad SH |
364 | |
365 | .ti -8 | |
366 | .IR ADDR " := { " IP_ADDRESS " |" | |
367 | .BR any " }" | |
368 | ||
369 | .ti -8 | |
370 | .IR TOS " := { " NUMBER " |" | |
371 | .BR inherit " }" | |
372 | ||
8a10d311 | 373 | .ti -8 |
ae9b671d | 374 | .IR ELIM " := { |
8a10d311 YH |
375 | .BR none " | " |
376 | .IR 0 ".." 255 " }" | |
377 | ||
378 | .ti -8 | |
985794ad SH |
379 | .ti -8 |
380 | .IR TTL " := { " 1 ".." 255 " | " | |
381 | .BR inherit " }" | |
382 | ||
383 | .ti -8 | |
384 | .IR KEY " := { " DOTTED_QUAD " | " NUMBER " }" | |
385 | ||
54e0b2e7 RJ |
386 | .ti -8 |
387 | .IR TIME " := " NUMBER "[s|ms|us|ns|j]" | |
388 | ||
985794ad SH |
389 | .ti -8 |
390 | .BR "ip maddr" " [ " add " | " del " ]" | |
391 | .IB MULTIADDR " dev " STRING | |
392 | ||
393 | .ti -8 | |
394 | .BR "ip maddr show" " [ " dev | |
395 | .IR STRING " ]" | |
396 | ||
397 | .ti -8 | |
398 | .BR "ip mroute show" " [" | |
399 | .IR PREFIX " ] [ " | |
400 | .B from | |
401 | .IR PREFIX " ] [ " | |
402 | .B iif | |
403 | .IR DEVICE " ]" | |
404 | ||
405 | .ti -8 | |
406 | .BR "ip monitor" " [ " all " |" | |
407 | .IR LISTofOBJECTS " ]" | |
ae9b671d MM |
408 | |
409 | .ti -8 | |
410 | .BR "ip xfrm" | |
411 | .IR XFRM_OBJECT " { " COMMAND " }" | |
412 | ||
413 | .ti -8 | |
414 | .IR XFRM_OBJECT " := { " state " | " policy " | " monitor " } " | |
415 | ||
416 | .ti -8 | |
417 | .BR "ip xfrm state " { " add " | " update " } " | |
418 | .IR ID " [ " | |
419 | .IR XFRM_OPT " ] " | |
420 | .RB " [ " mode | |
421 | .IR MODE " ] " | |
422 | .br | |
423 | .RB " [ " reqid | |
424 | .IR REQID " ] " | |
425 | .RB " [ " seq | |
426 | .IR SEQ " ] " | |
427 | .RB " [ " replay-window | |
428 | .IR SIZE " ] " | |
429 | .br | |
430 | .RB " [ " flag | |
431 | .IR FLAG-LIST " ] " | |
432 | .RB " [ " encap | |
433 | .IR ENCAP " ] " | |
434 | .RB " [ " sel | |
435 | .IR SELECTOR " ] " | |
436 | .br | |
437 | .RB " [ " | |
438 | .IR LIMIT-LIST " ] " | |
439 | ||
440 | .ti -8 | |
441 | .BR "ip xfrm state allocspi " | |
442 | .IR ID | |
443 | .RB " [ " mode | |
444 | .IR MODE " ] " | |
445 | .RB " [ " reqid | |
446 | .IR REQID " ] " | |
447 | .RB " [ " seq | |
448 | .IR SEQ " ] " | |
449 | .RB " [ " min | |
450 | .IR SPI | |
451 | .B max | |
452 | .IR SPI " ] " | |
453 | ||
454 | .ti -8 | |
455 | .BR "ip xfrm state" " { " delete " | " get " } " | |
456 | .IR ID | |
457 | ||
458 | .ti -8 | |
459 | .BR "ip xfrm state" " { " deleteall " | " list " } [ " | |
460 | .IR ID " ] " | |
461 | .RB " [ " mode | |
462 | .IR MODE " ] " | |
463 | .br | |
464 | .RB " [ " reqid | |
465 | .IR REQID " ] " | |
466 | .RB " [ " flag | |
467 | .IR FLAG_LIST " ] " | |
468 | ||
469 | .ti -8 | |
470 | .BR "ip xfrm state flush" " [ " proto | |
471 | .IR XFRM_PROTO " ] " | |
472 | ||
473 | .ti -8 | |
474 | .BR "ip xfrm state count" | |
475 | ||
476 | .ti -8 | |
477 | .IR ID " := " | |
478 | .RB " [ " src | |
479 | .IR ADDR " ] " | |
480 | .RB " [ " dst | |
481 | .IR ADDR " ] " | |
482 | .RB " [ " proto | |
483 | .IR XFRM_PROTO " ] " | |
484 | .RB " [ " spi | |
485 | .IR SPI " ] " | |
486 | ||
487 | .ti -8 | |
488 | .IR XFRM_PROTO " := " | |
489 | .RB " [ " esp " | " ah " | " comp " | " route2 " | " hao " ] " | |
490 | ||
491 | .ti -8 | |
492 | .IR MODE " := " | |
493 | .RB " [ " transport " | " tunnel " | " ro " | " beet " ] " | |
83ad2dd7 | 494 | .B (default=transport) |
ae9b671d MM |
495 | |
496 | .ti -8 | |
497 | .IR FLAG-LIST " := " | |
498 | .RI " [ " FLAG-LIST " ] " FLAG | |
499 | ||
500 | .ti -8 | |
501 | .IR FLAG " := " | |
502 | .RB " [ " noecn " | " decap-dscp " | " wildrecv " ] " | |
503 | ||
504 | .ti -8 | |
505 | .IR ENCAP " := " ENCAP-TYPE " " SPORT " " DPORT " " OADDR | |
506 | ||
507 | .ti -8 | |
508 | .IR ENCAP-TYPE " := " | |
509 | .B espinudp | |
510 | .RB " | " | |
511 | .B espinudp-nonike | |
512 | ||
513 | .ti -8 | |
514 | .IR ALGO-LIST " := [ " | |
515 | .IR ALGO-LIST " ] | [ " | |
516 | .IR ALGO " ] " | |
517 | ||
518 | .ti -8 | |
519 | .IR ALGO " := " | |
520 | .IR ALGO_TYPE | |
521 | .IR ALGO_NAME | |
522 | .IR ALGO_KEY | |
523 | ||
524 | .ti -8 | |
525 | .IR ALGO_TYPE " := " | |
526 | .RB " [ " enc " | " auth " | " comp " ] " | |
527 | ||
528 | .ti -8 | |
529 | .IR SELECTOR " := " | |
530 | .B src | |
531 | .IR ADDR "[/" PLEN "]" | |
532 | .B dst | |
533 | .IR ADDR "[/" PLEN "]" | |
534 | .RI " [ " UPSPEC " ] " | |
535 | .RB " [ " dev | |
536 | .IR DEV " ] " | |
537 | ||
538 | .ti -8 | |
539 | .IR UPSPEC " := " | |
540 | .B proto | |
541 | .IR PROTO " [[ " | |
542 | .B sport | |
543 | .IR PORT " ] " | |
544 | .RB " [ " dport | |
545 | .IR PORT " ] | " | |
546 | .br | |
547 | .RB " [ " type | |
548 | .IR NUMBER " ] " | |
549 | .RB " [ " code | |
4a9608e6 TT |
550 | .IR NUMBER " ] | " |
551 | .br | |
552 | .RB " [ " key | |
553 | .IR KEY " ]] " | |
ae9b671d MM |
554 | |
555 | .ti -8 | |
556 | .IR LIMIT-LIST " := [ " LIMIT-LIST " ] |" | |
557 | .RB " [ "limit | |
558 | .IR LIMIT " ] " | |
559 | ||
560 | .ti -8 | |
561 | .IR LIMIT " := " | |
562 | .RB " [ [" time-soft "|" time-hard "|" time-use-soft "|" time-use-hard "]" | |
563 | .IR SECONDS " ] | " | |
564 | .RB "[ ["byte-soft "|" byte-hard "]" | |
565 | .IR SIZE " ] | " | |
566 | .br | |
567 | .RB " [ ["packet-soft "|" packet-hard "]" | |
568 | .IR COUNT " ] " | |
569 | ||
570 | .ti -8 | |
571 | .BR "ip xfrm policy" " { " add " | " update " } " " dir " | |
572 | .IR DIR | |
573 | .IR SELECTOR " [ " | |
574 | .BR index | |
575 | .IR INDEX " ] " | |
576 | .br | |
577 | .RB " [ " ptype | |
578 | .IR PTYPE " ] " | |
579 | .RB " [ " action | |
580 | .IR ACTION " ] " | |
581 | .RB " [ " priority | |
582 | .IR PRIORITY " ] " | |
583 | .br | |
584 | .RI " [ " LIMIT-LIST " ] [ " | |
585 | .IR TMPL-LIST " ] " | |
586 | ||
587 | .ti -8 | |
588 | .BR "ip xfrm policy" " { " delete " | " get " } " " dir " | |
589 | .IR DIR " [ " SELECTOR " | " | |
590 | .BR index | |
591 | .IR INDEX | |
592 | .RB " ] " | |
593 | .br | |
594 | .RB " [ " ptype | |
595 | .IR PTYPE " ] " | |
596 | ||
597 | .ti -8 | |
598 | .BR "ip xfrm policy" " { " deleteall " | " list " } " | |
599 | .RB " [ " dir | |
600 | .IR DIR " ] [ " | |
601 | .IR SELECTOR " ] " | |
602 | .br | |
603 | .RB " [ " index | |
604 | .IR INDEX " ] " | |
605 | .RB " [ " action | |
606 | .IR ACTION " ] " | |
607 | .RB " [ " priority | |
608 | .IR PRIORITY " ] " | |
609 | ||
610 | .ti -8 | |
611 | .B "ip xfrm policy flush" | |
612 | .RB " [ " ptype | |
613 | .IR PTYPE " ] " | |
614 | ||
615 | .ti -8 | |
616 | .B "ip xfrm count" | |
617 | ||
618 | .ti -8 | |
619 | .IR PTYPE " := " | |
620 | .RB " [ " main " | " sub " ] " | |
83ad2dd7 | 621 | .B (default=main) |
ae9b671d MM |
622 | |
623 | .ti -8 | |
624 | .IR DIR " := " | |
625 | .RB " [ " in " | " out " | " fwd " ] " | |
626 | ||
627 | .ti -8 | |
628 | .IR SELECTOR " := " | |
629 | .B src | |
630 | .IR ADDR "[/" PLEN "]" | |
631 | .B dst | |
632 | .IR ADDR "[/" PLEN] " [ " UPSPEC | |
633 | .RB " ] [ " dev | |
634 | .IR DEV " ] " | |
635 | ||
636 | .ti -8 | |
637 | .IR UPSPEC " := " | |
638 | .B proto | |
639 | .IR PROTO " [ " | |
640 | .RB " [ " sport | |
641 | .IR PORT " ] " | |
642 | .RB " [ " dport | |
643 | .IR PORT " ] | " | |
644 | .br | |
645 | .RB " [ " type | |
646 | .IR NUMBER " ] " | |
647 | .RB " [ " code | |
4a9608e6 TT |
648 | .IR NUMBER " ] | " |
649 | .br | |
650 | .RB " [ " key | |
651 | .IR KEY " ] ] " | |
ae9b671d MM |
652 | |
653 | .ti -8 | |
654 | .IR ACTION " := " | |
655 | .RB " [ " allow " | " block " ]" | |
83ad2dd7 | 656 | .B (default=allow) |
ae9b671d MM |
657 | |
658 | .ti -8 | |
659 | .IR LIMIT-LIST " := " | |
660 | .RB " [ " | |
661 | .IR LIMIT-LIST " ] | " | |
662 | .RB " [ " limit | |
663 | .IR LIMIT " ] " | |
664 | ||
665 | .ti -8 | |
666 | .IR LIMIT " := " | |
667 | .RB " [ [" time-soft "|" time-hard "|" time-use-soft "|" time-use-hard "]" | |
668 | .IR SECONDS " ] | " | |
669 | .RB " [ [" byte-soft "|" byte-hard "]" | |
670 | .IR SIZE " ] | " | |
671 | .br [ " | |
672 | .RB "[" packet-soft "|" packet-hard "]" | |
673 | .IR NUMBER " ] " | |
674 | ||
675 | .ti -8 | |
676 | .IR TMPL-LIST " := " | |
83ad2dd7 | 677 | .B " [ " |
ae9b671d MM |
678 | .IR TMPL-LIST " ] | " |
679 | .RB " [ " tmpl | |
680 | .IR TMPL " ] " | |
681 | ||
682 | .ti -8 | |
683 | .IR TMPL " := " | |
684 | .IR ID " [ " | |
685 | .B mode | |
686 | .IR MODE " ] " | |
687 | .RB " [ " reqid | |
688 | .IR REQID " ] " | |
689 | .RB " [ " level | |
690 | .IR LEVEL " ] " | |
691 | ||
692 | .ti -8 | |
693 | .IR ID " := " | |
694 | .RB " [ " src | |
695 | .IR ADDR " ] " | |
696 | .RB " [ " dst | |
697 | .IR ADDR " ] " | |
698 | .RB " [ " proto | |
699 | .IR XFRM_PROTO " ] " | |
700 | .RB " [ " spi | |
701 | .IR SPI " ] " | |
702 | ||
703 | .ti -8 | |
704 | .IR XFRM_PROTO " := " | |
705 | .RB " [ " esp " | " ah " | " comp " | " route2 " | " hao " ] " | |
706 | ||
707 | .ti -8 | |
708 | .IR MODE " := " | |
709 | .RB " [ " transport " | " tunnel " | " beet " ] " | |
83ad2dd7 | 710 | .B (default=transport) |
ae9b671d MM |
711 | |
712 | .ti -8 | |
713 | .IR LEVEL " := " | |
714 | .RB " [ " required " | " use " ] " | |
83ad2dd7 | 715 | .B (default=required) |
ae9b671d MM |
716 | |
717 | .ti -8 | |
718 | .BR "ip xfrm monitor" " [ " all " | " | |
719 | .IR LISTofOBJECTS " ] " | |
720 | ||
985794ad SH |
721 | .in -8 |
722 | .ad b | |
723 | ||
724 | .SH OPTIONS | |
725 | ||
726 | .TP | |
727 | .BR "\-V" , " -Version" | |
728 | print the version of the | |
729 | .B ip | |
730 | utility and exit. | |
731 | ||
732 | .TP | |
733 | .BR "\-s" , " \-stats", " \-statistics" | |
734 | output more information. If the option | |
735 | appears twice or more, the amount of information increases. | |
736 | As a rule, the information is statistics or some time values. | |
737 | ||
64c79560 BG |
738 | .TP |
739 | .BR "\-l" , " \-loops" | |
740 | Specify maximum number of loops the 'ip addr flush' logic | |
741 | will attempt before giving up. The default is 10. | |
742 | Zero (0) means loop until all addresses are removed. | |
743 | ||
985794ad SH |
744 | .TP |
745 | .BR "\-f" , " \-family" | |
746 | followed by protocol family identifier: | |
747 | .BR "inet" , " inet6" | |
748 | or | |
749 | .B link | |
750 | ,enforce the protocol family to use. If the option is not present, | |
ae9b671d | 751 | the protocol family is guessed from other arguments. If the rest |
985794ad SH |
752 | of the command line does not give enough information to guess the |
753 | family, | |
754 | .B ip | |
755 | falls back to the default one, usually | |
756 | .B inet | |
757 | or | |
758 | .BR "any" . | |
759 | .B link | |
760 | is a special family identifier meaning that no networking protocol | |
761 | is involved. | |
762 | ||
763 | .TP | |
764 | .B \-4 | |
765 | shortcut for | |
766 | .BR "-family inet" . | |
767 | ||
768 | .TP | |
769 | .B \-6 | |
770 | shortcut for | |
771 | .BR "\-family inet6" . | |
772 | ||
773 | .TP | |
774 | .B \-0 | |
775 | shortcut for | |
776 | .BR "\-family link" . | |
777 | ||
778 | .TP | |
779 | .BR "\-o" , " \-oneline" | |
780 | output each record on a single line, replacing line feeds | |
781 | with the | |
b096fa5f | 782 | .B '\e\' |
ae9b671d | 783 | character. This is convenient when you want to count records |
985794ad SH |
784 | with |
785 | .BR wc (1) | |
786 | or to | |
787 | .BR grep (1) | |
788 | the output. | |
789 | ||
790 | .TP | |
791 | .BR "\-r" , " \-resolve" | |
792 | use the system's name resolver to print DNS names instead of | |
793 | host addresses. | |
794 | ||
795 | .SH IP - COMMAND SYNTAX | |
796 | ||
797 | .SS | |
798 | .I OBJECT | |
799 | ||
800 | .TP | |
801 | .B link | |
802 | - network device. | |
803 | ||
804 | .TP | |
805 | .B address | |
806 | - protocol (IP or IPv6) address on a device. | |
4759758c YH |
807 | |
808 | .TP | |
809 | .B addrlabel | |
810 | - label configuration for protocol address selection. | |
811 | ||
985794ad SH |
812 | .TP |
813 | .B neighbour | |
814 | - ARP or NDISC cache entry. | |
815 | ||
816 | .TP | |
817 | .B route | |
818 | - routing table entry. | |
819 | ||
820 | .TP | |
821 | .B rule | |
822 | - rule in routing policy database. | |
823 | ||
824 | .TP | |
825 | .B maddress | |
826 | - multicast address. | |
827 | ||
828 | .TP | |
829 | .B mroute | |
830 | - multicast routing cache entry. | |
831 | ||
832 | .TP | |
833 | .B tunnel | |
834 | - tunnel over IP. | |
835 | ||
ae9b671d MM |
836 | .TP |
837 | .B xfrm | |
838 | - framework for IPsec protocol. | |
839 | ||
985794ad SH |
840 | .PP |
841 | The names of all objects may be written in full or | |
842 | abbreviated form, f.e. | |
843 | .B address | |
844 | is abbreviated as | |
845 | .B addr | |
846 | or just | |
847 | .B a. | |
848 | ||
849 | .SS | |
850 | .I COMMAND | |
851 | ||
852 | Specifies the action to perform on the object. | |
853 | The set of possible actions depends on the object type. | |
854 | As a rule, it is possible to | |
855 | .BR "add" , " delete" | |
856 | and | |
857 | .B show | |
858 | (or | |
859 | .B list | |
860 | ) objects, but some objects do not allow all of these operations | |
861 | or have some additional commands. The | |
862 | .B help | |
863 | command is available for all objects. It prints | |
864 | out a list of available commands and argument syntax conventions. | |
865 | .sp | |
866 | If no command is given, some default command is assumed. | |
867 | Usually it is | |
868 | .B list | |
869 | or, if the objects of this class cannot be listed, | |
870 | .BR "help" . | |
871 | ||
872 | .SH ip link - network device configuration | |
873 | ||
874 | .B link | |
875 | is a network device and the corresponding commands | |
876 | display and change the state of devices. | |
877 | ||
df33d7a4 | 878 | .SS ip link add - add virtual link |
985794ad SH |
879 | |
880 | .TP | |
df33d7a4 SH |
881 | .BI link " DEVICE " |
882 | specifies the physical device to act operate on. | |
883 | ||
985794ad | 884 | .I NAME |
df33d7a4 SH |
885 | specifies the name of the new virtual device. |
886 | ||
887 | .I TYPE | |
888 | specifies the type of the new device. | |
889 | .sp | |
890 | Link types: | |
891 | ||
892 | .in +8 | |
893 | .B vlan | |
894 | - 802.1q tagged virrtual LAN interface | |
895 | .sp | |
896 | .B macvlan | |
897 | - virtual interface base on link layer address (MAC) | |
898 | .sp | |
899 | .B can | |
900 | - Controller Area Network interface | |
901 | .in -8 | |
902 | ||
903 | .SS ip link delete - delete virtual link | |
904 | .I DEVICE | |
905 | specifies the virtual device to act operate on. | |
906 | .I TYPE | |
907 | specifies the type of the device. | |
908 | ||
909 | ||
910 | .TP | |
911 | .BI dev " DEVICE " | |
912 | specifies the physical device to act operate on. | |
913 | ||
914 | .SS ip link set - change device attributes | |
915 | ||
916 | .TP | |
917 | .BI dev " DEVICE " | |
918 | .I DEVICE | |
46dab6e9 WM |
919 | specifies network device to operate on. When configuring SR-IOV Virtual Fuction |
920 | (VF) devices, this keyword should specify the associated Physical Function (PF) | |
921 | device. | |
985794ad SH |
922 | |
923 | .TP | |
924 | .BR up " and " down | |
925 | change the state of the device to | |
926 | .B UP | |
927 | or | |
928 | .BR "DOWN" . | |
929 | ||
930 | .TP | |
931 | .BR "arp on " or " arp off" | |
932 | change the | |
933 | .B NOARP | |
934 | flag on the device. | |
935 | ||
936 | .TP | |
937 | .BR "multicast on " or " multicast off" | |
938 | change the | |
939 | .B MULTICAST | |
940 | flag on the device. | |
941 | ||
942 | .TP | |
943 | .BR "dynamic on " or " dynamic off" | |
944 | change the | |
945 | .B DYNAMIC | |
946 | flag on the device. | |
947 | ||
948 | .TP | |
949 | .BI name " NAME" | |
950 | change the name of the device. This operation is not | |
951 | recommended if the device is running or has some addresses | |
952 | already configured. | |
953 | ||
954 | .TP | |
955 | .BI txqueuelen " NUMBER" | |
ae9b671d | 956 | .TP |
985794ad SH |
957 | .BI txqlen " NUMBER" |
958 | change the transmit queue length of the device. | |
959 | ||
960 | .TP | |
961 | .BI mtu " NUMBER" | |
ae9b671d | 962 | change the |
985794ad SH |
963 | .I MTU |
964 | of the device. | |
965 | ||
966 | .TP | |
967 | .BI address " LLADDRESS" | |
968 | change the station address of the interface. | |
969 | ||
970 | .TP | |
971 | .BI broadcast " LLADDRESS" | |
972 | .TP | |
973 | .BI brd " LLADDRESS" | |
974 | .TP | |
975 | .BI peer " LLADDRESS" | |
976 | change the link layer broadcast address or the peer address when | |
977 | the interface is | |
978 | .IR "POINTOPOINT" . | |
979 | ||
e2613dc8 BT |
980 | .TP |
981 | .BI netns " PID" | |
982 | move the device to the network namespace associated with the process | |
46dab6e9 WM |
983 | .IR "PID". |
984 | ||
985 | .TP | |
986 | .BI alias " NAME" | |
987 | give the device a symbolic name for easy reference. | |
988 | ||
989 | .TP | |
990 | .BI vf " NUM" | |
991 | specify a Virtual Function device to be configured. The associated PF device | |
992 | must be specified using the | |
993 | .B dev | |
994 | parameter. | |
995 | ||
996 | .in +8 | |
997 | .BI mac " LLADDRESS" | |
998 | - change the station address for the specified VF. The | |
999 | .B vf | |
1000 | parameter must be specified. | |
1001 | ||
1002 | .sp | |
1003 | .BI vlan " VLANID" | |
1004 | - change the assigned VLAN for the specified VF. When specified, all traffic | |
1005 | sent from the VF will be tagged with the specified VLAN ID. Incoming traffic | |
1006 | will be filtered for the specified VLAN ID, and will have all VLAN tags | |
1007 | stripped before being passed to the VF. Setting this parameter to 0 disables | |
1008 | VLAN tagging and filtering. The | |
1009 | .B vf | |
1010 | parameter must be specified. | |
1011 | ||
1012 | .sp | |
1013 | .BI qos " VLAN-QOS" | |
1014 | - assign VLAN QOS (priority) bits for the VLAN tag. When specified, all VLAN | |
1015 | tags transmitted by the VF will include the specified priority bits in the | |
1016 | VLAN tag. If not specified, the value is assumed to be 0. Both the | |
1017 | .B vf | |
1018 | and | |
1019 | .B vlan | |
1020 | parameters must be specified. Setting both | |
1021 | .B vlan | |
1022 | and | |
1023 | .B qos | |
1024 | as 0 disables VLAN tagging and filtering for the VF. | |
1025 | ||
1026 | .sp | |
1027 | .BI rate " TXRATE" | |
1028 | - change the allowed transmit bandwidth, in Mbps, for the specified VF. | |
1029 | Setting this parameter to 0 disables rate limiting. The | |
1030 | .B vf | |
1031 | parameter must be specified. | |
1032 | .in -8 | |
e2613dc8 | 1033 | |
985794ad SH |
1034 | .PP |
1035 | .B Warning: | |
1036 | If multiple parameter changes are requested, | |
1037 | .B ip | |
1038 | aborts immediately after any of the changes have failed. | |
1039 | This is the only case when | |
1040 | .B ip | |
1041 | can move the system to an unpredictable state. The solution | |
1042 | is to avoid changing several parameters with one | |
1043 | .B ip link set | |
1044 | call. | |
1045 | ||
1046 | .SS ip link show - display device attributes | |
1047 | ||
1048 | .TP | |
1049 | .BI dev " NAME " (default) | |
1050 | .I NAME | |
1051 | specifies the network device to show. | |
1052 | If this argument is omitted all devices are listed. | |
1053 | ||
1054 | .TP | |
1055 | .B up | |
1056 | only display running interfaces. | |
1057 | ||
1058 | .SH ip address - protocol address management. | |
1059 | ||
1060 | The | |
1061 | .B address | |
1062 | is a protocol (IP or IPv6) address attached | |
1063 | to a network device. Each device must have at least one address | |
1064 | to use the corresponding protocol. It is possible to have several | |
1065 | different addresses attached to one device. These addresses are not | |
1066 | discriminated, so that the term | |
1067 | .B alias | |
1068 | is not quite appropriate for them and we do not use it in this document. | |
1069 | .sp | |
1070 | The | |
1071 | .B ip addr | |
1072 | command displays addresses and their properties, adds new addresses | |
1073 | and deletes old ones. | |
1074 | ||
1075 | .SS ip address add - add new protocol address. | |
1076 | ||
1077 | .TP | |
1078 | .BI dev " NAME" | |
1079 | the name of the device to add the address to. | |
1080 | ||
1081 | .TP | |
1082 | .BI local " ADDRESS " (default) | |
1083 | the address of the interface. The format of the address depends | |
1084 | on the protocol. It is a dotted quad for IP and a sequence of | |
1085 | hexadecimal halfwords separated by colons for IPv6. The | |
1086 | .I ADDRESS | |
1087 | may be followed by a slash and a decimal number which encodes | |
1088 | the network prefix length. | |
1089 | ||
1090 | .TP | |
1091 | .BI peer " ADDRESS" | |
1092 | the address of the remote endpoint for pointopoint interfaces. | |
1093 | Again, the | |
1094 | .I ADDRESS | |
1095 | may be followed by a slash and a decimal number, encoding the network | |
1096 | prefix length. If a peer address is specified, the local address | |
1097 | cannot have a prefix length. The network prefix is associated | |
1098 | with the peer rather than with the local address. | |
1099 | ||
1100 | .TP | |
1101 | .BI broadcast " ADDRESS" | |
1102 | the broadcast address on the interface. | |
1103 | .sp | |
1104 | It is possible to use the special symbols | |
1105 | .B '+' | |
1106 | and | |
1107 | .B '-' | |
1108 | instead of the broadcast address. In this case, the broadcast address | |
1109 | is derived by setting/resetting the host bits of the interface prefix. | |
1110 | ||
1111 | .TP | |
1112 | .BI label " NAME" | |
1113 | Each address may be tagged with a label string. | |
1114 | In order to preserve compatibility with Linux-2.0 net aliases, | |
1115 | this string must coincide with the name of the device or must be prefixed | |
1116 | with the device name followed by colon. | |
1117 | ||
1118 | .TP | |
1119 | .BI scope " SCOPE_VALUE" | |
1120 | the scope of the area where this address is valid. | |
1121 | The available scopes are listed in file | |
1122 | .BR "/etc/iproute2/rt_scopes" . | |
1123 | Predefined scope values are: | |
1124 | ||
1125 | .in +8 | |
1126 | .B global | |
1127 | - the address is globally valid. | |
1128 | .sp | |
1129 | .B site | |
1130 | - (IPv6 only) the address is site local, i.e. it is | |
1131 | valid inside this site. | |
1132 | .sp | |
1133 | .B link | |
1134 | - the address is link local, i.e. it is valid only on this device. | |
1135 | .sp | |
1136 | .B host | |
1137 | - the address is valid only inside this host. | |
1138 | .in -8 | |
1139 | ||
1140 | .SS ip address delete - delete protocol address | |
1141 | .B Arguments: | |
1142 | coincide with the arguments of | |
1143 | .B ip addr add. | |
1144 | The device name is a required argument. The rest are optional. | |
1145 | If no arguments are given, the first address is deleted. | |
1146 | ||
1147 | .SS ip address show - look at protocol addresses | |
1148 | ||
1149 | .TP | |
1150 | .BI dev " NAME " (default) | |
1151 | name of device. | |
1152 | ||
1153 | .TP | |
1154 | .BI scope " SCOPE_VAL" | |
1155 | only list addresses with this scope. | |
1156 | ||
1157 | .TP | |
1158 | .BI to " PREFIX" | |
1159 | only list addresses matching this prefix. | |
1160 | ||
1161 | .TP | |
1162 | .BI label " PATTERN" | |
1163 | only list addresses with labels matching the | |
1164 | .IR "PATTERN" . | |
1165 | .I PATTERN | |
1166 | is a usual shell style pattern. | |
1167 | ||
1168 | .TP | |
1169 | .BR dynamic " and " permanent | |
1170 | (IPv6 only) only list addresses installed due to stateless | |
1171 | address configuration or only list permanent (not dynamic) | |
1172 | addresses. | |
1173 | ||
1174 | .TP | |
1175 | .B tentative | |
a1f27794 | 1176 | (IPv6 only) only list addresses which have not yet passed duplicate |
985794ad SH |
1177 | address detection. |
1178 | ||
1179 | .TP | |
1180 | .B deprecated | |
1181 | (IPv6 only) only list deprecated addresses. | |
1182 | ||
a1f27794 BH |
1183 | .TP |
1184 | .B dadfailed | |
1185 | (IPv6 only) only list addresses which have failed duplicate | |
1186 | address detection. | |
1187 | ||
a1b9ffcc BH |
1188 | .TP |
1189 | .B temporary | |
1190 | (IPv6 only) only list temporary addresses. | |
1191 | ||
985794ad SH |
1192 | .TP |
1193 | .BR primary " and " secondary | |
1194 | only list primary (or secondary) addresses. | |
1195 | ||
1196 | .SS ip address flush - flush protocol addresses | |
1197 | This command flushes the protocol addresses selected by some criteria. | |
1198 | ||
1199 | .PP | |
1200 | This command has the same arguments as | |
1201 | .B show. | |
1202 | The difference is that it does not run when no arguments are given. | |
1203 | ||
1204 | .PP | |
1205 | .B Warning: | |
1206 | This command (and other | |
1207 | .B flush | |
1208 | commands described below) is pretty dangerous. If you make a mistake, | |
1209 | it will not forgive it, but will cruelly purge all the addresses. | |
1210 | ||
1211 | .PP | |
1212 | With the | |
1213 | .B -statistics | |
1214 | option, the command becomes verbose. It prints out the number of deleted | |
1215 | addresses and the number of rounds made to flush the address list. If | |
1216 | this option is given twice, | |
1217 | .B ip addr flush | |
1218 | also dumps all the deleted addresses in the format described in the | |
1219 | previous subsection. | |
1220 | ||
4759758c YH |
1221 | .SH ip addrlabel - protocol address label management. |
1222 | ||
1223 | IPv6 address label is used for address selection | |
1224 | described in RFC 3484. Precedence is managed by userspace, | |
1225 | and only label is stored in kernel. | |
1226 | ||
1227 | .SS ip addrlabel add - add an address label | |
1228 | the command adds an address label entry to the kernel. | |
1229 | .TP | |
1230 | .BI prefix " PREFIX" | |
1231 | .TP | |
1232 | .BI dev " DEV" | |
1233 | the outgoing interface. | |
1234 | .TP | |
1235 | .BI label " NUMBER" | |
1236 | the label for the prefix. | |
1237 | 0xffffffff is reserved. | |
1238 | .SS ip addrlabel del - delete an address label | |
1239 | the command deletes an address label entry in the kernel. | |
1240 | .B Arguments: | |
1241 | coincide with the arguments of | |
1242 | .B ip addrlabel add | |
1243 | but label is not required. | |
1244 | .SS ip addrlabel list - list address labels | |
1245 | the command show contents of address labels. | |
1246 | .SS ip addrlabel flush - flush address labels | |
915fae19 | 1247 | the command flushes the contents of address labels and it does not restore default settings. |
985794ad SH |
1248 | .SH ip neighbour - neighbour/arp tables management. |
1249 | ||
1250 | .B neighbour | |
1251 | objects establish bindings between protocol addresses and | |
1252 | link layer addresses for hosts sharing the same link. | |
1253 | Neighbour entries are organized into tables. The IPv4 neighbour table | |
1254 | is known by another name - the ARP table. | |
1255 | ||
1256 | .P | |
1257 | The corresponding commands display neighbour bindings | |
1258 | and their properties, add new neighbour entries and delete old ones. | |
1259 | ||
1260 | .SS ip neighbour add - add a new neighbour entry | |
1261 | .SS ip neighbour change - change an existing entry | |
1262 | .SS ip neighbour replace - add a new entry or change an existing one | |
1263 | ||
1264 | These commands create new neighbour records or update existing ones. | |
1265 | ||
1266 | .TP | |
1267 | .BI to " ADDRESS " (default) | |
1268 | the protocol address of the neighbour. It is either an IPv4 or IPv6 address. | |
1269 | ||
1270 | .TP | |
1271 | .BI dev " NAME" | |
1272 | the interface to which this neighbour is attached. | |
1273 | ||
1274 | .TP | |
1275 | .BI lladdr " LLADDRESS" | |
1276 | the link layer address of the neighbour. | |
1277 | .I LLADDRESS | |
1278 | can also be | |
1279 | .BR "null" . | |
1280 | ||
1281 | .TP | |
1282 | .BI nud " NUD_STATE" | |
1283 | the state of the neighbour entry. | |
1284 | .B nud | |
1285 | is an abbreviation for 'Neigh bour Unreachability Detection'. | |
1286 | The state can take one of the following values: | |
1287 | ||
1288 | .in +8 | |
1289 | .B permanent | |
1290 | - the neighbour entry is valid forever and can be only | |
1291 | be removed administratively. | |
1292 | .sp | |
1293 | ||
1294 | .B noarp | |
1295 | - the neighbour entry is valid. No attempts to validate | |
1296 | this entry will be made but it can be removed when its lifetime expires. | |
1297 | .sp | |
1298 | ||
1299 | .B reachable | |
1300 | - the neighbour entry is valid until the reachability | |
1301 | timeout expires. | |
1302 | .sp | |
1303 | ||
1304 | .B stale | |
1305 | - the neighbour entry is valid but suspicious. | |
1306 | This option to | |
1307 | .B ip neigh | |
1308 | does not change the neighbour state if it was valid and the address | |
1309 | is not changed by this command. | |
1310 | .in -8 | |
1311 | ||
1312 | .SS ip neighbour delete - delete a neighbour entry | |
1313 | This command invalidates a neighbour entry. | |
1314 | ||
1315 | .PP | |
1316 | The arguments are the same as with | |
1317 | .BR "ip neigh add" , | |
1318 | except that | |
1319 | .B lladdr | |
1320 | and | |
1321 | .B nud | |
1322 | are ignored. | |
1323 | ||
1324 | .PP | |
1325 | .B Warning: | |
1326 | Attempts to delete or manually change a | |
1327 | .B noarp | |
1328 | entry created by the kernel may result in unpredictable behaviour. | |
1329 | Particularly, the kernel may try to resolve this address even | |
1330 | on a | |
1331 | .B NOARP | |
1332 | interface or if the address is multicast or broadcast. | |
1333 | ||
1334 | .SS ip neighbour show - list neighbour entries | |
1335 | ||
1336 | This commands displays neighbour tables. | |
1337 | ||
1338 | .TP | |
1339 | .BI to " ADDRESS " (default) | |
1340 | the prefix selecting the neighbours to list. | |
1341 | ||
1342 | .TP | |
1343 | .BI dev " NAME" | |
1344 | only list the neighbours attached to this device. | |
1345 | ||
1346 | .TP | |
1347 | .B unused | |
1348 | only list neighbours which are not currently in use. | |
1349 | ||
1350 | .TP | |
1351 | .BI nud " NUD_STATE" | |
1352 | only list neighbour entries in this state. | |
1353 | .I NUD_STATE | |
1354 | takes values listed below or the special value | |
1355 | .B all | |
1356 | which means all states. This option may occur more than once. | |
1357 | If this option is absent, | |
1358 | .B ip | |
1359 | lists all entries except for | |
1360 | .B none | |
1361 | and | |
1362 | .BR "noarp" . | |
1363 | ||
1364 | .SS ip neighbour flush - flush neighbour entries | |
1365 | This command flushes neighbour tables, selecting | |
1366 | entries to flush by some criteria. | |
1367 | ||
1368 | .PP | |
1369 | This command has the same arguments as | |
1370 | .B show. | |
1371 | The differences are that it does not run when no arguments are given, | |
1372 | and that the default neighbour states to be flushed do not include | |
1373 | .B permanent | |
1374 | and | |
1375 | .BR "noarp" . | |
1376 | ||
1377 | .PP | |
1378 | With the | |
1379 | .B -statistics | |
1380 | option, the command becomes verbose. It prints out the number of | |
1381 | deleted neighbours and the number of rounds made to flush the | |
1382 | neighbour table. If the option is given | |
1383 | twice, | |
1384 | .B ip neigh flush | |
1385 | also dumps all the deleted neighbours. | |
1386 | ||
1387 | .SH ip route - routing table management | |
1388 | Manipulate route entries in the kernel routing tables keep | |
1389 | information about paths to other networked nodes. | |
1390 | .sp | |
1391 | .B Route types: | |
1392 | ||
1393 | .in +8 | |
1394 | .B unicast | |
1395 | - the route entry describes real paths to the destinations covered | |
1396 | by the route prefix. | |
1397 | ||
1398 | .sp | |
1399 | .B unreachable | |
1400 | - these destinations are unreachable. Packets are discarded and the | |
1401 | ICMP message | |
1402 | .I host unreachable | |
1403 | is generated. | |
1404 | The local senders get an | |
1405 | .I EHOSTUNREACH | |
1406 | error. | |
1407 | ||
1408 | .sp | |
1409 | .B blackhole | |
1410 | - these destinations are unreachable. Packets are discarded silently. | |
1411 | The local senders get an | |
1412 | .I EINVAL | |
1413 | error. | |
1414 | ||
1415 | .sp | |
1416 | .B prohibit | |
1417 | - these destinations are unreachable. Packets are discarded and the | |
1418 | ICMP message | |
1419 | .I communication administratively prohibited | |
1420 | is generated. The local senders get an | |
1421 | .I EACCES | |
1422 | error. | |
1423 | ||
1424 | .sp | |
1425 | .B local | |
1426 | - the destinations are assigned to this host. The packets are looped | |
1427 | back and delivered locally. | |
1428 | ||
1429 | .sp | |
1430 | .B broadcast | |
1431 | - the destinations are broadcast addresses. The packets are sent as | |
1432 | link broadcasts. | |
1433 | ||
1434 | .sp | |
1435 | .B throw | |
1436 | - a special control route used together with policy rules. If such a | |
1437 | route is selected, lookup in this table is terminated pretending that | |
1438 | no route was found. Without policy routing it is equivalent to the | |
1439 | absence of the route in the routing table. The packets are dropped | |
1440 | and the ICMP message | |
1441 | .I net unreachable | |
1442 | is generated. The local senders get an | |
1443 | .I ENETUNREACH | |
1444 | error. | |
1445 | ||
1446 | .sp | |
1447 | .B nat | |
1448 | - a special NAT route. Destinations covered by the prefix | |
1449 | are considered to be dummy (or external) addresses which require translation | |
1450 | to real (or internal) ones before forwarding. The addresses to translate to | |
1451 | are selected with the attribute | |
526afe40 | 1452 | .B Warning: |
1453 | Route NAT is no longer supported in Linux 2.6. | |
1454 | ||
985794ad | 1455 | |
526afe40 | 1456 | .BR "via" . |
985794ad SH |
1457 | .sp |
1458 | .B anycast | |
1459 | .RI "- " "not implemented" | |
1460 | the destinations are | |
1461 | .I anycast | |
1462 | addresses assigned to this host. They are mainly equivalent | |
1463 | to | |
1464 | .B local | |
1465 | with one difference: such addresses are invalid when used | |
1466 | as the source address of any packet. | |
1467 | ||
1468 | .sp | |
1469 | .B multicast | |
1470 | - a special type used for multicast routing. It is not present in | |
1471 | normal routing tables. | |
1472 | .in -8 | |
1473 | ||
1474 | .P | |
1475 | .B Route tables: | |
4ec1933d SH |
1476 | Linux-2.x can pack routes into several routing tables identified |
1477 | by a number in the range from 1 to 2^31 or by name from the file | |
985794ad | 1478 | .B /etc/iproute2/rt_tables |
cd796bc7 | 1479 | By default all normal routes are inserted into the |
985794ad SH |
1480 | .B main |
1481 | table (ID 254) and the kernel only uses this table when calculating routes. | |
4ec1933d | 1482 | Values (0, 253, 254, and 255) are reserved for built-in use. |
985794ad SH |
1483 | |
1484 | .sp | |
1485 | Actually, one other table always exists, which is invisible but | |
1486 | even more important. It is the | |
1487 | .B local | |
1488 | table (ID 255). This table | |
1489 | consists of routes for local and broadcast addresses. The kernel maintains | |
1490 | this table automatically and the administrator usually need not modify it | |
1491 | or even look at it. | |
1492 | ||
1493 | The multiple routing tables enter the game when | |
1494 | .I policy routing | |
1495 | is used. | |
1496 | ||
1497 | .SS ip route add - add new route | |
1498 | .SS ip route change - change route | |
1499 | .SS ip route replace - change or add new one | |
1500 | ||
1501 | .TP | |
1502 | .BI to " TYPE PREFIX " (default) | |
1503 | the destination prefix of the route. If | |
1504 | .I TYPE | |
1505 | is omitted, | |
1506 | .B ip | |
1507 | assumes type | |
1508 | .BR "unicast" . | |
1509 | Other values of | |
1510 | .I TYPE | |
1511 | are listed above. | |
1512 | .I PREFIX | |
1513 | is an IP or IPv6 address optionally followed by a slash and the | |
1514 | prefix length. If the length of the prefix is missing, | |
1515 | .B ip | |
1516 | assumes a full-length host route. There is also a special | |
1517 | .I PREFIX | |
1518 | .B default | |
1519 | - which is equivalent to IP | |
1520 | .B 0/0 | |
1521 | or to IPv6 | |
1522 | .BR "::/0" . | |
1523 | ||
1524 | .TP | |
1525 | .BI tos " TOS" | |
1526 | .TP | |
1527 | .BI dsfield " TOS" | |
1528 | the Type Of Service (TOS) key. This key has no associated mask and | |
1529 | the longest match is understood as: First, compare the TOS | |
1530 | of the route and of the packet. If they are not equal, then the packet | |
1531 | may still match a route with a zero TOS. | |
1532 | .I TOS | |
1533 | is either an 8 bit hexadecimal number or an identifier | |
1534 | from | |
1535 | .BR "/etc/iproute2/rt_dsfield" . | |
1536 | ||
1537 | .TP | |
1538 | .BI metric " NUMBER" | |
1539 | .TP | |
1540 | .BI preference " NUMBER" | |
1541 | the preference value of the route. | |
1542 | .I NUMBER | |
1543 | is an arbitrary 32bit number. | |
1544 | ||
1545 | .TP | |
1546 | .BI table " TABLEID" | |
1547 | the table to add this route to. | |
1548 | .I TABLEID | |
1549 | may be a number or a string from the file | |
1550 | .BR "/etc/iproute2/rt_tables" . | |
1551 | If this parameter is omitted, | |
1552 | .B ip | |
1553 | assumes the | |
1554 | .B main | |
1555 | table, with the exception of | |
1556 | .BR local " , " broadcast " and " nat | |
1557 | routes, which are put into the | |
1558 | .B local | |
1559 | table by default. | |
1560 | ||
1561 | .TP | |
1562 | .BI dev " NAME" | |
1563 | the output device name. | |
1564 | ||
1565 | .TP | |
1566 | .BI via " ADDRESS" | |
1567 | the address of the nexthop router. Actually, the sense of this field | |
1568 | depends on the route type. For normal | |
1569 | .B unicast | |
1570 | routes it is either the true next hop router or, if it is a direct | |
1571 | route installed in BSD compatibility mode, it can be a local address | |
1572 | of the interface. For NAT routes it is the first address of the block | |
1573 | of translated IP destinations. | |
1574 | ||
1575 | .TP | |
1576 | .BI src " ADDRESS" | |
1577 | the source address to prefer when sending to the destinations | |
1578 | covered by the route prefix. | |
1579 | ||
1580 | .TP | |
1581 | .BI realm " REALMID" | |
1582 | the realm to which this route is assigned. | |
1583 | .I REALMID | |
1584 | may be a number or a string from the file | |
1585 | .BR "/etc/iproute2/rt_realms" . | |
1586 | ||
1587 | .TP | |
1588 | .BI mtu " MTU" | |
1589 | .TP | |
1590 | .BI "mtu lock" " MTU" | |
1591 | the MTU along the path to the destination. If the modifier | |
1592 | .B lock | |
1593 | is not used, the MTU may be updated by the kernel due to | |
1594 | Path MTU Discovery. If the modifier | |
1595 | .B lock | |
1596 | is used, no path MTU discovery will be tried, all packets | |
1597 | will be sent without the DF bit in IPv4 case or fragmented | |
1598 | to MTU for IPv6. | |
1599 | ||
1600 | .TP | |
1601 | .BI window " NUMBER" | |
1602 | the maximal window for TCP to advertise to these destinations, | |
1603 | measured in bytes. It limits maximal data bursts that our TCP | |
1604 | peers are allowed to send to us. | |
1605 | ||
1606 | .TP | |
54e0b2e7 RJ |
1607 | .BI rtt " TIME" |
1608 | the initial RTT ('Round Trip Time') estimate. If no suffix is | |
1609 | specified the units are raw values passed directly to the | |
1610 | routing code to maintain compatability with previous releases. | |
1611 | Otherwise if a suffix of s, sec or secs is used to specify | |
ae9b671d MM |
1612 | seconds; ms, msec or msecs to specify milliseconds; us, usec |
1613 | or usecs to specify microseconds; ns, nsec or nsecs to specify | |
1614 | nanoseconds; j, hz or jiffies to specify jiffies, the value is | |
54e0b2e7 RJ |
1615 | converted to what the routing code expects. |
1616 | ||
1617 | ||
1618 | .TP | |
1619 | .BI rttvar " TIME " "(2.3.15+ only)" | |
ae9b671d | 1620 | the initial RTT variance estimate. Values are specified as with |
54e0b2e7 RJ |
1621 | .BI rtt |
1622 | above. | |
985794ad SH |
1623 | |
1624 | .TP | |
54e0b2e7 RJ |
1625 | .BI rto_min " TIME " "(2.6.23+ only)" |
1626 | the minimum TCP Retransmission TimeOut to use when communicating with this | |
1627 | destination. Values are specified as with | |
1628 | .BI rtt | |
1629 | above. | |
985794ad SH |
1630 | |
1631 | .TP | |
1632 | .BI ssthresh " NUMBER " "(2.3.15+ only)" | |
1633 | an estimate for the initial slow start threshold. | |
1634 | ||
1635 | .TP | |
1636 | .BI cwnd " NUMBER " "(2.3.15+ only)" | |
1637 | the clamp for congestion window. It is ignored if the | |
1638 | .B lock | |
1639 | flag is not used. | |
1640 | ||
6299857d BB |
1641 | .TP |
1642 | .BI initcwnd " NUMBER " "(2.5.70+ only)" | |
704f4df4 | 1643 | the initial congestion window size for connections to this destination. |
6299857d BB |
1644 | Actual window size is this value multiplied by the MSS |
1645 | (``Maximal Segment Size'') for same connection. The default is | |
1646 | zero, meaning to use the values specified in RFC2414. | |
1647 | ||
704f4df4 SH |
1648 | .TP |
1649 | .BI initrwnd " NUMBER " "(2.6.33+ only)" | |
1650 | the initial receive window size for connections to this destination. | |
1651 | Actual window size is this value multiplied by the MSS of the connection. | |
1652 | The default value is zero, meaning to use Slow Start value. | |
1653 | ||
985794ad SH |
1654 | .TP |
1655 | .BI advmss " NUMBER " "(2.3.15+ only)" | |
1656 | the MSS ('Maximal Segment Size') to advertise to these | |
1657 | destinations when establishing TCP connections. If it is not given, | |
1658 | Linux uses a default value calculated from the first hop device MTU. | |
1659 | (If the path to these destination is asymmetric, this guess may be wrong.) | |
1660 | ||
1661 | .TP | |
1662 | .BI reordering " NUMBER " "(2.3.15+ only)" | |
1663 | Maximal reordering on the path to this destination. | |
1664 | If it is not given, Linux uses the value selected with | |
1665 | .B sysctl | |
1666 | variable | |
1667 | .BR "net/ipv4/tcp_reordering" . | |
1668 | ||
1669 | .TP | |
1670 | .BI nexthop " NEXTHOP" | |
1671 | the nexthop of a multipath route. | |
1672 | .I NEXTHOP | |
1673 | is a complex value with its own syntax similar to the top level | |
1674 | argument lists: | |
1675 | ||
1676 | .in +8 | |
1677 | .BI via " ADDRESS" | |
1678 | - is the nexthop router. | |
1679 | .sp | |
1680 | ||
1681 | .BI dev " NAME" | |
1682 | - is the output device. | |
1683 | .sp | |
1684 | ||
1685 | .BI weight " NUMBER" | |
1686 | - is a weight for this element of a multipath | |
1687 | route reflecting its relative bandwidth or quality. | |
1688 | .in -8 | |
1689 | ||
1690 | .TP | |
1691 | .BI scope " SCOPE_VAL" | |
1692 | the scope of the destinations covered by the route prefix. | |
1693 | .I SCOPE_VAL | |
1694 | may be a number or a string from the file | |
1695 | .BR "/etc/iproute2/rt_scopes" . | |
1696 | If this parameter is omitted, | |
1697 | .B ip | |
1698 | assumes scope | |
1699 | .B global | |
1700 | for all gatewayed | |
1701 | .B unicast | |
1702 | routes, scope | |
1703 | .B link | |
1704 | for direct | |
1705 | .BR unicast " and " broadcast | |
1706 | routes and scope | |
1707 | .BR host " for " local | |
1708 | routes. | |
1709 | ||
1710 | .TP | |
1711 | .BI protocol " RTPROTO" | |
1712 | the routing protocol identifier of this route. | |
1713 | .I RTPROTO | |
1714 | may be a number or a string from the file | |
1715 | .BR "/etc/iproute2/rt_protos" . | |
1716 | If the routing protocol ID is not given, | |
1717 | .B ip assumes protocol | |
1718 | .B boot | |
1719 | (i.e. it assumes the route was added by someone who doesn't | |
1720 | understand what they are doing). Several protocol values have | |
1721 | a fixed interpretation. | |
1722 | Namely: | |
1723 | ||
1724 | .in +8 | |
1725 | .B redirect | |
1726 | - the route was installed due to an ICMP redirect. | |
1727 | .sp | |
1728 | ||
1729 | .B kernel | |
1730 | - the route was installed by the kernel during autoconfiguration. | |
1731 | .sp | |
1732 | ||
1733 | .B boot | |
1734 | - the route was installed during the bootup sequence. | |
1735 | If a routing daemon starts, it will purge all of them. | |
1736 | .sp | |
1737 | ||
1738 | .B static | |
1739 | - the route was installed by the administrator | |
1740 | to override dynamic routing. Routing daemon will respect them | |
1741 | and, probably, even advertise them to its peers. | |
1742 | .sp | |
1743 | ||
1744 | .B ra | |
1745 | - the route was installed by Router Discovery protocol. | |
1746 | .in -8 | |
1747 | ||
1748 | .sp | |
1749 | The rest of the values are not reserved and the administrator is free | |
1750 | to assign (or not to assign) protocol tags. | |
1751 | ||
1752 | .TP | |
1753 | .B onlink | |
1754 | pretend that the nexthop is directly attached to this link, | |
1755 | even if it does not match any interface prefix. | |
1756 | ||
985794ad SH |
1757 | .SS ip route delete - delete route |
1758 | ||
1759 | .B ip route del | |
1760 | has the same arguments as | |
1761 | .BR "ip route add" , | |
1762 | but their semantics are a bit different. | |
1763 | ||
1764 | Key values | |
1765 | .RB "(" to ", " tos ", " preference " and " table ")" | |
1766 | select the route to delete. If optional attributes are present, | |
1767 | .B ip | |
1768 | verifies that they coincide with the attributes of the route to delete. | |
1769 | If no route with the given key and attributes was found, | |
1770 | .B ip route del | |
1771 | fails. | |
1772 | ||
1773 | .SS ip route show - list routes | |
1774 | the command displays the contents of the routing tables or the route(s) | |
1775 | selected by some criteria. | |
1776 | ||
1777 | .TP | |
1778 | .BI to " SELECTOR " (default) | |
1779 | only select routes from the given range of destinations. | |
1780 | .I SELECTOR | |
1781 | consists of an optional modifier | |
1782 | .RB "(" root ", " match " or " exact ")" | |
1783 | and a prefix. | |
1784 | .BI root " PREFIX" | |
1785 | selects routes with prefixes not shorter than | |
1786 | .IR PREFIX "." | |
1787 | F.e. | |
1788 | .BI root " 0/0" | |
1789 | selects the entire routing table. | |
1790 | .BI match " PREFIX" | |
1791 | selects routes with prefixes not longer than | |
1792 | .IR PREFIX "." | |
1793 | F.e. | |
1794 | .BI match " 10.0/16" | |
1795 | selects | |
1796 | .IR 10.0/16 "," | |
1797 | .IR 10/8 " and " 0/0 , | |
1798 | but it does not select | |
1799 | .IR 10.1/16 " and " 10.0.0/24 . | |
1800 | And | |
1801 | .BI exact " PREFIX" | |
1802 | (or just | |
1803 | .IR PREFIX ")" | |
1804 | selects routes with this exact prefix. If neither of these options | |
1805 | are present, | |
1806 | .B ip | |
1807 | assumes | |
1808 | .BI root " 0/0" | |
1809 | i.e. it lists the entire table. | |
1810 | ||
1811 | .TP | |
1812 | .BI tos " TOS" | |
1813 | .BI dsfield " TOS" | |
1814 | only select routes with the given TOS. | |
1815 | ||
1816 | .TP | |
1817 | .BI table " TABLEID" | |
1818 | show the routes from this table(s). The default setting is to show | |
1819 | .BR table main "." | |
1820 | .I TABLEID | |
1821 | may either be the ID of a real table or one of the special values: | |
1822 | .sp | |
1823 | .in +8 | |
1824 | .B all | |
1825 | - list all of the tables. | |
1826 | .sp | |
1827 | .B cache | |
1828 | - dump the routing cache. | |
1829 | .in -8 | |
1830 | ||
1831 | .TP | |
1832 | .B cloned | |
1833 | .TP | |
1834 | .B cached | |
1835 | list cloned routes i.e. routes which were dynamically forked from | |
1836 | other routes because some route attribute (f.e. MTU) was updated. | |
1837 | Actually, it is equivalent to | |
1838 | .BR "table cache" "." | |
1839 | ||
1840 | .TP | |
1841 | .BI from " SELECTOR" | |
1842 | the same syntax as for | |
1843 | .BR to "," | |
1844 | but it binds the source address range rather than destinations. | |
1845 | Note that the | |
1846 | .B from | |
1847 | option only works with cloned routes. | |
1848 | ||
1849 | .TP | |
1850 | .BI protocol " RTPROTO" | |
1851 | only list routes of this protocol. | |
1852 | ||
1853 | .TP | |
1854 | .BI scope " SCOPE_VAL" | |
1855 | only list routes with this scope. | |
1856 | ||
1857 | .TP | |
1858 | .BI type " TYPE" | |
1859 | only list routes of this type. | |
1860 | ||
1861 | .TP | |
1862 | .BI dev " NAME" | |
1863 | only list routes going via this device. | |
1864 | ||
1865 | .TP | |
1866 | .BI via " PREFIX" | |
1867 | only list routes going via the nexthop routers selected by | |
1868 | .IR PREFIX "." | |
1869 | ||
1870 | .TP | |
1871 | .BI src " PREFIX" | |
1872 | only list routes with preferred source addresses selected | |
1873 | by | |
1874 | .IR PREFIX "." | |
1875 | ||
1876 | .TP | |
1877 | .BI realm " REALMID" | |
1878 | .TP | |
1879 | .BI realms " FROMREALM/TOREALM" | |
1880 | only list routes with these realms. | |
1881 | ||
1882 | .SS ip route flush - flush routing tables | |
1883 | this command flushes routes selected by some criteria. | |
1884 | ||
1885 | .sp | |
1886 | The arguments have the same syntax and semantics as the arguments of | |
1887 | .BR "ip route show" , | |
1888 | but routing tables are not listed but purged. The only difference is | |
1889 | the default action: | |
1890 | .B show | |
1891 | dumps all the IP main routing table but | |
1892 | .B flush | |
1893 | prints the helper page. | |
1894 | ||
1895 | .sp | |
1896 | With the | |
1897 | .B -statistics | |
1898 | option, the command becomes verbose. It prints out the number of | |
1899 | deleted routes and the number of rounds made to flush the routing | |
1900 | table. If the option is given | |
1901 | twice, | |
1902 | .B ip route flush | |
1903 | also dumps all the deleted routes in the format described in the | |
1904 | previous subsection. | |
1905 | ||
1906 | .SS ip route get - get a single route | |
1907 | this command gets a single route to a destination and prints its | |
1908 | contents exactly as the kernel sees it. | |
1909 | ||
1910 | .TP | |
1911 | .BI to " ADDRESS " (default) | |
1912 | the destination address. | |
1913 | ||
1914 | .TP | |
1915 | .BI from " ADDRESS" | |
1916 | the source address. | |
1917 | ||
1918 | .TP | |
1919 | .BI tos " TOS" | |
1920 | .TP | |
1921 | .BI dsfield " TOS" | |
1922 | the Type Of Service. | |
1923 | ||
1924 | .TP | |
1925 | .BI iif " NAME" | |
1926 | the device from which this packet is expected to arrive. | |
1927 | ||
1928 | .TP | |
1929 | .BI oif " NAME" | |
1930 | force the output device on which this packet will be routed. | |
1931 | ||
1932 | .TP | |
1933 | .B connected | |
ae9b671d | 1934 | if no source address |
985794ad SH |
1935 | .RB "(option " from ")" |
1936 | was given, relookup the route with the source set to the preferred | |
1937 | address received from the first lookup. | |
1938 | If policy routing is used, it may be a different route. | |
1939 | ||
1940 | .P | |
1941 | Note that this operation is not equivalent to | |
1942 | .BR "ip route show" . | |
1943 | .B show | |
1944 | shows existing routes. | |
1945 | .B get | |
1946 | resolves them and creates new clones if necessary. Essentially, | |
1947 | .B get | |
1948 | is equivalent to sending a packet along this path. | |
1949 | If the | |
1950 | .B iif | |
1951 | argument is not given, the kernel creates a route | |
1952 | to output packets towards the requested destination. | |
1953 | This is equivalent to pinging the destination | |
1954 | with a subsequent | |
1955 | .BR "ip route ls cache" , | |
1956 | however, no packets are actually sent. With the | |
1957 | .B iif | |
1958 | argument, the kernel pretends that a packet arrived from this interface | |
1959 | and searches for a path to forward the packet. | |
1960 | ||
1961 | .SH ip rule - routing policy database management | |
1962 | ||
1963 | .BR "Rule" s | |
1964 | in the routing policy database control the route selection algorithm. | |
1965 | ||
1966 | .P | |
1967 | Classic routing algorithms used in the Internet make routing decisions | |
1968 | based only on the destination address of packets (and in theory, | |
1969 | but not in practice, on the TOS field). | |
1970 | ||
1971 | .P | |
1972 | In some circumstances we want to route packets differently depending not only | |
1973 | on destination addresses, but also on other packet fields: source address, | |
1974 | IP protocol, transport protocol ports or even packet payload. | |
1975 | This task is called 'policy routing'. | |
1976 | ||
1977 | .P | |
1978 | To solve this task, the conventional destination based routing table, ordered | |
1979 | according to the longest match rule, is replaced with a 'routing policy | |
1980 | database' (or RPDB), which selects routes by executing some set of rules. | |
1981 | ||
1982 | .P | |
1983 | Each policy routing rule consists of a | |
1984 | .B selector | |
1985 | and an | |
1986 | .B action predicate. | |
1987 | The RPDB is scanned in the order of increasing priority. The selector | |
1988 | of each rule is applied to {source address, destination address, incoming | |
1989 | interface, tos, fwmark} and, if the selector matches the packet, | |
1990 | the action is performed. The action predicate may return with success. | |
1991 | In this case, it will either give a route or failure indication | |
1992 | and the RPDB lookup is terminated. Otherwise, the RPDB program | |
1993 | continues on the next rule. | |
1994 | ||
1995 | .P | |
1996 | Semantically, natural action is to select the nexthop and the output device. | |
1997 | ||
1998 | .P | |
1999 | At startup time the kernel configures the default RPDB consisting of three | |
2000 | rules: | |
2001 | ||
2002 | .TP | |
2003 | 1. | |
2004 | Priority: 0, Selector: match anything, Action: lookup routing | |
2005 | table | |
2006 | .B local | |
2007 | (ID 255). | |
2008 | The | |
2009 | .B local | |
2010 | table is a special routing table containing | |
2011 | high priority control routes for local and broadcast addresses. | |
2012 | .sp | |
2013 | Rule 0 is special. It cannot be deleted or overridden. | |
2014 | ||
2015 | .TP | |
2016 | 2. | |
2017 | Priority: 32766, Selector: match anything, Action: lookup routing | |
2018 | table | |
2019 | .B main | |
2020 | (ID 254). | |
2021 | The | |
2022 | .B main | |
2023 | table is the normal routing table containing all non-policy | |
2024 | routes. This rule may be deleted and/or overridden with other | |
2025 | ones by the administrator. | |
2026 | ||
2027 | .TP | |
2028 | 3. | |
2029 | Priority: 32767, Selector: match anything, Action: lookup routing | |
2030 | table | |
2031 | .B default | |
2032 | (ID 253). | |
2033 | The | |
2034 | .B default | |
2035 | table is empty. It is reserved for some post-processing if no previous | |
2036 | default rules selected the packet. | |
2037 | This rule may also be deleted. | |
2038 | ||
2039 | .P | |
2040 | Each RPDB entry has additional | |
2041 | attributes. F.e. each rule has a pointer to some routing | |
2042 | table. NAT and masquerading rules have an attribute to select new IP | |
2043 | address to translate/masquerade. Besides that, rules have some | |
2044 | optional attributes, which routes have, namely | |
2045 | .BR "realms" . | |
2046 | These values do not override those contained in the routing tables. They | |
2047 | are only used if the route did not select any attributes. | |
2048 | ||
2049 | .sp | |
2050 | The RPDB may contain rules of the following types: | |
2051 | ||
2052 | .in +8 | |
2053 | .B unicast | |
2054 | - the rule prescribes to return the route found | |
2055 | in the routing table referenced by the rule. | |
2056 | ||
2057 | .B blackhole | |
2058 | - the rule prescribes to silently drop the packet. | |
2059 | ||
2060 | .B unreachable | |
2061 | - the rule prescribes to generate a 'Network is unreachable' error. | |
2062 | ||
2063 | .B prohibit | |
2064 | - the rule prescribes to generate 'Communication is administratively | |
2065 | prohibited' error. | |
2066 | ||
2067 | .B nat | |
2068 | - the rule prescribes to translate the source address | |
2069 | of the IP packet into some other value. | |
2070 | .in -8 | |
2071 | ||
2072 | .SS ip rule add - insert a new rule | |
2073 | .SS ip rule delete - delete a rule | |
2074 | ||
2075 | .TP | |
2076 | .BI type " TYPE " (default) | |
2077 | the type of this rule. The list of valid types was given in the previous | |
2078 | subsection. | |
2079 | ||
2080 | .TP | |
2081 | .BI from " PREFIX" | |
2082 | select the source prefix to match. | |
2083 | ||
2084 | .TP | |
2085 | .BI to " PREFIX" | |
2086 | select the destination prefix to match. | |
2087 | ||
2088 | .TP | |
2089 | .BI iif " NAME" | |
2090 | select the incoming device to match. If the interface is loopback, | |
2091 | the rule only matches packets originating from this host. This means | |
2092 | that you may create separate routing tables for forwarded and local | |
2093 | packets and, hence, completely segregate them. | |
2094 | ||
85eae222 PM |
2095 | .TP |
2096 | .BI oif " NAME" | |
2097 | select the outgoing device to match. The outgoing interface is only | |
2098 | available for packets originating from local sockets that are bound to | |
2099 | a device. | |
2100 | ||
985794ad SH |
2101 | .TP |
2102 | .BI tos " TOS" | |
2103 | .TP | |
2104 | .BI dsfield " TOS" | |
2105 | select the TOS value to match. | |
2106 | ||
2107 | .TP | |
2108 | .BI fwmark " MARK" | |
2109 | select the | |
2110 | .B fwmark | |
2111 | value to match. | |
2112 | ||
2113 | .TP | |
2114 | .BI priority " PREFERENCE" | |
2115 | the priority of this rule. Each rule should have an explicitly | |
2116 | set | |
2117 | .I unique | |
2118 | priority value. | |
21561e71 | 2119 | The options preference and order are synonyms with priority. |
985794ad SH |
2120 | |
2121 | .TP | |
2122 | .BI table " TABLEID" | |
2123 | the routing table identifier to lookup if the rule selector matches. | |
21561e71 | 2124 | It is also possible to use lookup instead of table. |
985794ad SH |
2125 | |
2126 | .TP | |
2127 | .BI realms " FROM/TO" | |
2128 | Realms to select if the rule matched and the routing table lookup | |
ae9b671d | 2129 | succeeded. Realm |
985794ad SH |
2130 | .I TO |
2131 | is only used if the route did not select any realm. | |
2132 | ||
2133 | .TP | |
2134 | .BI nat " ADDRESS" | |
2135 | The base of the IP address block to translate (for source addresses). | |
ae9b671d | 2136 | The |
985794ad SH |
2137 | .I ADDRESS |
2138 | may be either the start of the block of NAT addresses (selected by NAT | |
2139 | routes) or a local host address (or even zero). | |
2140 | In the last case the router does not translate the packets, but | |
2141 | masquerades them to this address. | |
21561e71 | 2142 | Using map-to instead of nat means the same thing. |
985794ad SH |
2143 | |
2144 | .B Warning: | |
2145 | Changes to the RPDB made with these commands do not become active | |
2146 | immediately. It is assumed that after a script finishes a batch of | |
2147 | updates, it flushes the routing cache with | |
2148 | .BR "ip route flush cache" . | |
2149 | ||
890fe64e SH |
2150 | .SS ip rule flush - also dumps all the deleted rules. |
2151 | This command has no arguments. | |
2152 | ||
985794ad SH |
2153 | .SS ip rule show - list rules |
2154 | This command has no arguments. | |
21561e71 | 2155 | The options list or lst are synonyms with show. |
985794ad SH |
2156 | |
2157 | .SH ip maddress - multicast addresses management | |
2158 | ||
2159 | .B maddress | |
2160 | objects are multicast addresses. | |
2161 | ||
2162 | .SS ip maddress show - list multicast addresses | |
2163 | ||
2164 | .TP | |
2165 | .BI dev " NAME " (default) | |
2166 | the device name. | |
2167 | ||
2168 | .SS ip maddress add - add a multicast address | |
2169 | .SS ip maddress delete - delete a multicast address | |
2170 | these commands attach/detach a static link layer multicast address | |
2171 | to listen on the interface. | |
2172 | Note that it is impossible to join protocol multicast groups | |
2173 | statically. This command only manages link layer addresses. | |
2174 | ||
2175 | .TP | |
2176 | .BI address " LLADDRESS " (default) | |
2177 | the link layer multicast address. | |
2178 | ||
2179 | .TP | |
2180 | .BI dev " NAME" | |
2181 | the device to join/leave this multicast address. | |
2182 | ||
2183 | .SH ip mroute - multicast routing cache management | |
2184 | .B mroute | |
2185 | objects are multicast routing cache entries created by a user level | |
2186 | mrouting daemon (f.e. | |
2187 | .B pimd | |
2188 | or | |
2189 | .B mrouted | |
2190 | ). | |
2191 | ||
2192 | Due to the limitations of the current interface to the multicast routing | |
2193 | engine, it is impossible to change | |
2194 | .B mroute | |
2195 | objects administratively, so we may only display them. This limitation | |
2196 | will be removed in the future. | |
2197 | ||
2198 | .SS ip mroute show - list mroute cache entries | |
2199 | ||
2200 | .TP | |
2201 | .BI to " PREFIX " (default) | |
2202 | the prefix selecting the destination multicast addresses to list. | |
2203 | ||
2204 | .TP | |
2205 | .BI iif " NAME" | |
2206 | the interface on which multicast packets are received. | |
2207 | ||
2208 | .TP | |
2209 | .BI from " PREFIX" | |
2210 | the prefix selecting the IP source addresses of the multicast route. | |
2211 | ||
2212 | .SH ip tunnel - tunnel configuration | |
2213 | .B tunnel | |
8a10d311 | 2214 | objects are tunnels, encapsulating packets in IP packets and then |
985794ad | 2215 | sending them over the IP infrastructure. |
8a10d311 YH |
2216 | The encapulating (or outer) address family is specified by the |
2217 | .B -f | |
2218 | option. The default is IPv4. | |
985794ad SH |
2219 | |
2220 | .SS ip tunnel add - add a new tunnel | |
2221 | .SS ip tunnel change - change an existing tunnel | |
2222 | .SS ip tunnel delete - destroy a tunnel | |
2223 | ||
2224 | .TP | |
2225 | .BI name " NAME " (default) | |
2226 | select the tunnel device name. | |
2227 | ||
2228 | .TP | |
2229 | .BI mode " MODE" | |
8a10d311 YH |
2230 | set the tunnel mode. Available modes depend on the encapsulating address family. |
2231 | .br | |
2232 | Modes for IPv4 encapsulation available: | |
2233 | .BR ipip ", " sit ", " isatap " and " gre "." | |
2234 | .br | |
2235 | Modes for IPv6 encapsulation available: | |
2236 | .BR ip6ip6 ", " ipip6 " and " any "." | |
985794ad SH |
2237 | |
2238 | .TP | |
2239 | .BI remote " ADDRESS" | |
2240 | set the remote endpoint of the tunnel. | |
2241 | ||
2242 | .TP | |
2243 | .BI local " ADDRESS" | |
2244 | set the fixed local address for tunneled packets. | |
2245 | It must be an address on another interface of this host. | |
2246 | ||
2247 | .TP | |
2248 | .BI ttl " N" | |
ae9b671d | 2249 | set a fixed TTL |
985794ad SH |
2250 | .I N |
2251 | on tunneled packets. | |
2252 | .I N | |
2253 | is a number in the range 1--255. 0 is a special value | |
ae9b671d | 2254 | meaning that packets inherit the TTL value. |
8a10d311 | 2255 | The default value for IPv4 tunnels is: |
985794ad | 2256 | .BR "inherit" . |
8a10d311 YH |
2257 | The default value for IPv6 tunnels is: |
2258 | .BR "64" . | |
2259 | ||
985794ad SH |
2260 | |
2261 | .TP | |
2262 | .BI tos " T" | |
2263 | .TP | |
2264 | .BI dsfield " T" | |
8a10d311 YH |
2265 | .TP |
2266 | .BI tclass " T" | |
2267 | set a fixed TOS (or traffic class in IPv6) | |
985794ad SH |
2268 | .I T |
2269 | on tunneled packets. | |
2270 | The default value is: | |
2271 | .BR "inherit" . | |
2272 | ||
2273 | .TP | |
ae9b671d | 2274 | .BI dev " NAME" |
985794ad SH |
2275 | bind the tunnel to the device |
2276 | .I NAME | |
2277 | so that tunneled packets will only be routed via this device and will | |
2278 | not be able to escape to another device when the route to endpoint | |
2279 | changes. | |
2280 | ||
2281 | .TP | |
2282 | .B nopmtudisc | |
2283 | disable Path MTU Discovery on this tunnel. | |
2284 | It is enabled by default. Note that a fixed ttl is incompatible | |
2285 | with this option: tunnelling with a fixed ttl always makes pmtu | |
2286 | discovery. | |
2287 | ||
2288 | .TP | |
2289 | .BI key " K" | |
2290 | .TP | |
2291 | .BI ikey " K" | |
2292 | .TP | |
2293 | .BI okey " K" | |
2294 | .RB ( " only GRE tunnels " ) | |
2295 | use keyed GRE with key | |
2296 | .IR K ". " K | |
2297 | is either a number or an IP address-like dotted quad. | |
2298 | The | |
2299 | .B key | |
2300 | parameter sets the key to use in both directions. | |
2301 | The | |
2302 | .BR ikey " and " okey | |
2303 | parameters set different keys for input and output. | |
ae9b671d | 2304 | |
985794ad SH |
2305 | .TP |
2306 | .BR csum ", " icsum ", " ocsum | |
2307 | .RB ( " only GRE tunnels " ) | |
2308 | generate/require checksums for tunneled packets. | |
ae9b671d | 2309 | The |
985794ad SH |
2310 | .B ocsum |
2311 | flag calculates checksums for outgoing packets. | |
2312 | The | |
2313 | .B icsum | |
2314 | flag requires that all input packets have the correct | |
2315 | checksum. The | |
2316 | .B csum | |
2317 | flag is equivalent to the combination | |
2318 | .BR "icsum ocsum" . | |
2319 | ||
2320 | .TP | |
2321 | .BR seq ", " iseq ", " oseq | |
2322 | .RB ( " only GRE tunnels " ) | |
2323 | serialize packets. | |
2324 | The | |
2325 | .B oseq | |
2326 | flag enables sequencing of outgoing packets. | |
2327 | The | |
2328 | .B iseq | |
2329 | flag requires that all input packets are serialized. | |
2330 | The | |
2331 | .B seq | |
ae9b671d | 2332 | flag is equivalent to the combination |
985794ad SH |
2333 | .BR "iseq oseq" . |
2334 | .B It isn't work. Don't use it. | |
2335 | ||
8a10d311 | 2336 | .TP |
488f1c77 | 2337 | .BR "dscp inherit" |
8a10d311 YH |
2338 | .RB ( " only IPv6 tunnels " ) |
2339 | Inherit DS field between inner and outer header. | |
2340 | ||
2341 | .TP | |
8a10d311 YH |
2342 | .BI encaplim " ELIM" |
2343 | .RB ( " only IPv6 tunnels " ) | |
2344 | set a fixed encapsulation limit. Default is 4. | |
2345 | ||
2346 | .TP | |
8a10d311 YH |
2347 | .BI flowlabel " FLOWLABEL" |
2348 | .RB ( " only IPv6 tunnels " ) | |
2349 | set a fixed flowlabel. | |
2350 | ||
a07e9912 SH |
2351 | .SS ip tunnel prl - potential router list (ISATAP only) |
2352 | ||
2353 | .TP | |
2354 | .BI dev " NAME" | |
2355 | mandatory device name. | |
2356 | ||
2357 | .TP | |
2358 | .BI prl-default " ADDR" | |
2359 | .TP | |
2360 | .BI prl-nodefault " ADDR" | |
2361 | .TP | |
2362 | .BI prl-delete " ADDR" | |
2363 | .RB "Add or delete " ADDR | |
2364 | as a potential router or default router. | |
2365 | ||
985794ad SH |
2366 | .SS ip tunnel show - list tunnels |
2367 | This command has no arguments. | |
2368 | ||
2369 | .SH ip monitor and rtmon - state monitoring | |
2370 | ||
2371 | The | |
2372 | .B ip | |
2373 | utility can monitor the state of devices, addresses | |
2374 | and routes continuously. This option has a slightly different format. | |
2375 | Namely, the | |
2376 | .B monitor | |
2377 | command is the first in the command line and then the object list follows: | |
2378 | ||
2379 | .BR "ip monitor" " [ " all " |" | |
2380 | .IR LISTofOBJECTS " ]" | |
2381 | ||
2382 | .I OBJECT-LIST | |
2383 | is the list of object types that we want to monitor. | |
2384 | It may contain | |
2385 | .BR link ", " address " and " route "." | |
2386 | If no | |
2387 | .B file | |
2388 | argument is given, | |
2389 | .B ip | |
2390 | opens RTNETLINK, listens on it and dumps state changes in the format | |
2391 | described in previous sections. | |
2392 | ||
2393 | .P | |
2394 | If a file name is given, it does not listen on RTNETLINK, | |
2395 | but opens the file containing RTNETLINK messages saved in binary format | |
2396 | and dumps them. Such a history file can be generated with the | |
2397 | .B rtmon | |
2398 | utility. This utility has a command line syntax similar to | |
2399 | .BR "ip monitor" . | |
2400 | Ideally, | |
2401 | .B rtmon | |
2402 | should be started before the first network configuration command | |
2403 | is issued. F.e. if you insert: | |
2404 | .sp | |
2405 | .in +8 | |
2406 | rtmon file /var/log/rtmon.log | |
2407 | .in -8 | |
2408 | .sp | |
2409 | in a startup script, you will be able to view the full history | |
2410 | later. | |
2411 | ||
2412 | .P | |
2413 | Certainly, it is possible to start | |
2414 | .B rtmon | |
2415 | at any time. | |
2416 | It prepends the history with the state snapshot dumped at the moment | |
2417 | of starting. | |
2418 | ||
ae9b671d MM |
2419 | .SH ip xfrm - setting xfrm |
2420 | xfrm is an IP framework, which can transform format of the datagrams, | |
2421 | .br | |
2422 | i.e. encrypt the packets with some algorithm. xfrm policy and xfrm state | |
2423 | are associated through templates | |
2424 | .IR TMPL_LIST "." | |
2425 | This framework is used as a part of IPsec protocol. | |
2426 | ||
2427 | .SS ip xfrm state add - add new state into xfrm | |
2428 | ||
2429 | .SS ip xfrm state update - update existing xfrm state | |
2430 | ||
2431 | .SS ip xfrm state allocspi - allocate SPI value | |
2432 | ||
2433 | .TP | |
2434 | .I MODE | |
2435 | is set as default to | |
2436 | .BR transport "," | |
2437 | but it could be set to | |
2438 | .BR tunnel "," ro " or " beet "." | |
2439 | ||
2440 | .TP | |
2441 | .I FLAG-LIST | |
2442 | contains one or more flags. | |
2443 | ||
2444 | .TP | |
2445 | .I FLAG | |
2446 | could be set to | |
2447 | .BR noecn ", " decap-dscp " or " wildrecv "." | |
2448 | ||
2449 | .TP | |
2450 | .I ENCAP | |
2451 | encapsulation is set to encapsulation type | |
2452 | .IR ENCAP-TYPE ", source port " SPORT ", destination port " DPORT " and " OADDR "." | |
2453 | ||
2454 | .TP | |
2455 | .I ENCAP-TYPE | |
2456 | could be set to | |
2457 | .BR espinudp " or " espinudp-nonike "." | |
2458 | ||
2459 | .TP | |
2460 | .I ALGO-LIST | |
2461 | contains one or more algorithms | |
2462 | .I ALGO | |
2463 | which depend on the type of algorithm set by | |
2464 | .IR ALGO_TYPE "." | |
2465 | It can be used these algoritms | |
2466 | .BR enc ", " auth " or " comp "." | |
2467 | ||
2468 | .SS ip xfrm policy add - add a new policy | |
2469 | ||
2470 | .SS ip xfrm policy update - update an existing policy | |
2471 | ||
2472 | .SS ip xfrm policy delete - delete existing policy | |
2473 | ||
2474 | .SS ip xfrm policy get - get existing policy | |
2475 | ||
2476 | .SS ip xfrm policy deleteall - delete all existing xfrm policy | |
2477 | ||
2478 | .SS ip xfrm policy list - print out the list of xfrm policy | |
2479 | ||
2480 | .SS ip xfrm policy flush - flush policies | |
2481 | It can be flush | |
2482 | .BR all | |
2483 | policies or only those specified with | |
2484 | .BR ptype "." | |
2485 | ||
2486 | .TP | |
2487 | .BI dir " DIR " | |
2488 | directory could be one of these: | |
2489 | .BR "inp", " out " or " fwd". | |
2490 | ||
2491 | .TP | |
2492 | .IR SELECTOR | |
2493 | selects for which addresses will be set up the policy. The selector | |
2494 | is defined by source and destination address. | |
2495 | ||
2496 | .TP | |
2497 | .IR UPSPEC | |
2498 | is defined by source port | |
2499 | .BR sport ", " | |
2500 | destination port | |
2501 | .BR dport ", " type | |
4a9608e6 | 2502 | as number, |
ae9b671d | 2503 | .B code |
4a9608e6 TT |
2504 | also number and |
2505 | .BR key | |
2506 | as dotted-quad or number. | |
ae9b671d MM |
2507 | |
2508 | .TP | |
2509 | .BI dev " DEV " | |
2510 | specify network device. | |
2511 | ||
2512 | .TP | |
2513 | .BI index " INDEX " | |
2514 | the number of indexed policy. | |
2515 | ||
2516 | .TP | |
2517 | .BI ptype " PTYPE " | |
2518 | type is set as default on | |
2519 | .BR "main" , | |
2520 | could be switch on | |
2521 | .BR "sub" . | |
2522 | ||
2523 | .TP | |
2524 | .BI action " ACTION " | |
2525 | is set as default on | |
2526 | .BR "allow". | |
2527 | It could be switch on | |
2528 | .BR "block". | |
2529 | ||
2530 | .TP | |
2531 | .BI priority " PRIORITY " | |
2532 | priority is a number. Default priority is set on zero. | |
2533 | ||
2534 | .TP | |
2535 | .IR LIMIT-LIST | |
2536 | limits are set in seconds, bytes or numbers of packets. | |
2537 | ||
2538 | .TP | |
2539 | .IR TMPL-LIST | |
2540 | template list is based on | |
2541 | .IR ID "," | |
2542 | .BR mode ", " reqid " and " level ". " | |
2543 | ||
2544 | .TP | |
2545 | .IR ID | |
2546 | is specified by source address, destination address, | |
2547 | .I proto | |
2548 | and value of | |
2549 | .IR spi "." | |
2550 | ||
2551 | .TP | |
2552 | .IR XFRM_PROTO | |
2553 | values: | |
2554 | .BR esp ", " ah ", " comp ", " route2 " or " hao "." | |
2555 | ||
2556 | .TP | |
2557 | .IR MODE | |
2558 | is set as default on | |
2559 | .BR transport "," | |
2560 | but it could be set on | |
2561 | .BR tunnel " or " beet "." | |
2562 | ||
2563 | .TP | |
2564 | .IR LEVEL | |
2565 | is set as default on | |
2566 | .BR required | |
2567 | and the other choice is | |
2568 | .BR use "." | |
2569 | ||
2570 | .TP | |
2571 | .IR UPSPEC | |
2572 | is specified by | |
4a9608e6 TT |
2573 | .BR sport " and " dport " (for UDP/TCP), " |
2574 | .BR type " and " code " (for ICMP; as number) or " | |
2575 | .BR key " (for GRE; as dotted-quad or number)." | |
2576 | . | |
ae9b671d MM |
2577 | |
2578 | .SS ip xfrm monitor - is used for listing all objects or defined group of them. | |
2579 | The | |
2580 | .B xfrm monitor | |
2581 | can monitor the policies for all objects or defined group of them. | |
2582 | ||
985794ad | 2583 | .SH HISTORY |
985794ad SH |
2584 | .B ip |
2585 | was written by Alexey N. Kuznetsov and added in Linux 2.2. | |
2586 | .SH SEE ALSO | |
2587 | .BR tc (8) | |
2588 | .br | |
2589 | .RB "IP Command reference " ip-cref.ps | |
2590 | .br | |
2591 | .RB "IP tunnels " ip-cref.ps | |
fd3877fe AW |
2592 | .br |
2593 | .RB "User documentation at " http://lartc.org/ ", but please direct bugreports and patches to: " <netdev@vger.kernel.org> | |
985794ad SH |
2594 | |
2595 | .SH AUTHOR | |
526afe40 | 2596 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |