Technical

Tips, Tricks and Technical Information

SMPTE 2110, 2202 & RTP Multicast Setup

dt logo 1.5inchMost operating systems are not set up out of the box to handle heavy multicast loads. With some, multicast reception is actually disabled.  This article contains setup notes for the OS when using Net-X-Code, videoQC or 2110Scope/HDRScope/4KScope with network video sources.

Centos/Red Hat 7

The main change needed here is the setting of the rp_filter for the ethernet card you are going to multicast to/from.  This can be set up temporarily by changing

/proc/sys/net/ipv4/conf/all/rp_filter
/proc/sys/net/ipv4/conf/<ethernet>/rp_filter

to 2.  This will allow the next run to read multicast packets from that ethernet device.  These variables can also be changed via the sysctl utility

sudo sysctl -w "net.ipv4.conf.default.rp_filter=2"
sudo sysctl -w "net.ipv4.conf.all.rp_filter=2"
sudo sysctl -w "net.ipv4.conf.<ethernet>.rp_filter=2"

For a more permanent change, modify the contents of /etc/sysctl.conf to include

net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.ens4.rp_filter = 2

You will also need to adjust your firewall to allow your ports/addresses through.  For testing, you can temporarily disable the firewall with:

systemctl stop firewalld

You can also permanently disable your firewall, but this is NOT recommended.

systemctl disable firewalld

sysctl -w net.core.rmem_max=12582912

sysctl -w net.core.wmem_max=12582912

sysctl -w net.core.netdev_max_backlog=5000

Here is an optimized sysctl.con


# sysctl settings are defined through files in
# /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/.
#
# Vendors settings live in /usr/lib/sysctl.d/.
# To override a whole file, create a new file with the same in
# /etc/sysctl.d/ and put new settings there. To override
# only specific settings, add a file with a lexically later
# name in /etc/sysctl.d/ and put new settings there.
#
# For more information, see sysctl.conf(5) and sysctl.d(5).
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.all.rp_filter = 2
net.ipv4.conf.ens4.rp_filter = 2

### KERNEL TUNING ###

# Increase size of file handles and inode cache
fs.file-max = 2097152

# Do less swapping
vm.swappiness = 10
vm.dirty_ratio = 60
vm.dirty_background_ratio = 2

# Sets the time before the kernel considers migrating a proccess to another core
kernel.sched_migration_cost_ns = 5000000

# Group tasks by TTY
#kernel.sched_autogroup_enabled = 0

### GENERAL NETWORK SECURITY OPTIONS ###

# Number of times SYNACKs for passive TCP connection.
net.ipv4.tcp_synack_retries = 2

# Allowed local port range
net.ipv4.ip_local_port_range = 2000 65535

# Protect Against TCP Time-Wait
net.ipv4.tcp_rfc1337 = 1

# Control Syncookies
net.ipv4.tcp_syncookies = 1

# Decrease the time default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 15

# Decrease the time default value for connections to keep alive
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_keepalive_probes = 5
net.ipv4.tcp_keepalive_intvl = 15

### TUNING NETWORK PERFORMANCE ###

# Default Socket Receive Buffer
net.core.rmem_default = 31457280

# Maximum Socket Receive Buffer
net.core.rmem_max = 33554432

# Default Socket Send Buffer
net.core.wmem_default = 31457280

# Maximum Socket Send Buffer
net.core.wmem_max = 33554432

# Increase number of incoming connections
net.core.somaxconn = 65535

# Increase number of incoming connections backlog
net.core.netdev_max_backlog = 65536

# Increase the maximum amount of option memory buffers
net.core.optmem_max = 25165824

# Increase the maximum total buffer-space allocatable
# This is measured in units of pages (4096 bytes)
net.ipv4.tcp_mem = 786432 1048576 26777216
net.ipv4.udp_mem = 65536 131072 262144

# Increase the read-buffer space allocatable
net.ipv4.tcp_rmem = 8192 87380 33554432
net.ipv4.udp_rmem_min = 16384

# Increase the write-buffer-space allocatable
net.ipv4.tcp_wmem = 8192 65536 33554432
net.ipv4.udp_wmem_min = 16384

