وبلاگ بلیان

IPv6 Advanced Protocols Implementation, 2007 Edition

معرفی کتاب «IPv6 Advanced Protocols Implementation, 2007 Edition» نوشتهٔ Quing Li, Tatuya Jinmei, Keiichi Shima، منتشرشده توسط نشر Morgan Kaufmann Publishers; Elsevier/Morgan Kaufmann Publishers در سال 2007. این کتاب در 6 صفحه، فرمت pdf، زبان انگلیسی ارائه شده است. «IPv6 Advanced Protocols Implementation, 2007 Edition» در دستهٔ بدون دسته‌بندی قرار دارد.

This book is the second installment of a two-volume series on IPv6 and the KAME implementation. This book discusses those protocols that are found in more capable IPv6 devices, are commonly deployed in more complex IPv6 network environments, or are not specific to IPv6 but are extended to support IPv6. Specifically, this book engages the readers in advanced topics such as routing, multicasting, DNS, DHCPv6, mobility, and security. This two-volume series covers a wide spectrum of the IPv6 technology, help the readers establish solid and empirical understanding on IPv6 and the KAME reference implementation paralleled by none. Key Features: \* Extensive code listings with meticulous line-by-line explanation of rationale and use for KAME snapshot implementations on advanced IPv6 related protocols, including: -Unicast and multicast routing and DNS client based on KAME snapshot dated April 2003, which are a base of more recent versions of BSD variants -Mobile IPv6 based on KAME snapshot dated July 2004, a predecessor version of the "SHISA" implementation -DHCPv6 based on KAME snapshot dated May 2005, a base of the WIDE-DHCPv6 implementation available at SourceForge today \* Numerous diagrams and illustrations help in visualizing the implementation \* In-depth discussion of the standards provides intrinsic understanding of the specifications \* An introduction to the IP security protocols along with the use of the racoon key exchange daemon \* Two CD-ROMs filled with the complete KAME IPv6 protocol stack and FreeBSD software \* The only authoritative reference "cookbook" for anyone interested in advanced IPv6 topics and protocols. \* Line-by-line walk through of real code helps the reader master IPv6 implementation \* Comprehensive in scope, based on a working standard, and thoroughly illustrated to bring the protocols alive.

Chapter One

IPv6 Unicast Routing Protocols

1.1 Introduction

Any time when communication takes place between any pair of nodes, especially when that communication involves nodes that reside on different network segments, a decision must be made about where each packet should go. This decision is often known as a packet routing decision, or a packet forwarding decision. The intermediate network devices, commonly known as routers, perform the routing functions that involve making the routing decision normally based on each packet's final destination.

The routing decision could be made based on manually configured routing information at each router, but such practice is obviously impractical for a complex network of middle to large scale. Routing protocols provide the necessary information that enable the routers to make correct routing decisions automatically. Since a packet's destination may be a unicast destination or a multicast destination (treating broadcast destination as a special case of multicast), routing protocols are designed for either unicast routing or multicast routing. We will focus on the routing protocols in this chapter.

In the IPv4 world, RIPv2 [RFC2453], the integrated IS-IS [RFC1195], and OSPFv2 [RFC2328] are commonly deployed unicast routing protocols in networks of small to middle scale such as enterprise environments, while BGP-4 [RFC4271] is the common routing protocol deployed among large organizations such as Internet Service Providers (ISPs). In general, since the routing concept is identical between IPv4 and IPv6, these routing protocols have been naturally extended to support IPv6. Even though the packet formats may have changed, the principles remain largely the same.

Yet there are IPv6 specific issues. In particular, most IPv6 routing protocols rely heavily on link-local addresses since communication using these addresses is stable in terms of routing, thanks to their limited scope. On the other hand, the ambiguity of link-local addresses discussed in Chapter 2 of IPv6 Core Protocols Implementation, "IPv6 Addressing Architecture", requires special care in implementing these protocols. It is therefore important to understand the details of the protocols and how they should be implemented even for those who are familiar with IPv4 routing protocols.

