Help Center> Virtual Private Cloud> FAQ> EIP> How Do I Access the Internet Using an EIP Bound to an Extension NIC?

How Do I Access the Internet Using an EIP Bound to an Extension NIC?

  1. 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
  2. Run the ifconfig command to view NIC information.
    Figure 2 Viewing NIC information
  3. Configure the extension NIC to enable access to the Internet through the extension NIC by default.
    1. 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.

    2. Run the following command to configure the default route for the extension NIC:

      route add default gw 192.168.17.1

  4. 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