Configure NetSpeek Edge with Static IP Address

This guide provides step-by-step instructions on how to configure a static IP address for the NetSpeek Edge Virtual Machine when you’re connected to it via Terminal view in your Hypervisor (or via SSH, if enabled) for Edge VM version 1.1 or later. If you’re looking for the connectivity requirements the NetSpeek platform requires to external services and devices being orchestrated, visit: https://docs.netspeek.ai/onboarding-and-platform-usage/network-and-firewall-requirements/

Note

The instructions for older versions of the Edge VM (Beta6 and earlier) are linked at the bottom of the page. This document specifically and exclusively addresses the modern (version 1.1 and newer) Edge VM distributed as an Open Virtual Appliance package (in .ova format).


Determining whether to use static IP, DHCP, or DHCP Reservation for your NetSpeek Edge VM

Network administrators take different approaches to assigning IP address. Typically infrastructure or VM components like the NetSpeek Edge VM will be assigned a static IP address, which is the primary focus of this document.

However, some administrators may choose to use either DHCP (where the IP address assigned may change), or an approach known as DHCP reservation (where the IP address is assigned dynamically by a DHCP server at first, and then “reserved” for the device it was assigned to). The decision about how to assign and manage IP addresses within your network is controlled by your network administrator.

While NetSpeek expects most Edge VMs to be assigned static IPs, for installation convenience the Edge VM will request an address via DHCP upon bootup, unless a static IP has been configured. The remainder of this introduction (after the login portion) shows examples of an Edge VM connecting to a network with and without DHCP services available.

Note that regardless of network connectivity, the Edge VM will present a login prompt in the Terminal view of your hypervisor. You must use the username and unique password for your VM instance provided by NetSpeek. (Note that two credentials are provided with your VM – this prompt requires the SSH/Terminal name and password, not the WebUI Passcode.)

The login prompt in the terminal view of the NetSpeek Edge VM, as shown in a hypervisor, before any credentials have been input
The same interface as above, following a successful login

To determine if an IP address has been assigned, run the command ip a as shown in the two examples below.

The ip a command run while connected to a network with no DHCP server available. Note that other information about the VM’s network interfaces is provided, but there is no valid IP address assigned because the network hasn’t provided one, and this static IP procedure hasn’t been done yet.
Same ip a command as above, but the network has an active DHCP server and assigned the IP address 192.168.10.12 to this Edge VM.

Identify Interfaces

You will first need to identify the VM’s active network interface and then create a relevant configuration.

Run ip -c link show or ip a to find the name of your interface (e.g.enp0s3 or ens18).

Both the ip a command in the initial examples, and the ip -c link show command shown here, indicate that the network interface on this Edge VM is labeled enp0s3

Create Configuration File:
Create a new file in /etc/systemd/network/ ending with .network. Using a numeric prefix such as how “10” is used in this example below (to identify the 192.168.10.x network being assigned), is optional but can help with recognition, and ordering in the event that multiple network assignments are eventually desired.

Enter the following two commands (pressing Enter after each) on subsequent lines of the command prompt:
bash
sudo -i

Note that the use of sudo changes the level of access you have to the Edge VM (now root)

Enter the following command (replacing 10 with your desired number, or omitting the number, per your preference) and press Enter:

nano /etc/systemd/network/10-static.network

The nano file editor program opens, and you are working in a file with the name given in the command above. Add the following, replacing enp0s3 with your adapter name (paying close attention to number 0 vs letter O distinctions) if needed, and the network connectivity details with appropriate information for your network (scroll down to see an example image of the nano editor with configuration entered):

[Match]

Name=enp0s3

[Network]

Address=192.168.10.5/24

Gateway=192.168.10.1

DNS=8.8.8.8

DNS=1.1.1.1

The relevant configuration has been entered, but we still need to save the file and exit the nano editor.

Press CTRL + O followed by Enter to save (what nano calls “Write Out”) the file:

Note

The first action is to hold the CTRL (or Control) key and subsequently press the letterO”, then the nano editor will display the current filename at the bottom of the screen. Release Ctrl and O, and then press Enter or Return to confirm the filename and save your changes, as shown in detail below.

CTRL + O has been pressed – see the highlighted area at the bottom of the window where nano confirms the file you’re about to save.
Enter has been pressed – see the highlighted area where nano confirms the number of lines of configuration written into your file.

Press CTRL + X to exit nano and return to the command line.

CTRL + X has been pressed, exiting nano and returning to the command line (see lower left of the image)

Restart Networking Services to use the new IP address

After the interface is configured to this point, the VM’s network service must be restarted with the command below before the new IP address will be utilized. (Note, this does not restart the entire Edge VM, only the networking services within the VM.)

sudo systemctl restart systemd-networkd.service

The first highlighted area shows the command to restart network services. Afterward, the ip a command is run, and the second highlighted area shows the newly configured network information is now being used by the VM.

Verify connectivity and test configuration resiliency

You may wish to verify network connectivity is operational at the newly configured IP address by accessing the Edge VM’s local webpage. To this do, navigate to: http://<vm-ip>:8080 noting that HTTP (not HTTPS) is, used and the port 8080 must be specified.

Note

If your browser defaults to HTTPS (which is certificate-secured connections to websites), you will need to manually specify an HTTP URL, including the port 8080, precisely as described in the example above. The NetSpeek Edge does not support HTTPS connections to the web UI in order to avoid browser compatibility problems with self-signed certificates.

Taking the HTTP and port 8080 requirements together to construct a URL, to access a VM assigned the address 192.168.10.5 in our example, the login URL would be:

http://192.168.10.5:8080

A redirect adding more text to the URL bar is normal – the primary purpose of this test is simply to confirm the Edge VM is active on the network at the new IP address configured in this procedure – this webpage displaying at all serves that purpose.

You may wish to test the resiliency of this configuration by rebooting the Edge VM, or the host/hypervisor the VM is running on, to simulate power loss and recovery, and ensure the Edge is still accessible and the systemd configuration is still intact afterward.


This guide is for Edge VMs version 1.1 and later, distributed as .OVA files. The procedure is different than in previous Edge VM versions – this document describes editing files in the /etc/systemd/network file path, whereas older Edge VMs held this configuration in /etc/network/interfaces.

Prior instructions (for the legacy pre-OVA Edge VM, version Beta6 and earlier) are found here: https://docs.netspeek.ai/netspeek-edge-installation-guide/legacy-netspeek-edge-documentation/configure-legacy-netspeek-edge-with-static-ip-address/