Skip to main content

Network Configuration

Transcription:BatchReal-TimeDeployments:Virtual Appliance

Before starting the Virtual Appliance for the first time, it is important to consider the network settings that will be used. The section below describes the options.

Network Interface Mapping

Whilst the Virtual Appliance is powered off, the virtual network adaptor should be mapped to the correct physical adaptor on the host. The virtual interface must be mapped to a physical adaptor on which the Speechmatics Virtual Appliance will be contacted. Steps are provided below for the supported hypervisors.

VMware ESXi

There is nothing to configure here. The network as specified during the import stage described above will be used.

VMware Workstation Player

Speechmatics recommends using bridged network mode. To ensure bridged networking is selected:

  • Open VMware Workstation Player
  • Right-click on the Virtual Appliance e.g. "SM_App_01", and select "Settings..."
  • Select the "Network Adapter" in the devices list
    • Select "Bridged: Connected directly to the physical network"
  • Click "OK"

This will result in the VM using an IP Address for its use that is independent from that of the host.

VirtualBox

Speechmatics recommends using bridged network mode. To ensure bridged networking is selected:

  • Open VirtualBox
  • Right-click on the Virtual Appliance and select "Settings..."
  • Select "Network" and from the "Attached to:" dropdown box, select "Bridged Adaptor"
  • Click "OK"

This will result in the VM using an IP Address for its use that is independent from that of the host.

IP Configuration

When the Speechmatics Virtual Appliance is started, the default behavior will be to dynamically acquire an IP address. If there is no DHCP service available on the network, it will fall back to an IP address automatically assigned.

The IP address information can be viewed by opening the Virtual Appliance console once it has booted, as shown below. Console banner

The screenshot above shows the 10.10.10.2 IP address as the fallback address. The other address shown was allocated by DHCP and should be used for all communication.

If DHCP cannot be used, a static IP address can be configured as described below.

Configure static IP

To configure a static IP address, the Management REST API for the Virtual Appliance is used. The following information is required:

  • Method: POST
  • URL:
    http://${APPLIANCE_HOST}:8080/v1/management/host/setipaddress
  • Body Format: JSON
  • Body: address, netmask, gateway, nameservers

Where ${APPLIANCE_HOST} is the hostname or IP address of your Virtual Appliance.

The example below shows use of Postman (available for free from the Chrome Web Store) to POST new IP settings.

Postman Set IP address

You can optionally specify a list of nameservers to use (if none are specified then, 8.8.8.8 is used), for example this time using Curl from the command line to make the POST request:

curl -L -X POST 'http://${APPLIANCE_HOST}:8080/v1/management/host/setipaddress' \
   -H 'Accept: application/json' \
   -H 'Content-Type: application/json' \
   -d '@network-config.json'

In this example, a local file network-config.json is used for the JSON configuration:

{
  "address": "192.168.128.96",
  "netmask": "255.255.255.0",
  "gateway": "192.168.4.1",
  "nameservers": ["208.67.222.222", "208.67.220.220"]
}

NOTE: once the POST is sent, the Virtual Appliance will automatically reboot. Check the console to verify the new IP address has been applied.

Configure DHCP IP

To configure a dynamic IP address using DHCP, the admin REST API is used as follows:

  • Method: POST
  • URL:
    http://${APPLIANCE_HOST}:8080/v1/management/host/setdhcp
  • Body format: JSON

The example below shows how to use Postman to POST to the REST API in order to configure a DHCP address.

Postman set DHCP

curl -L -X POST 'http://${APPLIANCE_HOST}:8080/v1/management/host/setdhcp' \
  -H 'Accept: application/json'

NOTE: once submitted, the Virtual Appliance will automatically reboot. Check the console to verify the new IP address has taken affect.