Dual Stack

This section presents the dual-stack approach used to transition from IPv4 networks to IPv6. The dual stack is a method used by the network's host, server, and router to handle and use the IPv4 and IPv6 protocols simultaneously. This well-known technique was successfully applied in the past for other protocol transitions, especially for the deployment of IPv4 inside Internet Packet Exchange (IPX) networks, Digital Equipment Corporation network protocol (DECnet), and AppleTalk-based networks. Dual-stack support implies that an IPv6 stack is installed on the host, server, and router where both protocols are needed. The management of IPv6 stacks on dual-stack nodes is greatly facilitated by IPv6's stateless autoconfiguration functionality, as discussed in Chapter 2, “IPv6 Addressing.”

NOTE

The assignment of IPv6 addresses on nodes with an IPv6 stack is simplified because a router advertises the IPv6 network prefix on the local links. Therefore, nodes can configure their IPv6 addresses by themselves.


Applications Supporting Both IPv4 and IPv6

Before being able to use the dual-stack capability in nodes, IPv4-based applications must be modified to support the IPv6 protocol. Basically, the API of the IPv4-only applications is coded to handle IPv4 addresses only. In fact, the application itself calls an IPv4-only API function that can handle only 32-bit addresses. As shown in Figure 5-1, the IPv4-only application may use either TCP or UDP as the transport layer to deliver data. After arriving at the stack, the data is put into IPv4 packets. Then the IPv4 packets are sent to the node's network interface. The protocol ID value used within Ethernet frames for IPv4 packets is 0x0800. This is a simple example that shows how the data passes from the IPv4-only application to the network interface through the IPv4 stack.

Figure 5-1. IPv4-Only Application Uses the IPv4 Stack to Send Packets


When an IPv4-only application has been modified to handle both IPv4 and IPv6 protocols, the application can continue to run as before over IPv4. The application can now call the right API function that can handle 128-bit addresses. After being updated to support IPv6, the application can select either the IPv4 or IPv6 stack to make the packets.

Figure 5-2 illustrates an application supporting both IPv4 and IPv6 protocols. The application uses TCP or UDP as the transport protocol, but it selects the IPv6 stack rather than IPv4. IPv6 packets are made and sent to the network interface. The protocol ID value used within Ethernet frames for IPv6 packets is 0x86DD.

Figure 5-2. Application Supporting Both IPv4 and IPv6 Can Use Both Stacks


Stack Selection

Even though an application is coded to handle both IPv4 and IPv6 protocols, the dual-stack node itself cannot randomly decide to use one of the two stacks to communicate. There are two methods to force a dual-stack node to use its IPv6 stack when IPv6 connectivity is available:

  • Manual entry by the user— If the user knows the IPv6 address of the destination IPv6 host name, he can fill in the IPv6 address to establish the session. However, as mentioned in Chapter 2, the legal format of an IPv6 address must be used. For web applications, do not forget to use the specific format for addresses used in a URL, as defined in RFC 2732. Manually entering an IPv6 address is good enough for debugging purposes, but this is not the best practice for the daily use of applications.

  • Using a naming service— As you saw in Chapter 3, “IPv6 in Depth,” you can configure a fully qualified domain name (FQDN) in the naming service (DNS) with both IPv4 and IPv6 addresses. An FQDN may be available through one IPv4 address represented by an A record or through one IPv6 address represented by an AAAA record in the DNS server. Eventually, the same FQDN might be available with both IPv4 and IPv6 addresses. This means that the DNS servers can be queried to provide information about a server's availability and host service either over IPv4 or IPv6.

As defined in RFC 2553, Basic Socket Interface Extensions for IPv6, a new API is defined to handle both IPv4 and IPv6 in DNS queries. The functions gethostbyname and gethostbyaddr in applications must be modified to get the benefits of the IPv6 protocol in legacy IPv4-based applications.

NOTE

The gethostbyname function translates a host name into its corresponding IPv4 address. gethostbyaddr translates an IPv4 address into its corresponding name. Both functions were originally designed to work with IPv4 values only.


The following is a list of possible querying scenarios:

  • Querying for an IPv4 address— An IPv4-only application requests naming services to resolve FQDN into an A record (IPv4 address). If the application receives an A record, it communicates with the host name using the IPv4 address received.

  • Querying for an IPv6 address— An IPv6-only application requests naming services to resolve FQDN into an AAAA record (IPv6 address). If the application receives an AAAA record, it communicates with the host name using the IPv6 address received.

  • Querying for all types of addresses— An application with both IPv4 and IPv6 support requests naming services to resolve FQDN into all types of addresses. The application looks for an AAAA record first. If it does not find an AAAA record, it looks for an A record to communicate with a host name.

The following sections describe these scenarios.

Querying the Naming Service for an IPv4 Address

