Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Скачиваний:
51
Добавлен:
11.04.2015
Размер:
22.9 Mб
Скачать

Chapter 10

IPv6 Routing

At the end of this chapter, you should be able to do the following:

Describe the contents of the IPv6 routing table.

Explain the end-to-end IPv6 packet delivery process.

Understand dynamic routing and the routing protocols used on IPv6 networks.

Describe the routing support for IPv6 in Windows Server 2008 and Windows Vista.

Routing in IPv6

Similar to IPv4 nodes, typical Internet Protocol version 6 (IPv6) nodes use a local IPv6 routing table to determine how to forward packets. IPv6 creates default routing table entries when initializing, and it adds entries based on its static configuration, based on the receipt of Router Advertisement messages containing on-link prefixes and routes, or with the Dynamic Host Configuration Protocol for IPv6 (DHCPv6).

A routing table is present on all nodes running the IPv6 protocol for Windows Server 2008 and Windows Vista. The routing table stores information about IPv6 address prefixes and how they can be reached (either directly or indirectly). Before checking the IPv6 routing table, IPv6 checks the destination cache 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, IPv6 uses the routing table to determine the following:

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 IPv6 header of the packet. For an indirect delivery (in which the destination is not on a local link), the next-hop address is typically the link-local address of a neighboring router.

The interface to be used for the forwarding (the next-hop interface) The next-hop interface identifies the physical or logical interface that is used to forward the packet to either its destination (for a direct delivery) or a neighboring router (for an indirect delivery).

After IPv6 determines the next-hop address and interface, it adds an entry to the destination cache. If the contents of the routing table do not change, IPv6 uses the destination cache entry for subsequent packets to the destination, rather than having to check the routing table.

231

232 Understanding IPv6, Second Edition

IPv6 Routing Table Entry Types

IPv6 routing table entries store the following types of routes:

Directly attached subnet or network routes Routes for subnets or address prefixes that are directly attached. Subnet routes have a 64-bit prefix length. Network routes that summarize a unicast address space have a prefix length less than 64 bits.

Remote subnet or network routes Address prefixes for subnets or address prefixes that are not directly attached but are available across neighboring routers. Remote subnet routes have a 64-bit prefix length. Remote network routes typically summarize an IPv6 address space and have a prefix length less than 64. An example of a remote network route is fd9c:31f1:2a59::/48, which is a route for a unique local address prefix that summarizes all of the address space within a site of an organization.

Host routes A route to a specific IPv6 address. Host routes allow routing to occur on a per-IPv6-address basis. For host routes, the address prefix is a specific IPv6 address with a 128-bit prefix length.

Default routes A route that summarizes all IPv6 traffic and is used when a more specific host, subnet, or network route is not found. The default route address prefix is ::/0.

Route Determination Process

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

1.For each entry in a routing table, compare the bits in the address prefix of the route to the same bits in the destination address for the number of bits indicated in the prefix length of the route. If all the bits in the address prefix match all the bits in the destination IPv6 address for the number of bits in the prefix length for the route, the route is a match for the destination.

2.Compile the list of matching routes, and choose the route that is usable and has the longest prefix length, which is the route that matched the most high-order bits with the destination address. The longest matching route is the most specific route to the destination. If there are multiple longest matching routes (for example, multiple routes to the same remote network prefix), select the route with the lowest metric. If there are multiple usable routes that are the longest match and the lowest metric, IPv6 can choose which routing table entry to use. RFC 4191 describes how IPv6 can choose among multiple matching routes with the same lowest metric.

Note This is the same process that an IPv4 router uses to determine the closest matching route.

Chapter 10 IPv6 Routing

233

For any given destination, this process finds matching routes in the following order:

1.A host route that matches the destination (all 128 bits match).

2.A subnet route that matches the destination (the first 64 bits match).

3.A network route with the longest prefix length that matches the destination (the first n bits match, where n is less than 64).

