Skip to main content

Set up an Internet connection from a third-party carrier

Last update:

The connection is organized over a private network at the L3 level through a global router. To organize the connection, you create a global router network — connect devices that need internet from the operator to the global router. A docking subnet is added to the global router network with the operator's router, and NAT is configured on the operator's router for access from the private network to the Internet.

When you connect to the Internet using Direct Connect, you cannot assign public IP addresses from the operator's pool to your servers. To do this find another way to connect to the Internet.

  1. Check that you have connected the Direct Connect service — physical port.
  2. Check or create a global router network.
  3. Connect the Direct Connect network to a global router.
  4. Check the settings on the operator side.
  5. Configure routing to the Direct Connect subnet on the global router network.
  6. Configure routing to the Internet on the global router.

1. Check that the Direct Connect service is connected — physical port

  1. Make sure that in the ticket On ordering the service, you received a VLAN number to which the operator's port will be added.
  2. Make sure that this VLAN appears in control panels: from the top menu, press ProductsDedicated serversNetwork → tab VLAN.

2. Verify or create a global router network

Make sure that your account has a global router network and includes all devices from which you want to access the Internet through your carrier. To see the global routers and their networks created, go to control panels under Network servicesSelectel Global Router.

If you do not already have a global router network or want to create a new one, use the instructions Create a private connection through a global router.

3. Connect the Direct Connect subnet to the global router

  1. В control panels from the top menu, press Products and select Selectel Global Router.
  2. Open the router page → tab Networks.
  3. Click Create a network.
  4. Enter a network name, this will only be used in the control panel.
  5. Select a service Servers and hardware.
  6. Select pool that you entered into the ordering Direct Connect service — physical port.
  7. Select the VLAN to which the operator port has been added. You can see the VLAN number in the ticket you received when you ordering Direct Connect service — physical port. If the port on the carrier router is configured in trunk mode, specify the Q-in-Q tag, a number between 2 and 4094.
  8. Enter the subnet name — this will only be used in the control panel.
  9. Enter the CIDR — IP address and mask of the private subnet. You can select any addressing that does not overlap with other subnets on the global router.
  10. Enter the gateway IP address or leave the first address from the subnet assigned by default. Do not assign this address to your devices to avoid disrupting the network.
  11. Enter service IPs or leave the last addresses from the subnet assigned by default. Do not assign these addresses to your devices to avoid disrupting the network.
  12. Click Create a network.
  13. Optional: check the network topology on the global router. В control panels from the top menu, press ProductsSelectel Global Router → router page → tap Network map.

4. Check the settings on the operator side

Contact the operator and make sure they have made the settings on their side:

  • assigned to the router an IP address from the Direct Connect subnet that you plugged into a global router. The address must not be the same as the gateway address and service addresses you selected when connecting. You can view the gateway address and service addresses in the control panels: from the top menu, press ProductsSelectel Global Router → router page → open the network card to which the subnet belongs → field Gateway.
  • configured the router to NAT from an IP address on the Direct Connect subnet to a public IP address from its address pool.

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

On all devices on the global router network, write static routes to the Direct Connect subnet that plugged into a global router.

As next-hop, specify the IP address from the device's subnet that is assigned to the global router as the gateway. You can view the gateway address in control panels: from the top menu, press ProductsGlobal router → global router page → open the network card to which the subnet belongs → field Gateway.

  1. Connect to the server.

  2. Open the network configuration file with a text editor vi:

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

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

    Specify:

    • <ip_address>/<mask> — The IP address of the Direct Connect subnet that you plugged into a global router with an indication of the mask;
    • <gateway> — gateway for the current server subnet, which is specified on the global router.
  4. Press the key ESC.

  5. Exit the text editor vi with the changes intact:

    :wq
  6. Check the settings:

    sudo netplan try
  7. Apply the changes:

    netplan apply

6. Configure routing to the Internet on a global router

Configure a route on the Internet to the default network 0.0.0.0/0. You can specify a static route or configure dynamic routing via BGP.

  1. В control panels go to Network servicesSelectel Global Router.
  2. Open the router page → tab Static routes.
  3. Click Create a route.
  4. Enter a route name — any name, it will only appear in the control panel.
  5. Enter the CIDR of the destination subnet — 0.0.0.0/0.
  6. Enter the Next hop IP address — the IP address from the Direct Connect subnet that is assigned to the carrier router.
  7. Click Create.