TechKnowSurge
CompTIA Network+ 3.4 Cisco CCNA 1.9 Cisco CCNA 1.8 Cisco CCST Networking 2.3 CompTIA Network+ 5.5 Cisco CCST Networking 5.2
VideoNetworkFree

DEMO: Wireshark, NDP - Neighbors

Neighbor Discovery Protocol (NDP) is the IPv6 mechanism for resolving MAC addresses, replacing the ARP broadcasts used in IPv4 with targeted multicast communication. This content covers how neighbor solicitation and neighbor advertisement packets work, examined through live Wireshark packet captures.

Complete this video to capture a CTF flag worth 1 point.

About this video

Neighbor Discovery Protocol (NDP) is the IPv6 equivalent of ARP, enabling a device to resolve the MAC address of another host before Layer 2 communication can take place. Unlike ARP, which sends a broadcast that every device on the network must process, NDP uses solicited-node multicast addresses derived from the target's IPv6 address. This means the neighbor solicitation is forwarded only to the specific device or small group of devices sharing that multicast group, significantly reducing unnecessary network traffic. The exchange begins when a device checks its neighbor table for an existing MAC-to-IPv6 mapping. If no entry is found, it sends an ICMPv6 Type 135 neighbor solicitation packet addressed to the solicited-node multicast address corresponding to the target IPv6 address. The Layer 2 destination is the associated multicast MAC address, prefixed with 33:33:FF. The target device, already registered to that multicast group, receives the solicitation and responds with an ICMPv6 Type 136 neighbor advertisement sent as a unicast directly back to the requesting host, carrying its MAC address in the payload. Examining these packets in Wireshark reveals the complete Layer 2 and Layer 3 addressing at each stage. The solicitation shows the sender's known IPv6 and MAC addresses as the source, with the solicited-node multicast address and its corresponding MAC as the destination. The advertisement reverses this with a direct unicast, source and destination fields populated with the actual IPv6 and MAC addresses of both machines. Once the exchange completes, the requesting device updates its neighbor table and can proceed with higher-layer communication such as TCP and HTTP.

What you'll learn

What's covered

Neighbor Discovery Protocol

Aligned to

CompTIA Network+
3.4 Given a scenario, implement IPv4 and IPv6 network services.
5.5 Given a scenario, use the appropriate tool or protocol to solve networking issues.
Cisco CCNA
1.9 Describe IPv6 address types
1.8 Configure and verify IPv6 addressing and prefix
Cisco CCST Networking
2.3 Identify IPv6 addresses and prefix formats
5.2 Perform a packet capture with Wireshark and save it to a file

Key terms

Neighbor Discovery Protocol
NDP
An IPv6 protocol that replaces ARP and handles router discovery, address autoconfiguration, and address resolution on local links.
Address Resolution Protocol
ARP
A protocol used to map an IP address to a physical MAC address on a local network.
Internet Control Message Protocol
ICMP
A network layer protocol used to send error messages and operational information about network conditions.
Media Access Control
MAC
A sublayer of the Data Link layer that controls how devices on a network gain access to a medium and transmit data.
Solicited-Node Multicast Address
A special IPv6 multicast address in the FF02::1:FF00:0/104 range that is derived from the last 24 bits of a device's IPv6 address, used by Neighbor Discovery to efficiently perform address resolution without broadcasting to all hosts. Instead of flooding all devices the way ARP does in IPv4, NDP sends solicitations only to the small group of devices sharing those same 24 bits.
Layer 2
The Data Link layer of the OSI model, responsible for MAC addressing and frame delivery on a local network.
Layer 3
The Network layer of the OSI model, responsible for logical addressing and routing packets between networks.

Topics

Networking Ipv6 Neighbor Discovery Protocol Icmpv6 Wireshark Packet Analysis Mac Address Resolution

Transcript

Neighbor discovery protocol

I have my demo laptop and my demo Pi, and I'm going to generate some traffic between those and then look at the headers of the neighbor solicitation and neighbor advertisement packets that go back and forth between the two machines.

What that neighbor discovery protocol is doing is finding out the MAC address of the demo Pi machine, so that way it knows how to communicate with it. Remember, layer 2 has to use MAC addresses, so it needs to find out the MAC address that's associated with the IP version 6 address that we're going to use. When we're talking about IPv4, it uses a process called ARP: it will send out a broadcast to all machines on the network, and then all machines will get that, and the one that has the IP address will reply with the associated MAC address. Well, we don't have broadcast with IPv6, so instead it needs to be a multicast, and so we're going to look at that process for neighbor discovery protocol.

Checking and clearing the neighbor table

First of all, the neighbor discovery protocol is not going to work if the neighbor already shows up in its neighbor table. What I mean by that is, the first thing that your computer is going to do when it communicates out to a device is look up in its neighbor table and see if it already has the answer. So let's see if this machine, this demo laptop, already has the answer.