In this chapter we provide all the essential information to understand and implement IPv6 unicast routing protocols. We first describe the basic routing concepts followed by an introduction to IPv6 unicast routing protocols. These unicast routing protocols include RIPng [RFC2080], OSPFv3 [RFC2740] and BGP4+ [RFC2545]. We provide full coverage on the RIPng protocol. In addition, we summarize the general protocol operations of OSPFv3 and BGP4+ without diving into the protocol specifics, other than the IPv6-related protocol packets. Readers who do not require such advanced topics can safely skip these sections (1.5 and 1.6) as they are not needed in any other part of the book.

Sections that follow the protocol background focus on implementation, which will provide all of the essential information to develop IPv6 routing programs on BSD systems, covering the kernel architecture to routing application code. We first explain how to deal with IPv6 routing information on BSD systems, from the kernel internal data structures to application interfaces (APIs). We also note major pitfalls in handling link-local addresses with these APIs. We then describe the implementation of the route6d program, KAME's RIPng routing daemon, focusing on its RIPng protocol processing. The provenance of RIP is the routed program, a popular implementation that is widely available on various platforms. Its popularity is due to the simplicity in both its implementation and its operation. The route6d daemon is the IPv6 counterpart of routed.

Finally, we conclude this chapter by showing how to operate route6d for some typical scenarios.

1.2 Overview of Routing Concepts

Routing information enables a node to determine whether a given destination is reachable and where to send the packet en route to the destination. Routing information can be either configured statically or obtained dynamically. Routers exchange routing information with one another through one or more dynamic routing protocols. Each router builds a local database, called the Routing Information Base (RIB) to store the exchanged routing information. A subset of this RIB is then selected to build a Forwarding Information Base (FIB) for the purpose of forwarding packets.

The routing concepts are identical between IPv4 and IPv6. That is, the goal of routing is to find a loop-free path for the destination address between any pair of end systems, and the best path is chosen according to some defined criteria at the time of route selection. Many of the existing dynamic routing protocols have been updated to support IPv6. Three well-known routing protocols—RIP, OSPF and BGP—have been extended to support IPv6, resulting in RIPng, OSPFv3 (OSPF for IPv6) and BGP4+, respectively. Another deployed routing protocol, IS-IS, was also extended to support both IPv4 and IPv6 (see the note on page 4).

The choice of the routing protocol depends on many factors, such as the diameter of the routing domain, the size and complexity of the networks within the routing domain, the level of tolerance to changing network topology by applications, and the complexity and the ease of deployment of the routing protocol.

In general, routing protocols are classified as either interior routing protocols or exterior routing protocols, based on where the protocol is deployed. Interior routing protocol is also known as interior gateway protocol (IGP) while exterior routing protocol is also known as exterior gateway protocol (EGP).

An interior routing protocol is deployed within a routing domain that is controlled by a single administrative entity. In this context, a routing domain is also known as an autonomous system (AS). Each autonomous system should have only one governing routing policy. For example, an interior routing protocol is deployed within the intranet of an organization, which may comprise multiple sub-networks. In other words, an interior routing protocol is deployed within a single routing domain to exchange routing information about these sub-networks among routers that belong to the same routing domain. Examples of interior routing protocols are RIPng and OSPFv3.

An exterior routing protocol is deployed among routing domains that are under the management of different administrative entities. For example, an exterior routing protocol is deployed between two different Internet Service Providers (ISPs). In other words, an exterior routing protocol is deployed to exchange routing information among routers that belong to different autonomous systems. BGP4+ is an example of an exterior routing protocol.

Within each AS, a small subset of the routers are situated at the boundary of the AS. These boundary routers, sometimes referred to as either border gateways or edge routers, exchange route information over EGP with other edge routers that belong to different ASs. An edge router also typically participates in IGP within its AS to advertise externally reachable networks, or it simply acts as the default router for the AS to reach the rest of the Internet. Figure 1-1 illustrates this relationship. In this example each AS has one edge router that participates in the EGP.

