You are on page 1of 41

S12700 Series Agile Switches

Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

12 IPv6 over IPv4 Tunnel Configuration

About This Chapter

This chapter describes how to configure IPv6 over IPv4 tunnels.

12.1 Overview of IPv6 over IPv4 Tunnels


12.2 Understanding IPv6 over IPv4 Tunnels
12.3 Licensing Requirements and Limitations for IPv6 over IPv4 Tunnels
12.4 Configuring the IPv4/IPv6 Dual Stack
12.5 (Optional) Enabling the Service Loopback Function on an Eth-Trunk
12.6 Configuring an IPv6 over IPv4 Tunnel
12.7 Configuring 6PE
12.8 Monitoring the Running Status of the IPv6 over IPv4 Tunnel
12.9 Configuration Examples for IPv6 over IPv4 Tunnels

12.1 Overview of IPv6 over IPv4 Tunnels


An IPv6 over IPv4 tunnel connects isolated IPv6 sites through an IPv4 network.
Exhaustion of IPv4 addresses urgently requires IPv4 to IPv6 transition. IPv6 is
incompatible with IPv4, so original IPv4 devices will need to be replaced. This
solution is currently infeasible because replacement requires huge capital
expenditures, and will interrupt services on the live network. IPv4 therefore needs
a gradual transit to IPv6. During the earlier stages, IPv4 networks are widely
deployed and IPv6 networks are isolated sites. An IPv6 over IPv4 tunnel allows
IPv6 packets to be transmitted on an IPv4 network and connects IPv6 sites.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 413


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

12.2 Understanding IPv6 over IPv4 Tunnels


12.2.1 Dual Protocol Stack
Dual protocol stack is a technology used for the transition from the IPv4 to IPv6
network. Nodes on a dual stack network support both IPv4 and IPv6 protocol
stacks. A source node and a destination node use the same protocol stack.
Network devices use protocol stacks to process and forward packets based on the
protocol type of packets. You can implement a dual protocol stack on a unique
device or a dual stack backbone network. On the dual stack backbone network, all
devices must support both IPv4 and IPv6 protocol stacks. Interfaces connecting to
the dual stack network must be configured with both IPv4 and IPv6 addresses.
Figure 12-1 shows the structures of an IPv4 stack and a dual protocol stack.

Figure 12-1 IPv4 stack and dual protocol stack


IPv4 Application IPv4/IPv6 Application

TCP UDP TCP UDP

IPv4 IPv4 IPv6


Protocol ID: Protocol ID: Protocol ID:
0x0800 0x0800 0x86DD
Ethernet Ethernet
IPv4 Stack Dual Stack

A dual protocol stack has the following advantages:


● Supported by multiple link protocols.
Multiple link protocols, such as Ethernet, support dual protocol stacks. In
Figure 12-1, the link protocol is Ethernet. In an Ethernet frame, if the value of
the Protocol ID field is 0x0800, the network layer receives IPv4 packets. If the
value of the Protocol ID field is 0x86DD, the network layer receives IPv6
packets.
● Supported by multiple applications.
Multiple applications, such as the DNS, FTP, and Telnet, support dual protocol
stacks. The upper layer applications, such as the DNS, can use TCP or UDP as
the transport layer protocol. However, these applications prefer the IPv6
protocol stack rather than the IPv4 protocol stack as the network layer
protocol.
Figure 12-2 shows a typical application of the dual IPv4/IPv6 protocol stack.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 414


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Figure 12-2 Networking diagram for applying a dual protocol stack

Host
IPv4

10.1.1.1

Network
10.1.1.1 or
DNS Switch
fc00::1
Server IPv6

fc00::1

In Figure 12-2, an application that supports dual protocol stack requests an IP


address corresponding to the domain name www.example.com from the DNS
server. A host sends a DNS request packet to the DNS server, requesting the IP
address corresponding to the domain name www.example.com. The DNS server
responds with the requested IP address. The IP address can be 10.1.1.1 or fc00::1. If
the host sends a class A query packet, it requests the IPv4 address from the DNS
server. If the host sends a class AAAA query packet, it requests the IPv6 address
from the DNS server.

The switch in the figure supports the dual protocol stack and uses the IPv4
protocol stack to connect the host to the network server with the IPv4 address
10.1.1.1. The switch also uses the IPv6 protocol stack to connect the host to the
network server with the IPv6 address fc00::1.

12.2.2 IPv6 over IPv4 Tunnel


Tunneling is an encapsulation technology that encapsulates packets of a network
layer protocol as packets of another one. A tunnel is a virtual point-to-point (P2P)
connection. It provides a path through which encapsulated packets are
transmitted. Datagrams are encapsulated at one end, and decapsulated at the
other end of the tunnel. Tunneling technology refers to the process that
datagrams are encapsulated, transmitted, and decapsulated and is significant for
the transition from IPv4 to IPv6.

Exhaustion of IPv4 addresses brings an urgent demand for the transition to IPv6.
As IPv6 is not compatible with IPv4, devices will need replacing on the original
IPv4 network. Replacing a large number of devices on the IPv4 network however
costs a significant amount and will cause service interruption to the current
network. Therefore, transition from IPv4 networks to IPv6 networks must happen
gradually. During the early stage of transition, a large number of IPv4 networks
have been deployed, whereas IPv6 networks remain as isolated sites over the
world. You can create tunnels on the IPv4 networks to connect to IPv6 isolated
sites. These tunnels are called IPv6 over IPv4 tunnels.

Figure 12-3 shows how to apply the IPv6 over IPv4 tunnel.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 415


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Figure 12-3 Networking diagram for applying the IPv6 over IPv4 tunnel
Dual Stack Dual Stack
Switch Switch
IPv4
IPv6 IPv6 over IPv4 Tunnel
Tunnel
IPv6

IPv6 host IPv6 host


IPv6 Header IPv6 Data IPv6 Header IPv6 Data

IPv4 Header IPv6 Header IPv6 Data

1. On the border device, the IPv4/IPv6 dual protocol stack is enabled, and an
IPv6 over IPv4 tunnel is configured.
2. After the border device receives a packet from the IPv6 network, the device
appends an IPv4 header to the IPv6 packet to encapsulate the IPv6 packet as
an IPv4 packet if the destination address of the IPv6 packet is not the device
and the outbound interface of the next hop is the tunnel interface.
3. On the IPv4 network, the encapsulated packet is transmitted to the remote
border device.
4. The remote border device decapsulates the packet, removes the IPv4 header,
and sends the decapsulated IPv6 packet to the IPv6 network.
A tunnel is established when its start and end points are determined. You must
manually configure an IPv4 address at the start point of an IPv6 over IPv4 tunnel.
The IPv4 address at the end point of the tunnel can be determined manually or
automatically. Based on the mode in which the end point IPv4 address is obtained,
IPv6 over IPv4 tunnels classify into manual tunnels and automatic tunnels.
● Manual tunnel: If a tunnel is created manually, a border router cannot
automatically obtain an IPv4 address at the end point. You must manually
configure an end point IPv4 address before packets can be transmitted to the
remote border router.
● Automatic tunnel: If a tunnel is created automatically, a border router can
automatically obtain an IPv4 address at the end point. The addresses of two
interfaces on both ends of the tunnel are IPv6 addresses with IPv4 addresses
embedded. The border router extracts IPv4 addresses from destination IPv6
addresses.

Manual Tunnel
Based on encapsulation modes of IPv6 packets, manual tunnels classify into IPv6
over IPv4 manual tunnels or IPv6 over IPv4 Generic Routing Encapsulation (GRE)
tunnels.
IPv6 over IPv4 Manual Tunnel
The border router uses the received IPv6 packet as the payload and encapsulates
the IPv6 packet as an IPv4 packet. You must manually specify the source and
destination addresses of a manual tunnel. A manual tunnel is created between
two border routers to connect IPv4 isolated IPv6 sites, or created between a

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 416


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

border router and a host to enable the host to access an IPv6 network. Hosts and
border routers on both ends of a manual tunnel must support the IPv4/IPv6 dual
protocol stack. Other devices only need to support a single protocol stack. If you
create multiple IPv6 over IPv4 manual tunnels between one border router and
multiple hosts, the configuration workload is heavy. Therefore, an IPv6 over IPv4
manual tunnel is commonly created between two border routers to connect IPv6
networks.
Figure 12-4 shows the encapsulation format of an IPv6 over IPv4 packet.

Figure 12-4 Encapsulation format of an IPv6 over IPv4 packet

IPv4 Header IPv6 Header IPv6 Data

