Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Setting up an IPv6 Network

Updated on 2024-04-18 GMT+08:00

Scenarios

This topic describes how to create a VPC with an IPv6 CIDR block and create an ECS with an IPv6 address in the VPC, so that the ECS can access the Internet using the IPv6 address.

NOTE:

If you already have a shared bandwidth, you can configure Internet access using an IPv6 address when purchasing an ECS.

Application Scenarios of IPv4/IPv6 Dual Stack

Table 1 Application scenarios of IPv4/IPv6 dual stack

Application Scenario

Description

Subnet

ECS

Private communication using IPv6 addresses

Your applications deployed on ECSs need to communicate with other systems (such as databases) through private networks using IPv6 addresses.

  • IPv4 CIDR block
  • IPv6 CIDR block
  • Private IPv4 address: used for private communication
  • IPv6 address: used for private communication.

Public communication using IPv6 addresses

Your applications deployed on ECSs need to provide services accessible from the Internet using IPv6 addresses.

  • IPv4 CIDR block
  • IPv6 CIDR block
  • Private IPv4 address + IPv4 EIP: used for public network communication
  • IPv6 address + shared bandwidth: used for public network communication

Your applications deployed on ECSs need to both provide services accessible from the Internet and analyze the access request data using IPv6 addresses.

Step 1: Create a VPC

Before creating your VPCs, determine how many VPCs, the number of subnets, and what IP address ranges you will need.

Perform the following operations to create a VPC named vpc-ipv6 and its default subnet named subnet-ipv6.

  1. Log in to the management console.
  2. Click in the upper left corner and choose Network > Virtual Private Cloud.

    The Virtual Private Cloud page is displayed.

  3. Click Create VPC.
  4. Set the VPC and subnet parameters.

    When configuring a subnet, select Enable for IPv6 CIDR Block so that the system will automatically allocate an IPv6 CIDR block to the subnet. IPv6 cannot be disabled after the subnet is created. Currently, customizing IPv6 CIDR block is not supported.

    Table 2 VPC parameter descriptions

    Parameter

    Description

    Example Value

    Region

    Select the region nearest to you to ensure the lowest latency possible.

    -

    Name

    The VPC name.

    The name can contain a maximum of 64 characters, which may consist of letters, digits, underscores (_), hyphens (-), and periods (.). The name cannot contain spaces.

    VPC-test

    IPv4 CIDR Block

    The CIDR block of the VPC. The CIDR block of a subnet can be the same as the CIDR block for the VPC (for a single subnet in the VPC) or a subset of the CIDR block for the VPC (for multiple subnets in the VPC).

    The following CIDR blocks are supported:

    • 10.0.0.0/8-24
    • 172.16.0.0/12-24
    • 192.168.0.0/16-24

    192.168.0.0/16

    Enterprise Project

    The enterprise project to which the VPC belongs.

    An enterprise project facilitates project-level management and grouping of cloud resources and users. The name of the default project is default.

    For details about creating and managing enterprise projects, see the Enterprise Management User Guide.

    default

    Advanced Settings

    Click the drop-down arrow to set advanced VPC parameters, including tags.

    Retain the default settings.

    Tag

    The VPC tag, which consists of a key and value pair. You can add a maximum of 10 tags to each VPC.

    • Key: vpc_key1
    • Value: vpc-01
    Table 3 Subnet parameter descriptions

    Parameter

    Description

    Example Value

    AZ

    An AZ is a geographic location with independent power supply and network facilities in a region. AZs are physically isolated, and AZs in the same VPC are interconnected through an internal network.

    Note the following when you select an AZ:
    • A VPC can have subnets that are in different AZs. For example, a VPC can have subnet A in AZ 1, and subnet B in AZ 3.
    • A cloud resource and its subnet can be in different AZs. For example, a cloud server in AZ 1 can use a subnet in AZ 3.

    AZ1

    Name

    The subnet name.

    The name can contain a maximum of 64 characters, which may consist of letters, digits, underscores (_), hyphens (-), and periods (.). The name cannot contain spaces.

    subnet-01

    IPv4 CIDR Block

    The CIDR block for the subnet. This value must be within the VPC CIDR block.

    192.168.0.0/24

    IPv6 CIDR Block

    Specifies whether to set IPv6 CIDR Block to Enable.

    After the IPv6 function is enabled, the system automatically assigns an IPv6 CIDR block to the created subnet. Currently, the IPv6 CIDR block cannot be customized. IPv6 cannot be disabled after the subnet is created.

    -

    Associated Route Table

    The default route table to which the subnet will be associated. You can change the route table to a custom route table on the Subnets page.

    Default

    Advanced Settings

    Click the drop-down arrow to set advanced settings for the subnet, including Gateway and DNS Server Address.

    Retain the default settings.

    Gateway

    The gateway address of the subnet.

    This IP address is used to communicate with other subnets.

    192.168.0.1

    DNS Server Address

    DNS server addresses allow ECSs in a VPC subnet to communicate with each other using private domain names. You can also directly access cloud services through private DNS servers.

    If you want to use other public DNS servers for resolution, you can change the default DNS server addresses.

    A maximum of two DNS server IP addresses can be configured. Multiple IP addresses must be separated using commas (,).

    100.125.x.x

    DHCP Lease Time

    The period during which a client can use an IP address automatically assigned by the DHCP server. After the lease time expires, a new IP address will be assigned to the client. Unit: Day or hour

    After you change the DHCP lease time on the console, the change is applied automatically when the DHCP lease of an instance (such as ECS) is renewed. You can wait for the system to renew the lease or manually renew the lease. Renewing lease will not change the IP address used by the instance. If you want the new lease time to take effect immediately, manually renew the lease or restart the ECS.

    -

    NTP Server Address

    The IP address of the NTP server. This parameter is optional.

    You can configure the NTP server IP addresses to be added to the subnet as required. The IP addresses are added in addition to the default NTP server addresses.

    If you do not specify this parameter, no additional NTP server IP addresses will be added.

    Enter a maximum of four valid IP addresses, and separate multiple IP addresses with commas. Each IP address must be unique. If you add or change the NTP server addresses of a subnet, you need to renew the DHCP lease for or restart all the ECSs in the subnet to make the change take effect immediately. If the NTP server addresses have been cleared out, restarting the ECSs will not help. You must renew the DHCP lease for all ECSs to make the change take effect immediately.

    192.168.2.1

    Tag

    The subnet tag, which consists of a key and value pair. You can add a maximum of 10 tags to each subnet.

    • Key: subnet_key1
    • Value: subnet-01

    Description

    Supplementary information about the subnet. This parameter is optional.

    The subnet description can contain a maximum of 255 characters and cannot contain angle brackets (< or >).

    N/A

  5. Click Create Now.

Step 2: Buy an ECS

Configure the network for the ECS as follows:

  • Network:
    • Select the created VPC vpc-ipv6.
    • Select the created subnet subnet-ipv6.
    • Select Self-assigned IPv6 address.
      NOTICE:

      Select Self-assigned IPv6 address during ECS creation to assign an IPv6 address to the ECS. Otherwise, the IPv4/IPv6 dual-stack network cannot be used.

    • Shared Bandwidth
      • If you select Do not configure, only IPv6 communication in a VPC is supported. If you want to enable Internet access, you need to perform operations in (Optional) Step 3: Buy a Shared Bandwidth and Add the IPv6 Address to It.
      • If you assign a shared bandwidth or select an existing shared bandwidth, the ECS can use the IPv6 address to access the Internet after the configuration is complete.
  • Security Group: Select the default security group Sys-default. The default security group rule allows all outgoing IPv4 and IPv6 data packets and denies all inbound data packets. ECSs in the same security group can access each other without the need to add rules. You can also create a security group and add rules to it.
  • EIP: Select Not required.

After the ECS is created, you can view the assigned IPv6 address on the ECS details page. You can also log in to the ECS and run the ifconfig command to view the assigned IPv6 address.

(Optional) Dynamically Assigning IPv6 Addresses

If an IPv6 address fails to be automatically assigned or the selected image does not support the function of automatic IPv6 address assignment, manually obtain the IPv6 address by referring to .

NOTE:

If an ECS is created from a public image:

Before enabling dynamic IPv6 address assignment for a Linux public image, check whether IPv6 is supported and then check whether dynamic IPv6 address assignment has been enabled. Currently, all Linux public images support IPv6, and dynamic IPv6 address assignment is enabled for Ubuntu 16 by default. You do not need to configure dynamic IPv6 address assignment for the Ubuntu 16 OS. For other Linux public images, you need to enable this function.

(Optional) Step 3: Buy a Shared Bandwidth and Add the IPv6 Address to It

By default, an IPv6 address can only be used for private network communication. If you want to use this IPv6 address to access the Internet or want it to be accessed by IPv6 clients on the Internet, you need to buy a shared bandwidth and add the IPv6 address to it.

If you already have a shared bandwidth, add the IPv6 address to the shared bandwidth.

Buying a Shared Bandwidth

  1. Log in to the management console.
  2. Click in the upper left corner and select the desired region and project.
  3. Click in the upper left corner and choose Network > Elastic IP.
  4. In the navigation pane on the left, choose Elastic IP and Bandwidth > Shared Bandwidths.
  5. In the upper right corner, click Assign Shared Bandwidth. On the displayed page, configure parameters as prompted.

    Table 4 Parameter descriptions

    Parameter

    Description

    Example Value

    Region

    Regions are geographic areas that are physically isolated from each other. The networks inside different regions are not connected to each other, so resources cannot be shared across different regions. For lower network latency and faster access to your resources, select the region nearest you.

    N/A

    Billed By

    The billing method for the shared bandwidth.

    You can specify a shared bandwidth to be billed by bandwidth.

    Bandwidth

    Bandwidth

    The bandwidth size in Mbit/s. The maximum bandwidth can be 300 Mbit/s.

    10

    Name

    The name of the shared bandwidth.

    Bandwidth-001

    Enterprise Project

    The enterprise project that the EIP belongs to.

    An enterprise project facilitates project-level management and grouping of cloud resources and users. The name of the default project is default.

    For details about creating and managing enterprise projects, see the Enterprise Management User Guide.

    default

  6. Click Create Now.

Adding the IPv6 Address to a Shared Bandwidth

  1. On the Shared Bandwidths page, click Add Public IP Address in the Operation column.
    Figure 1 Adding an IPv6 address to a shared bandwidth
  2. Add the IPv6 address to the shared bandwidth.
    Figure 2 Adding an IPv6 address to a shared bandwidth
  3. Click OK.

Verifying the Result

Log in to the ECS and ping an IPv6 address on the Internet to verify network connectivity. Figure 3 shows an example command output.

Log in to the ECS using SSH or the RDP file through the EIP.

Figure 3 Verification

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback