NOTE: These are general guidelines and your specific configuration may differ depending on the hardware being used. We recommend having a qualified network engineer with experience in multicast systems review the overall network configuration.
In order to use ViconNet in a Multicast environment the following changes must be made:
A. Configuring ViconNet to use multicast.
In order to configure ViconNet for Multicast mode an entry must be added in the "ThirdParty.ini" file found in the "\ViconNet\VnData\Settings\Config" folder. The entry can be added at the top or bottom of the file. This should not be done while ViconNet is still running; it is also recommended to clear the cache folder and to delete any VNBackup folders found on the system. In the event that the "ThirdParty.ini" file does not exist it can be manually created using notepad and saving the file as an .ini file. The multicast entry must be created for each driver(vendor) that is expected to use multicast, for example [Onvif] would constitute one entry and others such as [iqeye] would also require their own separate entry in the "ThirdParty.ini" file. Please note that once the entry is added for a specific vendor such as "Onvif" ViconNet will only try to communicate via Multicast with any devices which make use of that driver. The true way to know if ViconNet is communicating through multicast is to use a network analyzer such as Wireshark since ViconNet will still communicate via unicast with any IP devices including those which are set to Multicast, only the video stream traffic is sent via multicast, for example any Onvif or RTSP commands will still take place over unicast. Any devices making use of drivers which have not been configured for multicast will continue to communicate and stream over unicast. Devices using ViconNet protocol will need to be configured to use multicast via VNSetup. It is also important to note that if the network has not been configured for multicast it is likely that cameras will display a red x on the site list after having switched into multicast mode. This is most likely related to network misconfiguration; typically at the switch level but can be more involved depending on the size of the network. Wireshark is instrumental when troubleshooting multicast networks and it is highly advised to make use of it during any of the troubleshooting.
The entry needed to enable multicast in ViconNet for Onvif protocol cameras is:
Please reach out to technical support for further info on how to do this.
B. Multicast Networks.
When working with multicast there are a number of conditions that must be met before traffic will flow properly. In the event that the nodes are connected to an unmanaged switch there is nothing to be done on the network side unless there is any routing involved. When working with managed switches such as Cisco, it is important to configure the switch properly to allow the flow of multicast traffic, there are several options which could be implemented but it will ultimately depend upon the topology of the network and the capabilities of the hardware being used.
Multicast will not work on VLANs unless one of the following conditions have been met (Per Cisco best practices.)
" Solution 1: Enable PIM on the Layer 3 Router/VLAN Interface
" Solution 2: Enable IGMP Querier Feature on a Layer 2 Catalyst Switch
" Solution 3: Configure Static Mrouter Port on the Switch
" Solution 4: Configure Static Multicast MAC Entries on All the Switches
" Solution 5: Disable IGMP Snooping on All the Switches (*This is not recommended as all of the switch ports will be flooded by Multicast traffic.)
Keep in mind that these pertain only to Cisco hardware but configuration on other hardware will be very similar. Solution 5 is a great choice for troubleshooting but it is not recommended for production use as it will increase the workload on the switches/routers.
These procedures are clearly documented on this Cisco KB: http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008059a9df.shtml
and can also be found here:
When setting up multicast for IP video (One to many applications) it is recommended to use the SSM (Source Specific Multicast) model.
Here is an excerpt from the cisco docs:
SSM is a datagram delivery model that best supports one-to-many applications, also known as broadcast applications. SSM is a core networking technology for the Cisco implementation of IP multicast solutions targeted for audio and video broadcast application environments. The switch supports these components that support the implementation of SSM:
- Protocol independent multicast source-specific mode (PIM-SSM) PIM-SSM is the routing protocol that supports the implementation of SSM and is derived from PIM sparse mode (PIM-SM).
- Internet Group Management Protocol version 3 (IGMPv3) To run SSM with IGMPv3, SSM must be supported in the Cisco IOS router, the host where the application is running, and the application itself.
When configuring a camera/node for multicast we must specify a multicast address which the system will use for the multicast stream. Please note that the standard IP address is still used when working in multicast mode but the bulk(UDP in this case) traffic is transmitted via the multicast group IP. The IANA has created assigned a range for multicast addressing, it is recommended to follow this scheme although it is optional. Please use the following article as a reference: http://www.iana.org/assignments/multicast-addresses/multicast-addresses.xhtml
C. Troubleshooting Multicast Networks.
Troubleshooting multicast can become a daunting task depending on network infrastructure. As any other form of troubleshooting it is important to assess the problem and start with a known good test case before moving on and adding any new elements to the equation, essentially the simpler the test set up the easier it will be to diagnose and troubleshoot the problem. A simple routine would be to test multicast communication at the source device to determine if the device is working properly if it is you would then move on to the edge switch level and troubleshoot accordingly by verifying that the switch has been configured to handle multicast traffic and if using IGMP that the IGMP tables are being populated properly. A simple test would be to disable IGMP snooping and run Wireshark on a client connected to the switch, if you are able to see multicast traffic using Wireshark then the next step would be to configure for multicast per the manufacturer's recommendations, once that has been done you should not see very much incoming multicast traffic unless the client is requesting it from a device, there should be an obvious change in the amount of multicast traffic when a live stream is requested vs when nothing is being displayed. Depending on the model used Multicast makes use of IGMP (https://en.wikipedia.org/wiki/Internet_Group_Management_Protocol ) if multicast is being flooded to all ports of a switch (IGMP snooping is off.) then a client running Wireshark should see IGMP traffic populate, a simple wireshark filter to use would be to type 'IGMP' on the filter box in Wireshark this will in turn only display IGMP traffic. Another useful filter is to only display udp traffic originating from the node i.e. "ip.src==10.12.13.x && udp" or "ip.src==188.8.131.52" if multicast is being forwarded properly you will see the multicast IP of the node on the destination field. Finally the filter "(eth.addr&1) && !eth.addr==FF:FF:FF:FF:FF:FF" will only display multicast traffic.
Another tool that is instrumental when troubleshooting multicast video is VLC player. We can open a live stream from the camera and make VLC use multicast for the stream this works great as a basic test. In order for VLC to communicate via multicast we must first enable this feature by going into Tools>Preferences>show all settings>Demuxers>RTP/RTSP and selecting force multicast RTP over RTSP. We would then open a network stream to the camera i.e. rtsp://192.168.15.15/live/main. This would display the main stream on a V96X. If we are able to see the video and we can see the multicast traffic on Wireshark then we know multicast is working properly, if we get a multicast session and see the traffic on Wireshark but no video VLC the problem is most likely host related usually caused by security software such as AV, or a group policy related firewall rule on domains.
It is important to note that there is a bug which affects Windows 7 & Server 2008 which will not allow the NIC to properly forward the traffic to the application on the host. Always check for the hotfix which can be found on Microsoft's website: http://support.microsoft.com/kb/2639824
Although not written on the article it is recommended to reset the windows TCP/IP stack after applying the hotfix. Reboot after installing the hotfix and then type the following commands on the windows command prompt (Run the command prompt explicitly as admin, otherwise the process might fail.)
- Reset WINSOCK entries to installation defaults: netsh winsock reset catalog
- Reset IPv4 TCP/IP stack to installation defaults: netsh int ipv4 reset reset.log
- Reset IPv6 TCP/IP stack to installation defaults: netsh int ipv6 reset reset.log
- Reboot the machine.
If all else fails always test on multiple systems as results will vary depending on group policy/user rights on the windows box.
- Add the UseMulticast=1 entry to the "ThirdParty.ini" file found in the config folder. Note: this file is named "VMC_ThirdParty.ini" on VMDCs
- Configure any ViconNet protocol cameras for multicast using the VNSetup tool. Open standard cameras will need to have a unique multicast IP assigned to each stream as per the manufacturer's recommendations.
- Start ViconNet and verify that both live view and record work properly
- Configure PIM / IGMP / or Static entries on network hardware in order to allow multicast traffic
* When using IGMP you might need an IP IGMP snooping querier address to be configured.
For more information see:
- Verify proper packet flow through the network by using a sniffer such as Wireshark
- Assign proper IP addressing for all network nodes that will use multicast for communication
- Verify that IGMP queries are being forwarded properly throughout the network, and that nodes are joining the adequate groups.
- Follow the Cisco guidelines for configuring Multicast found at: http://www.cisco.com/en/US/products/hw/switches/ps708/products_tech_note09186a008059a9df.shtml
- If needed install the Multicast Hotfix [http://support.microsoft.com/kb/2639824]
- Disable/Remove any software that might interfere with the network data such as Antivirus, intrusion prevention systems, Firewalls etc. Also as a last resort you may need to disjoin any domains.
- Perform a repair of the TCP/IP stack by using the netsh command in windows