The forwarding mechanism of an IPv6 over IPv4 manual tunnel is as follows: After
a border router receives a packet from the IPv6 network, it searches the
destination address of the IPv6 packet in the routing and forwarding table. If the
packet is forwarded from a virtual tunnel interface, the router encapsulates the
packet based on the source and destination IPv4 addresses configured on the
interface. The IPv6 packet is encapsulated as an IPv4 packet and processed by the
IPv4 protocol stack. The encapsulated packet is forwarded through the IPv4
network to the remote end of the tunnel. After the border router on the remote
end of the tunnel receives the encapsulated packet, it decapsulates the packet and
processes the packet using the IPv6 protocol stack.
IPv6 over IPv4 GRE Tunnel
An IPv6 over IPv4 GRE tunnel uses the standard GRE tunneling technology to
provide P2P connections. You must manually specify addresses for both ends of
the tunnel. Any types of protocol packets that GRE supports can be encapsulated
and transmitted through a GRE tunnel. The protocols may include IPv4, IPv6, Open
Systems Interconnection (OSI), and Multiprotocol Label Switching (MPLS).
Figure 12-5 shows the encapsulation and transmission process on an IPv6 over
IPv4 GRE tunnel.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 417


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Figure 12-5 IPv6 over IPv4 GRE tunnel

IPv6 Header Data IPv6 Header Data

IPv4

IPv6 GRE Tunnel IPv6

IPv4 Header GRE Header IPv6 Header Data

The forwarding mechanism of an IPv6 over IPv4 GRE tunnel is the same as that of
an IPv6 over IPv4 manual tunnel. For details, see GRE Configuration in the S12700
V200R011C10 Configuration Guide - VPN.

Automatic Tunnel
You only need to configure the start point of an automatic tunnel, and the device
automatically obtains the end point of the tunnel. The tunnel interface uses a
special form of IPv6 address with an IPv4 address embedded. The device obtains
the IPv4 address from the destination IPv6 address and uses the IPv4 address as
the end point address of the tunnel.

Based on the encapsulation modes of IPv6 packets, automatic tunnels are


classified into IPv6-to-IPv4 tunnels, and Intra-Site Automatic Tunnel Addressing
Protocol (ISATAP) tunnels.

IPv6-to-IPv4 Tunnel

An IPv6-to-IPv4 tunnel also uses an IPv4 address that is embedded in an IPv6


address. Unlike IPv4-compatible IPv6 tunnels, you can create IPv6-to-IPv4 tunnels
between two routers, a router and a host, and two hosts. An IPv6-to-IPv4 address
uses the IPv4 address as the network ID. Figure 12-6 shows the format of an IPv6-
to-IPv4 address.

Figure 12-6 Format of an IPv6-to-IPv4 address

FP TLA
IPv4 address SLA ID Interface ID
001 0x0002

3 bit 13 bit 32 bit 16 bit 64 bit

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 418


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

● FP: format prefix of a global unicast address. The value is 001.


● TLA ID: top level aggregation identifier. The value is 0x0002.
● SLA ID: site level aggregation identifier.
An IPv6-to-IPv4 address is expressed in the format of 2002::/16. An IPv6-to-IPv4
network is expressed as 2002:IPv4 address::/48. An IPv6-to-IPv4 address has a 64-
bit prefix composed of a 48-bit 2002:IPv4 address and a 16-bit SLA. A 2002:IPv4
address in the format of 2002:a.b.c.d is determined by the IPv4 address allocated
to the router and the SLA is defined by the user. Figure 12-7 shows the
encapsulation and forwarding process of the IPv6-to-IPv4 tunnel.

Figure 12-7 Example of an IPv6-to-IPv4 tunnel (1)


IPv4-Addr 1 IPv4-Addr 2
IPv6 Header Data IPv6 Header Data

IPv4
6to4 6to4 tunnel 6to4

6to4 6to4 2002:IPv4-Addr2::/48


2002:IPv4-Addr1::/48 Switch
Switch

IPv4 Header IPv6 Header Data

One IPv4 address can be used as the source address of only one IPv6-to-IPv4
tunnel. When a border device connects to multiple IPv6-to-IPv4 networks using
the same IPv4 address as the source address of the tunnel, the IPv6-to-IPv4
networks share a tunnel and are identified by SLA ID in the IPv6-to-IPv4 address.
Figure 12-8 details this configuration.

Figure 12-8 Example of an IPv6-to-IPv4 tunnel (2)


IPv4-Addr 1 IPv4-Addr 2
2002:IPv4-Addr1:1::/64

6to4 2002:IPv4-Addr2::/48
IPv4
6to4 tunnel 6to4

6to4 Switch
6to4 Switch
6to4

2002:IPv4-Addr1:2::/64
IPv4 Header IPv6 Header Data

ISATAP Tunnel
ISATAP is another automatic tunneling technology. The ISATAP tunnel uses a
specially formatted IPv6 address with an IPv4 address embedded into it. Different

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 419


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

from the IPv6-to-IPv4 address that uses the IPv4 address as the network prefix,
the ISATAP address uses the IPv4 address as the interface ID. Figure 12-9 shows
the format of the interface ID of an ISATAP address.

Figure 12-9 Format of the interface ID of an ISATAP address

000000ug00000000 0101111011111110 IPv4 address

16 bit 16 bit 32 bit

The "u" bit in the IPv4 address that is globally unique is set to 1. Otherwise, the
"u" bit is set to 0. "g" is the individual/group bit. An ISATAP address contains an
interface ID and it can be a global unicast address, link-local address, ULA address,
or multicast address. The device obtains the first 64 bits of an ISATAP address by
sending Request packets to the ISATAP router. Devices on both ends of the ISATAP
tunnel run the Neighbor Discovery (ND) protocol. The ISATAP tunnel considers the
IPv4 network as a non-broadcast multiple access (NBMA) network.
ISATAP allows IPv6 networks to be deployed within existing IPv4 networks, which
is simple and makes networks easily expandable. ISATAP is suitable for transitions
of local sites and supports local routing within IPv6 sites, global IPv6 routing
domains, and automatic IPv6 tunnels. ISATAP can be used together with NAT to
allow the use of an IPv4 address that is not globally unique within the site.
Typically, an ISATAP tunnel is used within the site, and does not require a globally
unique IPv4 address embedded.
Figure 12-10 shows a typical application of the ISATAP tunnel.

Figure 12-10 Typical application of the ISATAP tunnel

Host B
10.1.2.5
FE80::5EFE:0A01:0205
FC01::5EFE:0A01:0205
Tunnel 1
FE80::5EFE:0A01:0201
FC01::5EFE:0A01:0201
l
ne
ISATAP Tunnel

un
Host A PT
FC02::8 TA
ISA
IPv4
IPv6

ISATAP Switch

Host C
10.1.2.6
FE80::5EFE:0A01:0206
FC01::5EFE:0A01:0206

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 420


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

In Figure 12-10, Host B and Host C are located on an IPv4 network. They both
support dual protocol stacks and have private IPv4 addresses. You can perform the
following operations to enable the ISATAP function on Host B and Host C:
1. Configure an ISATAP tunnel interface to generate an interface ID based on
the IPv4 address.
2. Encapsulate a link-local IPv6 address based on the interface ID. When a host
obtains the link-local IPv6 address, it can access the IPv6 network on the local
link.
3. The host automatically obtains a global unicast IPv6 address and ULA
address.
4. The host obtains an IPv4 address from the next hop IPv6 address as the
destination address, and forwards packets through the tunnel interface to
communicate with another IPv6 host. When the destination host is located on
the same site as the source host, the next hop address is the address of the
source host. When the destination host is not located on the local site, the
next hop address is the address of the ISATAP device.

6PE
IPv6 Provider Edge (6PE) is a transition technology from the IPv4 to the IPv6
network. With 6PE devices, Independent Service Providers (ISPs) can provide cost-
effective access services for isolated IPv6 network users over the existing IPv4
backbone network. The 6PE device labels IPv6 routing information and floods the
information onto the ISP's IPv4 backbone network through Internal Border
Gateway Protocol (IBGP) sessions. The IPv6 packets are labeled before flowing
into either GRE tunnels or MPLS LSPs on the backbone network. To allow IPv6
packet exchange on IPv4/MPLS networks through MPLS, LSPs can simply update
the PE devices.
Figure 12-11 shows the typical 6PE networking diagram.

Figure 12-11 Typical 6PE networking diagram

6PE Switch 6PE Switch


IPv4/MPLS
IBGP

IPv6 Network IPv6 Network


Customer site Customer site
CE CE

For more details about 6PE, see S12700 V200R011C10 Configuration Guide -
MPLS.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 421


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

12.3 Licensing Requirements and Limitations for IPv6


over IPv4 Tunnels
Involved Network Elements
Other network elements are not required.

Licensing Requirements
The IPv6 function must be enabled for the IPv6 over IPv4 tunnel function. The IPv6
function is controlled by a license. By default, the IPv6 function is disabled on a
new device. To use the IPv6 function, apply for and purchase the license from the
device supplier.

For details about how to apply for a license, see S Series Switch License Use
Guide.

Version Requirements

Table 12-1 Product and version requirements of the IPv6 over IPv4 tunnel function

Product Product Software Version


Model

S12700 S12708 V200R005C00, V200R006C00, V200R007C00,


and V200R007C20, V200R008C00, V200R009C00,
S12712 V200R010C00, V200R011C10

S12710 V200R010C00, V200R011C10

S12704 V200R008C00, V200R009C00, V200R010C00,


V200R011C10

NOTE
To know details about software mappings, see Hardware Query Tool.

