Skip to main content

How to bind a VNet to a Direct Connect

Binding a VNet to a Direct Connect plugs the VNet router into the dedicated link and gives it an address in a small network shared with your firewall. From then on, the VNet can reach the networks on your side through the static routes you create.

Prerequisites​

  • A Direct Connect with the status OK in Customer Connect → Direct Connect. If there is none, see How a Direct Connect reaches you.
  • A VNet in the same VDC.
  • Your firewall connected to the link, on the VLAN your provider set up for you.
  • The customer-connect:direct_connect:manage permission.

Plan the addressing​

Choose a small private network for the connection and split it between the VNet router and your firewall:

  • Local IP (CIDR): the router address, with the mask. Example: 172.16.1.1/30.
    • It must be in a private range: 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16.
    • The mask must leave room for two addresses: /31 or a larger network such as /30 or /29. A /32 is refused.
    • It cannot be the network address or the broadcast address of that network.
  • Remote IP: your firewall address, without the mask. Example: 172.16.1.2.
    • It must be inside the network of the Local IP, and it cannot be the network address, the broadcast address or the Local IP itself.

Examples:

Local IP (CIDR)Remote IPResult
172.16.1.1/30172.16.1.2Accepted
172.16.1.1/30172.16.1.5Refused: 172.16.1.5 is outside 172.16.1.0/30
172.16.1.0/30172.16.1.2Refused: 172.16.1.0 is the network address
172.16.1.1/30172.16.1.3Refused: 172.16.1.3 is the broadcast address
172.16.1.1/32172.16.1.2Refused: the mask must allow at least two addresses
200.1.1.1/30200.1.1.2Refused: not a private range

Within the same Direct Connect, the networks cannot collide:

  • the connection network cannot overlap the network of another VNet bound to it, nor the connection network of another connection (backup networks included);
  • the VNet you are binding cannot overlap the VNets already bound to it, nor their connection networks.

Also keep the connection network apart from the VNet network and from the networks on your side, so that each address has only one way to go.

Thinking of a backup peer?

A /30 only fits the router and one firewall. If a second firewall will share the same network, use a /29 now. The other option is to give the backup a network of its own later. See How to set up failover for a Direct Connect connection.

Bind the VNet​

  1. Open Customer Connect → Direct Connect and click the Direct Connect.

    Direct Connect list, with the Direct Connect menu item and the dc-recife row highlighted

  2. In Active Connections, click Bind VNet. You can also use the row menu (⋯) of the Direct Connect in the list and click Bind VNet there.

  3. In Bind VNet to Direct Connect, fill in:

    • Virtual Network: the VNet to bind. The list shows each VNet with its network.
    • Local IP (CIDR): the router address, such as 172.16.1.1/30.
    • Remote IP: your firewall address, such as 172.16.1.2.

    Bind VNet to Direct Connect dialog with the vnet-app VNet, Local IP 172.16.1.1/30 and Remote IP 172.16.1.2 filled in

  4. (Optional) Fill in the Backup peer section to add a second firewall now. Leave it empty to use only the primary peer; you can add the backup, or an IPsec, later on the page of the connection.

  5. Click Confirm.

The connection appears in Active Connections with the status BINDING and, after a few seconds, BOUND.

Active Connections table with vnet-app bound, Local IP 172.16.1.1/30, Remote IP 172.16.1.2, the router MAC address and the status BOUND

Configure your side​

On your firewall:

  • Give the link interface (on the VLAN of the link) the Remote IP with the same mask as the Local IP, such as 172.16.1.2/30.
  • Create a route to the VNet network (such as 10.20.0.0/16) through the Local IP (such as 172.16.1.1).
  • Allow, in your own rules, the traffic between your networks and the VNet.

On the platform: