other versions
- wheezy 20120521-3+b3
- wheezy-backports 3.16.0-2~bpo70+1
- jessie 3.16.0-2
- testing 4.9.0-1
- unstable 4.9.0-1
IP-ADDRESS(8) | Linux | IP-ADDRESS(8) |
NAME¶
ip-address - protocol address managementSYNOPSIS¶
ip [ OPTIONS ] address { COMMAND | help }
DESCRIPTION¶
The address is a protocol (IP or IPv6) address attached to a network device. Each device must have at least one address to use the corresponding protocol. It is possible to have several different addresses attached to one device. These addresses are not discriminated, so that the term alias is not quite appropriate for them and we do not use it in this document.ip address add - add new protocol address.¶
- 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.
- 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.
ip address delete - delete protocol address¶
Arguments: coincide with the arguments of ip addr add. The device name is a required argument. The rest are optional. If no arguments are given, the first address is deleted.ip address show - look at protocol addresses¶
- 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.
ip address flush - flush protocol addresses¶
This command flushes the protocol addresses selected by some criteria.EXAMPLES¶
ip address show dev eth0Shows 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
SEE ALSO¶
ip(8)AUTHOR¶
Original Manpage by Michail Litvak <mci@owl.openwall.com>20 Dec 2011 | iproute2 |