I can see all connected devices to my Linux PC with:
But this show only the IPv4 addresses and MAC of the connected devices. There is no IPv6 addresses.
How to find the IPv6 addresses of the connected Devices?
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It only takes a minute to sign up.Sign up to join this community
If you want to see all devices which have established connections to your machine, you can use
to see all IPv4 and IPV6 tcp connections.
If you want the IPv6 equivalent of
cat /proc/net/arp (that is, see all the machines on the local network for which you have cached the layer 2 address), use
ip -6 neigh
for the combined IPv4 and IPv6 neighboring nodes.
The simplest command is to list out all connections is the
ss | less, but to view only tcp or udp or unix connections use the
-t that is,
this should show you all IPv4 and IPV6 tcp connections.
To display only IPv4 socket connections use the
-f inet or
ss -tl -f inet or
ss -tl -4
While to display only IPv6 connections use the
-f inet6 or
ss -tl6 or
Or simply for the combined IPv4 and IPv6 neighboring nodes use
Which will shows the current neighbour table in kernel.
But NOTE as you've seen in the comment:
/proc/net/arp doesn't list devices connected to your PC. It shows a list of devices on your subnet for which your PC has done/seen an ARP request for. If you want to see which devices are connected to your PC, then you need
netstat or similar (which will automatically show both IPV4 and IPV6 devices). IPV6 doesn't use ARP (it uses NDP)