I'm going to bring up a command prompt. In case I need to delete the neighbor table — clear out the cache of this neighbor table — I'm going to need to make sure I'm in elevated permissions to do that, so I'm going to right click on this and say run as administrator so I can get in here with elevated permission. The command I'm going to use for this is netsh interface ipv6, and we just want to show neighbors.

We're going to see a big long list, because there's quite a few interfaces that are associated on this machine. We scroll up, and in fact this is the address that belongs to the demo Pi, fc00:1::3, and this is the MAC address associated with it.

These interchanges of neighbor discovery protocol might not be exactly what we're looking for, so what we're going to do is clear out this table. To clear out the table, what I'll do is change this show to delete, and then that clears out that table.

Capturing the traffic

Next, we'll generate some traffic and then capture it with Wireshark. I'm going to open up Wireshark, and I'm going to monitor the Ethernet interface, so now it's already starting to collect some data that's coming in from the switch. I'll open up a browser and I'm going to open up the IP address that I'm trying to get to. We see that it generates a lot of traffic back and forth. I can stop my capture at this point in time.

Now, for these two devices to communicate, we see that we have some TCP and HTTP, but for that all to happen, it needs to happen across MAC addresses. So how does it get that MAC address?

The neighbor solicitation

Let's start by first looking at the neighbor solicitation, so I'm going to click the neighbor solicitation. I'll minimize some of this because we'll look at specific aspects here one at a time.

The first thing that I'll do is take a look at this ICMP section right here. We see that this is a type 135, so that measures up with what we know.

Let's look at the source, the source layer 3 and layer 2. If I look at the source layer 3, the source layer 3 is fc00:1::14. That's the static IP that's associated with the demo laptop. That makes sense — it's coming from that demo laptop, it knows its own IP address, so that makes sense there. We look at the layer 2 IP address, and once again it's coming from the layer 2 address of the demo laptop, so that makes sense as well. No surprises there: it knows its own MAC address, so why would it not put it in there? So that all makes sense.

Now let's take a look at the destination. The destination is where we see a little bit of difference, maybe a little bit of a surprise here, and that is that it's using this ff02::1:ff. Anytime we see that, that's the beginning of that solicited node multicast address, and 00:3 is the associated solicited node multicast address that's associated with the fc00:1::3 that we have, the statically assigned IP address, the one that we generated traffic to.

So what essentially has happened is that machine figured out what the solicited node multicast address is, and then told the switch, "I want to be part of this multicast group." And then this machine, the demo laptop, said, "I'm trying to find out the MAC address of this IP address, so I'm going to send a multicast out to the switch to find out what the MAC address is." And the switch knows, okay, I'm going to forward this on to the Pi. So now the Pi receives this. It's a multicast group of just one device, and so this is how we get around — in the case with ARP, where it sends out to all of the devices for IPv4 saying, "Hey, who belongs to this IP address?" Now we've got a mechanism with this neighbor discovery protocol to find the MAC address of a single machine and just send traffic to that single machine.

And then we take a look at the layer 2 address, and this is the 3333ff. So once again, that's the MAC address that's associated with this solicited node multicast address, and then it's 000003. So that is just the layer 2 multicast MAC address that's associated with the layer 3 multicast address.

So that is where we find the solicited node multicast address. This is just sending out, who belongs to this?

The neighbor advertisement

Then what we can do is look at what the response is, so we click on the neighbor advertisement. Here again, I'm going to start by closing all these sections up. Let's just take a look at the ICMP. The ICMP is 136, so that's pretty straightforward, and it gives the MAC address of the Pi. So there's the answer, that's replying with the answer.

But we really also see, with the answer, when it comes to the layer 3 and layer 2 — so here in the layer 3, the source address is of the Pi, the statically assigned address that we assigned to the Pi, and the destination address is the statically assigned address of the demo laptop. And the same thing if we look at the layer 2: it's the MAC address of the laptop and the MAC address of the demo Pi. All of those make sense, because it's just sending a unicast back at this point in time. It sends a multicast out — the neighbor solicitation is a multicast, and it's a multicast with just one member in it — and then what it's getting back is a unicast back for an answer.

Now this device, the demo laptop, knows the MAC address that's associated with the IP address that we have. So we can go back to this table and do the same command that we did before to show all of the interfaces, and we see the fc0:1::3, and it now has the MAC address that's associated with it.

So now that sets the stage. It has the layer 2 address, now it can start requesting to get the rest of the information and send the web page request out to this device. We've successfully made the connection now, and a critical part of all of this was that neighbor discovery protocol, with neighbor solicitation and neighbor advertisements.

About TechKnowSurge

TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.

Explore free tools and programs →