dev " NAME" the name of the device to add the address to.
local " ADDRESS " (default) the address of the interface. The format of the address depends on the protocol. It is a dotted quad for IP and a sequence of hexadecimal halfwords separated by colons for IPv6. The ADDRESS may be followed by a slash and a decimal number which encodes the network prefix length.
peer " ADDRESS" the address of the remote endpoint for pointopoint interfaces. Again, the ADDRESS may be followed by a slash and a decimal number, encoding the network prefix length. If a peer address is specified, the local address cannot have a prefix length. The network prefix is associated with the peer rather than with the local address.
broadcast " ADDRESS" the broadcast address on the interface. It is possible to use the special symbols '+' and '-' instead of the broadcast address. In this case, the broadcast address is derived by setting/resetting the host bits of the interface prefix.
label " NAME" Each address may be tagged with a label string. In order to preserve compatibility with Linux-2.0 net aliases, this string must coincide with the name of the device or must be prefixed with the device name followed by colon.
scope " SCOPE_VALUE" the scope of the area where this address is valid. The available scopes are listed in file "/etc/iproute2/rt_scopes" . Predefined scope values are: global - the address is globally valid. link - the address is link local, i.e. it is valid only on this device. host - the address is valid only inside this host.
valid_lft " LFT" (IPv6 only) the valid lifetime of this address; see section 5.5.4 of RFC 4862. Defaults to "forever" .
preferred_lft " LFT" (IPv6 only) the preferred lifetime of this address; see section 5.5.4 of RFC 4862. Defaults to "forever" .
home (IPv6 only) designates this address the "home address" as defined in RFC 6275.
nodad (IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when adding this address.
dev " NAME " (default) name of device.
scope " SCOPE_VAL" only list addresses with this scope.
to " PREFIX" only list addresses matching this prefix.
label " PATTERN" only list addresses with labels matching the "PATTERN" . PATTERN is a usual shell style pattern.
dynamic " and " permanent (IPv6 only) only list addresses installed due to stateless address configuration or only list permanent (not dynamic) addresses.
tentative (IPv6 only) only list addresses which have not yet passed duplicate address detection.
deprecated (IPv6 only) only list deprecated addresses.
dadfailed (IPv6 only) only list addresses which have failed duplicate address detection.
temporary (IPv6 only) only list temporary addresses.
primary " and " secondary only list primary (or secondary) addresses.
This command has the same arguments as show. The difference is that it does not run when no arguments are given.
Warning: This command and other flush commands are unforgiving. They will cruelly purge all the addresses.
With the -statistics option, the command becomes verbose. It prints out the number of deleted addresses and the number of rounds made to flush the address list. If this option is given twice, ip address flush also dumps all the deleted addresses in the format described in the previous subsection.
ip address show dev eth0 Shows the addresses assigned to network interface eth0
ip addr add 2001:0db8:85a3::0370:7334/64 dev eth1 Adds an IPv6 address to network interface eth1
ip addr flush dev eth4 Removes all addresses from device eth4