End-to-End IPv6 Delivery Process

The following sections describe the process of forwarding an IPv6 packet from the sending host, across one or more IPv6 routers, and to the final destination. This example assumes that the Hop-by-Hop Options, Destination Options, and Routing extension headers are not present.

IPv6 on the Sending Host

The process by which an IPv6 host sends an IPv6 packet uses a combination of the local host's data structures and the Neighbor Discovery protocol. An IPv6 host uses the following algorithm when sending a packet to an arbitrary destination:

  1. Set the Hop Limit field value to either a default or application-specified value.
  2. Check the destination cache for an entry matching the destination address. You can view the destination cache with the netsh interface ipv6 show destinationcache command.
  3. If an entry matching the destination address is found in the destination cache, obtain the next-hop address and interface from the destination cache entry. If the destination is a mobile IPv6 node, the destination cache entry may contain a pointer to a care-of destination cache entry. If so, the next-hop address is obtained from the care-of destination cache entry. For more information about IPv6 mobility support, see Chapter 12, "IPv6 Mobility." Go to step 7.
  4. Check the local IPv6 routing table for the longest matching route with the lowest metric to the destination address. If there are multiple longest matching routes with the lowest metric, IPv6 chooses a route to use.
  5. Based on the longest matching route with the lowest metric, determine the next-hop interface and address used for forwarding the packet.

    If no route is found, IPv6 assumes that the destination is directly reachable. The next-hop address is set to the destination address and an interface is chosen.

  6. Update the destination cache.
  7. Check the neighbor cache for an entry matching the next-hop address. You can view the neighbor cache by using the netsh interface ipv6 show neighbors command.
  8. If an entry matching the next-hop address is found in the neighbor cache, obtain the link-layer address.
  9. If an entry matching the next-hop address is not found in the neighbor cache, use address resolution to obtain the link-layer address for the next-hop address.

    If address resolution is not successful, indicate an error.

  10. Send the packet by using the link-layer address of the neighbor cache entry.

Figure 10-1 shows the sending host process.

Figure 10-1. The sending host process

IPv6 on the Router

An IPv6 router uses the following algorithm when receiving and forwarding a packet to an arbitrary unicast or anycast destination:

  1. Perform optional header error checks such as ensuring that the Version field is set to 6 and that the source address is not the loopback address (::1) or a multicast address.
  2. Verify whether the destination address in the IPv6 packet corresponds to an address assigned to a router interface.

    If so, the router processes the IPv6 packet as the destination host (see step 3 in "IPv6 on the Destination Host" in this chapter).

  3. Decrement the value of the Hop Limit field by 1.

    If the value of the Hop Limit field is less than 1, the router sends an ICMPv6 Time Exceeded-Hop Limit Exceeded in Transit message to the sender and discards the packet.

  4. If the value of the Hop Limit field is greater than 0, update the Hop Limit field in the IPv6 header of the packet.
  5. Check the destination cache for an entry matching the destination address.
  6. If an entry matching the destination address is found in the destination cache, obtain the next-hop interface and address from the destination cache entry. Go to step 9.
  7. Check the local IPv6 routing table for the longest matching route to the destination IPv6 address.
  8. Based on the longest matching route, determine the next hop interface and address used for forwarding the packet.

    If no route is found, send an ICMPv6 Destination Unreachable-No Route to Destination message to the sending host and discard the packet.

  9. Update the destination cache.
  10. If the interface on which the packet was received is the same as the interface on which the packet is being forwarded, the interface is a point-to-point link, and the Destination Address field matches a prefix assigned to the interface, send an ICMPv6 Destination Unreachable-Address Unreachable message to the sending host and discard the packet. This prevents the needless "ping-pong" forwarding of IPv6 packets between the two interfaces on a point-to-point link for a packet whose destination matches the prefix of the point-to-point link but does not match the address of either interface. This condition and its solution are described in the Internet draft titled "Avoiding ping-pong packets on point-to-point links."
  11. If the interface on which the packet was received is the same as the interface on which the packet is being forwarded, and the Source Address field matches a prefix assigned to the interface, send a Redirect message to the sending host (subject to rate limiting).
  12. Compare the link MTU of the next-hop interface to the size of the IPv6 packet being forwarded.

    If the link MTU is smaller than the packet size, send an ICMPv6 Packet Too Big message to the sending host and discard the packet.

  13. Check the neighbor cache for an entry matching the next-hop address.
  14. If an entry matching the next-hop address is found in the neighbor cache, obtain the link-layer address.
  15. If an entry matching the next-hop address is not found in the neighbor cache, use address resolution to obtain the link-layer address for the next-hop address.

    If address resolution is not successful, send an ICMPv6 Destination Unreachable-Address Unreachable message to the sending host and discard the packet.

  16. Send the packet by using the link-layer address of the neighbor cache entry.

Figures 10-2 and 10-3 show the router forwarding process.

This entire process is repeated at each router in the path between the source and destination hosts.

Figure 10-2. Router forwarding process (part 1)

Figure 10-3. Router forwarding process (part 2)

IPv6 on the Destination Host

An IPv6 host uses the following algorithm when receiving an IPv6 packet:

  1. Perform optional header error checks, such as ensuring that the Version field is set to 6 and that the source address is not the loopback address (::1) or a multicast address.
  2. Verify whether the destination address in the IPv6 packet corresponds to an IPv6 address assigned to a local host interface.

    If the destination address is not assigned to a local host interface, silently discard the IPv6 packet.

  3. Based on the Next Header field, process extension headers (if present) and verify that the protocol for the value of the Next Header field exists.

    If the protocol does not exist, send an ICMPv6 Parameter Problem-Unrecognized Next Header Type Encountered message back to the sender and discard the packet.

  4. If the upper layer PDU is not a TCP segment or UDP message, pass the upper layer PDU to the appropriate protocol.
  5. If the upper layer PDU is a TCP segment or UDP message, check the destination port.

    If no application exists for the UDP port number, send an ICMPv6 Destination Unreachable-Port Unreachable message back to the sender and discard the packet. If no application exists for the TCP port number, send a TCP Connection Reset segment back to the sender and discard the packet.

  6. If an application exists for the UDP or TCP destination port, process the contents of the TCP segment or UDP message.

Figure 10-4 shows the receiving host process.

Figure 10-4. Receiving host process



Understanding IPv6
Understanding Ipv6
ISBN: 0735612455
EAN: 2147483647
Year: 2005
Pages: 124
Authors: Joseph Davies

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net