# Neighbor status



## Raul_Kl (Aug 31, 2016)

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.


```
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?


----------



## cpm@ (Aug 31, 2016)

If you want to display neighbor cache, run `ndp -a`

See ndp(8) man page.


----------



## Raul_Kl (Sep 1, 2016)

cpm@ said:


> If you want to display neighbor cache, run `ndp -a`



Unfortunately the ndp utility shows only ipv6, not ipv4.


----------



## kpa (Sep 1, 2016)

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`


----------



## Terry_Kennedy (Sep 5, 2016)

Raul_Kl said:


> On linux I use the following command to display the neighbor status:
> 
> `ip -4 neigh show dev <interface>`
> 
> ...


You should be able to get useful output from `# arp -a`. For example (covers your NOARP and STALE cases):

```
(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".


----------

