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 run the route command to query the route.
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
- Configure the extension NIC to 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 0.0.0.0 192.168.11.1 dev eth0
This operation will interrupt ECS communication. Exercise caution when performing this operation. 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 network segment (for example, xx.xx.0.0/16) through the extension NIC:
You can configure the network segment as required.
route add -net xx.xx.0.0 netmask 255.255.0.0 gw 192.168.17.1
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.