]> git.proxmox.com Git - mirror_iproute2.git/blob - man/man8/ip-address.8.in
iproute2: Fix some manpage typos
[mirror_iproute2.git] / man / man8 / ip-address.8.in
1 .TH "IP\-ADDRESS" 8 "20 Dec 2011" "iproute2" "Linux"
2 .SH "NAME"
3 ip-address \- protocol address management
4 .SH "SYNOPSIS"
5 .sp
6 .ad l
7 .in +8
8 .ti -8
9 .B ip
10 .RI "[ " OPTIONS " ]"
11 .B address
12 .RI " { " COMMAND " | "
13 .BR help " }"
14 .sp
15
16 .ti -8
17 .BR "ip address" " { " add " | " del " } "
18 .IB IFADDR " dev " STRING
19
20 .ti -8
21 .BR "ip address" " { " show " | " flush " } [ " dev
22 .IR STRING " ] [ "
23 .B scope
24 .IR SCOPE-ID " ] [ "
25 .B to
26 .IR PREFIX " ] [ " FLAG-LIST " ] [ "
27 .B label
28 .IR PATTERN " ]"
29
30 .ti -8
31 .IR IFADDR " := " PREFIX " | " ADDR
32 .B peer
33 .IR PREFIX " [ "
34 .B broadcast
35 .IR ADDR " ] [ "
36 .B anycast
37 .IR ADDR " ] [ "
38 .B label
39 .IR STRING " ] [ "
40 .B scope
41 .IR SCOPE-ID " ]"
42
43 .ti -8
44 .IR SCOPE-ID " := "
45 .RB "[ " host " | " link " | " global " | "
46 .IR NUMBER " ]"
47
48 .ti -8
49 .IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG
50
51 .ti -8
52 .IR FLAG " := "
53 .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
54 tentative " | " deprecated " | " dadfailed " | " temporary " ]"
55
56 .SH "DESCRIPTION"
57 The
58 .B address
59 is a protocol (IP or IPv6) address attached
60 to a network device. Each device must have at least one address
61 to use the corresponding protocol. It is possible to have several
62 different addresses attached to one device. These addresses are not
63 discriminated, so that the term
64 .B alias
65 is not quite appropriate for them and we do not use it in this document.
66 .sp
67 The
68 .B ip address
69 command displays addresses and their properties, adds new addresses
70 and deletes old ones.
71
72 .SS ip address add - add new protocol address.
73
74 .TP
75 .BI dev " NAME"
76 the name of the device to add the address to.
77
78 .TP
79 .BI local " ADDRESS " (default)
80 the address of the interface. The format of the address depends
81 on the protocol. It is a dotted quad for IP and a sequence of
82 hexadecimal halfwords separated by colons for IPv6. The
83 .I ADDRESS
84 may be followed by a slash and a decimal number which encodes
85 the network prefix length.
86
87 .TP
88 .BI peer " ADDRESS"
89 the address of the remote endpoint for pointopoint interfaces.
90 Again, the
91 .I ADDRESS
92 may be followed by a slash and a decimal number, encoding the network
93 prefix length. If a peer address is specified, the local address
94 cannot have a prefix length. The network prefix is associated
95 with the peer rather than with the local address.
96
97 .TP
98 .BI broadcast " ADDRESS"
99 the broadcast address on the interface.
100 .sp
101 It is possible to use the special symbols
102 .B '+'
103 and
104 .B '-'
105 instead of the broadcast address. In this case, the broadcast address
106 is derived by setting/resetting the host bits of the interface prefix.
107
108 .TP
109 .BI label " NAME"
110 Each address may be tagged with a label string.
111 In order to preserve compatibility with Linux-2.0 net aliases,
112 this string must coincide with the name of the device or must be prefixed
113 with the device name followed by colon.
114
115 .TP
116 .BI scope " SCOPE_VALUE"
117 the scope of the area where this address is valid.
118 The available scopes are listed in file
119 .BR "@SYSCONFDIR@/rt_scopes" .
120 Predefined scope values are:
121
122 .in +8
123 .B global
124 - the address is globally valid.
125 .sp
126 .B site
127 - (IPv6 only) the address is site local, i.e. it is
128 valid inside this site.
129 .sp
130 .B link
131 - the address is link local, i.e. it is valid only on this device.
132 .sp
133 .B host
134 - the address is valid only inside this host.
135 .in -8
136
137 .SS ip address delete - delete protocol address
138 .B Arguments:
139 coincide with the arguments of
140 .B ip addr add.
141 The device name is a required argument. The rest are optional.
142 If no arguments are given, the first address is deleted.
143
144 .SS ip address show - look at protocol addresses
145
146 .TP
147 .BI dev " NAME " (default)
148 name of device.
149
150 .TP
151 .BI scope " SCOPE_VAL"
152 only list addresses with this scope.
153
154 .TP
155 .BI to " PREFIX"
156 only list addresses matching this prefix.
157
158 .TP
159 .BI label " PATTERN"
160 only list addresses with labels matching the
161 .IR "PATTERN" .
162 .I PATTERN
163 is a usual shell style pattern.
164
165 .TP
166 .B up
167 only list running interfaces.
168
169 .TP
170 .BR dynamic " and " permanent
171 (IPv6 only) only list addresses installed due to stateless
172 address configuration or only list permanent (not dynamic)
173 addresses.
174
175 .TP
176 .B tentative
177 (IPv6 only) only list addresses which have not yet passed duplicate
178 address detection.
179
180 .TP
181 .B deprecated
182 (IPv6 only) only list deprecated addresses.
183
184 .TP
185 .B dadfailed
186 (IPv6 only) only list addresses which have failed duplicate
187 address detection.
188
189 .TP
190 .B temporary
191 (IPv6 only) only list temporary addresses.
192
193 .TP
194 .BR primary " and " secondary
195 only list primary (or secondary) addresses.
196
197 .SS ip address flush - flush protocol addresses
198 This command flushes the protocol addresses selected by some criteria.
199
200 .PP
201 This command has the same arguments as
202 .B show.
203 The difference is that it does not run when no arguments are given.
204
205 .PP
206 .B Warning:
207 This command (and other
208 .B flush
209 commands described below) is pretty dangerous. If you make a mistake,
210 it will not forgive it, but will cruelly purge all the addresses.
211
212 .PP
213 With the
214 .B -statistics
215 option, the command becomes verbose. It prints out the number of deleted
216 addresses and the number of rounds made to flush the address list. If
217 this option is given twice,
218 .B ip address flush
219 also dumps all the deleted addresses in the format described in the
220 previous subsection.
221
222 .SH "EXAMPLES"
223 .PP
224 ip address show dev eth0
225 .RS 4
226 Shows the addresses assigned to network interface eth0
227 .RE
228 .PP
229 ip addr add 2001:0db8:85a3::0370:7334/64 dev eth1
230 .RS 4
231 Adds an IPv6 address to network interface eth1
232 .RE
233 .PP
234 ip addr flush dev eth4
235 .RS 4
236 Removes all addresses from device eth4
237 .RE
238
239 .SH SEE ALSO
240 .br
241 .BR ip (8)
242
243 .SH AUTHOR
244 Original Manpage by Michail Litvak <mci@owl.openwall.com>