Feature Limitations
● The XGE interface connected to the ET1D2IPS0S00, ET1D2FW00S00,
ET1D2FW00S01, ET1D2FW00S02, or ACU2 card does not support the IPv6
over IPv4 tunnel function.
● The X1E series cards support the IPv6 over IPv4 tunnel function since
V200R009C00.
● The X2E, X2H, and X2S series cards support the IPv6 over IPv4 tunnel function
since V200R010C00.
● In the 6PE scenario, MPLS TE tunnels cannot be used on IPv4 backbone
networks or public networks.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 422


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

12.4 Configuring the IPv4/IPv6 Dual Stack


Pre-configuration Tasks
Before configuring an IPv4/IPv6 dual stack, configure link layer protocol
parameters for interfaces to ensure that the link layer protocol status on the
interfaces is Up.

12.4.1 Enabling IPv6 Packet Forwarding


Context
To enable an interface to forward IPv6 packets, enable IPv6 packet forwarding in
the system view and in the interface view.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run ipv6
IPv6 packet forwarding is enabled.
By default, IPv6 packet forwarding is disabled on the device.
To enable a device to forward IPv6 packets, enable IPv6 packet forwarding in the
system view; otherwise, the device fails to forward IPv6 packets even if an IPv6
address is configured for an interface on the device.
Step 3 Run interface interface-type interface-number
The view of the interface to be enabled with IPv6 is displayed.
Step 4 Run ipv6 enable
The IPv6 function is enabled on the interface.
Before performing IPv6 configurations in the interface view, enable the IPv6
function in the interface view.
By default, the IPv6 function is disabled on an interface.

----End

12.4.2 Configuring an IPv4 Address and an IPv6 Address for


Respective Interfaces
Context
The device to be enabled with the dual stack must be configured with an IPv4
address on the IPv4 network-side interface and an IPv6 address on the IPv6
network-side interface.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 423


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface vlanif vlan-id

The IPv4 network-side interface view is displayed.

Step 3 Run ip address ip-address { mask | mask-length }

An IPv4 address is configured for the interface.

Step 4 Run quit

Return to the system view.

Step 5 Run interface vlanif vlan-id

The IPv6 network-side interface view is displayed.

Step 6 Run the following commands as required.


● Run ipv6 address auto link-local
The interface is configured to automatically generate a link-local address.
● Run ipv6 address ipv6-address link-local
A link-local IPv6 address is manually configured for the interface.
● Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
A global unicast IPv6 address is configured for the interface.
● Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
eui-64
An IPv6 address in EUI-64 format is configured for the interface.

----End

12.4.3 Verifying the IPv4/IPv6 Dual Protocol Stack


Configuration
Procedure
● Run the display ipv6 interface [ interface-type interface-number | brief ]
command to check IPv6 attributes of an interface.

----End

12.5 (Optional) Enabling the Service Loopback


Function on an Eth-Trunk
Context
● The service loopback function must be configured on an Eth-Trunk for cards
that do not support internal loopback interfaces. The maximum rate of an

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 424


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Eth-Trunk enabled with the service loopback function is equal to the sum of
the Eth-Trunk member interfaces' rates.
● For cards that support internal loopback interfaces:
– The configuration of an Eth-Trunk enabled with the service loopback
function is optional, but the internal loopback interface rate is only 1000
Mbit/s.
– If the service loopback function is configured on an Eth-Trunk, the Eth-
Trunk takes effect with priority. The maximum rate of an Eth-Trunk
enabled with the service loopback function is equal to the sum of the
Eth-Trunk member interfaces' rates.
The ET1D2T36SEA0, ET1D2G48TEA0, ET1D2G48TEC0, ET1D2G48SEA0,
ET1D2G48SEC0, ET1D2X12SSA0, ET1D2X04XEA0, and ET1D2X04XEC1 cards
support internal loopback interfaces.

Before enabling the service loopback function on an Eth-Trunk, note that only one
interface enabled with the service loopback function is needed on a device. The
interface must be idle and not transmitting services.

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface eth-trunk trunk-id

The Eth-Trunk interface view is displayed.

Step 3 Run service type tunnel

The Eth-Trunk is enabled with the service loopback function.

NOTE

You cannot configure both the service type tunnel command and the URPF function on
the same Eth-Trunk.
On an Eth-Trunk enabled with the service loopback function, the STP function is
automatically disabled. After the service loopback function is disabled on the Eth-Trunk, the
STP function is automatically enabled.

Step 4 Run quit

Return to the system view.

Step 5 Run interface interface-type interface-number

The interface view is displayed.

Step 6 Run eth-trunk trunk-id

The interface is added to the Eth-Trunk.

----End

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 425


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Verifying the Configuration


Run the display this include-default command in Eth-Trunk interface view to
check whether the Eth-Trunk interface is enabled with the service loopback
function.

12.6 Configuring an IPv6 over IPv4 Tunnel


Prerequisites
Source and destination devices of an IPv6 over IPv4 tunnel must have forwarding
routes.

Pre-configuration Tasks
Before configuring an IPv6 over IPv4 tunnel, complete the following tasks:
● Configure the IPv4/IPv6 dual stack. For details, see 12.4 Configuring the
IPv4/IPv6 Dual Stack.
● (Optional) Enable the service loopback function on an Eth-Trunk. For details,
see 12.5 (Optional) Enabling the Service Loopback Function on an Eth-
Trunk.
IPv6 over IPv4 Tunnel has the following three modes, the tasks are independent of
each, and you can select one task according to service requirements.

12.6.1 Configuring a Manual IPv6 over IPv4 Tunnel


Context
When configuring a manual IPv6 over IPv4 tunnel, note the following points:
● You must create a tunnel interface before setting tunnel parameters.
● You are advised to set the tunnel number to be the same as the number of
the source physical interface of the tunnel, when the specified tunnel source
interface is a physical interface.
● The following configurations must be performed on devices at both ends of
the tunnel.
● You need to configure an IPv6 address for the interface that connects a border
device to the IPv6 network, and an IPv4 address for the interface that
connects a border device to the IPv4 network. You also need to configure a
network address for the tunnel interface to support a dynamic routing
protocol.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface tunnel interface-number
A tunnel interface is created.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 426


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Step 3 Run tunnel-protocol ipv6-ipv4


The tunnel mode is set to manual.
Step 4 (Optional) Run eth-trunk trunk-id
The interface is added to the Eth-Trunk.
This step is optional for cards supporting internal loopback interfaces. For details,
see (Optional) Enabling the Service Loopback Function on an Eth-Trunk.
Step 5 Run source { ip-address | interface-type interface-number }
A source address or source interface is specified for the tunnel.
Step 6 Run destination dest-ip-address
A destination address is specified for the tunnel.

NOTE

The destination address of a tunnel can be the IP address of a physical interface or


loopback interface.

Step 7 Run ipv6 enable


The IPv6 function is enabled on the interface.
Step 8 Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
An IPv6 address is configured for the tunnel interface.

NOTE

The IPv6 address prefix of the specified tunnel interface must be the same as the address
prefix of the IPv6 network that the device belongs to.

----End

12.6.2 Configuring a 6to4 Tunnel


Context
When configuring a 6to4 tunnel, note the following points:
● You must create a tunnel interface before setting tunnel parameters.
● You are advised to set the tunnel number to be the same as the number of
the source physical interface of the tunnel, when the specified tunnel source
interface is a physical interface.
● You only need to specify the source address of the tunnel when a 6to4 tunnel
is configured. The destination address of the tunnel is obtained from the
destination address of the original IPv6 packet. In addition, the source address
of a 6to4 tunnel must be unique.
● You need to configure an IPv6 address for the interface that connects a border
device to the IPv6 network, and an IPv4 address for the interface that
connects a border device to the IPv4 network. You also need to configure a
network address for the tunnel interface to support a dynamic routing
protocol.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 427


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Procedure
Step 1 Run system-view

The system view is displayed.

Step 2 Run interface tunnel interface-number

A tunnel interface is created.

Step 3 Run tunnel-protocol ipv6-ipv4 6to4

The tunnel mode is set to 6to4.

Step 4 (Optional) Run eth-trunk trunk-id

The interface is added to the Eth-Trunk.

This step is optional for cards supporting internal loopback interfaces. For details,
see (Optional) Enabling the Service Loopback Function on an Eth-Trunk.

Step 5 Run source { source-ip-address | interface-type interface-number }

A source address or source interface is specified for the tunnel.

Step 6 Run ipv6 enable

The IPv6 function is enabled on the interface.

Step 7 Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }

An IPv6 address is configured for the tunnel interface.

NOTE

The IPv6 address prefix of the specified tunnel interface must be the same as the address
prefix of the IPv6 network that the device belongs to.

----End

12.6.3 Configuring an ISATAP Tunnel

Context
When configuring an ISATAP tunnel, note the following points:

● You must create a tunnel interface before setting tunnel parameters.


