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

Configuring IPv4 and IPv6 Policy-based Routes for a Windows ECS with Multiple Network Interfaces

Updated on 2025-01-24 GMT+08:00

Scenarios

This section describes how to configure policy-based routes for a Windows Server 2012 64-bit ECS with two network interfaces.

For details about the background knowledge and networking of an ECS with two network interfaces, see Overview.

Configuring IPv4 Policy-based Routes for a Windows ECS

  1. Collect the ECS network information required for configuring policy-based routes.

    For details, see Collecting ECS Network Information.

    In this example, the network information of the ECS is shown in Table 1.

    Table 1 Windows ECS using IPv4

    ECS

    Primary Network Interface

    Extended Network Interface

    Source

    • IP address: 10.0.0.59
    • Subnet gateway: 10.0.0.1
    • IP address: 10.0.1.104
    • Subnet gateway: 10.0.1.1

    Destination

    IP address: 10.0.2.12

    N/A

  2. Log in to the source ECS.

    For details, see How Do I Log In to My ECS?

  1. Check whether the source ECS can use its primary network interface to communicate with the destination ECS:

    Before configuring policy-based routes, ensure that the source ECS can use its primary network interface to communicate with the destination ECS.

    ping -S <IP-address-of-the-primary-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    In this example, run the following command:

    ping -S 10.0.0.59 10.0.2.12

    If information similar to the following is displayed, the source ECS can use its primary network interface to communicate with the destination ECS.

  2. Configure a policy-based route for the extended network interface.

    route add -p 0.0.0.0 mask 0.0.0.0 <subnet-gateway-of-the-extended-network-interface> metric <route-priority>

    Configure the parameters as follows:
    • 0.0.0.0/0: Default route. Do not change it.
    • Subnet gateway of the extended network interface: Enter the IP address collected in 1.
    • Route priority: Set its value to 261. The priority of the extended network interface must be lower than that of the primary network interface. A larger value indicates a lower priority.

    In this example, run the following command:

    route add -p 0.0.0.0 mask 0.0.0.0 10.0.1.1 metric 261

    NOTE:
    • The primary network interface already has policy-based routes and you do not need to configure again.
    • If the ECS has multiple extended network interfaces, configure policy-based routes for all extended network interfaces one by one.
  3. Check whether the policy-based route is added.

    route print

    If information similar to the following is displayed, the policy-based route has been added. The route is a permanent route and will not be lost after the ECS is restarted.

  4. Check whether the source and destination ECSs can communicate with each other.

    ping -S <IP-address-of-the-primary-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    ping -S <IP-address-of-the-extended-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    In this example, run the following commands:

    ping -S 10.0.0.59 10.0.2.12

    ping -S 10.0.1.104 10.0.2.12

    If information similar to the following is displayed, both the network interfaces of the source ECS can communicate with the destination ECS.

Configuring IPv6 Policy-based Routes for a Windows ECS

  1. Collect the ECS network information required for configuring policy-based routes.

    For details, see Collecting ECS Network Information.

    In this example, the network information of the ECS is shown in Table 2.

    Table 2 Windows ECS using IPv6

    ECS

    Primary Network Interface

    Extended Network Interface

    Source

    IP address: 2407:c080:802:aba:6788:fb94:d71f:8deb

    IP address: 2407:c080:802:be6:71c8:42e0:d44e:eeb4

    Destination

    IP address: 2407:c080:802:be7:c2e6:d99c:b685:c6c8

    N/A

  2. Log in to the source ECS.

    For details, see How Do I Log In to My ECS?

  1. Run the following command to check whether the ECS has IPv6 enabled and has IPv6 addresses:

    ipconfig

    If information similar to the following is displayed, each network interface has an IPv6 address starting with 2407, which indicates that the ECS has been assigned IPv6 addresses.

    NOTICE:

    Perform this step for both the source and destination ECSs to ensure that the ECSs have IPv6 addresses. Otherwise, the ECSs cannot communicate with each other using IPv6 addresses.

    ECSs in this example run Windows Server 2012 (64-bit). No additional configuration is required for such ECSs because they can automatically obtain IPv6 addresses. If your ECS cannot automatically obtain IPv6 addresses, see Dynamically Assigning IPv6 Addresses.

  2. Check whether the source and destination ECSs can communicate with each other.

    ping -6 -S <IP-address-of-the-primary-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    ping -6 -S <IP-address-of-the-extended-network-interface-on-the-source-ECS> <IP-address-of-the-destination-ECS>

    In this example, run the following commands:

    ping -6 -S 2407:c080:802:aba:8999:5e61:e19:cf7e 2407:c080:802:be7:c2e6:d99c:b685:c6c8

    ping -6 -S 2407:c080:802:be6:ec23:ec4:c886:cc1 2407:c080:802:be7:c2e6:d99c:b685:c6c8

    If information similar to the following is displayed, both the network interfaces of the source ECS can communicate with the destination ECS.

    NOTICE:

    ECSs in this example run Windows Server 2012 (64-bit). You do not need to configure policy-based routes for these ECSs because both the network interfaces of such an ECS can communicate with others using IPv6.

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