06-Layer 3—IP Services Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C S9825 & S9855 Switch Series Configuration Guides-R913x-6W10006-Layer 3—IP Services Configuration Guide
09-IPv6 transition technologies configuration
Title Size Download
09-IPv6 transition technologies configuration 193.89 KB

IPv6 transition technologies overview

About IPv6 transition technologies

IPv6 transition technologies enable communication between IPv4 and IPv6 networks.

Dual stack

Dual stack is the most direct transition approach. A network node that supports both IPv4 and IPv6 is a dual-stack node. A dual-stack node configured with an IPv4 address and an IPv6 address can forward both IPv4 and IPv6 packets. An application that supports both IPv4 and IPv6 prefers IPv6 at the network layer.

Dual stack is suitable for communication between IPv4 nodes or between IPv6 nodes. It is the basis of all transition technologies. However, it does not solve the IPv4 address depletion issue because each dual-stack node must have a globally unique IPv4 address.

6PE

6PE enables communication between isolated IPv6 networks over an IPv4 backbone network.

6PE adds labels to the IPv6 routing information about customer networks and advertises the information into the IPv4 backbone network over internal Border Gateway Protocol (IBGP) sessions. IPv6 packets are labeled and forwarded over tunnels on the backbone network. The tunnels can be GRE tunnels or MPLS LSPs.

Figure 1 Network diagram

6PE is a highly efficient solution. When an ISP wants to utilize the existing IPv4/MPLS network to provide IPv6 traffic switching, it only needs to upgrade the PE routers. In addition, the operation risk of 6PE is very low. For more information about 6PE, see extended BGP feature configuration in Layer 3—IP Routing Configuration Guide.

Tunneling

Tunneling uses one network protocol to encapsulate the packets of another network protocol and transfers them over the network. For example, IPv6 over IPv4 tunneling and IPv4 over IPv6 tunneling are IPv6 transition technologies.

 

 

NOTE:

This document describes only IPv6 over IPv4 tunneling and IPv4 over IPv6 tunneling. Unless otherwise stated, the term "tunneling" in this document refers to IPv6 over IPv4 tunneling and IPv4 over IPv6 tunneling.

IPv6 over IPv4 tunneling

Implementation

IPv6 over IPv4 tunneling enables isolated IPv6 networks to communicate, as shown in Figure 2.

 

 

NOTE:

The devices at both ends of an IPv6 over IPv4 tunnel must support the IPv4/IPv6 dual stack.

 

Figure 2 IPv6 over IPv4 tunnel

 

The IPv6 over IPv4 tunnel processes packets by using the following steps:

1.     A host in the IPv6 network sends an IPv6 packet to Device A at the tunnel source.

2.     After Device A receives the IPv6 packet, it processes the packet as follows:

a.     Searches the routing table to identify the outgoing interface for the IPv6 packet.

The outgoing interface is the tunnel interface, so Device A knows that the packet needs to be forwarded through the tunnel.

b.     Adds an IPv4 header to the IPv6 packet and forwards the packet through the physical interface of the tunnel.

In the IPv4 header, the source IPv4 address is the IPv4 address of the tunnel source, and the destination IPv4 address is the IPv4 address of the tunnel destination.

3.     Upon receiving the packet, Device B de-encapsulates the packet.

4.     If the destination address of the IPv6 packet is itself, Device B forwards it to the upper-layer protocol. If it is not, Device B forwards it according to the routing table.

IPv4 over IPv6 tunneling

Implementation

IPv4 over IPv6 tunneling adds an IPv6 header to IPv4 packets so that the IPv4 packets can pass an IPv6 network through a tunnel to realize interworking between isolated IPv4 networks.

Figure 3 IPv4 over IPv6 tunnel

 

Figure 3 shows the encapsulation and de-encapsulation processes.

·     Encapsulation:

a.     Upon receiving an IPv4 packet, Device A delivers it to the IPv4 protocol stack.

b.     The IPv4 protocol stack uses the destination address of the packet to determine the egress interface. If the egress interface is the tunnel interface, the IPv4 protocol stack delivers the packet to the tunnel interface.

c.     The tunnel interface adds an IPv6 header to the original IPv4 packet and delivers the packet to the IPv6 protocol stack.

d.     The IPv6 protocol stack uses the destination IPv6 address of the packet to look up the routing table, and then sends it out.

·     De-encapsulation:

