- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-Network Access with Stateful IPv6 Address Assignment Configuration Examples (CLI) | 85.34 KB |
Network Access with Stateful IPv6 Address Assignment Configuration Examples (CLI)
Copyright © 2024 New H3C Technologies Co., Ltd. All rights reserved.
No part of this manual may be reproduced or transmitted in any form or by any means without prior written consent of New H3C Technologies Co., Ltd.
Except for the trademarks of New H3C Technologies Co., Ltd., any trademarks that may be mentioned in this document are the property of their respective owners.
The information in this document is subject to change without notice.
Contents
Example: Configuring stateful IPv6 address assignment for network access
Configuring WAN interface settings
Configuring stateful IPv6 address assignment
Configuring default IPv6 routes
Introduction
This document provides an example of configuring stateful IPv6 address assignment through the CLI of a router for network access.
Prerequisites
This document is not restricted to specific software or hardware versions. Procedures and information in the examples might be slightly different depending on the software or hardware version of the device.
The configuration examples were created and verified in a lab environment, and all the devices were started with the factory default configuration. When you are working on a live network, make sure you understand the potential impact of every command on your network.
The following information is provided based on the assumption that you have basic knowledge of DHCP and NAT.
Example: Configuring stateful IPv6 address assignment for network access
Network configuration
As shown in Figure 1, the router serves as the egress router on the enterprise network. The PC accesses the Internet through stateful IPv6 address assignment.
· The ISP uses network segment 3001::/64, gateway address 3001::1/64, and DNS server address 1::1.
· The router obtains public-network address 3001::2/64 from the ISP.
· The internal network is 2001::/64 and its gateway is 2001::1/64.
Restrictions and guidelines
The address range in the address pool configured on the LAN interface cannot belong to the same network segment as the IP address of the WAN interface on the device.
Procedures
Configuring WAN interface settings
# Assign an IPv6 address to interface WAN1(GE0/1). The interface uses the IPv6 address for network access.
<Router> system-view
[Router] interface gigabitethernet 0/1
[Router-GigabitEthernet0/1] ipv6 address 3001::2/64
[Router-GigabitEthernet0/1] quit
Configuring stateful IPv6 address assignment
# Configure interface GE0/2 as the gateway of the internal network.
[Router] interface gigabitethernet 0/2
[Router-GigabitEthernet0/2] ipv6 address 2001::1/64
# Enable GE0/2 to advertise RA messages.
[Router-GigabitEthernet0/2] undo ipv6 nd ra halt
# Enable clients to use stateful auto-configuration to obtain IPv6 addresses.
[Router-GigabitEthernet0/2] ipv6 nd autoconfig managed-address-flag
# Enable clients to use stateless auto-configuration to obtain other network settings.
[Router-GigabitEthernet0/2] ipv6 nd autoconfig other-flag
# Enable GE0/2 to operate in DHCPv6 server mode.
[Router-GigabitEthernet0/2] ipv6 dhcp select server
[Router-GigabitEthernet0/2] quit
# Create DHCPv6 address pool 1 and specify network segment 2001::/64 for dynamic IPv6 address assignment in the address pool.
[Router] ipv6 dhcp pool 1
[Router-dhcp6-pool-1] network 2001::/64
[Router-dhcp6-pool-1] gateway-list 2001::1
[Router-dhcp6-pool-1] dns-server 1::1
[Router-dhcp6-pool-1] quit
# Create DHCPv6 address pool 1 and specify network segment 2001::/64 for dynamic IPv6 address assignment in the address pool.
[Router] ipv6 pool 1
[Router-ipv6-pool-1] network 2001::/64
[Router-ipv6-pool-1] gateway-list 2001::1
[Router-ipv6-pool-1] dns-server 1::1
[Router-ipv6-pool-1] quit
Configuring default IPv6 routes
# Configure a default IPv6 route. The next hop address is 3001::1, the gateway address assigned by the ISP.
[Router] ipv6 route-static 0:: 0 3001::1
Verifying the configuration
The PC can access the ISP network.