Neighbor status

Hello,

On linux I use the following command to display the neighbor status:

ip -4 neigh show dev <interface>

The above command shows in the last column the status of neighbors(permanent | noarp | stale | reachable ) as in the example below.

Code:
192.168.0.2 lladdr aa:bb:cc:dd:ee:ff PERMANENT
192.168.0.3 lladdr aa:bb:cc:dd:ee:ff NOARP
192.168.0.4 lladdr aa:bb:cc:dd:ee:ff STALE
192.168.0.5 lladdr aa:bb:cc:dd:ee:ff REACHABLE

The info I need is the last column. Is there a way to show this info on FreeBSD?
 
Ahem, I really wonder why IPv4 ARP is called now a "neighbour status" in Linux, it's always been known as ARP and I see no reason to rename it even though IPv6 does use different terminology. On FreeBSD the command is exactly the same as it used to be in Linux, arp(8):

arp -an
 
On linux I use the following command to display the neighbor status:

ip -4 neigh show dev <interface>

The above command shows in the last column the status of neighbors(permanent | noarp | stale | reachable ) as in the example below.

Code:
192.168.0.2 lladdr aa:bb:cc:dd:ee:ff PERMANENT
192.168.0.3 lladdr aa:bb:cc:dd:ee:ff NOARP
192.168.0.4 lladdr aa:bb:cc:dd:ee:ff STALE
192.168.0.5 lladdr aa:bb:cc:dd:ee:ff REACHABLE

The info I need is the last column. Is there a way to show this info on FreeBSD?
You should be able to get useful output from # arp -a. For example (covers your NOARP and STALE cases):
Code:
(0:1) host:~# arp -a | grep incomplete
tunnel1.example.com (192.168.100.192) at (incomplete) on ix0 expired [ethernet]
"incomplete" is your "NOARP". "expired" is your "STALE".
 
Back
Top