a.     Upon receiving the IPv6 packet from the attached IPv6 network, Device B delivers the packet to the IPv6 protocol stack to examine the protocol type encapsulated in the data portion of the packet.

b.     If the protocol type is IPv4, the IPv6 protocol stack delivers the packet to the tunneling module.

c.     The tunneling module removes the IPv6 header and delivers the remaining IPv4 packet to the IPv4 protocol stack.

d.     The IPv4 protocol stack forwards the IPv4 packet.


Configuring IPv6 over IPv4 tunneling

Configuring an IPv6 over IPv4 manual tunnel

Restrictions and guidelines

When you perform tasks in this section, follow these restrictions and guidelines:

·     The tunnel destination address specified on the local device must be identical with the tunnel source address specified on the tunnel peer device.

·     Do not specify the same tunnel source and destination addresses for the tunnel interfaces in the same mode on a device.

·     To ensure correct packet forwarding, identify whether the destination IPv6 network and the IPv6 address of the local tunnel interface are on the same subnet. If they are not, configure a route reaching the destination IPv6 network through the tunnel interface. You can configure the route by using one of the following methods:

¡     Configure a static route, and specify the local tunnel interface as the outgoing interface or specify the IPv6 address of the peer tunnel interface as the next hop.

¡     Enable a dynamic routing protocol on both the local and remote tunnel interfaces.

For more information about route configuration, see Layer 3—IP Routing Configuration Guide.

·     IPv6 over IPv4 manual tunnel configuration commands include the following common tunnel interface commands:

¡     interface tunnel.

¡     source.

¡     destination.

¡     tunnel dfbit enable.

For more information about these and more tunnel interface commands, see Interface Command Reference.

Procedure

1.     Enter system view.

system-view

2.     Enter IPv6 over IPv4 manual tunnel interface view.

interface tunnel number [ mode ipv6-ipv4 ]

3.     Specify an IPv6 address for the tunnel interface.

See "Configuring basic IPv6 settings."

4.     Configure a source address or source interface for the tunnel interface.

source { ipv4-address | interface-type interface-number }

By default, no source address or source interface is configured for the tunnel interface.

If you specify a source address, it is used as the source IP address of tunneled packets.

If you specify a source interface, the primary IP address of this interface is used as the source IP address of tunneled packets.

5.     Configure a destination address for the tunnel interface.

destination ipv4-address

By default, no destination address is configured for the tunnel interface.

The tunnel destination address must be the IP address of the receiving interface on the tunnel peer. It is used as the destination IP address of tunneled packets.

6.     (Optional.) Set the DF bit for tunneled packets.

tunnel dfbit enable

By default, the DF bit is not set for tunneled packets.

Example: Configuring an IPv6 over IPv4 manual tunnel

Network configuration

As shown in Figure 4, configure an IPv6 over IPv4 tunnel between Switch A and Switch B so the two IPv6 networks can reach each other over the IPv4 network. Because the tunnel destination IPv4 address cannot be automatically obtained from the destination IPv6 addresses, configure an IPv6 over IPv4 manual tunnel.

Figure 4 Network diagram

 

Prerequisites

Make sure Switch A and Switch B have the corresponding VLAN interfaces created and can reach each other through IPv4.

Procedure

1.     Configure Switch A:

# Add HundredGigE 1/0/2 (the physical interface of the tunnel) to VLAN 100.

<SwitchA> system-view

[SwitchA] vlan 100

[SwitchA-vlan100] port hundredgige 1/0/2

[SwitchA-vlan100] quit

# Specify an IPv4 address for VLAN-interface 100.

[SwitchA] interface vlan-interface 100

[SwitchA-Vlan-interface100] ip address 192.168.100.1 255.255.255.0

[SwitchA-Vlan-interface100] quit

# Add HundredGigE 1/0/1 to VLAN 101.

[SwitchA] vlan 101

[SwitchA-vlan101] port hundredgige 1/0/1

[SwitchA-vlan101] quit

# Specify an IPv6 address for VLAN-interface 101.

[SwitchA] interface vlan-interface 101

[SwitchA-Vlan-interface101] ipv6 address 3002::1 64

[SwitchA-Vlan-interface101] quit

# Create IPv6 over IPv4 manual tunnel interface Tunnel 1.

[SwitchA] interface tunnel 1 mode ipv6-ipv4

# Specify an IPv6 address for the tunnel interface.

[SwitchA-Tunnel1] ipv6 address 3001::1/64