The purpose of running a dynamic routing protocol is to provide reachability information about networks and individual nodes to routers that participate in the routing domain. The reachability information allows each router to compute the appropriate next hop or the paths to these networks and nodes using a specific routing algorithm. Whether the paths are loop-free depends on the routing protocol and the information distributed by the routing protocol. The way the routing algorithm works determines the type of information distributed in the routing protocol messages. Therefore routing protocols are also classified according to the routing algorithms by which the routing protocols are employed for route computation. The routing algorithms can be classified as vector-based algorithms or link-state algorithms. The vectorbased algorithms can be further classified as either distance vector algorithms or path-vector algorithms. RIPng is a routing protocol representative of the distance vector algorithm; BGP4+ is a routing protocol representative of the path-vector algorithm; OSPFv3 is a routing protocol representative of the link-state algorithm.

The routing protocols are designed to satisfy a different set of goals. A routing protocol, more precisely the algorithm used by the routing protocol, must be capable of selecting the optimal route according to predefined selection criteria. For example, a routing algorithm can select the best route according to the least number of hops traversed to reach the destination. A routing protocol must be robust to changing network topologies and network conditions. For example, the routing protocol must continue to function when an interface on the router fails, or when one or more routers fail. A routing protocol should have a good convergence rate. When network topologies or network conditions change, the routing protocol should have the ability to convey this information to all participating routers quickly to avoid routing problems. The convergence rate refers to the time taken for all routers in the domain to become aware of the changing condition. Routing protocols should be designed to have small operational overhead and should be relatively easy to deploy.

A predefined selection criteria determines what is considered the optimal route or the best route according to one or more metrics. The metrics can be either static or dynamic. Examples of static metrics are path length or monetary cost of using a particular path. Path length can be either simple hop counts, or the sum of the costs of all links in a given path. Typically a system administrator assigns the cost of each link. Examples of dynamic metrics are the measured network load, delay, available bandwidth, and reliability (such as error rate and drop rate).

1.3 Overview of Vector-based Algorithms and Link-State Algorithm

1.3.1 Distance-Vector Algorithm

A router running the distance-vector algorithm, as is the case with RIPng, initializes its local routing database with the addresses and costs of the directly attached networks and nodes. This information is exchanged with other directly connected routers through routing protocol messages. When a router receives routing messages from its neighboring routers, it adds the cost of the network on which the routing messages arrived to all of the destinations that are advertised in the routing messages. A destination can appear in multiple routing messages that were sent by different neighboring routers. The receiving router chooses the router that advertised the smallest metric to that destination as the preferred next hop. The smallest metric value is updated with the cost of the network. The receiving router then readvertises that destination with the updated metric.

Figure 1-2 illustrates how the distance-vector algorithm works for a very simple network topology (a more interesting example will be shown in Section 1.4). There are three routers (A, B and C) connected in series, and router A is attached to a leaf network N. For simplicity, let us just concentrate on the routing information about network N, and assume that the cost of any link is 1.

The arrows shown in Figure 1-2 are labeled with the routing information distributed among the routers, which highlights the destination information (N) and the total cost to reach the destination. The box drawn next to each router represents its routing table, whose entry is a combination of . For example, router B accepts the information advertised by router A (which by default has the smallest metric because that route is the only route about network N) and installs the route to its routing table. Router B then readvertises that route toward router C with the updated cost. Eventually all of the routers will converge to a stable state in which each router knows the path to leaf network N. Router C forwards any packet destined to network N toward router B, which then forwards the packet to router A. Router A will then deliver the packet to the final destination on N.

(Continues...)


