09-IP Tunneling Configuration Guide

HomeSupportSwitchesS6550X-HI SeriesConfigure & DeployConfiguration GuidesH3C S6550X-HI Configuration Guides-R1116Pxx-6W10009-IP Tunneling Configuration Guide
02-IPv6 over IPv6 tunneling configuration
Title Size Download
02-IPv6 over IPv6 tunneling configuration 96.07 KB

IPv6 over IPv6 tunneling

About IPv6 over IPv6 tunneling

IPv6 over IPv6 tunneling (RFC 2473) enables isolated IPv6 networks to communicate with each other over another IPv6 network. For example, two isolated IPv6 networks that do not want to show their addresses to the Internet can use an IPv6 over IPv6 tunnel to communicate with each other.

Figure 1 Principle of IPv6 over IPv6 tunneling

 

Figure 1 shows the encapsulation and de-encapsulation processes.

·     Encapsulation:

a.     After receiving an IPv6 packet, Device A submits it to the IPv6 protocol stack.

b.     The IPv6 protocol stack uses the destination IPv6 address of the packet to find the egress interface. If the egress interface is the tunnel interface, the stack delivers it to the tunnel interface.

c.     After receiving the packet, the tunnel interface adds an IPv6 header to it and submits it to the IPv6 protocol stack.

d.     The IPv6 protocol stack forwards the packet according to its destination IPv6 address.

·     De-encapsulation:

a.     Upon receiving the IPv6 packet, Device B delivers it to the IPv6 protocol stack.

b.     The IPv6 protocol stack checks the protocol type of the data portion encapsulated in the IPv6 packet. If the encapsulation protocol is IPv6, the stack delivers the packet to the tunnel module.

c.     The tunnel module de-encapsulates the packet and sends it back to the IPv6 protocol stack.

d.     The IPv6 protocol stack forwards the IPv6 packet.

Restrictions and guidelines: IPv6 over IPv6 tunnel configuration

Follow these guidelines when you configure an IPv6 over IPv6 tunnel:

·     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.

·     The IPv6 address of the tunnel interface cannot be on the same subnet as the destination address configured for the tunnel interface.

·     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 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.

·     The destination address of the route passing the tunnel interface cannot be on the same subnet as the destination address configured for the tunnel interface.

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

¡     interface tunnel.

¡     source.

¡     destination.

¡     tunnel discard ipv4-compatible-packet.

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

IPv6 over IPv6 tunnel configuration tasks at a glance

To configure an IPv6 over IPv6 tunnel, perform the following tasks:

1.     Configuring an IPv6 over IPv6 tunnel

2.     (Optional.) Enabling dropping IPv6 packets that use IPv4-compatible IPv6 addresses

Configuring an IPv6 over IPv6 tunnel

1.     Enter system view.

system-view

2.     Enter IPv6 over IPv6 tunnel interface view.

interface tunnel number [ mode ipv6-ipv6 ]

3.     Configure an IPv6 address for the tunnel interface.

See IPv6 basics in Layer 3—IP Services Configuration Guide.

4.     Configure the source address or source 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.

Enabling dropping IPv6 packets that use IPv4-compatible IPv6 addresses

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.

Verifying and maintaining IPv6 over IPv6 tunneling

Displaying IPv6 over IPv6 tunnel interface information

Perform display tasks in any view.

·     Display IPv6 over IPv6 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 IPv6 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 IPv6 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 IPv6 tunnel interface statistics

Perform clear tasks in user view.

·     Clear IPv6 over IPv6 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 IPv6 tunnel interfaces.

reset ipv6 statistics [ slot slot-number ]

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

IPv6 over IPv6 tunnel configuration examples

Example: Configuring an IPv6 over IPv6 tunnel

Network configuration

As shown in Figure 2, configure an IPv6 over IPv6 tunnel between Switch A and Switch B so the two networks can reach each other without disclosing their IPv6 addresses.

Figure 2 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 Twenty-FiveGigE 1/0/1 to VLAN 100.

<SwitchA> system-view

[SwitchA] vlan 100

[SwitchA-vlan100] port twenty-fivegige 1/0/1

[SwitchA-vlan100] quit

# Specify an IPv6 address for VLAN-interface 100.

[SwitchA] interface vlan-interface 100

[SwitchA-Vlan-interface100] ipv6 address 2002:1::1 64

[SwitchA-Vlan-interface100] quit

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

[SwitchA] vlan 101

[SwitchA-vlan101] port twenty-fivegige 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::11:1 64

[SwitchA-Vlan-interface101] quit

# Create service loopback group 1, and specify its service type as tunnel.

[SwitchA] service-loopback group 1 type tunnel

# Assign Twenty-FiveGigE 1/0/3 to service loopback group 1.

[SwitchA] interface twenty-fivegige 1/0/3

[SwitchA-Twenty-FiveGigE1/0/3] port service-loopback group 1

[SwitchA-Twenty-FiveGigE1/0/3] quit

# Create IPv6 over IPv6 tunnel interface Tunnel1.

[SwitchA] interface tunnel 1 mode ipv6-ipv6

# Specify an IPv6 address for the tunnel interface.

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

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

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

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

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

[SwitchA-Tunnel1] quit

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

[SwitchA] ipv6 route-static 2002:3:: 64 tunnel 1

2.     Configure Switch B:

# Add Twenty-FiveGigE 1/0/1 to VLAN 100.

<SwitchB> system-view

[SwitchB] vlan 100

[SwitchB-vlan100] port twenty-fivegige 1/0/1

[SwitchB-vlan100] quit

# Specify an IPv6 address for VLAN-interface 100.

[SwitchB] interface vlan-interface 100

[SwitchB-Vlan-interface100] ipv6 address 2002:3::1 64

[SwitchB-Vlan-interface100] quit

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

[SwitchB] vlan 101

[SwitchB-vlan101] port twenty-fivegige 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::22:1 64

[SwitchB-Vlan-interface101] quit

# Create service loopback group 1, and specify its service type as tunnel.

[SwitchB] service-loopback group 1 type tunnel

# Assign Twenty-FiveGigE 1/0/3 to service loopback group 1.

[SwitchB] interface twenty-fivegige 1/0/3

[SwitchB-Twenty-FiveGigE1/0/3] port service-loopback group 1

[SwitchB-Twenty-FiveGigE1/0/3] quit

# Create IPv6 over IPv6 tunnel interface Tunnel 2.

[SwitchB] interface tunnel 2 mode ipv6-ipv6

# Specify an IPv6 address for the tunnel interface.

[SwitchB-Tunnel2] ipv6 address 3001::1:2 64

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

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

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

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

[SwitchB-Tunnel2] quit

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

[SwitchB] ipv6 route-static 2002:1:: 64 tunnel 2

Verifying the configuration

# Use the display ipv6 interface 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 ipv6 -a 2002:1::1 2002:3::1

Ping6(56 data bytes) 2002:1::1 --> 2002:3::1, press CTRL_C to break

56 bytes from 2002:3::1, icmp_seq=0 hlim=64 time=9.000 ms

56 bytes from 2002:3::1, icmp_seq=1 hlim=64 time=1.000 ms

56 bytes from 2002:3::1, icmp_seq=2 hlim=64 time=0.000 ms

56 bytes from 2002:3::1, icmp_seq=3 hlim=64 time=0.000 ms

56 bytes from 2002:3::1, icmp_seq=4 hlim=64 time=0.000 ms

 

--- Ping6 statistics for 2002:3::1 ---

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

round-trip min/avg/max/std-dev = 0.000/2.000/9.000/3.521 ms

  • 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 Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网