4.The default route (the address prefix ::/0).

The route determination process selects a single route in the routing table. The selected route yields a next-hop address and interface. 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. In contrast, if the route determination process on the sending host fails to find a route, IPv6 indicates an error.

Strong and Weak Host Behaviors

In the weak host model, an IPv6 host can send packets on an interface that is not assigned the source IPv6 address of the packet being sent. This is known as weak host send behavior. An IPv6 host can also receive packets on an interface that is not assigned the destination IP address of the packet being received. This is known as weak host receive behavior.

In the strong host model, the send and receive behaviors are different. With strong host sends, the host can send packets on an interface only if the interface is assigned the source IPv6 address of the packet being sent. With strong host receives, the host can receive packets on an interface only if the interface is assigned the destination IPv6 address of the packet being received. The sending process works differently on a host than on a router when you allow strong host sends and receives to be enabled or disabled on a per-interface basis.

For packets being sent, IPv6 first checks whether a source address has already been specified. If it has not, IPv6 performs an unconstrained lookup of the destination address of the packet in the routing table. In an unconstrained lookup, all the routes in the routing table are considered. Based on the selected route for the destination, IPv6 determines the next-hop interface (the interface used for placing the packet on the link layer) and the next-hop address. Based on the next-hop interface, IPv6 uses the address selection process defined in RFC 3484 as needed to determine the best source address. At this point, IPv6 has everything it needs to send the packet: the source and destination addresses, the next-hop interface, and the next-hop address.

If the source address has been specified, the source interface is known. The source interface is assigned the source address. IPv6 then determines whether strong host sends are enabled on the source interface. If they are disabled, IPv6 performs an unconstrained lookup of the packet’s destination address in the routing table. Based on the best matching route for the destination, IPv6 determines the next-hop interface and the next-hop address. IPv6 has the

234 Understanding IPv6, Second Edition

source and destination addresses, the next-hop interface, and the next-hop address. Note that with strong host send behavior disabled on the source interface, the next-hop interface might not be the same as the source interface.

If strong host sends are enabled on the source interface, IPv6 performs a constrained lookup of the destination address of the packet in the routing table. In a constrained lookup, only those routes with a next-hop interface of the source interface are considered. Based on the selected route for the destination, IPv6 determines the next-hop address. IPv6 has the source and destination addresses, the next-hop interface, and the next-hop address. Note that with strong host send behavior enabled on the source interface, the next-hop interface is always the same as the source interface. When the source address has been specified, the constrained route lookup can select a route with a higher metric among multiple routes in the routing table that are the closest match to the destination.

Computers running Windows Server 2008 or Windows Vista support the strong host model for sent IPv6 packets by default. You can enable the weak host model for sent IPv6 packets with the netsh interface ipv6 set interface InterfaceNameOrIndex weakhostsend=enabled command.

Example IPv6 Routing Table for Windows Server 2008 and Windows Vista

To view the IPv6 routing table on a computer running Windows Server 2008 or Windows Vista, you can use the following commands at a command prompt:

netsh interface ipv6 show route

route print

The netsh interface ipv6 show route Command

The following is an example display of the netsh interface ipv6 show route command on a host computer running Windows Vista on a subnet with an advertising default router that is advertising the 2001:db8:21d0:3f48::/64 and fd5e:2aa9:b3e:3f48::/64 prefixes:

Publish

Type

Met

Prefix

Idx

Gateway/Interface Name

-------

--------

---

------------------------

---

------------------------

No

Manual

256

::/0

8

fe80::69ee:7d26:3:fbec

No

Manual

256

::1/128

1

Loopback Pseudo-Interface 1

No

Manual

8

2001:db8:21d0:3f48::/64

8

Local Area Connection

No

Manual

256

2001:db8:21d0:3f48:1b9:88d1:cf98:fcaf/128

8

Local Area Connection

 

 

No

Manual

256

2001:db8:21d0:3f48:b500:734b:fe5b:3945/128

