1IP(8)                                Linux                               IP(8)
2
3
4

NAME

6       ip - show / manipulate routing, devices, policy routing and tunnels
7

SYNOPSIS

9       ip [ OPTIONS ] OBJECT { COMMAND | help }
10
11
12       ip [ -force ] -batch filename
13
14
15       OBJECT := { link | address | addrlabel | route | rule | neigh | ntable
16               | tunnel | tuntap | maddress | mroute | mrule | monitor | xfrm
17               | netns | l2tp | tcp_metrics | token | macsec }
18
19
20       OPTIONS := { -V[ersion] | -h[uman-readable] | -s[tatistics] |
21               -d[etails] | -r[esolve] | -iec | -f[amily] { inet | inet6 | ipx
22               | dnet | link } | -4 | -6 | -I | -D | -B | -0 | -l[oops] { max‐
23               imum-addr-flush-attempts } | -o[neline] | -rc[vbuf] [size] |
24               -t[imestamp] | -ts[hort] | -n[etns] name | -a[ll] | -c[olor] }
25
26
27

OPTIONS

29       -V, -Version
30              Print the version of the ip utility and exit.
31
32
33       -h, -human, -human-readable
34              output statistics with human readable values followed by suffix.
35
36
37       -b, -batch <FILENAME>
38              Read commands from provided file or standard input and invoke
39              them.  First failure will cause termination of ip.
40
41
42       -force Don't terminate ip on errors in batch mode.  If there were any
43              errors during execution of the commands, the application return
44              code will be non zero.
45
46
47       -s, -stats, -statistics
48              Output more information. If the option appears twice or more,
49              the amount of information increases.  As a rule, the information
50              is statistics or some time values.
51
52
53       -d, -details
54              Output more detailed information.
55
56
57       -l, -loops <COUNT>
58              Specify maximum number of loops the 'ip address flush' logic
59              will attempt before giving up. The default is 10.  Zero (0)
60              means loop until all addresses are removed.
61
62
63       -f, -family <FAMILY>
64              Specifies the protocol family to use. The protocol family iden‐
65              tifier can be one of inet, inet6, bridge, ipx, dnet, mpls or
66              link.  If this option is not present, the protocol family is
67              guessed from other arguments. If the rest of the command line
68              does not give enough information to guess the family, ip falls
69              back to the default one, usually inet or any.  link is a special
70              family identifier meaning that no networking protocol is
71              involved.
72
73
74       -4     shortcut for -family inet.
75
76
77       -6     shortcut for -family inet6.
78
79
80       -B     shortcut for -family bridge.
81
82
83       -D     shortcut for -family decnet.
84
85
86       -I     shortcut for -family ipx.
87
88
89       -M     shortcut for -family mpls.
90
91
92       -0     shortcut for -family link.
93
94
95       -o, -oneline
96              output each record on a single line, replacing line feeds with
97              the '\' character. This is convenient when you want to count
98              records with wc(1) or to grep(1) the output.
99
100
101       -r, -resolve
102              use the system's name resolver to print DNS names instead of
103              host addresses.
104
105
106       -n, -netns <NETNS>
107              switches ip to the specified network namespace NETNS.  Actually
108              it just simplifies executing of:
109
110              ip netns exec NETNS ip [ OPTIONS ] OBJECT { COMMAND | help }
111
112              to
113
114              ip -n[etns] NETNS [ OPTIONS ] OBJECT { COMMAND | help }
115
116
117       -a, -all
118              executes specified command over all objects, it depends if com‐
119              mand supports this option.
120
121
122       -c, -color
123              Use color output.
124
125
126       -t, -timestamp
127              display current time when using monitor option.
128
129
130       -ts, -tshort
131              Like -timestamp, but use shorter format.
132
133
134       -rc, -rcvbuf<SIZE>
135              Set the netlink socket receive buffer size, defaults to 1MB.
136
137
138       -iec   print human readable rates in IEC units (e.g. 1Ki = 1024).
139
140

IP - COMMAND SYNTAX

142   OBJECT
143       address
144              - protocol (IP or IPv6) address on a device.
145
146
147       addrlabel
148              - label configuration for protocol address selection.
149
150
151       l2tp   - tunnel ethernet over IP (L2TPv3).
152
153
154       link   - network device.
155
156
157       maddress
158              - multicast address.
159
160
161       monitor
162              - watch for netlink messages.
163
164
165       mroute - multicast routing cache entry.
166
167
168       mrule  - rule in multicast routing policy database.
169
170
171       neighbour
172              - manage ARP or NDISC cache entries.
173
174
175       netns  - manage network namespaces.
176
177
178       ntable - manage the neighbor cache's operation.
179
180
181       route  - routing table entry.
182
183
184       rule   - rule in routing policy database.
185
186
187       tcp_metrics/tcpmetrics
188              - manage TCP Metrics
189
190
191       token  - manage tokenized interface identifiers.
192
193
194       tunnel - tunnel over IP.
195
196
197       tuntap - manage TUN/TAP devices.
198
199
200       xfrm   - manage IPSec policies.
201
202
203       The names of all objects may be written in full or abbreviated form,
204       for example address can be abbreviated as addr or just a.
205
206
207   COMMAND
208       Specifies the action to perform on the object.  The set of possible
209       actions depends on the object type.  As a rule, it is possible to add,
210       delete and show (or list ) objects, but some objects do not allow all
211       of these operations or have some additional commands. The help command
212       is available for all objects. It prints out a list of available com‐
213       mands and argument syntax conventions.
214
215       If no command is given, some default command is assumed.  Usually it is
216       list or, if the objects of this class cannot be listed, help.
217
218

EXIT STATUS

220       Exit status is 0 if command was successful, and 1 if there is a syntax
221       error.  If an error was reported by the kernel exit status is 2.
222
223

EXAMPLES

225       ip addr
226           Shows addresses assigned to all network interfaces.
227
228       ip neigh
229           Shows the current neighbour table in kernel.
230
231       ip link set x up
232           Bring up interface x.
233
234       ip link set x down
235           Bring down interface x.
236
237       ip route
238           Show table routes.
239
240

HISTORY

242       ip was written by Alexey N. Kuznetsov and added in Linux 2.2.
243

SEE ALSO

245       ip-address(8), ip-addrlabel(8), ip-l2tp(8), ip-link(8), ip-maddress(8),
246       ip-monitor(8), ip-mroute(8), ip-neighbour(8), ip-netns(8), ip-
247       ntable(8), ip-route(8), ip-rule(8), ip-tcp_metrics(8), ip-token(8), ip-
248       tunnel(8), ip-xfrm(8)
249       IP Command reference ip-cref.ps
250

REPORTING BUGS

252       Report any bugs to the Network Developers mailing list <net‐
253       dev@vger.kernel.org> where the development and maintenance is primarily
254       done.  You do not have to be subscribed to the list to send a message
255       there.
256
257

AUTHOR

259       Original Manpage by Michail Litvak <mci@owl.openwall.com>
260
261
262
263iproute2                          20 Dec 2011                            IP(8)
Impressum