Commit 43d29f78 authored by Kenyon Ralph's avatar Kenyon Ralph Committed by Stephen Hemminger

Update ip address manual page

* update synopsis to match "ip address help" output
* specify IPv4, since "IP" is ambiguous
* remove deprecated site scope
* document lifetimes, home, and nodad
* update wording to make sense since page was split from the ip(8) page
* git rid of extra spaces
parent 90d98edf
.TH "IP\-ADDRESS" 8 "20 Dec 2011" "iproute2" "Linux" .TH "IP\-ADDRESS" 8 "04 March 2012" "iproute2" "Linux"
.SH "NAME" .SH "NAME"
ip-address \- protocol address management ip-address \- protocol address management
.SH "SYNOPSIS" .SH "SYNOPSIS"
...@@ -14,7 +14,12 @@ ip-address \- protocol address management ...@@ -14,7 +14,12 @@ ip-address \- protocol address management
.sp .sp
.ti -8 .ti -8
.BR "ip address" " { " add " | " del " } " .BR "ip address" " { " add " | " change " | " replace " } "
.IB IFADDR " dev " STRING
.RI "[ " LIFETIME " ] [ " CONFFLAG-LIST " ]"
.ti -8
.BR "ip address del"
.IB IFADDR " dev " STRING .IB IFADDR " dev " STRING
.ti -8 .ti -8
...@@ -51,12 +56,30 @@ ip-address \- protocol address management ...@@ -51,12 +56,30 @@ ip-address \- protocol address management
.ti -8 .ti -8
.IR FLAG " := " .IR FLAG " := "
.RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\ .RB "[ " permanent " | " dynamic " | " secondary " | " primary " | "\
tentative " | " deprecated " | " dadfailed " | " temporary " ]" tentative " | " deprecated " | " dadfailed " | " temporary " | " CONFFLAG-LIST " ]"
.ti -8
.IR CONFFLAG-LIST " := [ " CONFFLAG-LIST " ] " CONFFLAG
.ti -8
.IR CONFFLAG " := "
.RB "[ " home " | " nodad " ]"
.ti -8
.IR LIFETIME " := [ "
.BI valid_lft " LFT"
.RB "| " preferred_lft
.IR LFT " ]"
.ti -8
.IR LFT " := [ "
.BR forever " |"
.IR SECONDS " ]"
.SH "DESCRIPTION" .SH "DESCRIPTION"
The The
.B address .B address
is a protocol (IP or IPv6) address attached is a protocol (IPv4 or IPv6) address attached
to a network device. Each device must have at least one address to a network device. Each device must have at least one address
to use the corresponding protocol. It is possible to have several to use the corresponding protocol. It is possible to have several
different addresses attached to one device. These addresses are not different addresses attached to one device. These addresses are not
...@@ -79,7 +102,7 @@ the name of the device to add the address to. ...@@ -79,7 +102,7 @@ the name of the device to add the address to.
.BI local " ADDRESS " (default) .BI local " ADDRESS " (default)
the address of the interface. The format of the address depends 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 on the protocol. It is a dotted quad for IP and a sequence of
hexadecimal halfwords separated by colons for IPv6. The hexadecimal halfwords separated by colons for IPv6. The
.I ADDRESS .I ADDRESS
may be followed by a slash and a decimal number which encodes may be followed by a slash and a decimal number which encodes
the network prefix length. the network prefix length.
...@@ -90,8 +113,8 @@ the address of the remote endpoint for pointopoint interfaces. ...@@ -90,8 +113,8 @@ the address of the remote endpoint for pointopoint interfaces.
Again, the Again, the
.I ADDRESS .I ADDRESS
may be followed by a slash and a decimal number, encoding the network may be followed by a slash and a decimal number, encoding the network
prefix length. If a peer address is specified, the local address prefix length. If a peer address is specified, the local address
cannot have a prefix length. The network prefix is associated cannot have a prefix length. The network prefix is associated
with the peer rather than with the local address. with the peer rather than with the local address.
.TP .TP
...@@ -102,7 +125,7 @@ It is possible to use the special symbols ...@@ -102,7 +125,7 @@ It is possible to use the special symbols
.B '+' .B '+'
and and
.B '-' .B '-'
instead of the broadcast address. In this case, the broadcast address instead of the broadcast address. In this case, the broadcast address
is derived by setting/resetting the host bits of the interface prefix. is derived by setting/resetting the host bits of the interface prefix.
.TP .TP
...@@ -123,10 +146,6 @@ Predefined scope values are: ...@@ -123,10 +146,6 @@ Predefined scope values are:
.B global .B global
- the address is globally valid. - the address is globally valid.
.sp .sp
.B site
- (IPv6 only) the address is site local, i.e. it is
valid inside this site.
.sp
.B link .B link
- the address is link local, i.e. it is valid only on this device. - the address is link local, i.e. it is valid only on this device.
.sp .sp
...@@ -134,11 +153,33 @@ valid inside this site. ...@@ -134,11 +153,33 @@ valid inside this site.
- the address is valid only inside this host. - the address is valid only inside this host.
.in -8 .in -8
.TP
.BI valid_lft " LFT"
(IPv6 only) the valid lifetime of this address; see section 5.5.4 of
RFC 4862. Defaults to
.BR "forever" .
.TP
.BI preferred_lft " LFT"
(IPv6 only) the preferred lifetime of this address; see section 5.5.4
of RFC 4862. Defaults to
.BR "forever" .
.TP
.B home
(IPv6 only) designates this address the "home address" as defined in
RFC 6275.
.TP
.B nodad
(IPv6 only) do not perform Duplicate Address Detection (RFC 4862) when
adding this address.
.SS ip address delete - delete protocol address .SS ip address delete - delete protocol address
.B Arguments: .B Arguments:
coincide with the arguments of coincide with the arguments of
.B ip addr add. .B ip addr add.
The device name is a required argument. The rest are optional. The device name is a required argument. The rest are optional.
If no arguments are given, the first address is deleted. If no arguments are given, the first address is deleted.
.SS ip address show - look at protocol addresses .SS ip address show - look at protocol addresses
...@@ -200,17 +241,16 @@ The difference is that it does not run when no arguments are given. ...@@ -200,17 +241,16 @@ The difference is that it does not run when no arguments are given.
.PP .PP
.B Warning: .B Warning:
This command (and other This command and other
.B flush .B flush
commands described below) is pretty dangerous. If you make a mistake, commands are unforgiving. They will cruelly purge all the addresses.
it will not forgive it, but will cruelly purge all the addresses.
.PP .PP
With the With the
.B -statistics .B -statistics
option, the command becomes verbose. It prints out the number of deleted 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 addresses and the number of rounds made to flush the address list.
this option is given twice, If this option is given twice,
.B ip address flush .B ip address flush
also dumps all the deleted addresses in the format described in the also dumps all the deleted addresses in the format described in the
previous subsection. previous subsection.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment