Skip to main content

Configure connection to infrastructure outside Selectel

  1. Make sure you have connected the Direct Connect – physical port service.
  2. Make sure that a global router network is created in your account and includes all devices that need to be connected via the carrier channel to your external infrastructure.
  3. Connect the Direct Connect network to the global router.
  4. Assign an IP address from the Direct Connect subnet to the router in the external infrastructure.
  5. Configure routing to the Direct Connect subnet in the global router network.
  6. If there are multiple subnets behind the external router, configure routing on the global router.

1. Check service connection

Check that in the service order ticket you received a VLAN ID and this VLAN appeared in the Control panel: in the top menu, click Products → Dedicated Servers → Network → VLANs tab.

2. Check or create a global router network

Make sure that your account has a global router network and includes all devices that need to be connected to the external infrastructure. You can view created global routers in the Control panel: in the top menu, click Products → Global Router.

If you do not have a global router yet or need to create a new one, use the Create private connectivity via global router instructions.

3. Connect the Direct Connect network to the global router

  1. In the Control panel, in the top menu, click Products and select Global Router.
  2. Open the router page → Networks tab.
  3. Click Create network.
  4. Enter a network name. It will only be used in the control panel.
  5. Select the Servers and Hardware service.
  6. Select the network location — the region and pool you specified when ordering the Direct Connect – physical port service.
  7. Select or enter the VLAN to which the carrier port is added. You can find the VLAN ID in the ticket you received when ordering the Direct Connect – physical port service.
  8. If a trunk port is configured on the provider side, specify a Q-in-Q tag—a number from 2 to 4094.
  9. Enter the subnet name. It will only be used in the control panel.
  10. Enter the CIDR—the IP address and mask of the private subnet. You can choose any addressing that does not overlap with other subnets on the global router and with subnets used in your external infrastructure.
  11. Enter the gateway IP address or leave the first address of the subnet, which is assigned by default. Do not assign this address to your devices so as not to disrupt network operation.
  12. Enter service IPs or leave the last addresses of the subnet, which are assigned by default. Do not assign these addresses to your devices so as not to disrupt network operation.
  13. Click Create network.
  14. Optional: check the network topology on the global router. In the Control panel, in the top menu, click Products → Global Router → router page → Network map.
  15. If you specified a Q-in-Q tag, make sure you enabled Q-in-Q on the switch port for the VLAN you specified in step 7.

4. Assign an IP address to the router in the external infrastructure

Assign an IP address from the Direct Connect subnet that you connected to the global router to the router in your external infrastructure.

The address must not match the gateway address or the service addresses you selected during connection. You can find the gateway address and service addresses in the Control panel: in the top menu, click Products → Global Router → global router page → open the card of the network that the subnet belongs to → Gateway field.

5. Configure routing to the Direct Connect subnet in the global router network

On all devices in the global router network, configure static routes to the Direct Connect subnet that you connected to the global router.

As the next hop, specify the IP address from the device subnet assigned to the global router as the gateway. You can view the gateway address in the control panel: in the top menu, click Products → Global Router → global router page → open the card of the network the subnet belongs to → Gateway field.

  1. Connect to the server.

  2. Open the network configuration file in the vi text editor:

    vi /etc/netplan/01-netcfg.yaml
  3. At the end of the data block for the required network interface, add a route:

    routes:
    - to: <ip_address>/<mask>
    via: <gateway>

    Specify:

    • <ip_address>/<mask> — IP address of the Direct Connect subnet you connected to the global router, specifying the mask;
    • <gateway> — gateway for the subnet of the current server specified on the global router.
  4. Press the ESC key.

  5. Exit the vi text editor, saving the changes:

    :wq
  6. Check the settings:

    sudo netplan try
  7. Apply the changes:

    netplan apply

6. Configure routing on the global router

If several subnets are located behind the router in your external infrastructure, add static routes to each of them or configure dynamic routing via BGP.

  1. In the Control panel, in the top menu, click Products and select Global Router.
  2. Open the router page → Static routes tab.
  3. Click Create route.
  4. Enter a route name—any name, it will only be displayed in the control panel.
  5. Enter the CIDR of the destination subnet—this is the subnet located behind the router in your external infrastructure.
  6. Enter the Next hop IP address — the IP address from the Direct Connect subnet that you assigned to the router in the external infrastructure.
  7. Click Create.