30 lines
2.1 KiB
Markdown
Raw Normal View History

---
2025-03-27 06:46:47 +01:00
date: 2025-03-25T21:16:00+01:00
draft: false
title: Finding out what nodes are on an IPv6 Network
---
On an IPv4 network it is possible to find out what hosts are on a network by queering the local dynamic host configuration protocol (DHCP) server for IP leases, or since the IP Address space is so small simply scanning the network for all addresses is feasible. With IPv6 however both of these options are not available. Firstly many IPv6 networks leverage stateless address auto-configuration (SLAAC) and neighbour discovery (ND) to configure hosts without a server to maintain a list of addresses, and secondly the address space for IPv6 is huge. A standard /64 IPv6 subnet contains 18,446,744,073,709,551,61 possible addresses, this would take an enormous amount of time to scan. The solution here is to use multicast addresses.
## Multicast Addresses
In IPv6 networks multicast addresses are commonplace and are required for key components of the network such as ND. All IPv6 nodes belong the `ff02::01` multicast address. When sending a ping to this address all nodes will respond using their link local address. The interface on which the network is attached to must be specified using the % sign.
```
[henryv@HenryV-T480 ~]$ ping -6 ff02::1%wlan0
PING ff02::1%wlan0 (ff02::1%wlan0) 56 data bytes
64 bytes from fe80::f16:b9b:1724:fc75%wlan0: icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from fe80::7eff:4dff:feb8:827f%wlan0: icmp_seq=1 ttl=64 time=3.56 ms
64 bytes from fe80::4e52:62ff:fe12:da2%wlan0: icmp_seq=1 ttl=255 time=4.05 ms
```
To the the global unicast address of a host the IP address to be used from interface can be specified.
```
[henryv@HenryV-T480 ~]$ ping -6 -I 2001:9e8:e364:9100:6286:2235:7c45:14b4 ff02::1%wlan0 PING ff02::1%wlan0 (ff02::1%wlan0) from 2001:9e8:e364:9100:6286:2235:7c45:14b4 : 56 data bytes
64 bytes from 2001:9e8:e364:9100:6286:2235:7c45:14b4: icmp_seq=1 ttl=64 time=0.061 ms
64 bytes from 2001:9e8:e364:9100:7eff:4dff:feb8:827f: icmp_seq=1 ttl=64 time=3.80 ms
64 bytes from 2001:9e8:e364:9100:f027:4857:3588:a035: icmp_seq=1 ttl=255 time=71.9 ms
64 bytes from 2001:9e8:e364:9100:85ce:2483:d39c:e212: icmp_seq=1 ttl=255 time=113 ms
2025-03-27 06:46:47 +01:00
```