Excerpted from IPv6 Advanced Protocols Implementation by Qing Li Tatuya Jinmei Keiichi Shima Copyright © 2007 by Elsevier Inc. . Excerpted by permission of MORGAN KAUFMANN. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site. This book is the second installment of a two-volume series on IPv6 and the KAME implementation. This book discusses those protocols that are found in more capable IPv6 devices, are commonly deployed in more complex IPv6 network environments, or are not specific to IPv6 but are extended to support IPv6. Specifically, this book engages the readers in advanced topics such as routing, multicasting, DNS, DHCPv6, mobility, and security.

This two-volume series covers a wide spectrum of the IPv6 technology, help the readers establish solid and empirical understanding on IPv6 and the KAME reference implementation paralleled by none.

Key Features:

* Extensive code listings with meticulous line-by-line explanation of rationale and use for KAME snapshot implementations on advanced IPv6 related protocols, including:
-Unicast and multicast routing and DNS client based on KAME snapshot dated April 2003, which are a base of more recent versions of BSD variants
-Mobile IPv6 based on KAME snapshot dated July 2004, a predecessor version of the "SHISA" implementation
-DHCPv6 based on KAME snapshot dated May 2005, a base of the WIDE-DHCPv6 implementation available at SourceForge today
* Numerous diagrams and illustrations help in visualizing the implementation
* In-depth discussion of the standards provides intrinsic understanding of the specifications
* An introduction to the IP security protocols along with the use of the racoon key exchange daemon
* Two CD-ROMs filled with the complete KAME IPv6 protocol stack and FreeBSD software


* The only authoritative reference "cookbook" for anyone interested in advanced IPv6 topics and protocols.
* Line-by-line walk through of real code helps the reader master IPv6 implementation
* Comprehensive in scope, based on a working standard, and thoroughly illustrated to bring the protocols alive. IPv6 Advanced Protocols Implementation is the second installment of a two-volume series on IPv6 and the KAME implementation. This book discusses those protocols that are found in more capable IPv6 devices, are commonly deployed in more complex IPv6 network environments, or are not specific to IPv6 but are extended to support IPv6. Specifically, this book engages the readers in advanced topics such as routing, multicasting, DNS, DHCPv6, mobility, and security. This two-volume series covers a wide spectrum of the IPv6 technology, help the readers establish solid and empirical understanding on IPv6 and the KAME reference implementation paralleled by none. Key Features: Extensive code listings with meticulous line-by-line explanation of rationale and use for KAME snapshot implementations on advanced IPv6 related protocols, including: Unicast and multicast routing and DNS client based on KAME snapshot dated April 2003, which are a base of more recent versions of BSD variants Mobile IPv6 based on KAME snapshot dated July 2004, a predecessor version of the "SHISA" implementation DHCPv6 based on KAME snapshot dated May 2005, a base of the WIDE-DHCPv6 implementation available at SourceForge today Numerous diagrams and illustrations help in visualizing the implementation In-depth discussion of the standards provides intrinsic understanding of the specifications An introduction to the IP security protocols along with the use of the racoon key exchange daemon Two CD-ROMs filled with the complete KAME IPv6 protocol stack and FreeBSD software The only authoritative reference "cookbook" for anyone interested in advanced IPv6 topics and protocols Line-by-line walk through of real code helps the reader master IPv6 implementation Comprehensive in scope, based on a working standard, and thoroughly illustrated to bring the protocols alive "IPv6 is now in its deployment stage after having been in development with the IETF for over 10 years. KAME is the widely accepted reference implementation for IPv6 and IP security protocols developed on multiple variants of the BSD operating systems. This book tackles more high level topics than its predecessor, IPv6 Core Protocols Implementation written by the same author team. The Core book focuses on fundamentals of IPv6 and essential protocols. This book takes the next step and details protocols that are founded on more advanced topics such as routing, multicasting, DNS, DHCPv6, mobility, and security."--Jacket

دانلود کتاب IPv6 Advanced Protocols Implementation, 2007 Edition