Configuring IPv4 and IPv6 Policy-based Routes for a Windows ECS with Multiple Network Interfaces
Scenarios
This section describes how to configure policy-based routes for a Windows Server 2012 64-bit ECS with two network interfaces.
- IPv4: Configuring IPv4 Policy-based Routes for a Windows ECS
- IPv6: Configuring IPv6 Policy-based Routes for a Windows ECS
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
- 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.
- Log in to the source ECS.
For details, see How Do I Log In to My ECS?
- Check whether 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.
Before configuring policy-based routes, ensure that the source ECS can use its primary network interface to communicate with the destination ECS.
- 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
- 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.
- Check whether the policy-based route is added.
If information similar to the following is displayed, the policy-based route has been added. The route is persistent and will not be lost after the ECS is restarted.
- 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
- 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.
- Log in to the source ECS.
For details, see How Do I Log In to My ECS?
- Run the following command to check whether the ECS has IPv6 enabled and has IPv6 addresses:
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.
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.
- 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.
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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot