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:managepermission.
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/12or192.168.0.0/16. - The mask must leave room for two addresses:
/31or a larger network such as/30or/29. A/32is refused. - It cannot be the network address or the broadcast address of that network.
- It must be in a private range:
- 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 IP | Result |
|---|---|---|
172.16.1.1/30 | 172.16.1.2 | Accepted |
172.16.1.1/30 | 172.16.1.5 | Refused: 172.16.1.5 is outside 172.16.1.0/30 |
172.16.1.0/30 | 172.16.1.2 | Refused: 172.16.1.0 is the network address |
172.16.1.1/30 | 172.16.1.3 | Refused: 172.16.1.3 is the broadcast address |
172.16.1.1/32 | 172.16.1.2 | Refused: the mask must allow at least two addresses |
200.1.1.1/30 | 200.1.1.2 | Refused: 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.
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
-
Open Customer Connect → Direct Connect and click the Direct Connect.

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

-
(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.
-
Click Confirm.
The connection appears in Active Connections with the status BINDING and, after a few seconds, 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 as172.16.1.1). - Allow, in your own rules, the traffic between your networks and the VNet.
On the platform:
- Create the static routes to the networks on your side. Without them, the VNet only reaches the connection network.
- Allow the traffic in the VNet firewall.
- Run a Health Check to confirm the router reaches your firewall.