IPv6 Address Resolution – Ciscco Certifed Support Technici
If A, B, D, and E are running IPv6, the Neighbor Discovery (ND) protocol is used to map physical interface addresses. One major difference between IPv4 and IPv6 is that IPv6 hosts do not assume every other host on the segment is using the same prefix. Figure 3-5 illustrates.
Figure 3-5 IPv6 Neighbor Discovery
Because of the role the router plays in IPv6 address resolution, we have to start a few steps back from where we started with IPv4:
1. Router C sends an RA with a list of prefixes.
2. Each prefix in use on this segment is marked with the L bit.
3. Each host on the segment— A, B, D, and E—keeps a list of the prefixes in use on this segment based on all the RAs they have received.
When host A wants to send a packet to B:
1. Host A examines its local list of prefixes in use on this segment.
2. If host B’s IPv6 address is contained within one of the prefixes on this segment, A sends a Neighbor Solicitation packet to a multicast address.
3. Host B responds with a Neighbor Advertisement packet linking its IPv6 and physical addresses.
4. Host A receives the neighbor advertisement and uses it to build a local cache of IPv6 to physical address mappings.
Switching Packets
Up to this point, we have been considering hosts connected to a single segment. What if you want to connect multiple segments (or broadcast domains or wires) together? There are three ways to connect segments in a computer network:
• Switches
• Routers
• Gateways
Switches act on the physical (Layer 2) interface. Routers act on the interface (Layer 3) address. Gateways or proxies act on some higher-level address, including the protocol identifier and port number. Gateways are outside the scope of this book.
Switches are the simpler of the two kinds of devices we want to look at, so we’ll start there. Figure 3-6 and the list that follows help to illustrate how a switch works.
Figure 3-6 Switching Packets
In Figure 3-6, if host A does not have any information on E, but A wants to send a packet to E:
1. Host A sends an address discovery packet for E. For IPv6, this will be a neighbor solicitation, and the packet’s destination address will be a multicast. For IPv4, this will be an ARP, and the packet’s destination will be a broadcast.
2. Switch C receives this packet. Because C receives this packet on port 1, C will learn A is connected to (or reachable by) port 1.
A switch learns about which hosts are connected where by examining packets it receives in the normal course of the network’s operation. This is called bridge learning.
3. Switch C examines the destination address and discovers it is either a multicast (IPv6) or broadcast (IPv4). Broadcast and multicast packets should be forwarded out all unblocked ports, so C forwards this packet through port 2.
4. Host E receives the address resolution packet and responds.
5. When C receives E’s response on port 2, it learns E is reachable through port 2.
6. Switch C forwards E’s responses back through port 1, where A receives the response and builds a local table mapping E’s interface address to E’s physical address.
Note
Switches can decide not to forward a multicast packet out through a port if the switch knows there are no hosts listening to the multicast group. How the switch knows this is outside the scope of this book, but it involves the switch snooping on Internet Group Message Protocol (IGMP) packets.
When A sends a packet toward E, it will place E’s interface and physical addresses into the packet and transmit the packet onto the segment. When C receives this packet, it will examine its local table, called a bridge or forwarding table, and find E is reachable through port 2. Because the destination is on a different port than where C received the packet, C will forward the packet out the correct port ( port 2 in this case).
Note
Hosts will receive and process all packets with a broadcast physical address, some packets with a physical multicast address, and unicast packets only if the destination address matches the physical address of the interface. Switches, on the other hand, receive packets promiscuously, which means they receive and process every packet transmitted on the physical wire or segment.
The process of sending a packet from A to E seems to be just the same as it was without switch C in the network, so what purpose does the switch serve? Let’s walk through the process of A sending packets to B to see the difference: 1. Host A sends an address discovery packet for B. For IPv6, this will be a neighbor solicitation, and the packet’s destination address will be a multicast. For IPv4, this will be an ARP, and the packet’s destination will be a broadcast.
2. Switch C receives this packet. Because C receives this packet on port 1, C will learn A is connected to (or reachable by) port 1.
A switch learns about which hosts are connected where by examining packets it receives in the normal course of the network’s operation. This is called bridge learning.
3. Switch C examines the destination address and discovers it is either a multicast (IPv6) or broadcast (IPv4). Broadcast and multicast packets should be forwarded out all unblocked ports, so C forwards this packet through port 2.
4. Host E receives the address resolution packet and does not respond because the packet request does not contain E’s interface address.
5. Host B receives the address resolution packet and responds with a unicast packet directly to host A.
6. When C receives B’s response on port 1, it learns B is reachable through port 1.
7. Host A receives B’s response and creates a local cache entry mapping B’s physical and interface address.
When A sends packets to B, switch C will receive these packets.
When C looks up the packet’s destination in its local forwarding table, it will find B is reachable through port 1, which is the same port B itself is reachable through. Because the packet is received on the same port through which the destination is reachable, C does nothing with the packet.
Because C ignores the packet, E never receives it. For a single packet, the reduction in processing load might be small.
Breaking up the network into parts has a large impact on the size of buildable networks—or the possible scale.