ndp(1M) ndp(1M)
NAME [Toc] [Back]
ndp - IPv6 Neighbor Discovery cache display and control
SYNOPSIS [Toc] [Back]
ndp host
ndp [-i interface] [-n] -a
ndp [-i interface] [-n] -A interval
ndp [-i interface] [-q] -d host
ndp [-i interface] [-nq] -F
ndp [-i interface] -p
ndp [-i interface] [-q] -P
ndp -s interface host hw_addr [pub]
ndp -f filename
DESCRIPTION [Toc] [Back]
The ndp command displays and modifies the IPv6 Neighbor Discovery
cache as specified in the IPv6 Neighbor Discovery (ND) protocol.
Options [Toc] [Back]
ndp recognizes the following options and arguments:
host Display the current Neighbor Discovery cache entries
for the host specified by host, which is either a name
present in the hostname database (see hosts(4)), or an
IPv6 address expressed in colon notation (see
inet6(3N)).
-i interface
Select the Neighbor Discovery cache entries for the
specified interface. There is no distinction between
primary and secondary interfaces. Therefore,
specifying -i lan1:1 is the same as specifying -i lan1.
-n Display host addresses in IPv6 colon notation. If this
option is not specified, ndp attempts to display host
addresses symbolically first, and falls back to
displaying the host addresses in IPv6 colon notation if
that failed.
-a Display all Neighbor Discovery cache entries.
-A interval
Continuously display all Neighbor Discovery cache
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
ndp(1M) ndp(1M)
entries, updated at each interval , measured in
seconds.
-d host Deletes Neighbor Discovery cache entries with IP
addresses that are not associated with local interfaces
for the host specified by host.
-F Flushes all Neighbor Discovery cache entries with IP
addresses that are not associated with local
interfaces. These are entries with the L flag set.
-q (Quiet) Do not write anything to standard output.
This option only applies to -d, -F, and -P options.
-p Display the prefix list in the Neighbor Discovery cache
table. The prefix list defines a set of IP address
ranges that the host can reach. The prefix flags are L
for on-link, and A for autonomous. The on-link flag
indicates that addresses with that prefix can be
reached directly without going through a router. The
autonomous flag indicates that the prefix came from
stateless autoconfiguration.
-P Flushes all autoconfigured addresses learned from
prefixes advertised by the Router Advertisement
Messages.
-s interface host hw_addr [pub]
Create a Neighbor Discovery cache entry for the
interface specified by interface, the host specified by
host, and the hardware address (link-layer address)
specified by hw_addr. The hw_addr is specified as
xx:xx:xx:xx:xx:xx, where each x is a hexadecimal digit.
If pub is specified, the entry is published, which
means that this system will respond to Neighbor
Solicitation for the specified "host" even though the
host address is not its own.
-f filename
Create Neighbor Discovery cache entries from the
specifications found in the file specified by filename.
Each entry in this file specifies the interface, host,
hw_addr, and optionally the pub flag. For example, the
content of this file can be:
lan0 nodea 1:2:3:4:5:6
lan1 nodeb 2:3:4:5:6:7 pub
The use of -d, -F, -P, -s, and -f options requires root privileges.
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
ndp(1M) ndp(1M)
Contents [Toc] [Back]
A Neighbor Discovery cache entry includes the following fields:
+ host (neighbor's host name or IP address)
+ hardware address (link layer address) of host
+ interface name
+ state
+ flags
The state of an entry can be INCOMPLETE, REACHABLE, STALE, DELAY, or
PROBE.
+ An entry is in an INCOMPLETE state if address resolution is in
progress and the hardware address of the neighbor has not been
determined.
+ An entry is in a REACHABLE state if the neighbor is known to
have been reachable recently.
+ An entry is in a STALE state if the neighbor is no longer
known to be reachable. However, no attempt has been made to
verify its reachability because no traffic has been sent to
this neighbor.
+ An entry is in a DELAY state if the neighbor is no longer
known to be reachable, and traffic has recently been sent to
the neighbor.
+ An entry is in a PROBE state if the neighbor is no longer
known to be reachable, and unicast Neighbor Solicitation
probes have been sent to verify reachability.
The flags can be D (deprecated), L (local), or P (published). A
deprecated address can be used for receiving packets, but it should
not be used for sending packets because its validity is expected to
expire soon. The local flag indicates that this Neighbor Discovery
cache entry corresponds to an interface on this host. The published
flag indicates that the host will respond to Neighbor Solicitations on
this IPv6 address.
DIAGNOSTICS [Toc] [Back]
ndp returns a non-zero value to indicate errors. A zero return value
indicates success.
EXAMPLES [Toc] [Back]
The following netstat output shows the local interfaces and the IP
addresses assigned to them.
# netstat -inf inet6
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
ndp(1M) ndp(1M)
Name Mtu Address/Prefix Ipkts Opkts
lan1 1500 fe80::210:83ff:fef7:3a21/10 982 759
lan1:1 1500 fec0::9:210:83ff:fef7:3a21/64 0 0
lan3 1500 fe80::210:83ff:fef7:7a9d/10 0 0
lo0 4136 ::1/128 57 57
To display the entire Neighbor Discovery cache:
# ndp -a -n
Destination Physical Address Interface State Flags
fe80::202:fdff:fe36:8720 0:2:fd:36:87:20 lan1 STALE -
fec0::9:210:83ff:fef7:3a21 0:10:83:f7:3a:21 lan1:1 REACHABLE LP
fe80::210:83ff:fef7:3a21 0:10:83:f7:3a:21 lan1 REACHABLE LP
fe80::210:83ff:fef7:7a9d 0:10:83:f7:7a:9d lan3 REACHABLE LP
To show Neighbor Discovery cache entries for a host:
# ndp fe80::210:83ff:fef7:3a21
Destination Physical Address Interface State Flags
fe80::210:83ff:fef7:3a21 0:10:83:f7:3a:21 lan1 REACHABLE LP
To show Neighbor Discovery cache entries for an interface:
# ndp -n -i lan3 -a
Destination Physical Address Interface State Flags
fe80::210:83ff:fef7:7a9d 0:10:83:f7:7a:9d lan3 REACHABLE LP
To delete a Neighbor Discovery cache entries for a host and an
interface:
# ndp -i lan1 -d fe80::202:fdff:fe36:8720
fe80::202:fdff:fe36:8720 (fe80::202:fdff:fe36:8720) deleted.
To show the prefix list:
# ndp -p
Prefix List Interface Valid Preferred Flags
Entries Lifetime Lifetime
fec0:0:0:9::/64 lan1 167 107 A
fe80::/10 lan1 inf inf LA
fe80::/10 lan3 inf inf LA
To add an entry in the Neighbor Discovery cache:
# ndp -s lan3 nodeb 0:1:2:3:4:5
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
ndp(1M) ndp(1M)
nodeb (2001::1) added.
# ndp -a -n -i lan3
Destination Physical Address Interface State Flags
fe80::210:83ff:fef7:7a9d 0:10:83:f7:7a:9d lan3 REACHABLE LP
2001::1 0:1:2:3:4:5 lan3 - -
To flush all remote entries:
# ndp -F
nodea (fe80::202:fdff:fe36:8720) flushed.
nodeb (2001::1) flushed.
AUTHOR [Toc] [Back]
ndp was developed by HP.
SEE ALSO [Toc] [Back]
hosts(4), inet6(3N), ndp(7P).
Neighbor Discovery for IP Version 6 (IPv6), RFC2461, Narten, Nordmark,
Simpson.
IPv6 Stateless Address Autoconfiguration, RFC2462, Thomson, Narten.
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003 [ Back ] |