● You are advised to set the tunnel number to be the same as the number of
the source physical interface of the tunnel, when the specified tunnel source
interface is a physical interface.
● You need to configure an IPv6 address for the interface that connects a border
device to the IPv6 network, and an IPv4 address for the interface that
connects a border device to the IPv4 network. You also need to configure an
ISATAP address with a 64-bit prefix-length as the IPv6 address of the tunnel
interface to support a dynamic routing protocol.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 428


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface tunnel interface-number
A tunnel interface is created.
Step 3 Run tunnel-protocol ipv6-ipv4 isatap
The tunnel mode is set to ISATAP.
Step 4 (Optional) Run eth-trunk trunk-id
The interface is added to the Eth-Trunk.
This step is optional for cards supporting internal loopback interfaces. For details,
see (Optional) Enabling the Service Loopback Function on an Eth-Trunk.
Step 5 Run source { source-ip-address | interface-type interface-number }
A source address or source interface is specified for the tunnel.
Step 6 Run ipv6 enable
The IPv6 function is enabled on the interface.
Step 7 Run ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length }
eui-64
An IPv6 address is configured for the tunnel interface.
Step 8 Run undo ipv6 nd ra halt
The device is enabled to send router advertisement (RA) packets.

----End

12.6.4 Verifying the IPv6 over IPv4 Tunnel Configuration


Procedure
● Run the display ipv6 interface tunnel interface-number command to check
IPv6 attributes of a tunnel interface.
----End

12.7 Configuring 6PE


Pre-configuration Tasks
You can configure IPv6 Provider Edge (6PE) to connect IPv6 networks through an
existing MPLS network.
Before configuring 6PE, complete the following tasks:
● Enable the dual stack on 6PE switches.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 429


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

● Configure a 6PE-to-CE route.


● Configure a reachable route on the backbone network.

12.7.1 Configuring the MPLS Function


Context
Configuring basic MPLS functions includes setting up an LSP and enabling LDP.

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run mpls lsr-id lsr-id
An LSR ID is specified.
Step 3 Run mpls
MPLS is enabled and the MPLS view is displayed.
Step 4 Run quit
Return to the system view.
Step 5 Run mpls ldp
LDP is enabled.
Step 6 Run quit
Return to the system view.
Step 7 Run interface interface-type interface-number
The IPv4 network-side interface view is displayed.
Step 8 Run mpls
MPLS is enabled on the interface.
Step 9 Run mpls ldp
MPLS LDP is enabled on the interface.

----End

12.7.2 Configuring a 6PE Peer


Context
A PE device configured with a 6PE peer can exchange routes with an IPv6 device in
the IPv6 address family view.

NOTE

The SA series cards do not support 6PE.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 430


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run bgp { as-number-plain | as-number-dot }
The BGP view is displayed.
Step 3 Run peer ipv4-address as-number { as-number-plain | as-number-dot }
The peer IP address and the ID of the AS where the peer resides are specified.
Step 4 Run peer ipv4-address connect-interface interface-type interface-number
The interface connected to the peer PE is specified.
Step 5 Run ipv6-family
The BGP-IPv6 unicast address family view is displayed.
Step 6 Run peer ipv4-address enable
The 6PE peer is enabled.
Step 7 Run peer ipv4-address label-route-capability
The 6PE device is enabled to exchange labeled routes.

----End

12.7.3 Verifying the 6PE Configuration


Procedure
Step 1 Run the display mpls lsp command to check LSP information.
Step 2 Run the display bgp ipv6 routing-table command to check information about
IPv6 BGP routes.

----End

12.8 Monitoring the Running Status of the IPv6 over


IPv4 Tunnel
Context
In routine maintenance, you can run the following command in any view to
monitor the running status of the IPv6 over IPv4 tunnel.

Procedure
● Run the display ipv6 interface tunnel interface-number command in any
view to monitor the running status of the tunnel interface.
----End

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 431


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

12.9 Configuration Examples for IPv6 over IPv4 Tunnels


12.9.1 Example for Configuring a Manual IPv6 over IPv4
Tunnel

Networking Requirements
Figure 12-12 shows two IPv6 networks connected to SwitchB on an IPv4
backbone network through SwitchA and SwitchC respectively. A manual IPv6 over
IPv4 tunnel needs to be set up between SwitchA and SwitchC so that hosts on the
two IPv6 networks can communicate.

Figure 12-12 Networking diagram for configuring a manual IPv6 over IPv4 tunnel

IPv4
GE1/0/1 network
GE1/0/2
VLANIF100 VLANIF200
192.168.50.1/24 192.168.51.1/24
GE1/0/1 GE1/0/1
VLANIF100 VLANIF200
192.168.50.2/24 SwitchB 192.168.51.2/24

Dual Dual
IPv6 stack stack IPv6
SwitchA SwitchC

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure IP addresses for interfaces so that devices can communicate on the


IPv4 backbone network.
2. Configure IPv6 addresses, source interfaces, and destination addresses for
tunnel interfaces so that devices can communicate with hosts on the two IPv6
networks.
3. Set the tunnel protocol to IPv6-IPv4 so that hosts on the two IPv6 networks
can communicate through the IPv4 backbone network.

Procedure
Step 1 Configure SwitchA.

# Enable the service loopback function on an Eth-Trunk.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 432


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

NOTE

This step is optional for cards supporting internal loopback interfaces. For details, see
(Optional) Enabling the Service Loopback Function on an Eth-Trunk.
The interface must be idle and not transmitting services.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] service type tunnel
[SwitchA-Eth-Trunk1] quit
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] eth-trunk 1
[SwitchA-GigabitEthernet1/0/3] quit

# Configure an IP address for an interface.


[SwitchA] ipv6
[SwitchA] vlan 100
[SwitchA-vlan100] quit
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type hybrid
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] ip address 192.168.50.2 255.255.255.0
[SwitchA-Vlanif100] quit

# Set the tunnel protocol to IPv6-IPv4.


[SwitchA] interface tunnel 1
[SwitchA-Tunnel1] tunnel-protocol ipv6-ipv4
[SwitchA-Tunnel1] eth-trunk 1

# Configure an IPv6 address and a destination address for the tunnel interface.
[SwitchA-Tunnel1] ipv6 enable
[SwitchA-Tunnel1] ipv6 address fc00:3::1 64
[SwitchA-Tunnel1] source vlanif 100
[SwitchA-Tunnel1] destination 192.168.51.2
[SwitchA-Tunnel1] quit

# Configure a static route.


[SwitchA] ip route-static 192.168.51.2 255.255.255.0 192.168.50.1

Step 2 Configure SwitchB.


# Configure IP addresses for interfaces.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] vlan 100
[SwitchB-vlan100] quit
[SwitchB] vlan 200
[SwitchB-vlan200] quit
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] port link-type hybrid
[SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchB-GigabitEthernet1/0/1] quit
[SwitchB] interface gigabitethernet 1/0/2
[SwitchB-GigabitEthernet1/0/2] port link-type hybrid
[SwitchB-GigabitEthernet1/0/2] port hybrid pvid vlan 200
[SwitchB-GigabitEthernet1/0/2] port hybrid untagged vlan 200
[SwitchB-GigabitEthernet1/0/2] quit
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] ip address 192.168.50.1 255.255.255.0

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 433


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

[SwitchB-Vlanif100] quit
[SwitchB] interface vlanif 200
[SwitchB-Vlanif200] ip address 192.168.51.1 255.255.255.0
[SwitchB-Vlanif200] quit

Step 3 Configure SwitchC.


# Enable the service loopback function on an Eth-Trunk.

NOTE

This step is optional for cards supporting internal loopback interfaces. For details, see
(Optional) Enabling the Service Loopback Function on an Eth-Trunk.
The interface must be idle and not transmitting services.
<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] interface eth-trunk 1
[SwitchC-Eth-Trunk1] service type tunnel
[SwitchC-Eth-Trunk1] quit
[SwitchC] interface gigabitethernet 1/0/3
[SwitchC-GigabitEthernet1/0/3] eth-trunk 1
[SwitchC-GigabitEthernet1/0/3] quit

# Configure an IP address for an interface.


[SwitchC] ipv6
[SwitchC] vlan 200
[SwitchC-vlan200] quit
[SwitchC] interface gigabitethernet1/0/1
[SwitchC-GigabitEthernet1/0/1] port link-type hybrid
[SwitchC-GigabitEthernet1/0/1] port hybrid pvid vlan 200
[SwitchC-GigabitEthernet1/0/1] port hybrid untagged vlan 200
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface vlanif 200
[SwitchC-Vlanif200] ip address 192.168.51.2 255.255.255.0
[SwitchC-Vlanif200] quit

# Set the tunnel protocol to IPv6-IPv4.


[SwitchC] interface tunnel 1
[SwitchC-Tunnel1] tunnel-protocol ipv6-ipv4
[SwitchC-Tunnel1] eth-trunk 1

# Configure an IPv6 address and a destination address for the tunnel interface.
[SwitchC-Tunnel1] ipv6 enable
[SwitchC-Tunnel1] ipv6 address fc00:3::2 64
[SwitchC-Tunnel1] source vlanif 200
[SwitchC-Tunnel1] destination 192.168.50.2
[SwitchC-Tunnel1] quit

# Configure a static route.


[SwitchC] ip route-static 192.168.50.2 255.255.255.0 192.168.51.1

Step 4 Verify the configuration.


