How Do I Access the Internet Using an EIP Bound to an Extension NIC?
- After an EIP is bound to an extension NIC, log in to the ECS and use the route command to query the routes.
You can run route --help to learn more about the route command.
Figure 1 Viewing route information
- Run the ifconfig command to view NIC information.
Figure 2 Viewing NIC information
- Enable access to the Internet through the extension NIC by default.
- Run the following command to delete the default route of the primary NIC:
route del -net 0.0.0.0 gw 192.168.11.1 dev eth0
192.168.11.1 is the gateway of the subnet that the NIC works. You can view the gateway on the Summary tab page of the subnet on the management console.This operation will interrupt ECS communication. It is recommended that you perform the configuration by following step 4.
- Run the following command to configure the default route for the extension NIC:
- Run the following command to delete the default route of the primary NIC:
- Configure Internet access from the extension NIC based on your destination address.
Run the following command to configure access to a specified CIDR block (for example, xx.xx.0.0/16) through the extension NIC:
You can configure the CIDR block as required.
route add -net xx.xx.0.0 netmask 255.255.0.0 gw 192.168.17.1
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.