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

Chapter 14

Teredo

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

Define the address format, encapsulation, and intended use of the Teredo IPv6 transition technology.

Describe how the IPv6 protocol in Windows Server 2008 and Windows Vista supports Teredo as a Teredo client and a Teredo host-specific relay.

List and describe the routes on Teredo clients, Teredo servers, Teredo relays, and IPv6 routers on the IPv6 Internet that make Teredo-based communication possible.

Describe how Teredo clients perform automatic address configuration.

Describe how Teredo clients on the same link, Teredo clients in different sites, Teredo host-specific relays, and IPv6 hosts on the IPv6 Internet initiate communication with each other.

Introduction to Teredo

Teredo is an address assignment and automatic tunneling technology defined in RFC 4380 that provides unicast IPv6 connectivity across the IPv4 Internet. 6to4 is an automatic tunneling technology described in Chapter 13, “6to4,” that also provides unicast IPv6 connectivity across the IPv4 Internet. However, 6to4 works well when a 6to4 router exists at the edge of the site. The 6to4 router uses a public IPv4 address to construct the 6to4 prefix and acts as an IPv6 advertising and forwarding router. The 6to4 router encapsulates and decapsulates IPv6 traffic sent to and from site hosts.

6to4 relies on the configuration of a public IPv4 address and the implementation of 6to4 routing functionality in the edge device. Many small office/home office (SOHO) configurations use an IPv4 Network Address Translator (NAT) for Internet connectivity. For more information about how a NAT works, see Chapter 1, “Introduction to IPv6.” In most NAT configurations, the device providing NAT functionality is not capable of acting as a 6to4 router. Even if 6to4 was universally supported in Internet edge devices, there are some Internet connectivity configurations that contain multiple levels of NATs. A 6to4-capable edge device cannot use 6to4 if it is not assigned a public IPv4 address.

Teredo addresses the issues related to the lack of 6to4 functionality in modern-day Internet edge devices and multilayered NAT configurations by tunneling IPv6 packets between hosts. In contrast, 6to4 tunnels IPv6 packets between the edge devices. Tunneling from the hosts presents another issue for NATs: IPv6 packets that are encapsulated with IPv4 have the Protocol field in the IPv4 header set to 41. Most NATs translate only Transmission Control

317

318 Understanding IPv6, Second Edition

Protocol (TCP) or User Datagram Protocol (UDP) traffic and must either be manually configured to translate other protocols or have NAT editors installed that handle the translation. Because Protocol 41 translation is not a common feature of NATs, IPv4-encapsulated IPv6 traffic will not flow through typical NATs. Therefore, to allow IPv6 traffic to flow through one or multiple NATs, Teredo encapsulates the IPv6 packet as an IPv4 UDP message, containing both an IPv4 and UDP header. UDP messages can be translated by most NATs and can traverse multiple layers of NATs.

To summarize, Teredo is an IPv6 transition technology that allows automatic IPv6 tunneling between hosts that are located on the IPv4 Internet, even when those hosts are behind one or more IPv4 NATs. IPv6 traffic from Teredo clients can flow across NATs because it is sent as an IPv4 UDP message. If the NAT supports UDP port translation, the NAT supports Teredo (with the exception of symmetric NATs, described later in this chapter).

Benefits of Using Teredo

Teredo is a NAT traversal technology for IPv6 traffic. IPv6 traffic tunneled using Teredo can cross one or multiple NATs and allow a Teredo client to access other Teredo clients on the IPv4 Internet and hosts on the IPv6 Internet (through a Teredo relay). The ability to connect to other Teredo clients that are connected to the IPv4 Internet enables communication between applications that would otherwise have problems communicating over a NAT. With Teredo, IPv6-enabled applications can successfully communicate more frequently over the IPv4 Internet than IPv4-only applications.

Some types of IPv4-only server or peer applications have problems communicating when running on a computer that is behind a NAT. These types of applications either require manual configuration of the NAT (to allow unsolicited incoming traffic to the server or peer computer on the private network) or must provide their own solution for NAT traversal.

If the application is IPv6-capable, it can use Teredo, the NAT traversal solution for Windows. There is no need to either configure the NAT or modify the application to perform its own NAT traversal. Therefore, rather than spending development time modifying applications for a custom NAT traversal solution, application vendors should update their applications to be IPv6-capable.

