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.
In this article, users will learn how to install the xNIC software on Windows systems.
Installing xNIC for Windows
BEFORE STARTING
Review the xNIC System Requirements page.
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.
If the VM has a different Firewall, users should manually change the configuration to allow the needed ports.
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
Open a terminal on the Windows VM (PowerShell or Windows Terminal), and run the following commands, which will download the installation script and then execute it:
Invoke-WebRequest -Uri 'http://<cloudSwXtch-ip>/swx/services/install/swx-xnic-install.ps1' -Outfile swx-xnic-install.ps1
./swx-xnic-install.ps1The installer script will automatically open UDP ports 10800 and 9999. The cloudSwXtch sends UDP packets to these ports as part of normal operation.
Additional Arguments
There are additional options when installing the xNIC. To see these options, use the -h argument.
Note that the control and data interfaces are from the VM in which the xNIC is installed. These will be set automatically by the installer. Under some circumstances, the user may need to manually specify them. For example, if there are three NICs, the user may need to instruct the installer which interface to use for control, and which for data..This can be manually selected using the --ctrl_interface <interface index> or --data_interface <interface index> arguments. Also, these arguments help in complex contexts where the agent is in a different vNet/VPC from the cloudSwXtch.
Getting the interface index for ctrl_interface and data_interface
To get the interface index, you can run the following command:
get-netipconfigurationA 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.16Note: There is an option (-t) for users to switch between xNIC Type 1 or 2 (default). All installation instructions and system requirements are solely for Type 2. Refer to How to choose the correct xNIC type for more information on the types.
A full list of arguments is detailed below:
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 helpPrecision Time Protocol Installation
At this time PTP can only be manually installed please contact support@swxtch.io for further instructions.
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.
Additional resources
For other xNIC types, see the How to determine correct xNIC Type page.
For opening firewall ports, see How to open Firewall ports on VMs page.
Testing
xNIC installation includes a set of utility applications that can be used to verify the operation of the cloudSwXtch network. Refer to Tools and Testing for details.
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.