# Specify VLAN-interface 100 as the source interface of the tunnel interface.

[SwitchA-Tunnel1] source vlan-interface 100

# Specify the destination address for the tunnel interface as the IP address of the VLAN-interface 100 on Switch B.

[SwitchA-Tunnel1] destination 192.168.50.1

[SwitchA-Tunnel1] quit

# Configure a static route destined for IPv6 network 2 through tunnel 1.

[SwitchA] ipv6 route-static 3003:: 64 tunnel 1

2.     Configure Switch B:

# Add HundredGigE 1/0/2 (the physical interface of the tunnel) to VLAN 100.

<SwitchB> system-view

[SwitchB] vlan 100

[SwitchB-vlan100] port hundredgige 1/0/2

[SwitchB-vlan100] quit

# Specify an IPv4 address for VLAN-interface 100.

[SwitchB] interface vlan-interface 100

[SwitchB-Vlan-interface100] ip address 192.168.50.1 255.255.255.0

[SwitchB-Vlan-interface100] quit

# Add HundredGigE 1/0/1 to VLAN 101.

[SwitchB] vlan 101

[SwitchB-vlan101] port hundredgige 1/0/1

[SwitchB-vlan101] quit

# Specify an IPv6 address for VLAN-interface 101.

[SwitchB] interface vlan-interface 101

[SwitchB-Vlan-interface101] ipv6 address 3003::1 64

[SwitchB-Vlan-interface101] quit

# Create IPv6 over IPv4 manual tunnel interface Tunnel 1.

[SwitchB] interface tunnel 1 mode ipv6-ipv4

# Specify an IPv6 address for the tunnel interface.

[SwitchB-Tunnel1] ipv6 address 3001::2/64

# Specify VLAN-interface 100 as the source interface of the tunnel interface.

[SwitchB-Tunnel1] source vlan-interface 100

# Specify the destination address for the tunnel interface as the IP address of VLAN-interface 100 of Switch A.

[SwitchB-Tunnel1] destination 192.168.100.1

[SwitchB-Tunnel1] quit

# Configure a static route destined for IPv6 network 1 through tunnel 1.

[SwitchB] ipv6 route-static 3002:: 64 tunnel 1

Verifying the configuration

# Use the display ipv6 interface command to display tunnel interface status on Switch A and Switch B. Verify that the interface Tunnel 1 is up. (Details not shown.)

# Verify that Switch B and Switch A can ping the IPv6 address of VLAN-interface 101 of each other. This example uses Switch A.

[SwitchA] ping ipv6 3003::1

Ping6(56 data bytes) 3001::1 --> 3003::1, press CTRL_C to break

56 bytes from 3003::1, icmp_seq=0 hlim=64 time=45.000 ms

56 bytes from 3003::1, icmp_seq=1 hlim=64 time=10.000 ms

56 bytes from 3003::1, icmp_seq=2 hlim=64 time=4.000 ms

56 bytes from 3003::1, icmp_seq=3 hlim=64 time=10.000 ms

56 bytes from 3003::1, icmp_seq=4 hlim=64 time=11.000 ms

 

--- Ping6 statistics for 3003::1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 4.000/16.000/45.000/14.711 ms

Enabling dropping IPv6 packets that use IPv4-compatible IPv6 addresses

Restrictions and guidelines

Automatic IPv4-compatible IPv6 tunnels do not support this feature.

Procedure

1.     Enter system view.

system-view

2.     Enable dropping IPv6 packets that use IPv4-compatible IPv6 addresses.

tunnel discard ipv4-compatible-packet

By default, IPv6 packets that use IPv4-compatible IPv6 addresses are not dropped.

For more information about this command, see tunnel interface commands in Interface Command Reference.

Enabling fragmentation check for packets to be tunneled

1.     Enter system view.

system-view

2.     Enable fragmentation check for packets to be tunneled.

tunnel ipv6-fragmentation-check enable

By default, fragmentation check is disabled for packets to be tunneled.

Verifying and maintaining IPv6 over IPv4 tunneling

Displaying IPv6 over IPv4 tunnel interface information

Perform display tasks in any view.

·     Display IPv6 over IPv4 tunnel interface information.

display tunnel-interface [ number ]

For more information about this command, see tunnel interface commands in Interface Command Reference.

·     Display information about IPv6 over IPv4 tunnel interfaces.

