Help Center> Direct Connect> Getting Started> Step 3: Create a Virtual Interface

Step 3: Create a Virtual Interface

Scenarios

After the connection and the virtual gateway are ready, you need to create a virtual interface so that your network can access the VPC you want to access.

Procedure

  1. Log in to the management console.
  2. On the console homepage, click in the upper left corner and select the desired region and project.
  3. Hover on to display Service List and choose Networking > Direct Connect.
  4. In the navigation pane on the left, choose Direct Connect > Virtual Interfaces.
  5. Click Create Virtual Interface.
    • Cross-account virtual interfaces are available in CN North-Beijing4, CN East-Shanghai1, and CN South-Guangzhou regions.
    • Virtual interfaces that you created for other users take effect only after other users accept them.
    Configure the parameters based on Table 1.
    Table 1 Parameters for creating a virtual interface for your own account

    Parameter

    Description

    Example Value

    Region

    Specifies the region where the connection resides. You can also change the region in the upper left corner of the console.

    CN North-Beijing4

    Name

    Specifies the virtual interface name.

    The name can contain 1 to 64 characters.

    vif-123

    Connection

    Specifies the connection you can use to connect your environment to HUAWEI CLOUD.

    dc-123

    Virtual Gateway

    Specifies the virtual gateway to which the virtual interface connects.

    vgw-123

    VLAN

    Specifies the ID of the VLAN in which the virtual interface works.

    You need to configure the VLAN if you create a connection through self-service.

    The VLAN of the virtual interface of the hosting private line uses the VLAN allocated by the carrier or partner for the hosting private line. You do not need to configure the VLAN.

    30

    Bandwidth

    Specifies the bandwidth that can be used by the virtual interface in the unit of Mbit/s. The bandwidth cannot exceed that of the connection.

    50

    Local Gateway

    Specifies the IP address for connecting to the cloud.

    10.0.0.1/30

    Remote Gateway

    Specifies the IP address for connecting to your network.

    The remote gateway must be in the same IP address range as the local gateway. Generally, a subnet with a 30-bit mask is recommended.

    10.0.0.2/30

    Remote Subnet

    Specifies the subnets and masks of your network. If there are multiple subnets, use commas (,) to separate them.

    192.168.51.0/24, 10.1.123.0/24

    Routing Mode

    Specifies the routing mode. Two options are available, static routing and BGP routing.

    If there are two connections or you want to have another connection in the future, select BGP routing.

    BGP

    BGP ASN

    Specifies the autonomous system number (ASN) of the BGP peer.

    This parameter is required when BGP routing is selected.

    12345

    BGP MD5 Authentication Key

    Specifies the password used to authenticate the BGP peer using MD5. The value is case sensitive and cannot contain spaces.

    This parameter is mandatory when BGP routing is selected, and the parameter values on both gateways must be the same.

    12345678

    Description

    Provides supplementary information about the virtual interface.

    N/A

    If you want to create a virtual interface for other users, configure the parameters based on Table 2.
    Table 2 Parameters for creating a virtual interface for other users

    Parameter

    Description

    Example Value

    Virtual Interface Account

    Specifies the account that owns the virtual interface. You create a virtual interface for another user so that this user can use your connection to access the VPC.

    Another account

    Region

    Specifies the region where the connection resides. You can also change the region in the upper left corner of the console.

    CN North-Beijing4

    Name

    Specifies the virtual interface name.

    The name can contain 1 to 64 characters.

    vif-123

    Connection

    Specifies the connection you can use to connect your environment to HUAWEI CLOUD.

    dc-123

    Project ID

    Specifies the ID of the project that the virtual gateway belongs to. On the management console, hover the cursor on the account name in the upper right corner and select My Credentials. On the My Credentials page, view the project ID.

    -

    ID

    Specifies the ID of the virtual gateway. In the virtual gateway list, hover the cursor on the virtual gateway name and view the name and ID of the virtual gateway.

    -

    VLAN

    Specifies the ID of the VLAN in which the virtual interface works.

    You need to configure the VLAN if you create a connection through self-service.

    The VLAN of the virtual interface of the hosting private line uses the VLAN allocated by the carrier or partner for the hosting private line. You do not need to configure the VLAN.

    30

    Bandwidth

    Specifies the bandwidth that can be used by the virtual interface in the unit of Mbit/s. The bandwidth cannot exceed that of the connection.

    50

    Local Gateway

    Specifies the IP address for connecting to the cloud.

    10.0.0.1/30

    Remote Gateway

    Specifies the IP address for connecting to your network.

    The remote gateway must be in the same IP address range as the local gateway. Generally, a subnet with a 30-bit mask is recommended.

    10.0.0.2/30

    Remote Subnet

    Specifies the subnets and masks of your network. If there are multiple subnets, use commas (,) to separate them.

    192.168.51.0/24, 10.1.123.0/24

    Routing Mode

    Specifies the routing mode. Two options are available, static routing and BGP routing.

    If there are two connections or you want to have another connection in the future, select BGP routing.

    BGP

    BGP ASN

    Specifies the ASN of the BGP peer.

    This parameter is required when BGP routing is selected.

    12345

    BGP MD5 Authentication Key

    Specifies the password used to authenticate the BGP peer using MD5. The value is case sensitive and cannot contain spaces.

    This parameter is mandatory when BGP routing is selected, and the parameter values on both gateways must be the same.

    12345678

    Description

    Provides supplementary information about the virtual interface.

    -

    When you configure the local and remote gateways, note the following:

    • Local gateway is used by HUAWEI CLOUD for connecting to your equipment room. After you configure Local Gateway on the console, the configuration will be automatically delivered to the gateway used by HUAWEI CLOUD.
    • Remote gateway is used by your equipment room for connecting to HUAWEI CLOUD. After you configure Remote Gateway on the console, you also need to configure the gateway deployed in your equipment room.
    • The local gateway must be in the same CIDR block as the remote gateway, and this CIDR block cannot conflict with the local subnet configured on the virtual gateway or the remote subnet configured on the virtual interface.
  6. Click Create Now.

    Ensure that the virtual interface is in the Normal state.

  7. Ping the IP address of a host in the VPC from your environment to check network connectivity.