Install xNIC on Windows

Prev Next

WHAT TO EXPECT

The xNIC is a lightweight service that must be installed on every VM sending or receiving multicast traffic to and from a cloudSwXtch. An xNIC should not be installed on a cloudSwXtch or a cloudSwXtch Bridge VM. 

In this article, users will learn how to install the xNIC software on Windows systems. 

Installing xNIC for Windows

BEFORE YOU START

Review xNIC System Requirements

Firewall Restrictions
The Windows installation process adds rules to Windows Defender Firewall, which allow for traffic through the UDP ports 10800 and 9999. The rule names can be anything, but they should reflect their usage, for example, swXtchControl for 10800 and swXtchData for 9999.

Before installation

Verify network connectivity to the cloudSwXtch instance by "pinging" the switch.

ping <cloudSwXtch-instance-name or cloudSwXch-ctrl-IP>

If the ping fails to find the cloudSwXtch instance by name, try pinging the IP address of the cloudSwXtch instance. If the IP works, then use the IP address in place of the <switch-instance-name> in all further commands. This can happen if the DNS settings are not configured for the virtual network.

If the ping command still fails using the IP, the VM may not have a direct connection to the cloudSwXtch and can potentially fail trying to download the installation script. Check the firewall rules and the security groups on the cloud.

Running the Install script

To make installation easy, the xNIC is installed from the cloudSwXtch instance via a one-time set of shell commands. The xNIC is matched to the attached cloudSwXtch instance and should be reinstalled if the cloudSwXtch version changes.

The xNIC takes less than a minute to install on an existing VM.

To run the install

  1. Open a PowerShell terminal on the Windows VM where the xNIC software will be installed. If it’s a Windows 11 VM, the user can use Windows Terminal for installation.

    1. The installer script will automatically remove any firewall restrictions to UDP ports 10800 and 9999. The cloudSwXtch sends UDP packets to these ports as part of normal operation. 

      Special Rules for Windows Defender Firewall

      It is recommended to simply turn off the firewall. Additionally, users can open up additional ports for producing/consuming multicast traffic by using the following command in PowerShell:

      New-NetFirewallRule -Name 'rule_name' -DisplayName 'rule_name' -Enabled True -Direction Inbound -Protocol UDP -Action Allow -LocalPort 1234
  2. Download the installer script in Powershell as an administrator:

    Invoke-WebRequest -Uri 'http://<cloudSwXtch-ip>/swx/services/install/swx-xnic-install.ps1' -Outfile swx-xnic-install.ps1
  3. Run the installer script:

    ./swx-xnic-install.ps1

For other xNIC types see How to determine correct xNIC Type:

Additional Arguments

There are additional options when installing the xNIC. To see these options, use the -h argument. 

The ctrl- and data- interfaces are from the VM where the xNIC is installed. These will be set automatically by the installer. There may be some instances where you will need to specify them. For example, if you have three network interfaces and you want to specify what you want to use for ctrl or data, you can manually select them using the -ctrl_interface <interface index> or -data_interface <interface index> arguments detailed below.

Note: There is an option (-t) for users to switch between xNIC Type 1, 2 (default), or 3. All installation instructions and system requirements are solely for Type 2.

PS C:\Users\Administrator> .\swx-xnic-install.ps1 -h
Usage: C:\Users\Administrator\swx-xnic-install.ps1 [OPTIONS]
  -t <1|2>                              xNIC type to install (default: 2 if supported in this OS, 1 otherwise)
  -u                                    uninstall xNIC only (no other options allowed)
  -ctrl_interface <interface index>     manually select nic for control interface
  -data_interface <interface index>     manually select nic for data interface
  -ptp                                  installing of Precision Time Protocol (default: false)  **At this time PTP  can only be manually installed please contact support@swxtch.io for further instructions. 
  -verify <publickey file>              verify install package with respective signature file
  -override_src_ip                      override the source IP of incoming packets (default: false)
  -persist                              keep persistence folder (default: do not keep it)
  -h                                    shows this help

Please note: The ctrl_interface and data_interface commands should only be used in complex configurations where the installer cannot locate them. Contact support@swXtch.io for more information. 

Getting the interface index for ctrl_interface and data_interface 

To get the interface index, you can run the following command:

get-netipconfiguration

A sample of the response will be returned with the InterfaceIndex (***) listed for both:

PS C:\Users\testadmin> get-netipconfiguration

InterfaceAlias       : Ethernet
InterfaceIndex       : 36 ***
InterfaceDescription : Microsoft Hyper-V Network Adapter
NetProfile.Name      : Network
IPv4Address          : 10.2.128.75
IPv6DefaultGateway   :
IPv4DefaultGateway   : 10.2.128.1
DNSServer            : 168.63.129.16

InterfaceAlias       : Ethernet 2
InterfaceIndex       : 60 ***
InterfaceDescription : Microsoft Hyper-V Network Adapter #2
NetProfile.Name      : Unidentified network
IPv4Address          : 10.2.192.82
IPv6DefaultGateway   :
IPv4DefaultGateway   :
DNSServer            : 168.63.129.16

The installer script will install a Windows service called swXtchNIC.

In some cases, you may need to reboot your machine once the installation is complete. In most cases, closing the PowerShell console and starting it again is enough. This enables execution of  cloudSwXtch tools properly from your user home directory, such as swx-top

Testing

The installation includes a set of utility applications that you can use to verify the operation of your cloudSwXtch network. Refer to the Tools and Testing page for details.

  • swx-top.exe: An application to display real-time statistics of the cloudSwXtch instance.

  • swx-perf.exe: An application to produce and consume multicast traffic for testing purposes.

Running swx-top on Windows

swx-top -swxtch <cloudSwXtch-hostname or ip>
  • <cloudSwXtch-hostname>: the name of your existing or "host" cloudSwXtch, or the IP of the cloudSwXtch


Uninstalling xNIC on Windows

To uninstall xNIC on Windows, users can follow the steps in the Uninstall xNIC on Windows guide. 

Upgrading xNIC on Windows 

To upgrade xNIC on Windows, users can follow the steps in the Upgrade xNIC on Windows guide.