Linux」カテゴリーアーカイブ

NMOSのRDSサーバを立ててみる

仕事柄、SMPTE2110をちょっと触っているので、
NMOSもやらざるをえず。。。。

RDSサーバが必要なので自前で立ててみようかと。
検証でよく使われているそうなのでこれを使ってみます。
https://github.com/sony/nmos-cpp

Hyper-Vのクイック作成を使ってUbuntu20.04作ったので、
最小構成だとほかにもインストールしないといけないものがあるかもしれません。。。
(あたりまでだけど仮想スイッチでも問題ないです)

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.4 LTS
Release:        20.04
Codename:       focal

さて必要なものをざっくりインストールしていきます。

$ sudo  apt-get update
$ sudo apt-get install build-essential g++ libcpprest-dev libc6 libavahi-compat-libdnssd-dev libnss-mdns avahi-utils git

続きを読む

マルチキャストテストツール

マルチキャストパケットをテストするためのツール。
ただ、igmp v2なのでPIM-SSMのテストはできなさそうです。

1)Linux

msend – send UDP messages to a multicast group
mreceive – receive UDP multicast messages and display them

https://github.com/troglobit/mtools/blob/master/README.md

# apt-get install libcurl4-openssl-dev libexpat1-dev
# apt-get install git
# apt-get install make gcc
# git clone https://github.com/troglobit/mtools
# cd mtools
# make
# ls
LICENSE.md  README.md  mreceive.8  mreceive.d    mreceive.o  msend.8  msend.d    msend.o
Makefile    mreceive   mreceive.c  mreceive.map  msend       msend.c  msend.map  ttcp.c
# ./msend -h
msend version 2.3
Usage:  msend [-g GROUP] [-p PORT] [-join] [-i ADDRESS] [-t TTL] [-P PERIOD]
              [-text "text"|-n]
        msend [-v | -h]

  -g GROUP     IP multicast group address to send to.  Default: 224.1.1.1
  -p PORT      UDP port number used in the multicast packets.  Default: 4444
  -i ADDRESS   IP address of the interface to use to send the packets.
               The default is to use the system default interface.
  -join        Multicast sender will join the multicast group.
               By default a sender never joins the group.
  -P PERIOD    Interval in milliseconds between packets.  Default 1000 msec
  -t TTL       The TTL value (1-255) used in the packets.  You must set
               this higher if you want to route the traffic, otherwise
               the first router will drop the packets!  Default: 1
  -text "text" Specify a string to use as payload in the packets, also
               displayed by the mreceive command.  Default: empty
  -n           Encode -text argument as a number instead of a string.
  -v           Print version information.
  -h           Print the command usage.
# ./mreceive -h
mreceive version 2.3
Usage: mreceive [-g GROUP] [-p PORT] [-i ADDRESS ] ... [-i ADDRESS] [-n]
       mreceive [-v | -h]

  -g GROUP     IP multicast group address to listen to.  Default: 224.1.1.1
  -p PORT      UDP port number used in the multicast packets.  Default: 4444
  -i ADDRESS   IP addresses of one or more interfaces to listen for the given
               multicast group.  Default: the system default interface.
  -n           Interpret the contents of the message as a number instead of
               a string of characters.  Use this with `msend -n`
  -v           Print version information.
  -h           Print the command usage.

2)Windows
http://www.dqnetworks.ie/toolsinfo/mcasttest/

MCastTest is a utility for testing IP multicast routing on your network.
You can add multiple tranmitters and listeners on different IP multicast groups.
By running this utility on multiple machines at different points in your network you can check that your multicast traffic is getting to where it is supposed to get to.

PIM-SSMをテストしたいけど、CLIツールがない。。。
たぶん、VLCはできると思います。。。

Dockerのiptables

Dockerサービスが起動したときや、
コンテナを作ったときに、iptablesに自動的にフィルターが入ります。

困ったことに、特に設定しなければ、
INPUTもFORWARDもACCEPTになるため精神衛生上よくありません。
せめてINPUTとFORWARDはDROPとしておきたいです。

それに加えて、DOCKERコンテナへのフィルターを書く場合は、
mangleで設定しなければなりません。(natテーブルでもいけるかもしれません)
https://ja.wikipedia.org/wiki/Iptables#/media/File:Netfilter-packet-flow.svg

続きを読む