Professional Documents
Culture Documents
Host
IPv4
10.1.1.1
Network
10.1.1.1 or
DNS Switch
fc00::1
Server IPv6
fc00::1
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.
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.
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
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
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.
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.
IPv4
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.
IPv6-to-IPv4 Tunnel
FP TLA
IPv4 address SLA ID Interface ID
001 0x0002
IPv4
6to4 6to4 tunnel 6to4
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.
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
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.
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.
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
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.
For more details about 6PE, see S12700 V200R011C10 Configuration Guide -
MPLS.
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
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.
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
Procedure
Step 1 Run system-view
----End
----End
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
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.
----End
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.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run interface tunnel interface-number
A tunnel interface is created.
NOTE
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
Procedure
Step 1 Run system-view
This step is optional for cards supporting internal loopback interfaces. For details,
see (Optional) Enabling the Service Loopback Function on an Eth-Trunk.
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
Context
When configuring an ISATAP tunnel, note the following points:
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
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
NOTE
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
----End
Procedure
● Run the display ipv6 interface tunnel interface-number command in any
view to monitor the running status of the tunnel interface.
----End
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:
Procedure
Step 1 Configure SwitchA.
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 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
[SwitchB-Vlanif100] quit
[SwitchB] interface vlanif 200
[SwitchB-Vlanif200] ip address 192.168.51.1 255.255.255.0
[SwitchB-Vlanif200] quit
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 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
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 3/32/84 ms
----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
SwitchB so that hosts on the 6to4 network and the IPv6 network can
communicate.
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
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
<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
NOTE
[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
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 4/9/25 ms
----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
#
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
#
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
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.
Configuration Roadmap
The configuration roadmap is as follows:
Procedure
Step 1 Configure the ISATAP border device.
NOTE
# 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
# 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
<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
# 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
# Ping the global unicast address of the ISATAP device from the ISATAP host.
Pinging fc00:1::5efe:10.1.1.1
from fc00:1::5efe:10.1.1.2 with 32 bytes of data:
# 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
----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
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
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
# 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
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
# 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
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
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