# Increase the tcp-time-wait buckets pool size to prevent simple DOS attacks
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_tw_reuse = 1

Finally, most SMPTE 2110/2022 systems will be multi-homed (more than one ethernet adapter).  To tell our software which is the video IP adapter, the RecieveInteface, RecieveAudInteface, and RecieveAncInteface will need to be set.  There are Transmit versions of each of these as well.

Microsoft Windows

Generally, Windows is not recommended for direct SMPTE 2110/2022, as its network stack is not as good as Linux.  If you are going to use it, the following may help.

Firewalls

Windows firewall can end up blocking all multicast network traffic.  This will definitely happen if your 10G/25G network card ends up in the 'public' group, rather than the private or domain.  In that case, the firewall will have to be completely disabled on the public network for SMPTE 2110/2022 to be received.  Ideally, the NIC should be in the domain or private, and your IT group can enable the correct ports and protocols.  If you are having trouble, try temporarily disabling the firewall.  If that works, then the firewall configuration is still too restrictive/improperly configured.

Buffering

To increase the default buffering for UDP, save this as a .reg file and double click to add it to your registry.


Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\AFD\Parameters]
"DefaultReceiveWindow"=dword:00200000
"DefaultSendWindow"=dword:00200000

 

Trademarks, Registered Trademarks, and Copyrights

 

Trademarks, Registered Trademarks, and Copyrights

Drastic Technologies, Ltd. – trademarks specified here.
Linus Torvalds - Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Microsoft Corporation – Microsoft: Windows®, Video For Windows (VFW), DirectShow, Microsoft, Skype, Microsoft Azure, Microsoft Teams, Wave Mapper, Microsoft, Windows NT|2000|XP|XP Professional|Server 2003|Server 2008 |Server 2012, Windows 7, Windows 8, Media Player, Media Encoder, Windows Defender, Microsoft Office, .Net, Internet Explorer, SQL Server 2005|2008|2012|2014, Windows Media Technologies and Internet Explorer are trademarks of Microsoft Corporation.
Red Hat, Inc. - Red Hat, and the Red Hat logo are trademarks or registered trademarks of Red Hat, Inc. or its subsidiaries in the United States and other countries
Society of Motion Picture and Television Engineers - SMPTE is a trademark of Society of Motion Picture and Television Engineers.
All other trademarks are the property of their respective owners

 

More great products from Drastic

Web Server Setup for DrasticDDR
Web Server Setup for DrasticDDR All Drastic server digital disk recorder (DDR) products have a built in web server for local use. If you have a VVW Series, Titan Series, ClipRecorder, or Inges... Tips, Tricks and Technical Information
Net-X-Code and Avid MediaCentral Setup
Net-X-Code and Avid MediaCentral Setup Avid MediaCentral provides a convenient method to share media and projects among a group of Media Composer stations or other Avid products.  Drastic's Net-... Tips, Tricks and Technical Information
Animation And Single Frame Recording
Animation And Single Frame Recording Note: This area describes legacy products. Drastic VVW and Titan Series DDRs, QuickClip, MediaNXS and DrasticDDR software can be used to capture single or multi... Tips, Tricks and Technical Information
How To Report Issues To Drastic
How To Report Issues To Drastic We are always happy to receive product ideas, new file/codec/feature requests, and bug/issue reports.  To make these reports as effective as possible, plea... Tips, Tricks and Technical Information
Running Net-X-Code In The Cloud (AWS/GCS/VM)
Running Net-X-Code In The Cloud (AWS/GCS/VM) Net-X-Code can be run on local servers, local VMs or cloud based VMs.  The VMs can be using Red Hat/CentOS, Windows, Windows Server, or even Docker.  ... Tips, Tricks and Technical Information
Image

For more than two decades, Drastic™ has been developing cutting edge solutions for television, post production and sports broadcasting, from real time web delivery to 8K broadcast.

We offer standalone software for the end user or enterprise, integrated solutions for automated workflows, and OEM tools for custom applications or branded devices.

Contact Us

Address:
523 The Queensway, Suite 201
Toronto, ON
M8Y 1J7, Canada

Phone: +1 (416) 255 5636

Email: info@drastictech.com

Fax: + 1 (416) 255 8780