Teredo Support in Microsoft Windows

Teredo is supported in the following versions of Microsoft Windows:

Windows Server 2008

Windows Vista

Windows XP with Service Pack 2 (SP2)

Chapter 14 Teredo

319

Windows Server 2003 with Service Pack 1

Windows XP with Service Pack 1 (SP1) with the Advanced Networking Pack for Windows XP

All implementations of Teredo in Windows are based on RFC 4380.

In Windows Server 2008 and Windows Vista, the Teredo component might be enabled or disabled depending on the computer’s configuration. When enabled, the Teredo component can be in the dormant or qualified states. For more information, see “The Teredo Client and Host-Specific Relay in Windows” later in this chapter.

In Windows Server 2008 or Windows Vista, any IPv6-capable application can use Teredo for incoming traffic by adding an inbound rule to the Windows Firewall for the application’s traffic with edge traversal enabled. You can manually enable edge traversal with the Windows Firewall with Advanced Security snap-in, on the Advanced tab for the properties of an inbound rule. In Windows Server 2008 or Windows Vista, any IPv6-capable application can use Teredo for outgoing traffic if the outgoing traffic uses the Teredo tunneling interface as its next-hop interface.

Teredo and Protection from Unsolicited Incoming IPv6 Traffic

IPv6 traffic that is tunneled with Teredo is not subject to the IPv4 packet-filtering function of typical NATs. Although this might sound like Teredo is bypassing the NAT and allowing potentially malicious IPv6 traffic on private networks, consider the following:

Teredo does not change the behavior of NATs. Teredo clients create dynamic NAT translation table entries for their own Teredo traffic. The NAT forwards incoming Teredo traffic to the host that created the matching NAT translation table entry. The NAT will not forward Teredo traffic to computers on the private network that are not Teredo clients.

Teredo clients that use a host-based, stateful firewall that supports IPv6 traffic, such as Windows Firewall, are protected from unsolicited, unwanted, incoming IPv6 traffic. Windows Firewall is enabled by default for Windows XP with SP2, Windows Vista, and Windows Server 2008.

The combination of IPv6, Teredo, and a host-based, stateful, IPv6 firewall does not affect the packet-filtering function of the NAT for IPv4-based traffic and does not make your Windowsbased computer more susceptible to attacks by malicious users and programs that use IPv6 traffic rather than IPv4 traffic.

Network Address Translators (NATs)

As described in Chapter 1, a NAT is an IPv4 router defined in RFC 1631 that can translate the IPv4 addresses and TCP/UDP port numbers of packets as they are forwarded. A NAT can map private addresses to a single or to multiple public IPv4 addresses.

320 Understanding IPv6, Second Edition

NAT is a common solution for the following combination of requirements:

You want to leverage the use of a single connection, rather than connecting multiple computers, to the Internet.

You want to use private addressing.

You want access to Internet resources without having to deploy a proxy server.

The mappings for private-to-public traffic are stored in a NAT translation table, which can contain the following types of entries:

Dynamic mappings Created when private network clients initiate communications. Dynamic mappings are removed from the NAT translation table after a specified amount of time, unless refreshed by traffic that corresponds to the NAT translation table entry.

Static mappings Configured manually so that communications initiated by Internet clients can be mapped to a specific private network address and port. Static mappings are needed when there are servers (for example, Web servers) or applications (for example, games) on the private network that you want to make available to computers that are connected to the Internet. Static mappings are not removed from the NAT translation table.

For outgoing traffic to the Internet, the NAT translation table maps the destination address in the packet from an internal address (the address assigned to a host on the private network) to an external address (the public IPv4 address assigned to the NAT’s Internet interface) and the destination port number from an internal port number (the port number being used by the host on the private network) to an external port number (the port number assigned by the NAT).

For incoming traffic from the Internet, the NAT translation table maps the destination address in the packet from an external address to an internal address and the destination port number from an external port number to an internal port number.

The NAT forwards traffic from the Internet to the private network only if a mapping exists in the NAT translation table. In this way, the NAT provides a simple, stateful, packet-filtering function for the computers on the private network.

Types of NATs

The following types of NATs are defined:

Cone NATs A NAT in which the NAT translation table entry stores a mapping between an internal address and port number and an external address and port number. Once the NAT translation table entry is in place, inbound traffic to the external address and port number from any source address and port number is allowed and translated.

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