Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 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 |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 17 | .BR "ip address" " { " add " | " change " | " replace " } " |
| 18 | .IB IFADDR " dev " IFNAME |
| 19 | .RI "[ " LIFETIME " ] [ " CONFFLAG-LIST " ]" |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 20 | |
| 21 | .ti -8 |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 22 | .BR "ip address del" |
| 23 | .IB IFADDR " dev " IFNAME " [ " mngtmpaddr " ]" |
| 24 | |
| 25 | .ti -8 |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 26 | .BR "ip address" " { " save " | " flush " } [ " dev |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 27 | .IR IFNAME " ] [ " |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 28 | .B scope |
| 29 | .IR SCOPE-ID " ] [ " |
| 30 | .B to |
| 31 | .IR PREFIX " ] [ " FLAG-LIST " ] [ " |
| 32 | .B label |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 33 | .IR PATTERN " ] [ " up " ]" |
| 34 | |
| 35 | .ti -8 |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 36 | .BR "ip address" " [ " show " [ " dev |
| 37 | .IR IFNAME " ] [ " |
| 38 | .B scope |
| 39 | .IR SCOPE-ID " ] [ " |
| 40 | .B to |
| 41 | .IR PREFIX " ] [ " FLAG-LIST " ] [ " |
| 42 | .B label |
| 43 | .IR PATTERN " ] [ " |
| 44 | .B master |
| 45 | .IR DEVICE " ] [ " |
| 46 | .B type |
| 47 | .IR TYPE " ] [ " |
David Ahern | 104444c | 2016-06-29 11:26:58 -0700 | [diff] [blame] | 48 | .B vrf |
| 49 | .IR NAME " ] [ " |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 50 | .BR up " ] ]" |
| 51 | |
| 52 | .ti -8 |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 53 | .BR "ip address" " { " showdump " | " restore " }" |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 54 | |
| 55 | .ti -8 |
| 56 | .IR IFADDR " := " PREFIX " | " ADDR |
| 57 | .B peer |
| 58 | .IR PREFIX " [ " |
| 59 | .B broadcast |
| 60 | .IR ADDR " ] [ " |
| 61 | .B anycast |
| 62 | .IR ADDR " ] [ " |
| 63 | .B label |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 64 | .IR LABEL " ] [ " |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 65 | .B scope |
| 66 | .IR SCOPE-ID " ]" |
| 67 | |
| 68 | .ti -8 |
| 69 | .IR SCOPE-ID " := " |
| 70 | .RB "[ " host " | " link " | " global " | " |
| 71 | .IR NUMBER " ]" |
| 72 | |
| 73 | .ti -8 |
| 74 | .IR FLAG-LIST " := [ " FLAG-LIST " ] " FLAG |
| 75 | |
| 76 | .ti -8 |
| 77 | .IR FLAG " := " |
Phil Sutter | 37fdeb5 | 2016-03-02 19:19:56 +0100 | [diff] [blame] | 78 | .RB "[ " permanent " | " dynamic " | " secondary " | " primary " |" |
| 79 | .RB [ - ] tentative " | [" - ] deprecated " | [" - ] dadfailed " |" |
Phil Sutter | 6acf086 | 2016-07-12 09:56:16 +0200 | [diff] [blame] | 80 | .BR temporary " |" |
| 81 | .IR CONFFLAG-LIST " ]" |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 82 | |
| 83 | .ti -8 |
| 84 | .IR CONFFLAG-LIST " := [ " CONFFLAG-LIST " ] " CONFFLAG |
| 85 | |
| 86 | .ti -8 |
| 87 | .IR CONFFLAG " := " |
Phil Sutter | 6acf086 | 2016-07-12 09:56:16 +0200 | [diff] [blame] | 88 | .RB "[ " home " | " mngtmpaddr " | " nodad " | " noprefixroute " | " autojoin " ]" |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 89 | |
| 90 | .ti -8 |
| 91 | .IR LIFETIME " := [ " |
| 92 | .BI valid_lft " LFT" |
Phil Sutter | 37fdeb5 | 2016-03-02 19:19:56 +0100 | [diff] [blame] | 93 | .RB "] [ " preferred_lft |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 94 | .IR LFT " ]" |
| 95 | |
| 96 | .ti -8 |
| 97 | .IR LFT " := [ " |
| 98 | .BR forever " |" |
| 99 | .IR SECONDS " ]" |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 100 | |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 101 | .ti -8 |
| 102 | .IR TYPE " := [ " |
| 103 | .BR bridge " | " |
Phil Sutter | 577cfe0 | 2016-06-28 15:07:17 +0200 | [diff] [blame] | 104 | .BR bridge_slave " |" |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 105 | .BR bond " | " |
Phil Sutter | 577cfe0 | 2016-06-28 15:07:17 +0200 | [diff] [blame] | 106 | .BR bond_slave " |" |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 107 | .BR can " | " |
| 108 | .BR dummy " | " |
| 109 | .BR hsr " | " |
| 110 | .BR ifb " | " |
| 111 | .BR ipoib " |" |
| 112 | .BR macvlan " | " |
| 113 | .BR macvtap " | " |
| 114 | .BR vcan " | " |
| 115 | .BR veth " | " |
| 116 | .BR vlan " | " |
| 117 | .BR vxlan " |" |
| 118 | .BR ip6tnl " |" |
| 119 | .BR ipip " |" |
| 120 | .BR sit " |" |
| 121 | .BR gre " |" |
| 122 | .BR gretap " |" |
| 123 | .BR ip6gre " |" |
| 124 | .BR ip6gretap " |" |
| 125 | .BR vti " |" |
Phil Sutter | 577cfe0 | 2016-06-28 15:07:17 +0200 | [diff] [blame] | 126 | .BR vrf " |" |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 127 | .BR nlmon " |" |
| 128 | .BR ipvlan " |" |
| 129 | .BR lowpan " |" |
Davide Caratti | fd4df5b | 2016-07-26 11:03:19 +0200 | [diff] [blame] | 130 | .BR geneve " |" |
| 131 | .BR macsec " ]" |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 132 | |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 133 | .SH "DESCRIPTION" |
| 134 | The |
| 135 | .B address |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 136 | is a protocol (IPv4 or IPv6) address attached |
| 137 | to a network device. Each device must have at least one address |
| 138 | to use the corresponding protocol. It is possible to have several |
| 139 | different addresses attached to one device. These addresses are not |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 140 | discriminated, so that the term |
| 141 | .B alias |
| 142 | is not quite appropriate for them and we do not use it in this document. |
| 143 | .sp |
| 144 | The |
| 145 | .B ip address |
| 146 | command displays addresses and their properties, adds new addresses |
| 147 | and deletes old ones. |
| 148 | |
| 149 | .SS ip address add - add new protocol address. |
| 150 | |
| 151 | .TP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 152 | .BI dev " IFNAME " |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 153 | the name of the device to add the address to. |
| 154 | |
| 155 | .TP |
| 156 | .BI local " ADDRESS " (default) |
| 157 | the address of the interface. The format of the address depends |
| 158 | on the protocol. It is a dotted quad for IP and a sequence of |
Pavel Šimerda | a89d532 | 2015-04-07 08:41:36 -0700 | [diff] [blame] | 159 | hexadecimal halfwords separated by colons for IPv6. The |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 160 | .I ADDRESS |
| 161 | may be followed by a slash and a decimal number which encodes |
| 162 | the network prefix length. |
| 163 | |
| 164 | .TP |
| 165 | .BI peer " ADDRESS" |
| 166 | the address of the remote endpoint for pointopoint interfaces. |
| 167 | Again, the |
| 168 | .I ADDRESS |
| 169 | may be followed by a slash and a decimal number, encoding the network |
Pavel Šimerda | a89d532 | 2015-04-07 08:41:36 -0700 | [diff] [blame] | 170 | prefix length. If a peer address is specified, the local address |
| 171 | cannot have a prefix length. The network prefix is associated |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 172 | with the peer rather than with the local address. |
| 173 | |
| 174 | .TP |
| 175 | .BI broadcast " ADDRESS" |
| 176 | the broadcast address on the interface. |
| 177 | .sp |
| 178 | It is possible to use the special symbols |
| 179 | .B '+' |
| 180 | and |
| 181 | .B '-' |
Pavel Šimerda | a89d532 | 2015-04-07 08:41:36 -0700 | [diff] [blame] | 182 | instead of the broadcast address. In this case, the broadcast address |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 183 | is derived by setting/resetting the host bits of the interface prefix. |
| 184 | |
| 185 | .TP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 186 | .BI label " LABEL" |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 187 | Each address may be tagged with a label string. |
| 188 | In order to preserve compatibility with Linux-2.0 net aliases, |
| 189 | this string must coincide with the name of the device or must be prefixed |
| 190 | with the device name followed by colon. |
| 191 | |
| 192 | .TP |
| 193 | .BI scope " SCOPE_VALUE" |
| 194 | the scope of the area where this address is valid. |
| 195 | The available scopes are listed in file |
| 196 | .BR "@SYSCONFDIR@/rt_scopes" . |
| 197 | Predefined scope values are: |
| 198 | |
| 199 | .in +8 |
| 200 | .B global |
| 201 | - the address is globally valid. |
| 202 | .sp |
| 203 | .B site |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 204 | - (IPv6 only, deprecated) the address is site local, i.e. it is |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 205 | valid inside this site. |
| 206 | .sp |
| 207 | .B link |
| 208 | - the address is link local, i.e. it is valid only on this device. |
| 209 | .sp |
| 210 | .B host |
| 211 | - the address is valid only inside this host. |
| 212 | .in -8 |
| 213 | |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 214 | .TP |
| 215 | .BI valid_lft " LFT" |
| 216 | the valid lifetime of this address; see section 5.5.4 of |
| 217 | RFC 4862. When it expires, the address is removed by the kernel. |
| 218 | Defaults to |
| 219 | .BR "forever" . |
| 220 | |
| 221 | .TP |
| 222 | .BI preferred_lft " LFT" |
| 223 | the preferred lifetime of this address; see section 5.5.4 |
| 224 | of RFC 4862. When it expires, the address is no longer used for new |
| 225 | outgoing connections. Defaults to |
| 226 | .BR "forever" . |
| 227 | |
| 228 | .TP |
| 229 | .B home |
| 230 | (IPv6 only) designates this address the "home address" as defined in |
| 231 | RFC 6275. |
| 232 | |
| 233 | .TP |
Phil Sutter | f7afa99 | 2015-09-18 20:17:03 +0200 | [diff] [blame] | 234 | .B mngtmpaddr |
| 235 | (IPv6 only) make the kernel manage temporary addresses created from this one as |
| 236 | template on behalf of Privacy Extensions (RFC3041). For this to become active, |
| 237 | the \fBuse_tempaddr\fP sysctl setting has to be set to a value greater than |
| 238 | zero. The given address needs to have a prefix length of 64. This flag allows |
| 239 | to use privacy extensions in a manually configured network, just like if |
| 240 | stateless auto-configuration was active. |
| 241 | |
| 242 | .TP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 243 | .B nodad |
| 244 | (IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when |
| 245 | adding this address. |
| 246 | |
Phil Sutter | f7afa99 | 2015-09-18 20:17:03 +0200 | [diff] [blame] | 247 | .TP |
| 248 | .B noprefixroute |
| 249 | Do not automatically create a route for the network prefix of the added |
| 250 | address, and don't search for one to delete when removing the address. Changing |
| 251 | an address to add this flag will remove the automatically added prefix route, |
| 252 | changing it to remove this flag will create the prefix route automatically. |
| 253 | |
Phil Sutter | 6acf086 | 2016-07-12 09:56:16 +0200 | [diff] [blame] | 254 | .TP |
| 255 | .B autojoin |
| 256 | Joining multicast groups on Ethernet level via |
| 257 | .B "ip maddr" |
| 258 | command does not work if connected to an Ethernet switch that does IGMP |
| 259 | snooping since the switch would not replicate multicast packets on ports that |
| 260 | did not have IGMP reports for the multicast addresses. |
| 261 | |
| 262 | Linux VXLAN interfaces created via |
| 263 | .B "ip link add vxlan" |
| 264 | have the |
| 265 | .B group |
| 266 | option that enables them to do the required join. |
| 267 | |
| 268 | Using the |
| 269 | .B autojoin |
| 270 | flag when adding a multicast address enables similar functionality for |
| 271 | Openvswitch VXLAN interfaces as well as other tunneling mechanisms that need to |
| 272 | receive multicast traffic. |
| 273 | |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 274 | .SS ip address delete - delete protocol address |
| 275 | .B Arguments: |
| 276 | coincide with the arguments of |
| 277 | .B ip addr add. |
Pavel Šimerda | a89d532 | 2015-04-07 08:41:36 -0700 | [diff] [blame] | 278 | The device name is a required argument. The rest are optional. |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 279 | If no arguments are given, the first address is deleted. |
| 280 | |
| 281 | .SS ip address show - look at protocol addresses |
| 282 | |
| 283 | .TP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 284 | .BI dev " IFNAME " (default) |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 285 | name of device. |
| 286 | |
| 287 | .TP |
| 288 | .BI scope " SCOPE_VAL" |
| 289 | only list addresses with this scope. |
| 290 | |
| 291 | .TP |
| 292 | .BI to " PREFIX" |
| 293 | only list addresses matching this prefix. |
| 294 | |
| 295 | .TP |
| 296 | .BI label " PATTERN" |
| 297 | only list addresses with labels matching the |
| 298 | .IR "PATTERN" . |
| 299 | .I PATTERN |
| 300 | is a usual shell style pattern. |
| 301 | |
| 302 | .TP |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 303 | .BI master " DEVICE" |
| 304 | only list interfaces enslaved to this master device. |
| 305 | |
| 306 | .TP |
David Ahern | 104444c | 2016-06-29 11:26:58 -0700 | [diff] [blame] | 307 | .BI vrf " NAME " |
| 308 | only list interfaces enslaved to this vrf. |
| 309 | |
| 310 | .TP |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 311 | .BI type " TYPE" |
| 312 | only list interfaces of the given type. |
| 313 | |
Phil Sutter | 3462c11 | 2016-06-24 12:14:23 +0200 | [diff] [blame] | 314 | Note that the type name is not checked against the list of supported types - |
| 315 | instead it is sent as-is to the kernel. Later it is used to filter the returned |
| 316 | interface list by comparing it with the relevant attribute in case the kernel |
| 317 | didn't filter already. Therefore any string is accepted, but may lead to empty |
| 318 | output. |
| 319 | |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 320 | .TP |
Petr Šabata | 4405123 | 2013-03-14 15:10:44 +0100 | [diff] [blame] | 321 | .B up |
| 322 | only list running interfaces. |
| 323 | |
| 324 | .TP |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 325 | .BR dynamic " and " permanent |
| 326 | (IPv6 only) only list addresses installed due to stateless |
| 327 | address configuration or only list permanent (not dynamic) |
| 328 | addresses. |
| 329 | |
| 330 | .TP |
| 331 | .B tentative |
| 332 | (IPv6 only) only list addresses which have not yet passed duplicate |
| 333 | address detection. |
| 334 | |
| 335 | .TP |
Heiner Kallweit | 18c8bbe | 2014-12-24 23:11:50 +0100 | [diff] [blame] | 336 | .B -tentative |
| 337 | (IPv6 only) only list addresses which are not in the process of |
| 338 | duplicate address detection currently. |
| 339 | |
| 340 | .TP |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 341 | .B deprecated |
| 342 | (IPv6 only) only list deprecated addresses. |
| 343 | |
| 344 | .TP |
Heiner Kallweit | 18c8bbe | 2014-12-24 23:11:50 +0100 | [diff] [blame] | 345 | .B -deprecated |
| 346 | (IPv6 only) only list addresses not being deprecated. |
| 347 | |
| 348 | .TP |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 349 | .B dadfailed |
| 350 | (IPv6 only) only list addresses which have failed duplicate |
| 351 | address detection. |
| 352 | |
| 353 | .TP |
Heiner Kallweit | 18c8bbe | 2014-12-24 23:11:50 +0100 | [diff] [blame] | 354 | .B -dadfailed |
| 355 | (IPv6 only) only list addresses which have not failed duplicate |
| 356 | address detection. |
| 357 | |
| 358 | .TP |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 359 | .B temporary |
| 360 | (IPv6 only) only list temporary addresses. |
| 361 | |
| 362 | .TP |
| 363 | .BR primary " and " secondary |
| 364 | only list primary (or secondary) addresses. |
| 365 | |
| 366 | .SS ip address flush - flush protocol addresses |
| 367 | This command flushes the protocol addresses selected by some criteria. |
| 368 | |
| 369 | .PP |
| 370 | This command has the same arguments as |
Phil Sutter | 24604eb | 2016-06-09 19:20:36 +0200 | [diff] [blame] | 371 | .BR show " except that " type " and " master " selectors are not supported." |
| 372 | Another difference is that it does not run when no arguments are given. |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 373 | |
| 374 | .PP |
| 375 | .B Warning: |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 376 | This command and other |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 377 | .B flush |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 378 | commands are unforgiving. They will cruelly purge all the addresses. |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 379 | |
| 380 | .PP |
| 381 | With the |
| 382 | .B -statistics |
| 383 | option, the command becomes verbose. It prints out the number of deleted |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 384 | addresses and the number of rounds made to flush the address list. |
| 385 | If this option is given twice, |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 386 | .B ip address flush |
| 387 | also dumps all the deleted addresses in the format described in the |
| 388 | previous subsection. |
| 389 | |
| 390 | .SH "EXAMPLES" |
| 391 | .PP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 392 | ip address show |
| 393 | .RS 4 |
| 394 | Shows IPv4 and IPv6 addresses assigned to all network interfaces. The 'show' |
| 395 | subcommand can be omitted. |
| 396 | .RE |
| 397 | .PP |
| 398 | ip address show up |
| 399 | .RS 4 |
| 400 | Same as above except that only addresses assigned to active network interfaces |
| 401 | are shown. |
| 402 | .RE |
| 403 | .PP |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 404 | ip address show dev eth0 |
| 405 | .RS 4 |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 406 | Shows IPv4 and IPv6 addresses assigned to network interface eth0. |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 407 | .RE |
| 408 | .PP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 409 | ip address add 2001:0db8:85a3::0370:7334/64 dev eth1 |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 410 | .RS 4 |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 411 | Adds an IPv6 address to network interface eth1. |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 412 | .RE |
| 413 | .PP |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 414 | ip address delete 2001:0db8:85a3::0370:7334/64 dev eth1 |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 415 | .RS 4 |
Pavel Šimerda | 4e972d5 | 2015-08-12 22:04:08 +0200 | [diff] [blame] | 416 | Delete the IPv6 address added above. |
| 417 | .RE |
| 418 | .PP |
| 419 | ip address flush dev eth4 scope global |
| 420 | .RS 4 |
| 421 | Removes all global IPv4 and IPv6 addresses from device eth4. Without 'scope |
| 422 | global' it would remove all addresses including IPv6 link-local ones. |
Christoph J. Thompson | 761a1e6 | 2012-03-01 17:45:45 +0100 | [diff] [blame] | 423 | .RE |
| 424 | |
| 425 | .SH SEE ALSO |
| 426 | .br |
| 427 | .BR ip (8) |
| 428 | |
| 429 | .SH AUTHOR |
| 430 | Original Manpage by Michail Litvak <mci@owl.openwall.com> |