beautypg.com

H3C Technologies H3C SecPath F1000-E User Manual

Page 125

background image

113

# Enable IPv6.

system-view

[SecPathB] ipv6

# Configure an IPv6 address for interface GigabitEthernet 0/1 (the physical interface of the
tunnel).

[SecPathB] interface GigabitEthernet 0/1

[SecPathB-GigabitEthernet0/1] ipv6 address 1::2 64

[SecPathB-GigabitEthernet0/1] quit

# Configure an IPv4 address for interface GigabitEthernet 0/2.

[SecPathB] interface GigabitEthernet 0/2

[SecPathB-GigabitEthernet0/2] ip address 20.1.1.1 24

[SecPathB-GigabitEthernet0/2] quit

# Create interface Tunnel 2.

[SecPathB] interface tunnel 2

# Configure an IPv4 address for interface Tunnel 2.

[SecPathB-Tunnel2] ip address 30.1.2.2 255.255.255.0

# Specify the tunnel encapsulation mode.

[SecPathB-Tunnel2] tunnel-protocol ipv4-ipv6 dslite-aftr

# Configure the source interface for interface Tunnel 2.

[SecPathB-Tunnel2] source GigabitEthernet 0/1

[SecPathB-Tunnel2] quit

# Configure NAT and use the IP address of interface GigabitEthernet 0/2 as the translated IP

address.

[SecPathB] acl number 2000

[SecPathB-acl-basic-2000] rule permit source 10.0.0.0 0.0.0.255

[SecPathB-acl-basic-2000] quit

[SecPathB] interface GigabitEthernet 0/2

[SecPathB-GigabitEthernet0/2] nat outbound 2000

[SecPathB-GigabitEthernet0/2] quit

Configure SecPath C (the DHCPv6 server):
# Enable IPv6.

system-view

[SecPathC] ipv6

# Enable DHCPv6.

[SecPathC] ipv6 dhcp server enable

# Create address pool 1 and specify the address of the AFTR (1::2).

[SecPathC] ipv6 dhcp pool 1

[SecPathC-dhcp6-pool-1] ds-lite address 1::2

[SecPathC-dhcp6-pool-1] quit

# Configure the IPv6 address of interface GigabitEthernet 0/1.

[SecPathC] interface GigabitEthernet 0/1

[SecPathC-GigabitEthernet0/1] ipv6 address 1::3 64

# Apply address pool 1 to the interface.

[SecPathC-GigabitEthernet0/1] ipv6 dhcp server apply pool 1