WHAT TO EXPECT
In this article, users will learn how to configure Bridge 2 and 3 for High Availability.
Configuring cloudSwXtch Bridge Type 2 and 3 for High Availability
After a user sets up their cloudSwXtch for High Availability, the cloudSwXtch Bridge will automatically configure itself to receive and/or send HA traffic for a single multicast group. Users can confirm high availability has been configured by viewing the swxtch-bridge.json file in the VM where their cloudSwXtch Bridge resides.
Reminder: A cloudSwXtch Bridge can only exist on a Linux machine.
Where to Find the Bridge JSON File
To configure the cloudSwXtch Bridge for high availability streams, the swxtch-bridge.json file needs to be updated. See where to locate them below:
Linux:
The file can be found in /var/opt/swxtch/swxtch-bridge.json. To edit the file, use nano as shown below:
sudo nano /var/opt/swxtch/swxtch-bridge.json
Single Multicast Group
An example of the swxtch-bridge.json file is shown below. Note the ha section has been added. While it may look similar to the xnic.json file, there are a number of differences. One noteworthy addition is the "producer" and "consumer" fields in the ha section.
{
"swxtch": "10.2.128.10",
"controlInterface": "Ethernet 2",
"dataInterface": "Ethernet",
"dataPort": 9999,
"xnicType": 2,
"dataPlaneSpecs": {
"verbosity": 0,
"virtualInterface": {
"name": "swxtch-tun0",
"ip": "172.30.0.0",
"subnet": "255.255.0.0",
"mtu": 4096
},
"ha": {
"producer" : false,
"consumer": false,
"maxTimeToBufferPacketsMs": 50,
"bufferSizeInPackets": 131072,
"protocol": "swxtch"
},
"statsReportWait": 60
}
It is important to imagine configuration from the perspective of the cloudSwXtch Bridge. At default, both the producer and consumer is set to false. Switching either to true will change the direction of the high availability.
If the producer is set to true, the cloudSwXtch Bridge is producing duplicate streams taken from on-prem applications and sending to cloudSwXtches in the cloud.
If the consumer is set to true, the cloudSwXtch Bridge is receiving duplicate streams from the cloud. However, unlike the xNIC, it does not do the deduplication and will send both streams to the on-prem applications.
Whether it is producer or consumer, one of them has to be set to true in order to activate high availability via the cloudSwXtch Bridge.
Once a selection has been made, a user must restart the cloudSwXtch Bridge control service by running the following command:
Bridge Type 3:
sudo systemctl restart swxtch-bridge3-ctrl
Bridge Type 2:
sudo systemctl restart swxtch-bridge2.service
Multiple Multicast for cloudSwXtch Bridge
If a user wants to set up Multiple Multicast groups for cloudSwXtch Bridge, they will need to manually configure the swxtch-bridge.json file by changing the protocol under ha to "rtp" and adding the "streamSpecs" section. This process is similar to configuring the xNIC for multiple multicast groups.
How to update swxtch-bridge.json file for Multiple Multicast Groups:
The user will have to make the following changes to their swxtch-bridge.json file found in the single multicast group configuration to match the example above. These alterations to the swxtch-bridge.json file should happen after Configuring the cloudSwXtch for High Availability.
1. Change the protocol under ha from "swxtch" to "rtp" including the quotation marks.
2. For each multicast group, add the following "streamSpecs" section as shown below with your parent and children groups listed. Note: A user can enter multiple multicast groups.
},
"streamSpecs": {
"mmcProducerEnable": false,
"multipleMulticastGroups": [
{
"parent": "239.2.2.2:8804",
"children": [
"239.1.1.1:8804",
"239.1.1.2:8804"
]
},
{
"parent": "239.3.3.3:8804",
"children": [
"239.1.1.3:8804",
"239.1.1.4:8804"
]
}
]
},
3. Save the swxtch-bridge.json file.
4. Restart the cloudSwXtch Bridge control service by running the following command in Linux:
Bridge 3
sudo systemctl restart swxtch-bridge3-ctrl
Bridge 2
sudo systemctl restart swxtch-bridge2.service