When an application is IPv4-aware only (it does not support IPv6), the application asks the DNS server to get only the IPv4 address for the host name to communicate. As shown in Figure 5-3, first an IPv4-only application on the dual-stack node X asks the DNS server Y to resolve the FQDN www.example.org into an A record. Then the DNS server Y replies to the dual-stack node X, specifying the IPv4 address 206.123.31.2 of www.example.org. Finally, the IPv4-only application on the dual-stack node X forces node X to establish a session to the destination IPv4 address 206.123.31.2.

Figure 5-3. IPv4-Only Application Requesting an FQDN's A Record from the DNS Server


NOTE

The naming service presented in this example is a DNS server. However, a simple host file may also be used as a naming service.


Querying the Naming Service for an IPv6 Address

On the opposite side, the application may also support only IPv6 as the protocol. In this case, the IPv6-only application asks the DNS server to resolve an FQDN to get the host name's IPv6 address to communicate. As shown in Figure 5-4, first an IPv6-only application on the dual-stack node X asks the DNS server Y to resolve the FQDN www.example.org into an AAAA record. Then the DNS server Y replies to the dual-stack node X, specifying the destination IPv6 address 3ffe:b00:ffff:a::1. Finally, the IPv6-only application on the dual-stack node X forces node X to establish a session to the destination IPv6 address 3ffe:b00:ffff:a::1.

Figure 5-4. IPv6-Only Application Requesting an FQDN's AAAA Record from the DNS Server


NOTE

In Figure 5-4, the DNS query sent to the DNS server Y can be sent over IPv4 or IPv6. The type of address requested in a DNS query is independent of the protocol used to transport the query. However, to send a DNS query over IPv6, the dual-stack node's resolver must handle IPv6, and the DNS server must be reachable using an IPv6 address.


Querying the Naming Service for All Types of Addresses

The third possibility is an application with both IPv4 and IPv6 support used on a dual-stack node. In this situation, the application asks the DNS server to get all types of addresses. The application first looks for an AAAA record. If it does not find one, it looks for an A record to communicate with a host name. An application supporting both IPv4 and IPv6 is generally coded to give preference to the IPv6 address received from a naming service. As shown in Figure 5-5, an application with both IPv4 and IPv6 support on the dual-stack node X asks the DNS server Y to resolve the FQDN www.example.org into AAAA and A records. Then the DNS server Y replies to the dual-stack node X, specifying 3ffe:b00:ffff:a::1 as the destination IPv6 address and 206.123.31.2 as the destination IPv4 address. Finally, the application on the dual-stack node X prefers the IPv6 address 3ffe:b00:ffff:a::1 to establish the session to the destination node.

Figure 5-5. Application with IPv4 and IPv6 Support Requesting the A and AAAA Records from the DNS Server


NOTE

To facilitate the understanding of this concept, Figure 5-5 presents two different hosts (www.example.org) connected on two separate networks: IPv4 and IPv6. Moreover, each server uses a different address family, but they share the same FQDN. In a normal deployment, the same host using a dual stack may use both IPv4 and IPv6 addresses to handle the same service (in Figure 5-5, the web service).


Enabling Dual-Stack Support on Cisco Routers

On a Cisco router, when both IPv4 and IPv6 addresses are assigned to a network interface, the interface is considered dual-stacked. Therefore, the router can forward both IPv4 and IPv6 packets.

As shown in Example 5-1, the command ipv6 address 3ffe:b00:ffff:a::1/64 assigns the IPv6 address to the interface. The ip address 206.123.31.2 255.255.255.0 command enables the IPv4 address on the same network interface, fastethernet0/0.

Example 5-1. Enabling the Dual Stack on the Internet by Configuring Both IPv6 and IPv4 Addresses
Router#configure terminal
Router(config)#int fastethernet 0/0
Router(config-if)#ipv6 address 3ffe:b00:ffff:a::1/64
Router(config-if)#ip address 206.123.31.2 255.255.255.0
Router(config-if)#exit
Router(config)#exit
						

The following is a list of applications that have dual-stack support on the Cisco IOS Software:

  • DNS resolver— The DNS resolver on the Cisco IOS Software may resolve host names into IPv4 or IPv6 addresses. The DNS resolver on Cisco can be configured to reach naming services over IPv4 and IPv6 using the ip name-server ipv6-address command, as discussed in Chapter 3. This command may accept up to six different name servers.

  • Telnet— The Telnet server on the Cisco IOS Software accepts incoming Telnet sessions over IPv4 or IPv6. The Telnet client in the IOS EXEC command accepts both IPv4 and IPv6 addresses as an argument.

  • TFTP— The TFTP IOS EXEC command accepts either an IPv4 address or an IPv6 address as an argument.

  • HTTP server— When enabled, the HTTP server on the Cisco IOS Software accepts incoming HTTP sessions over IPv4 and IPv6.

Refer to Chapter 3 for additional information about the DNS resolver, Telnet, TFTP, and the HTTP server with IPv6 on Cisco.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.44.9