8

Local Area Connection

 

 

No

Manual

8

fd5e:2aa9:b3e:3f48::/64

8

Local Area Connection

No

Manual

256

fd5e:2aa9:b3e:3f48:1b9:88d1:cf98:fcaf/128

8

Local Area Connection

 

 

No

Manual

256

fd5e:2aa9:b3e:3f48:b500:734b:fe5b:3945/128

 

 

 

 

 

Chapter 10 IPv6 Routing

235

8

Local Area Connection

 

 

 

No

Manual

256

fe80::/64

10

Local Area Connection* 9

 

No

Manual

256

fe80::/64

8

Local Area Connection

 

No

Manual

256

fe80::100:7f:fffe/128

10

Local Area Connection* 9

 

No

Manual

256

fe80::5efe:10.0.0.2/128

11

Local Area Connection* 6

 

No

Manual

256

fe80::b500:734b:fe5b:3945/128

8 Local Area Connection

 

No

Manual

256

ff00::/8

1

Loopback Pseudo-Interface 1

 

No

Manual

256

ff00::/8

10

Local Area Connection* 9

 

No

Manual

256

ff00::/8

8

Local Area Connection

 

The display of the IPv6 routing table for the netsh interface ipv6 show route command has the following columns:

Publish Whether the route is published (advertised in a Routing Advertisement message).

Type The origin of the route.

Met The preference of the route. The lowest metric is the most preferred route. The metric is used to select between multiple routes with the same prefix.

Prefix The address prefix for the route.

Idx The interface index for the route, indicating the interface over which packets matching the address prefix are reachable. You can view the interface indexes from the display of the netsh interface ipv6 show interface command.

Gateway/Interface Name Either the next-hop IPv6 address (for remote routes) or an interface name corresponding to the interface indicated in the Idx column (for directly attached routes).

Table 10-1 lists the routes in this example display and provides a description of each route.

Table 10-1 Example Routing Table Entries

Route (by prefix)

Description

::/0

Default route. The Gateway/Interface Name column contains the

 

link-local address of the default router.

 

 

::1/128

Host route for the loopback address.

 

 

2001:db8:21d0:3f48::/64

Subnet prefix for the directly attached subnet.

 

 

2001:db8:21d0:3f48:1b9:88d1:

Host route for a global unicast address assigned to the Local Area

cf98:fcaf/128

Connection interface.

 

 

2001:db8:21d0:3f48:b500:734b:

Host route for another global unicast address assigned to the

fe5b:3945/128

Local Area Connection interface.

 

 

fd5e:2aa9:b3e:3f48::/64

Subnet prefix for the directly attached subnet.

 

 

fd5e:2aa9:b3e:3f48:1b9:88d1:

Host route for a unique local unicast address assigned to the Local

cf98:fcaf/128

Area Connection interface.

 

 

fd5e:2aa9:b3e:3f48:b500:734b:

Host route for another unique local unicast address assigned to

fe5b:3945/128

the Local Area Connection interface.

fe80::/64

Routes for the link-local address space.

236Understanding IPv6, Second Edition

Table 10-1 Example Routing Table Entries

Route (by prefix)

Description

fe80::100:7f:fffe/128

Host route for a link-local unicast address assigned to the Local

 

Area Connection* 9 interface (Teredo).

 

 

fe80::5efe:10.0.0.2/128

Host route for a link-local unicast address assigned to the Local

 

Area Connection* 6 interface (ISATAP).

 

 

fe80::b500:734b:fe5b:3945/128

Host route for a link-local unicast address assigned to the Local

 

Area Connection interface.

 

 

ff00::/8

Routes for the multicast address space.

 

 

When determining the next-hop address from a route in the routing table, the following actions occur:

If the Gateway/Interface Name column of the route table entry has an interface name, 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 has an address (the address of a neighboring router), the destination is remote and the next-hop address is set to the address in the Gateway/Interface Name column.

