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 HDRScope/4KScope with network video sources.

Centos/RedHat 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

 

More great products from Drastic

Supported Audio/Video Hardware
Supported Audio/Video Hardware Drastic supports a wide variety of audio and video hardware for products such as MediaNXS, videoQC and DrasticDDR. The current product families Drastic supports... Tips, Tricks and Technical Information
DDRSetup - Net-X-Code Setup and Licensing
DDRSetup - Net-X-Code Setup and Licensing ddrSetup is part of the ccConvert and Net-X-Code Server software. ddrSetup is a command line tool that can do basic configurations for various Drastic softwar... Tips, Tricks and Technical Information
How to License Drastic Products
How to License Drastic Products Drastic's software products install and will run in demo mode, with a number of restrictions (10 second media duration, watermarks, length of run limitations, m... Tips, Tricks and Technical Information
Drastic EDL Format
Drastic EDL Format The Drastic EDL format uses the same basic layout as a CMX, GVG or Sony 91xx series EDL. The main differences are the 'Type:' header and the file name in the co... Tips, Tricks and Technical Information
Controlling FlowCaster
Controlling FlowCaster FlowCaster creates a virtual I/O board for your creative software, desktop, real I/O board, or NDI source that sends a high quality video signal through the net... Tips, Tricks and Technical Information