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

Chapter 6 Neighbor Discovery

167

Host Sending Algorithm

The process by which an IPv6 host sends a unicast IPv6 packet uses a combination of the local host’s conceptual data structures and the ND protocol. Based on RFC 4861, an IPv6 host uses the following algorithm when sending a unicast packet to an arbitrary destination:

1.Check the destination cache for an entry matching the destination address.

2.If an entry matching the destination address is found in the destination cache, obtain the next-hop address from the destination cache entry. If the destination is a Mobile IPv6 node, the destination cache entry might 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 Mobile IPv6, see Appendix F. Go to step 4.

If an entry matching the destination address is not found in the destination cache, determine if the destination address matches a prefix in the prefix list:

If the destination address matches a prefix in the prefix list, the next-hop address is set to the destination address. Go to step 3.

If the destination address does not match a prefix in the prefix list, a default router is chosen from the default router list and the next-hop address is set to the default router address.

3.Update the destination cache.

4.Check the neighbor cache for an entry matching the next-hop address.

5.If an entry matching the next-hop address is found in the neighbor cache, use the linklayer address of the matching entry.

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 fails, indicate an error.

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

Figure 6-28 shows the host sending algorithm in flowchart form.

Because the IPv6 protocol for Windows Server 2008 and Windows Vista uses a routing table in place of a prefix list and default router list, the host-sending algorithm uses a different method to determine the next-hop address for the destination. For more information, see the “End-to-End IPv6 Delivery Process” section in Chapter 10.

Check destination cache for an entry matching the destination address.

Entry found

Yes

in destination

 

 

cache?

 

No

Check prefix list for a prefix that matches the destination address.

Does the

destination

Yes

address match a prefix in the prefix list?

No

Choose a default router from the default router list and set the next-hop address to the default router address.

Check neighbor cache for an entry matching the next-hop address.

Obtain next-hop address from destination cache entry.

Is next-hop

Yes address entry

in neighbor cache?

Update destination cache.

No

Use address resolution process to determine the link-layer address of the next-hop address.

Set the next-hop address to the destination address.

Was address

Yes

resolution

 

 

 

 

successful?

 

 

 

No

 

 

 

 

 

 

 

 

 

Indicate an error.

 

 

 

 

 

 

Send packet using link-layer address of neighbor

cache entry.

Update neighbor cache.

Edition Second IPv6, Understanding 168

Figure 6-28 The host sending algorithm

Chapter 6 Neighbor Discovery

169

IPv4 Neighbor Messages and Functions and IPv6

Equivalents

Table 6-3 lists IPv4 neighbor messages, components, and functions and their IPv6 equivalents.

Table 6-3 IPv4 Neighbor Messages, Components, and Functions and Their IPv6 Equivalents

IPv4

IPv6

ARP Request message

Neighbor Solicitation message

 

 

ARP Reply message

Neighbor Advertisement message

 

 

ARP cache

Neighbor cache

 

 

Gratuitous ARP

Duplicate address detection

 

 

Router Solicitation message (optional)

Router Solicitation message (required)

 

 

Router Advertisement message (optional)

Router Advertisement message (required)

 

 

Redirect message

Redirect message

 

 

References

The following references were cited in this chapter:

RFC 1256 — “ICMP Router Discovery Messages”

RFC 2464 — “Transmission of IPv6 Packets over Ethernet Networks”

RFC 3775 — “Mobile IPv6”

RFC 4191 — “Default Router Preferences and More-Specific Routes”

RFC 4861 — “Neighbor Discovery for IP Version 6 (IPv6)”

RFC 4862 — “IPv6 Stateless Address Autoconfiguration”

Internet Draft — “Site Prefixes in Neighbor Discovery”

You can obtain these RFCs from the \RFCs_and_Drafts folder on the companion CD-ROM or from http://www.ietf.org/rfc.html.

Testing for Understanding

To test your understanding of IPv6 ND, answer the following questions. See Appendix D, “Testing for Understanding Answers,” to check your answers.

1.List the IPv4 facilities that are replaced by the IPv6 ND protocol.

2.List the capabilities of the IPv6 ND protocol that are not present in IPv4.

3.List the five different ND messages and the options that can be included with them.

170Understanding IPv6, Second Edition

4.Describe the interpretation of the Length field in ND options.

5.What is the value of the Length field for a maximum-sized Redirected Header option (assuming no IPv6 extension headers are present)?

6.Describe how you would use the MTU option to provide seamless connectivity between Ethernet nodes and Asynchronous Transfer Mode (ATM) nodes on a transparently bridged link.

7.Why is the Source Link-Layer Address option not included in the Neighbor Solicitation message sent during duplicate address detection?

8.Describe the configuration parameters and their corresponding fields sent in the Router Advertisement message (not including options). Describe the configuration parameters and their corresponding fields sent in the Prefix Information option.

9.Under what circumstances is an unsolicited Neighbor Advertisement message sent?

10.What are the differences in address resolution and duplicate address detection node behavior for anycast addresses?

11.Why is the response to a duplicate address detection sent as multicast? Who sends the response, the offending or defending node?

12.Why is the value of the Hop Limit field set to 255 for all ND messages?

13.Describe the purpose of each of the host data structures described in RFC 4861.

14.What field in the Redirect message contains the next-hop address of the better router to use for packets addressed to a specific destination? Describe how the contents of that field are used to update the conceptual host data structures for subsequent data sent to the destination.

15.Under what circumstances does a router send a Router Advertisement?

16.For Host A and Host B on the same link, why is the exchange of a Neighbor Solicitation message (sent by Host A to Host B) and a Neighbor Advertisement message (sent by Host B to Host A) not considered by Host B as proof that Host A is reachable?

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