In both cases, the next-hop interface is the interface in the Idx column of the route.

For example, when this IPv6 host sends a packet to 2001:db8:21d0:3f48:2aa:ff:fe90:4d3c, the longest matching route is the route for the directly attached subnet 2001:db8:21d0:3f48::/64. The next-hop address is set to the destination address of 2001:db8:21d0:3f48:dd48:ab34: d07c:3914 (the destination), and the next-hop interface is the interface that corresponds to interface index 8 (the Ethernet network adapter named Local Area Connection). When

this IPv6 host sends traffic to 2001:db8:21d0:a957:2aa:ff:fe03:21a6, the longest matching route is the default route (::/0). The next-hop address is set to the router address of fe80::69ee:7d26:3:fbec, and the next-hop interface is the interface that corresponds to interface index 8 (Local Area Connection).

The route print Command

The following is the display of the route print command on the same host computer running Windows Vista with the IPv4 route table portion removed:

C:\Windows\system32>route print

===========================================================================

Interface List

8 ...

00

12

3f

17

e0

cf

......

Broadcom

NetXtreme 57xx Gigabit Controller

1 ...........................

 

 

 

 

 

 

 

Software

Loopback Interface 1

11 ...

00

00

00

00

00

00

00 e0

isatap.{17940FE6-D6C7-4AF3-8B79-8BC68D192EB4}

10 ...

02

00

54

55

4e

01

......

Teredo Tunneling Pseudo-Interface

===========================================================================

IPv6 Route Table

Chapter 10 IPv6 Routing

237

===========================================================================

Active Routes:

If Metric

Network Destination

Gateway

8

286

::/0

fe80::69ee:7d26:3:fbec

1

306

::1/128

On-link

8

38

2001:db8:21d0:3f48::/64

On-link

8

286

2001:db8:21d0:3f48:1b9:88d1:cf98:fcaf/128

 

 

 

On-link

8

286

2001:db8:21d0:3f48:b500:734b:fe5b:3945/128

 

 

 

On-link

8

38

fd5e:2aa9:b3e:3f48::/64

On-link

8

286

fd5e:2aa9:b3e:3f48:1b9:88d1:cf98:fcaf/128

 

 

 

On-link

8

286

fd5e:2aa9:b3e:3f48:b500:734b:fe5b:3945/128

 

 

 

On-link

8

286

fe80::/64

On-link

11

296

fe80::5efe:10.0.0.2/128

On-link

8

286

fe80::b500:734b:fe5b:3945/128

 

 

 

On-link

1

306

ff00::/8

On-link

8

286

ff00::/8

On-link

===========================================================================

Persistent Routes: None

The display of the IPv6 routing table for the route print command has the following columns:

If The interface index for the route. The interface indexes are listed in the Interface List portion of the route print display.

Metric The preference for the route. The lowest metric is the most preferred route. This is the metric used to select between multiple routes with the same prefix.

Network Destination The address prefix for the route.

Gateway A next-hop IPv6 address (for remote routes), or an indication that the destination is on-link (for directly attached routes).

Table 10-2 lists the routes in this example display and provides a description of each route.

Table 10-2 Example Routing Table Entries

Route (by prefix)

Description

::/0

Default route. The Gateway column has the link-local address of

 

the default router.

 

 

::1/128

Host route for the loopback address.

 

 

2001:db8:21d0:3f48::/64

Subnet prefix for the directly attached subnet.

 

 

2001:db8:21d0:3f48:1b9:88d1:

Host route for a global unicast address assigned to the Local Area

cf98:fcaf/128

Connection interface.

 

 

2001:db8:21d0:3f48:b500:734b

Host route for another global unicast address assigned to the

:fe5b:3945/128

Local Area Connection interface.

 

 

fd5e:2aa9:b3e:3f48::/64

Subnet prefix for the directly attached subnet.

Соседние файлы в папке Lecture 2_10