# Ping the IPv4 address of VLANIF 100 on SwitchA from SwitchC.
[SwitchC] ping 192.168.50.2
PING 192.168.50.2: 56 data bytes, press CTRL_C to break
Reply from 192.168.50.2: bytes=56 Sequence=1 ttl=253 time=84 ms
Reply from 192.168.50.2: bytes=56 Sequence=2 ttl=253 time=27 ms
Reply from 192.168.50.2: bytes=56 Sequence=3 ttl=253 time=25 ms
Reply from 192.168.50.2: bytes=56 Sequence=4 ttl=253 time=3 ms
Reply from 192.168.50.2: bytes=56 Sequence=5 ttl=253 time=24 ms

--- 192.168.50.2 ping statistics ---

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 434


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 3/32/84 ms

SwitchC can receive Reply packets from SwitchA.

# Ping the IPv6 address of Tunnel1 on SwitchA from SwitchC.


[SwitchC] ping ipv6 FC00:3::1
PING FC00:3::1 : 56 data bytes, press CTRL_C to break
Reply from FC00:3::1
bytes=56 Sequence=1 hop limit=64 time = 28 ms
Reply from FC00:3::1
bytes=56 Sequence=2 hop limit=64 time = 27 ms
Reply from FC00:3::1
bytes=56 Sequence=3 hop limit=64 time = 26 ms
Reply from FC00:3::1
bytes=56 Sequence=4 hop limit=64 time = 27 ms
Reply from FC00:3::1
bytes=56 Sequence=5 hop limit=64 time = 26 ms

--- FC00:3::1 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 26/26/28 ms

SwitchC can receive Reply packets from SwitchA.

----End

Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
ipv6
#
vlan batch 100
#
interface Vlanif100
ip address 192.168.50.2 255.255.255.0
#
interface Eth-Trunk1
service type tunnel
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet1/0/3
eth-trunk 1
#
interface Tunnel1
ipv6 enable
ipv6 address FC00:3::1/64
tunnel-protocol ipv6-ipv4
source Vlanif100
destination 192.168.51.2
eth-trunk 1
#
ip route-static 192.168.51.0 255.255.255.0 192.168.50.1
#
return

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 435


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

● SwitchB configuration file


#
sysname SwitchB
#
vlan batch 100 200
#
interface Vlanif100
ip address 192.168.50.1 255.255.255.0
#
interface Vlanif200
ip address 192.168.51.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
return
● SwitchC configuration file
#
sysname SwitchC
#
ipv6
#
vlan batch 200
#
interface Vlanif200
ip address 192.168.51.2 255.255.255.0
#
interface Eth-Trunk1
service type tunnel
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface GigabitEthernet1/0/3
eth-trunk 1
#
interface Tunnel1
ipv6 enable
ipv6 address FC00:3::2/64
tunnel-protocol ipv6-ipv4
source Vlanif200
destination 192.168.50.2
eth-trunk 1
#
ip route-static 192.168.50.0 255.255.255.0 192.168.51.1
#
return

12.9.2 Example for Configuring a 6to4 Tunnel


Networking Requirements
Figure 12-13 shows that SwitchA connects to a 6to4 network using an IPv6
network-side interface, and that SwitchB is a 6to4 relay agent and connects to the
IPv6 Internet (2002::/64). SwitchC and SwitchD are connected through an IPv4
backbone network. A 6to4 tunnel needs to be set up between SwitchA and

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 436


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

SwitchB so that hosts on the 6to4 network and the IPv6 network can
communicate.

Figure 12-13 Networking diagram for configuring a 6to4 tunnel

IPv4

GE1/0/2 GE1/0/2
VLANIF200 VLANIF200
SwitchC 10.2.1.1/24 10.2.1.2/24
SwitchD
GE1/0/1 GE1/0/1
VLANIF100 VLANIF300
10.1.1.2/24 10.3.1.1/24

GE1/0/1 GE1/0/1
VLANIF100 VLANIF300
10.1.1.1/24 Tunnel1 Tunnel1 10.3.1.2/24
2002:A01:101::1/64 2002:A03:102::1/64
SwitchA SwitchB
GE1/0/2 GE1/0/2
VLANIF200 VLANIF200
2002:A01:101:1::1/64 2002:A03:102:1::1/64

PC1 2002:A01:101:1::2/64 2002:A03:102:1::2/64


PC2

IPv6 IPv6

Configuration Roadmap
The configuration roadmap is as follows:
1. Configure an IPv4/IPv6 dual stack on SwitchA and SwitchB so that they can
access the IPv4 and IPv6 networks.
2. Configure a 6to4 tunnel on SwitchA and SwitchB to connect IPv6 networks
through the IPv4 backbone network.
3. Configure a static route between SwitchA and SwitchB so that they can
connect through the IPv4 backbone network.

Procedure
Step 1 Configure SwitchA.
# Enable the service loopback function on an Eth-Trunk.

NOTE

The interface must be idle and not transmitting services.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 437


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] interface eth-trunk 1
[SwitchA-Eth-Trunk1] service type tunnel
[SwitchA-Eth-Trunk1] quit
[SwitchA] interface gigabitethernet 1/0/3
[SwitchA-GigabitEthernet1/0/3] eth-trunk 1
[SwitchA-GigabitEthernet1/0/3] quit

# Configure an IPv4/IPv6 dual stack.


[SwitchA] ipv6
[SwitchA] vlan batch 100 200
[SwitchA] interface gigabitethernet 1/0/1
[SwitchA-GigabitEthernet1/0/1] port link-type hybrid
[SwitchA-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchA-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchA-GigabitEthernet1/0/1] quit
[SwitchA] interface vlanif 100
[SwitchA-Vlanif100] ip address 10.1.1.1 24
[SwitchA-Vlanif100] quit
[SwitchA] interface gigabitethernet 1/0/2
[SwitchA-GigabitEthernet1/0/2] port link-type hybrid
[SwitchA-GigabitEthernet1/0/2] port hybrid pvid vlan 200
[SwitchA-GigabitEthernet1/0/2] port hybrid untagged vlan 200
[SwitchA-GigabitEthernet1/0/2] quit
[SwitchA] interface vlanif 200
[SwitchA-Vlanif200] ipv6 enable
[SwitchA-Vlanif200] ipv6 address 2002:0a01:0101:1::1/64
[SwitchA-Vlanif200] quit

# Configure a 6to4 tunnel.


[SwitchA] interface tunnel 1
[SwitchA-Tunnel1] tunnel-protocol ipv6-ipv4 6to4
[SwitchA-Tunnel1] eth-trunk 1
[SwitchA-Tunnel1] ipv6 enable
[SwitchA-Tunnel1] ipv6 address 2002:0a01:0101::1/64
[SwitchA-Tunnel1] source vlanif 100
[SwitchA-Tunnel1] quit

# Configure a route to the other 6to4 network.


[SwitchA] ipv6 route-static 2002:: 16 tunnel 1

Step 2 Configure SwitchB.


# Enable the service loopback function on an Eth-Trunk.

NOTE

The interface must be idle and not transmitting services.


<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] interface eth-trunk 1
[SwitchB-Eth-Trunk1] service type tunnel
[SwitchB-Eth-Trunk1] quit
[SwitchB] interface gigabitethernet 1/0/3
[SwitchB-GigabitEthernet1/0/3] eth-trunk 1
[SwitchB-GigabitEthernet1/0/3] quit

# Configure an IPv4/IPv6 dual stack.