display interface [ tunnel [ number ] ] [ brief [ description | down ] ]

For more information about this command, see tunnel interface commands in Interface Command Reference.

·     Display IPv6 information about IPv6 over IPv4 tunnel interfaces.

display ipv6 interface [ tunnel [ number ] ] [ brief ]

For more information about this command, see IPv6 basics in Layer 3—IP Services Command Reference.

Clearing IPv6 over IPv4 tunnel interface information

Perform clear tasks in user view.

·     Clear IPv6 over IPv4 tunnel interface statistics.

reset counters interface [ tunnel [ number ] ]

For more information about this command, see common interface commands in Interface Command Reference.

·     Clear IPv6 statistics on IPv6 over IPv4 tunnel interfaces.

reset ipv6 statistics [ slot slot-number ]

For more information about this command, see IPv6 basics in Layer 3—IP Services Command Reference.

 


Configuring IPv4 over IPv6 tunneling

Configuring an IPv4 over IPv6 manual tunnel

Restrictions and guidelines

When you perform the tasks in this section, follow these restrictions and guidelines:

·     The tunnel destination address specified on the local device must be identical with the tunnel source address specified on the tunnel peer device.

·     Do not specify the same source and destination addresses for local tunnel interfaces in the same tunnel mode.

·     To ensure correct packet forwarding, identify whether the destination IPv4 network and the IPv4 address of the local tunnel interface are on the same subnet. If they are not, configure a route reaching the destination IPv4 network through the tunnel interface. You can configure the route by using one of the following methods:

¡     Configure a static route, and specify the local tunnel interface as the egress interface or specify the IPv6 address of the peer tunnel interface as the next hop.

¡     Enable a dynamic routing protocol on both the local and remote tunnel interfaces.

For more information about route configuration, see Layer 3—IP Routing Configuration Guide.

·     IPv4 over IPv6 tunnel configuration commands include the following common tunnel interface commands:

¡     interface tunnel.

¡     source.

¡     destination.

For more information about these and more tunnel interface commands, see Interface Command Reference.

Procedure

1.     Enter system view.

system-view

2.     Enter IPv4 over IPv6 tunnel interface view or IPv6 tunnel interface view.

interface tunnel number [ mode { ipv4-ipv6 | ipv6 } ]

3.     Configure an IPv4 address for the tunnel interface.

ip address ip-address { mask | mask-length } [ sub ]

4.     Configure the source address or interface for the tunnel interface.

source { ipv6-address | interface-type interface-number }

By default, no source address or interface is configured for the tunnel.

If you specify a source address, it is used as the source IPv6 address of tunneled packets.

If you specify a source interface, the lowest IPv6 address of this interface is used as the source IPv6 address of tunneled packets.

5.     Configure the destination address for the tunnel interface.

destination ipv6-address

By default, no destination address is configured for the tunnel.

The tunnel destination address must be the IPv6 address of the receiving interface on the tunnel peer. It is used as the destination IPv6 address of tunneled packets.

Example: Configuring an IPv4 over IPv6 manual tunnel

Network configuration

As shown in Figure 5, configure an IPv4 over IPv6 tunnel between Switch A and Switch B so the two networks can reach each other over the IPv6 network.

Figure 5 Network diagram

Prerequisites

Make sure Switch A and Switch B have the corresponding VLAN interfaces created and can reach each other through IPv6.

Procedure

1.     Configure Switch A:

# Add HundredGigE 1/0/1 to VLAN 100.

<SwitchA> system-view

[SwitchA] vlan 100

[SwitchA-vlan100] port hundredgige 1/0/1

[SwitchA-vlan100] quit

# Specify an IPv4 address for VLAN-interface 100.

[SwitchA] interface vlan-interface 100

[SwitchA-Vlan-interface100] ip address 30.1.1.1 255.255.255.0

[SwitchA-Vlan-interface100] quit

# Add HundredGigE 1/0/2 (the physical interface of the tunnel) to VLAN 101.

[SwitchA] vlan 101

[SwitchA-vlan101] port hundredgige 1/0/2

[SwitchA-vlan101] quit

# Specify an IPv6 address for VLAN-interface 101.

[SwitchA] interface vlan-interface 101

[SwitchA-Vlan-interface101] ipv6 address 2001::1:1 64

[SwitchA-Vlan-interface101] quit

# Create IPv6 tunnel interface Tunnel 1.

[SwitchA] interface tunnel 1 mode ipv6

