Routing in IPv6

Similar to IPv4 nodes, typical IPv6 nodes use a local IPv6 routing table to determine how to forward packets. IPv6 routing table entries are created by default when IPv6 initializes and additional entries are added either by the receipt of Router Advertisement messages containing on-link prefixes and routes, or through manual configuration.

IPv6 Routing Table

A routing table is present on all nodes running the IPv6 protocol for the Windows .NET Server 2003 family and Windows XP. The routing table stores information about IPv6 network prefixes and how they can be reached (either directly or indirectly). Before the IPv6 routing table is checked, the destination cache is checked for an entry matching the destination address in the IPv6 packet being forwarded. If an entry for the destination address is not in the destination cache, the routing table is used to determine:

  1. The interface to be used for the forwarding (the next-hop interface)

    The interface identifies the physical or logical interface that is used to forward the packet to either its destination or the next router.

  2. The next-hop address

    For a direct delivery (in which the destination is on a local link), the next-hop address is the destination address in the packet. For an indirect delivery (in which the destination is not on a local link), the next-hop address is the address of a router.

After the next-hop interface and address are determined, the destination cache is updated. Subsequent packets forwarded to the destination use the destination cache entry, rather than having to check the routing table.

IPv6 Routing Table Entry Types

IPv6 routing table entries can be used to store the following types of routes:

  • Directly attached network routes

    These routes are network prefixes for subnets that are directly attached and typically have a 64-bit prefix length.

  • Remote network routes

    These routes are network prefixes for subnets that are not directly attached but are available across other routers. Remote network routes can be subnet network prefixes (typically with a 64-bit prefix length) or a prefix for an address space (typically with a prefix length less than 64).

  • Host routes

    A host route is a route to a specific IPv6 address. Host routes allow routing to occur on a per-IPv6 address basis. For host routes, the route prefix is a specific IPv6 address with a 128-bit prefix length. In contrast, both types of network routes have prefixes that have a prefix length less than 128 bits.

  • Default route

    The default route is used when a more specific network or host route is not found. The default route prefix is ::/0.

Route Determination Process

To determine which routing table entry is used for the forwarding decision, IPv6 uses the following process:

  1. For each entry in a routing table, compare the bits in the network prefix to the same bits in the destination address for the number of bits indicated in the prefix length of the route. For the number of bits in the prefix length for the route, if all the bits in the network prefix match all the bits in the destination IPv6 address the route is a match for the destination.
  2. The list of matching routes is compiled. The route that has the largest prefix length (the route that matched the most high-order bits with the destination address) is chosen. The longest matching route is the most specific route to the destination. If multiple entries with the longest match are found (multiple routes to the same network prefix, for example), the router uses the lowest metric to select the best route. If multiple entries exist that are the longest match and the lowest metric, IPv6 can choose which routing table entryto use.

For any given destination, the above procedure results in finding matching routes in the following order:

  1. A host route that matches the entire destination address
  2. A network route with the longest prefix length that matches the destination
  3. The default route (the network prefix ::/0)

The result of the route determination process is the selection of a single route in the routing table. The selected route yields a next-hop interface and address. If the route determination process on the sending host fails to find a route, IPv6 assumes that the destination is locally reachable. If the route determination process on a router fails to find a route, IPv6 sends an ICMPv6 Destination Unreachable-No Route to Destination message to the sending host and discards the packet.

Example IPv6 Routing Table for Windows XPand the Windows .NET Server 2003 family

To view the IPv6 routing table on a computer running a member of the Windows .NET Server 2003 family or Windows XP, type netsh interface ipv6 show routes at a command prompt. Here is the display of the netsh interface ipv6 show routes command for a computer with three network adapters that is acting as a default router for two subnets configured with site-local address prefixes and that has a default route pointing to a default router on a thirdsubnet:

 Publish  Type       Met  Prefix            Idx  Gateway/Interface Name -------  -------   ----  ---------------   ---  ------------------------ yes      Autoconf     8  fec0:0:0:1::/64     3  Local Area Connection yes      Autoconf     8  fec0:0:0:2::/64     4  Local Area Connection 2 yes      Autoconf     8  fec0:0:0:3::/64     5  Local Area Connection 3 yes      Manual     256  ::/0                5  fe80::210:ffff:fed6:58c0 

Each entry in the IPv6 routing table for Windows XP and the Windows .NET Server 2003 family has the following fields:

  • Whether the route is published (advertised in a Routing Advertisement message).
  • The route type.
  • A metric used to select between multiple routes with the same prefix. The lowest metric is the most desirable matching route.
  • The prefix.
  • The interface index indicating the interface over which packets matching the address prefix are reachable.

    The interface indexes can be viewed from the display of the netsh interface ipv6 show interface command.

  • A next-hop IPv6 address or an interface name.

    For remote network routes, a next-hop IPv6 address is listed. For directly attached network routes, the name of the interface from which the address prefix is directly reachable is listed.

Routes configured by user applications have the route type of Manual. Routes configured by the IPv6 protocol have the route type of Autoconf. The IPv6 routing table is built automatically, based on the current IPv6 configuration of your computer. A route for the link-local prefix (FE80::/64) is never present in the IPv6 routing table.

The first, second, and third routes are for the 64-bit site-local address prefixes of locally attached subnets. An Ethernet network adapter named Local Area Connection (interface index 3) is connected to the subnet FEC0:0:0:1::/64, a second Ethernet network adapter named Local Area Connection 2 (interface index 4) is connected to the subnet FEC0:0:0:2::/64, and a third Ethernet network adapter named Local Area Connection 3 (interface index 5) is connected to the subnet FEC0:0:0:3::/64.

The fourth route is the default route (prefix of ::/0). The default route matches all destinations. If the default route is the longest matching route for the destination, the packet is forwarded to the IPv6 address FE80::210:FFFF:FED6:58C0 by using the Ethernet network adapter named Local Area Connection 3 (interface index 5).

When determining the forwarding or next-hop IPv6 address from a route in the routing table:

  • If the Gateway/Interface Name column of the route table entry indicates an interface name, then the destination is a neighbor and the next-hop address is set to the destination address of the IPv6 packet.
  • If the Gateway/Interface Name column of the route table entry indicates an address (the address of a neighboring router), then the destination is remote and the next-hop address is set to the address in the Gateway/Interface Name column.

For example, when traffic is sent to FEC0:0:0:2:2AA:FF:FE90:4D3C, the longest matching route is the route for the directly attached network FEC0:0:0:2::/64. The forwarding IP address is set to the destination address of FEC0:0:0:2:2AA:FF:FE90:4D3C and the interface is the interface that corresponds to interface index 4 (the Ethernet network adapter named Local Area Connection 2). When traffic is sent to FEC0:0:0:9:2AA:FF:FE03:21A6, the longest matching route is the default route (::/0). The forwarding IP address is set to the router address of FE80::210:FFFF:FED6:58C0 and the interface is the interface that corresponds to interface index 5 (the Ethernet network adapter named Local Area Connection 3).



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

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