[SwitchB] ipv6
[SwitchB] vlan batch 200 300
[SwitchB] interface gigabitethernet1/0/1
[SwitchB-GigabitEthernet1/0/1] port link-type hybrid
[SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 300
[SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 300

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 438


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

[SwitchB-GigabitEthernet1/0/1] quit
[SwitchB] interface vlanif 300
[SwitchB-Vlanif300] ip address 10.3.1.2 24
[SwitchB-Vlanif300] quit
[SwitchB] interface gigabitethernet1/0/2
[SwitchB-GigabitEthernet1/0/2] port link-type hybrid
[SwitchB-GigabitEthernet1/0/2] port hybrid pvid vlan 200
[SwitchB-GigabitEthernet1/0/2] port hybrid untagged vlan 200
[SwitchB-GigabitEthernet1/0/2] quit
[SwitchB] interface vlanif 200
[SwitchB-Vlanif200] ipv6 enable
[SwitchB-Vlanif200] ipv6 address 2002:0a03:0102:1::1/64
[SwitchB-Vlanif200] quit

# Configure a 6to4 tunnel.


[SwitchB] interface tunnel 1
[SwitchB-Tunnel1] eth-trunk 1
[SwitchB-Tunnel1] tunnel-protocol ipv6-ipv4 6to4
[SwitchB-Tunnel1] ipv6 enable
[SwitchB-Tunnel1] ipv6 address 2002:0a03:0102::1/64
[SwitchB-Tunnel1] source vlanif 300
[SwitchB-Tunnel1] quit

# Configure a route to the other 6to4 network.


[SwitchB] ipv6 route-static 2002:: 16 tunnel 1

Step 3 Assign IPv4 addresses to interfaces and configure OSPF.


# Configure OSPF on SwitchA.
[SwitchA] ospf 1
[SwitchA-ospf-1] area 0
[SwitchA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[SwitchA-ospf-1-area-0.0.0.0] quit
[SwitchA-ospf-1] quit

# Configure OSPF on SwitchB.


[SwitchB] ospf 1
[SwitchB-ospf-1] area 0
[SwitchB-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[SwitchB-ospf-1-area-0.0.0.0] quit
[SwitchB-ospf-1] quit

# Assign IPv4 addresses to interfaces and configure OSPF on SwitchC.


<HUAWEI> system-view
[HUAWEI] sysname SwitchC
[SwitchC] vlan batch 100 200
[SwitchC] interface vlanif 100
[SwitchC-Vlanif100] ip address 10.1.1.2 24
[SwitchC-Vlanif100] quit
[SwitchC] interface vlanif 200
[SwitchC-Vlanif200] ip address 10.2.1.1 24
[SwitchC-Vlanif200] quit
[SwitchC] interface gigabitethernet1/0/1
[SwitchC-GigabitEthernet1/0/1] port link-type hybrid
[SwitchC-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchC-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchC-GigabitEthernet1/0/1] quit
[SwitchC] interface gigabitethernet1/0/2
[SwitchC-GigabitEthernet1/0/2] port link-type hybrid
[SwitchC-GigabitEthernet1/0/2] port hybrid pvid vlan 200
[SwitchC-GigabitEthernet1/0/2] port hybrid untagged vlan 200
[SwitchC-GigabitEthernet1/0/2] quit
[SwitchC] ospf 1
[SwitchC-ospf-1] area 0
[SwitchC-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 439


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

[SwitchC-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255


[SwitchC-ospf-1-area-0.0.0.0] quit
[SwitchC-ospf-1] quit

# Assign IPv4 addresses to interfaces and configure OSPF on SwitchD.


<HUAWEI> system-view
[HUAWEI] sysname SwitchD
[SwitchD] vlan batch 200 300
[SwitchD] interface vlanif 200
[SwitchD-Vlanif200] ip address 10.2.1.2 24
[SwitchD-Vlanif200] quit
[SwitchD] interface vlanif 300
[SwitchD-Vlanif300] ip address 10.3.1.1 24
[SwitchD-Vlanif300] quit
[SwitchD] interface gigabitethernet1/0/1
[SwitchD-GigabitEthernet1/0/1] port link-type hybrid
[SwitchD-GigabitEthernet1/0/1] port hybrid pvid vlan 300
[SwitchD-GigabitEthernet1/0/1] port hybrid untagged vlan 300
[SwitchD-GigabitEthernet1/0/1] quit
[SwitchD] interface gigabitethernet1/0/2
[SwitchD-GigabitEthernet1/0/2] port link-type hybrid
[SwitchD-GigabitEthernet1/0/2] port hybrid pvid vlan 200
[SwitchD-GigabitEthernet1/0/2] port hybrid untagged vlan 200
[SwitchD-GigabitEthernet1/0/2] quit
[SwitchD] ospf 1
[SwitchD-ospf-1] area 0
[SwitchD-ospf-1-area-0.0.0.0] network 10.2.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] network 10.3.1.0 0.0.0.255
[SwitchD-ospf-1-area-0.0.0.0] quit
[SwitchD-ospf-1] quit

Step 4 Verify the configuration.


# Check the IPv6 status of Tunnel1 on SwitchA.
[SwitchA] display ipv6 interface tunnel 1
Tunnel1 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::244:1FF:FE41:5410
Global unicast address(es):
2002:A01:101::1, subnet is 2002:A01:101::/64
Joined group address(es):
FF02::1:FF00:1
FF02::1:FF41:5410
FF02::2
FF02::1
MTU is 1500 bytes
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
ND stale time is 1200 seconds

You can see that the tunnel status is Up.


# Ping the 6to4 address of the tunnel interface on SwitchB from SwitchA.
[SwitchA] ping ipv6 2002:0a03:0102::1
PING 2002:0a03:0102::1 : 56 data bytes, press CTRL_C to break
Reply from 2002:A03:102::1
bytes=56 Sequence=1 hop limit=64 time = 8 ms
Reply from 2002:A03:102::1
bytes=56 Sequence=2 hop limit=64 time = 25 ms
Reply from 2002:A03:102::1
bytes=56 Sequence=3 hop limit=64 time = 4 ms
Reply from 2002:A03:102::1
bytes=56 Sequence=4 hop limit=64 time = 5 ms
Reply from 2002:A03:102::1
bytes=56 Sequence=5 hop limit=64 time = 5 ms

--- 2002:0a03:0102::1 ping statistics ---

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 440


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 4/9/25 ms

The 6to4 address can be pinged successfully.

----End

Configuration Files
● SwitchA configuration file
#
sysname SwitchA
#
ipv6
#
vlan batch 100 200
#
interface Vlanif100
ip address 10.1.1.1 255.255.255.0
#
interface Vlanif200
ipv6 enable
ipv6 address 2002:A01:101:1::1/64
#
interface Eth-Trunk1
service type tunnel
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface GigabitEthernet1/0/3
eth-trunk 1
#
interface Tunnel1
ipv6 enable
ipv6 address 2002:A01:101::1/64
tunnel-protocol ipv6-ipv4 6to4
source Vlanif100
eth-trunk 1
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
#
ipv6 route-static 2002:: 16 Tunnel1
#
return

● SwitchB configuration file


#
sysname SwitchB
#
ipv6
#
vlan batch 200 300
#
interface Vlanif200
ipv6 enable
ipv6 address 2002:A03:102:1::1/64

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 441


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

#
interface Vlanif300
ip address 10.3.1.2 255.255.255.0
#
interface Eth-Trunk1
service type tunnel
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 300
port hybrid untagged vlan 300
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface GigabitEthernet1/0/3
eth-trunk 1
#
interface Tunnel1
ipv6 enable
ipv6 address 2002:A03:102::1/64
tunnel-protocol ipv6-ipv4 6to4
source Vlanif300
eth-trunk 1
#
ospf 1
area 0.0.0.0
network 10.3.1.0 0.0.0.255
#
ipv6 route-static 2002:: 16 Tunnel1
#
return
● SwitchC configuration file
#
sysname SwitchC
#
vlan batch 100 200
#
interface Vlanif100
ip address 10.1.1.2 255.255.255.0
#
interface Vlanif200
ip address 10.2.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
ospf 1
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.2.1.0 0.0.0.255
#
return
● SwitchD configuration file
#
sysname SwitchD
#
vlan batch 200 300
#

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 442


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

interface Vlanif200
ip address 10.2.1.2 255.255.255.0
#
interface Vlanif300
ip address 10.3.1.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 300
port hybrid untagged vlan 300
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
ospf 1
area 0.0.0.0
network 10.2.1.0 0.0.0.255
network 10.3.1.0 0.0.0.255
#
return

12.9.3 Example for Configuring an ISATAP Tunnel

Networking Requirements
Figure 12-14 shows how an IPv6 host on the IPv4 network needs to connect to
the IPv6 network through a border device. The IPv6 host and border device
support ISATAP, so an ISATAP tunnel can be set up between the IPv6 host and the
border device.

Figure 12-14 Networking diagram for configuring an ISATAP tunnel


ISATAP
IPv6 IPv4
network network

Switch_2 Switch_1 ISATAP host


GE1/0/1 GE1/0/1 GE1/0/2 fe80::5efe:0a01:0102
VLANIF 100 VLANIF 100 VLANIF 200 10.1.1.2
fc00:2::2/64 fc00:2::1/64 10.1.1.1/8 fc00:1::5efe:0a01:0102

Configuration Roadmap
The configuration roadmap is as follows:

1. Configure an IPv4/IPv6 dual stack on Switch_1 so that Switch_1 can access


the IPv4 and IPv6 networks.
2. Configure an ISATAP tunnel on Switch_1 so that IPv6 hosts on the IPv4
network can communicate with Switch_2 on the IPv6 network.
3. Configure a static route from Switch_2 to the ISATAP host.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 443


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Procedure
Step 1 Configure the ISATAP border device.

# Enable the service loopback function on an Eth-Trunk.

NOTE

The interface must be idle and not transmitting services.


<HUAWEI> system-view
[HUAWEI] sysname Switch_1
[Switch_1] interface eth-trunk 1
[Switch_1-Eth-Trunk1] service type tunnel
[Switch_1-Eth-Trunk1] quit
[Switch_1] interface gigabitethernet 1/0/3
[Switch_1-GigabitEthernet1/0/3] eth-trunk 1
[Switch_1-GigabitEthernet1/0/3] quit

# Enable the IPv4/IPv6 dual stack and configure an IP address for each interface.
[Switch_1] ipv6
[Switch_1] vlan batch 100 200
[Switch_1] interface gigabitethernet 1/0/1
[Switch_1-GigabitEthernet1/0/1] port link-type hybrid
[Switch_1-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[Switch_1-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[Switch_1-GigabitEthernet1/0/1] quit
[Switch_1] interface gigabitethernet 1/0/2
[Switch_1-GigabitEthernet1/0/2] port link-type hybrid
[Switch_1-GigabitEthernet1/0/2] port hybrid pvid vlan 200
[Switch_1-GigabitEthernet1/0/2] port hybrid untagged vlan 200
[Switch_1-GigabitEthernet1/0/2] quit
[Switch_1] interface vlanif 100
[Switch_1-Vlanif100] ipv6 enable
[Switch_1-Vlanif100] ipv6 address fc00:2::1/64
[Switch_1-Vlanif100] quit
[Switch_1] interface vlanif 200
[Switch_1-Vlanif200] ip address 10.1.1.1 255.0.0.0
[Switch_1-Vlanif200] quit

# Configure an ISATAP tunnel.


[Switch_1] interface tunnel 1
[Switch_1-Tunnel1] tunnel-protocol ipv6-ipv4 isatap
[Switch_1-Tunnel1] eth-trunk 1
[Switch_1-Tunnel1] ipv6 enable
[Switch_1-Tunnel1] ipv6 address fc00:1::/64 eui-64
[Switch_1-Tunnel1] source vlanif 200
[Switch_1-Tunnel1] undo ipv6 nd ra halt
[Switch_1-Tunnel1] quit

Step 2 Configure the ISATAP host.

# Run the following command to add a static route to the border device. The IPv4
address of the host is 10.1.1.2/8.
C:\> netsh interface ipv6 isatap set router 10.1.1.1
C:\> netsh
netsh> interface
netsh interface> ipv6
netsh interface ipv6>isatap
netsh interface ipv6 isatap>set router 10.1.1.1 enabled 1440

Step 3 Configure Switch_2.

# Configure the IPv6 address for the interface.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 444


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

<HUAWEI> system-view
[HUAWEI] sysname Switch_2
[Switch_2] ipv6
[Switch_2] vlan batch 100
[Switch_2] interface gigabitethernet 1/0/1
[Switch_2-GigabitEthernet1/0/1] port link-type hybrid
[Switch_2-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[Switch_2-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[Switch_2-GigabitEthernet1/0/1] quit
[Switch_2] interface vlanif 100
[Switch_2-Vlanif100] ipv6 enable
[Switch_2-Vlanif100] ipv6 address fc00:2::2/64
[Switch_2-Vlanif100] quit

# Configure a static route.


[Switch_2] ipv6 route-static fc00:1:: 64 fc00:2::1

Step 4 Verify the configuration.

# Check the IPv6 status of Tunnel1 on the ISATAP device.


[Switch_1] display ipv6 interface tunnel 1
Tunnel1 current state : UP
IPv6 protocol current state : UP
IPv6 is enabled, link-local address is FE80::5EFE:A01:101
Global unicast address(es):
FC00:1::5EFE:A01:101, subnet is FC00:1::/64
Joined group address(es):
FF02::1:FF01:101
FF02::2
FF02::1
MTU is 1500 bytes
ND reachable time is 30000 milliseconds
ND retransmit interval is 1000 milliseconds
ND stale time is 1200 seconds
ND advertised reachable time is 0 milliseconds
ND advertised retransmit interval is 0 milliseconds
ND router advertisement max interval 600 seconds, min interval 200 seconds
ND router advertisements live for 1800 seconds
ND router advertisements hop-limit 64
Hosts use stateless autoconfig for addresses

You can see that the tunnel status is Up.

# Ping the global unicast address of the tunnel interface on the ISATAP host from
the ISATAP device.
[Switch_1] ping ipv6 FC00:1::5EFE:10.1.1.2
PING FC00:1::5EFE:10.1.1.2 : 56 data bytes, press CTRL_C to break
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=1 hop limit=64 time = 4 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=2 hop limit=64 time = 3 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=3 hop limit=64 time = 2 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=4 hop limit=64 time = 2 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=5 hop limit=64 time = 2 ms

--- FC00:1::5EFE:10.1.1.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/2/4 ms

# Ping the global unicast address of the ISATAP device from the ISATAP host.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 445


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

C:\> ping fc00:1::5efe:10.1.1.1

Pinging fc00:1::5efe:10.1.1.1
from fc00:1::5efe:10.1.1.2 with 32 bytes of data:

Reply from fc00:1::5efe:10.1.1.1: time=1ms


Reply from fc00:1::5efe:10.1.1.1: time=1ms
Reply from fc00:1::5efe:10.1.1.1: time=1ms
Reply from fc00:1::5efe:10.1.1.1: time=1ms
Ping statistics for fc00:1::5efe:10.1.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1ms, Average = 1ms

# Ping the global unicast address of the tunnel interface on the ISATAP host from
Switch_2.
[Switch_2] ping ipv6 FC00:1::5EFE:10.1.1.2
PING FC00:1::5EFE:10.1.1.2 : 56 data bytes, press CTRL_C to break
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=1 hop limit=64 time = 4 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=2 hop limit=64 time = 3 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=3 hop limit=64 time = 2 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=4 hop limit=64 time = 2 ms
Reply from FC00:1::5EFE:A01:102
bytes=56 Sequence=5 hop limit=64 time = 2 ms

--- FC00:1::5EFE:10.1.1.2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 2/2/4 ms

----End

Configuration Files
● Switch_1 configuration file
#
sysname Switch_1
#
ipv6
#
vlan batch 100 200
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:2::1/64
#
interface Vlanif200
ip address 10.1.1.1 255.0.0.0
#
interface Eth-Trunk1
service type tunnel
#
interface Tunnel1
ipv6 enable
ipv6 address FC00:1::/64 eui-64
undo ipv6 nd ra halt
tunnel-protocol ipv6-ipv4 isatap
source Vlanif200
eth-trunk 1
#
interface GigabitEthernet1/0/1
port link-type hybrid

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 446


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

port hybrid pvid vlan 100


port hybrid untagged vlan 100
#
interface GigabitEthernet1/0/2
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface GigabitEthernet1/0/3
eth-trunk 1
#
return

● Switch_2 configuration file


#
sysname Switch_2
#
ipv6
#
vlan batch 100
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:2::2/64
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ipv6 route-static FC00:1:: 64 FC00:2::1
#
return

12.9.4 Example for Configuring 6PE


Networking Requirements
In Figure 12-15, PE1 and PE2 support 6PE, and CE1 and CE2 support the IPv6
protocol. A carrier's IPv4/MPLS backbone network exists between PE1 and PE2.
The IPv4/MPLS backbone network runs OSPF. IPv4 IBGP connections are set up
between PEs. CE1 and CE2 are located on two IPv6 networks respectively. PEs and
CEs use IPv6 addresses to exchange route information through static routes.
6PE must be configured to connect IPv6 networks through the IPv4/MPLS
backbone network.

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 447


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

Figure 12-15 Networking diagram for configuring 6PE


GE2/0/0 GE2/0/0
VLANIF200 VLANIF200
4.3.5.1/24 IPv4/MPLS 4.3.5.2/24

PE1 PE2
GE1/0/0 GE1/0/0
VLANIF100 VLANIF100
fc00:3::1/64 fc00:4::1/64
GE1/0/0 GE1/0/0
CE1 VLANIF100 VLANIF100
CE2
fc00:3::2/64 fc00:4::2/64

IPv6 IPv6
Customer Customer
site site

NOTE

You need to purchase a license to run MPLS-related commands.

Configuration Roadmap
The configuration roadmap is as follows:
1. Enable IPv6 and configure an IPv4/IPv6 dual stack.
2. Enable MPLS.
3. Configure a 6PE peer.
4. Configure IPv6 addresses for CE interfaces and static routes.

Configuration Procedures
1. Enable IPv6 and configure an IPv4/IPv6 dual stack.
# Enable IPv6 on PE1.
<HUAWEI> system-view
[HUAWEI] sysname PE1
[PE1] ipv6

# Enable IPv6 on PE2.


<HUAWEI> system-view
[HUAWEI] sysname PE2
[PE2] ipv6

# Configure an IPv6 address for VLANIF 100 on PE1 and an IP address for
Loopback0.
[PE1] vlan batch 100 200
[PE1] interface gigabitethernet 1/0/0
[PE1-GigabitEthernet1/0/0] port link-type hybrid
[PE1-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[PE1-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[PE1-GigabitEthernet1/0/0] quit
[PE1] interface vlanif 100
[PE1-Vlanif100] ipv6 enable

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 448


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

[PE1-Vlanif100] ipv6 address fc00:3::1 64


[PE1-Vlanif100] quit
[PE1] interface loopback 0
[PE1-LoopBack0] ip address 1.1.1.9 255.255.255.255
[PE1-LoopBack0] quit
# Configure an IPv6 address for VLANIF 100 on PE2 and an IP address for
Loopback0.
[PE2] vlan batch 100 200
[PE2] interface gigabitethernet 1/0/0
[PE2-GigabitEthernet1/0/0] port link-type hybrid
[PE2-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[PE2-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[PE2-GigabitEthernet1/0/0] quit
[PE2] interface vlanif 100
[PE2-Vlanif100] ipv6 enable
[PE2-Vlanif100] ipv6 address fc00:4::1 64
[PE2-Vlanif100] quit
[PE2] interface loopback 0
[PE2-LoopBack0] ip address 2.2.2.9 255.255.255.255
[PE2-LoopBack0] quit
2. Enable MPLS.
NOTE

PEs in this example are directly connected. You need to run the label advertise
command to enable the egress node to assign labels to the penultimate hop.
# Configure an IP address for VLANIF 200 on PE1 and enable MPLS and LDP.
[PE1] mpls lsr-id 1.1.1.9
[PE1] mpls
[PE1-mpls] lsp-trigger all
[PE1-mpls] label advertise non-null
[PE1-mpls] quit
[PE1] mpls ldp
[PE1-mpls-ldp] quit
[PE1] interface gigabitethernet 2/0/0
[PE1-GigabitEthernet2/0/0] port link-type hybrid
[PE1-GigabitEthernet2/0/0] port hybrid pvid vlan 200
[PE1-GigabitEthernet2/0/0] port hybrid untagged vlan 200
[PE1-GigabitEthernet2/0/0] quit
[PE1] interface vlanif 200
[PE1-Vlanif200] ip address 4.3.5.1 255.255.255.0
[PE1-Vlanif200] mpls
[PE1-Vlanif200] mpls ldp
[PE1-Vlanif200] quit
# Configure an IP address for VLANIF 200 on PE2 and enable MPLS and LDP.
[PE2] mpls lsr-id 2.2.2.9
[PE2] mpls
[PE2-mpls] lsp-trigger all
[PE2-mpls] label advertise non-null
[PE2-mpls] quit
[PE2] mpls ldp
[PE2-mpls-ldp] quit
[PE2] interface gigabitethernet 2/0/0
[PE2-GigabitEthernet2/0/0] port link-type hybrid
[PE2-GigabitEthernet2/0/0] port hybrid pvid vlan 200
[PE2-GigabitEthernet2/0/0] port hybrid untagged vlan 200
[PE2-GigabitEthernet2/0/0] quit
[PE2] interface vlanif 200
[PE2-Vlanif200] ip address 4.3.5.2 255.255.255.0
[PE2-Vlanif200] mpls
[PE2-Vlanif200] mpls ldp
[PE2-Vlanif200] quit
# Configure OSPF on PE1 to trigger LSP setup.
[PE1] ospf
[PE1-ospf-1] area 0

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 449


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

[PE1-ospf-1-area-0.0.0.0] network 1.1.1.9 0.0.0.0


[PE1-ospf-1-area-0.0.0.0] network 4.3.5.0 0.0.0.255
[PE1-ospf-1-area-0.0.0.0] quit
[PE1-ospf-1] quit

# Configure OSPF on PE2 to trigger LSP setup.


[PE2] ospf
[PE2-ospf-1] area 0
[PE2-ospf-1-area-0.0.0.0] network 2.2.2.9 0.0.0.0
[PE2-ospf-1-area-0.0.0.0] network 4.3.5.0 0.0.0.255
[PE2-ospf-1-area-0.0.0.0] quit
[PE2-ospf-1] quit

3. Configure a 6PE peer.


# Configure IBGP on PE1, enable 6PE capability for the peer, and import IPv6
direct routes.
[PE1] bgp 65100
[PE1-bgp] peer 2.2.2.9 as-number 65100
[PE1-bgp] peer 2.2.2.9 connect-interface loopback 0
[PE1-bgp] ipv6-family
[PE1-bgp-af-ipv6] import-route direct
[PE1-bgp-af-ipv6] peer 2.2.2.9 enable
[PE1-bgp-af-ipv6] peer 2.2.2.9 label-route-capability
[PE1-bgp-af-ipv6] quit
[PE1-bgp] quit

# Configure IBGP on PE2, enable 6PE capability for the peer, and import IPv6
direct routes.
[PE2] bgp 65100
[PE2-bgp] peer 1.1.1.9 as-number 65100
[PE2-bgp] peer 1.1.1.9 connect-interface loopback 0
[PE2-bgp] ipv6-family
[PE2-bgp-af-ipv6] import-route direct
[PE2-bgp-af-ipv6] peer 1.1.1.9 enable
[PE2-bgp-af-ipv6] peer 1.1.1.9 label-route-capability
[PE2-bgp-af-ipv6] quit
[PE2-bgp] quit

4. Configure IPv6 addresses for CE interfaces and static routes.


# Configure CE1 to set up an IPv6 connection with PE1.
<HUAWEI> system-view
[HUAWEI] sysname CE1
[CE1] ipv6
[CE1] vlan batch 100
[CE1] interface gigabitethernet 1/0/0
[CE1-GigabitEthernet1/0/0] port link-type hybrid
[CE1-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[CE1-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[CE1-GigabitEthernet1/0/0] quit
[CE1] interface vlanif 100
[CE1-Vlanif100] ipv6 enable
[CE1-Vlanif100] ipv6 address fc00:3::2 64
[CE1-Vlanif100] quit
[CE1] ipv6 route-static :: 0 fc00:3::1

# Configure CE2 to set up an IPv6 connection with PE2.


<HUAWEI> system-view
[HUAWEI] sysname CE2
[CE2] ipv6
[CE2] vlan batch 100
[CE2] interface gigabitethernet 1/0/0
[CE2-GigabitEthernet1/0/0] port link-type hybrid
[CE2-GigabitEthernet1/0/0] port hybrid pvid vlan 100
[CE2-GigabitEthernet1/0/0] port hybrid untagged vlan 100
[CE2-GigabitEthernet1/0/0] quit
[CE2] interface vlanif 100
[CE2-Vlanif100] ipv6 enable

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 450


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

[CE2-Vlanif100] ipv6 address fc00:4::2 64


[CE2-Vlanif100] quit
[CE2] ipv6 route-static :: 0 fc00:4::1

5. Verify the configuration.


# Ping the IPv6 address of CE2 from CE1.
[CE1] ping ipv6 FC00:4::2
PING FC00:4::2 : 56 data bytes, press CTRL_C to break
Reply from FC00:4::2
bytes=56 Sequence=1 hop limit=63 time = 50 ms
Reply from FC00:4::2
bytes=56 Sequence=2 hop limit=63 time = 1 ms
Reply from FC00:4::2
bytes=56 Sequence=3 hop limit=63 time = 1 ms
Reply from FC00:4::2
bytes=56 Sequence=4 hop limit=63 time = 1 ms
Reply from FC00:4::2
bytes=56 Sequence=5 hop limit=63 time = 1 ms

--- FC00:4::2 ping statistics ---


5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 1/10/50 ms

The IPv6 address of CE2 can be pinged successfully.

Configuration Files
● PE1 configuration file
#
sysname PE1
#
ipv6
#
vlan batch 100 200
#
mpls lsr-id 1.1.1.9
mpls
label advertise non-null
lsp-trigger all
#
mpls ldp
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:3::1/64
#
interface Vlanif200
ip address 4.3.5.1 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet2/0/0
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface LoopBack0
ip address 1.1.1.9 255.255.255.255
#
bgp 65100
peer 2.2.2.9 as-number 65100

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 451


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

peer 2.2.2.9 connect-interface LoopBack0


#
ipv4-family unicast
undo synchronization
peer 2.2.2.9 enable
#
ipv6-family unicast
undo synchronization
import-route direct
peer 2.2.2.9 enable
peer 2.2.2.9 label-route-capability
#
ospf 1
area 0.0.0.0
network 1.1.1.9 0.0.0.0
network 4.3.5.0 0.0.0.255
#
return
● PE2 configuration file
#
sysname PE2
#
ipv6
#
vlan batch 100 200
#
mpls lsr-id 2.2.2.9
mpls
label advertise non-null
lsp-trigger all
#
mpls ldp
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:4::1/64
#
interface Vlanif200
ip address 4.3.5.2 255.255.255.0
mpls
mpls ldp
#
interface GigabitEthernet1/0/0
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
interface GigabitEthernet2/0/0
port link-type hybrid
port hybrid pvid vlan 200
port hybrid untagged vlan 200
#
interface LoopBack0
ip address 2.2.2.9 255.255.255.255
#
bgp 65100
peer 1.1.1.9 as-number 65100
peer 1.1.1.9 connect-interface LoopBack0
#
ipv4-family unicast
undo synchronization
peer 1.1.1.9 enable
#
ipv6-family unicast
undo synchronization
import-route direct
peer 1.1.1.9 enable
peer 1.1.1.9 label-route-capability
#

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 452


S12700 Series Agile Switches
Configuration Guide - IP Service 12 IPv6 over IPv4 Tunnel Configuration

ospf 1
area 0.0.0.0
network 2.2.2.9 0.0.0.0
network 4.3.5.0 0.0.0.255
#
return

● CE1 configuration file


#
sysname CE1
#
ipv6
#
vlan batch 100
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:3::2/64
#
interface GigabitEthernet1/0/0
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ipv6 route-static :: 0 FC00:3::1
#
return

● CE2 configuration file


#
sysname CE2
#
ipv6
#
vlan batch 100
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:4::2/64
#
interface GigabitEthernet1/0/0
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
ipv6 route-static :: 0 FC00:4::1
#
return

Issue 11 (2020-11-15) Copyright © Huawei Technologies Co., Ltd. 453

You might also like