# Specify an IPv4 address for the tunnel interface.

[SwitchA-Tunnel1] ip address 30.1.2.1 255.255.255.0

# Specify the IP address of VLAN-interface 101 as the source address for the tunnel interface.

[SwitchA-Tunnel1] source 2001::1:1

# Specify the IP address of VLAN-interface 101 on Switch B as the destination address for the tunnel interface.

[SwitchA-Tunnel1] destination 2002::2:1

[SwitchA-Tunnel1] quit

# Configure a static route destined for IPv4 network 2 through the tunnel interface.

[SwitchA] ip route-static 30.1.3.0 255.255.255.0 tunnel 1

2.     Configure Switch B:

# Add HundredGigE 1/0/1 to VLAN 100.

<SwitchB> system-view

[SwitchB] vlan 100

[SwitchB-vlan100] port hundredgige 1/0/1

[SwitchB-vlan100] quit

# Specify an IPv4 address for VLAN-interface 100.

[SwitchB] interface vlan-interface 100

[SwitchB-Vlan-interface100] ip address 30.1.3.1 255.255.255.0

[SwitchB-Vlan-interface100] quit

# Add HundredGigE 1/0/2 (the physical interface of the tunnel) to VLAN 101.

[SwitchB] vlan 101

[SwitchB-vlan101] port hundredgige 1/0/2

[SwitchB-vlan101] quit

# Specify an IPv6 address for VLAN-interface 101.

[SwitchB] interface vlan-interface 101

[SwitchB-Vlan-interface101] ipv6 address 2002::2:1 64

[SwitchB-Vlan-interface101] quit

# Create IPv6 tunnel interface Tunnel 2.

[SwitchB] interface tunnel 2 mode ipv6

# Specify an IPv4 address for the tunnel interface.

[SwitchB-Tunnel2] ip address 30.1.2.2 255.255.255.0

# Specify the IP address of VLAN-interface 101 as the source address for the tunnel interface (IP address of VLAN-interface 101).

[SwitchB-Tunnel2] source 2002::2:1

# Specify the IP address of VLAN-interface 101 on Switch A as the destination address for the tunnel interface.

[SwitchB-Tunnel2] destination 2001::1:1

[SwitchB-Tunnel2] quit

# Configure a static route destined for IPv4 network 1 through the tunnel interface.

[SwitchB] ip route-static 30.1.1.0 255.255.255.0 tunnel 2

Verifying the configuration

# Use the display interface tunnel command to display the status of the tunnel interfaces on Switch A and Switch B. Verify that the tunnel interfaces are up. (Details not shown.)

# Verify that Switch A and Switch B can ping the IPv4 address of the peer interface. This example uses Switch A.

[SwitchA] ping -a 30.1.1.1 30.1.3.1

Ping 30.1.3.1 (30.1.3.1) from 30.1.1.1: 56 data bytes, press CTRL_C to break

56 bytes from 30.1.3.1: icmp_seq=0 ttl=255 time=3.000 ms

56 bytes from 30.1.3.1: icmp_seq=1 ttl=255 time=1.000 ms

56 bytes from 30.1.3.1: icmp_seq=2 ttl=255 time=0.000 ms

56 bytes from 30.1.3.1: icmp_seq=3 ttl=255 time=1.000 ms

56 bytes from 30.1.3.1: icmp_seq=4 ttl=255 time=1.000 ms

 

--- Ping statistics for 30.1.3.1 ---

5 packet(s) transmitted, 5 packet(s) received, 0.0% packet loss

round-trip min/avg/max/std-dev = 0.000/1.200/3.000/0.980 ms

Verifying and maintaining IPv4 over IPv6 tunneling

Displaying IPv4 over IPv6 tunnel interface information

This section only lists commands available for displaying IPv4 over IPv6 tunnel interface information. For more information about the commands, see tunnel interface commands in Interface Command Reference.

Perform display tasks in any view.

·     Display IPv4 over IPv6 tunnel interface information.

display tunnel-interface [ number ]

·     Display information about IPv4 over IPv6 tunnel interfaces.

display interface [ tunnel [ number ] ] [ brief [ description | down ] ]

Clearing IPv4 over IPv6 tunnel interface information

To clear IPv4 over IPv6 tunnel interface statistics, execute the following command in user view:

reset counters interface [ tunnel [ number ] ]

For more information about this command, see common interface commands in Interface Command Reference.

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网