DS-LiteとPPPoEを同時に使う

僕の環境はMikroTik CCR(RouterOS)を使っています。

で、
DS-LiteとPPPoE(IP非固定)を同時に使っていて、
かつDefault GatewayをDS-Liteに向けています。

[admin@MikroTik] /ip route print detail
 0 A S  dst-address=0.0.0.0/0 gateway=ds-lite gateway-status=ds-lite reachable check-gateway=ping distance=1 scope=30 target-scope=10 

 1  DS  dst-address=0.0.0.0/0 gateway=pppoe gateway-status=pppoe reachable distance=2 scope=30 target-scope=10 

しかし困ったことに、
この環境下だとCCRをVPNルーターとして使いたい時、
VPNのトラフィックがポート開放ができないDS-Lite経路となってしまい、
うまく接続することができません。
また、このままだとRouterOSの機能「Cloud」もDS-Lite側のアドレスを登録してしまいます。

なので、
「Cloud」への登録IPアドレスはPPPoE側のアドレスを登録し、
Mangleを書いて、PPPoEからのトラフィックはPPPoEへ返すようにしてみます。

続きを読む

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

マルチキャストパケットをテストするためのツール。
ただ、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 Desktopのインストール

最近は仮想ではなくコンテナを使うことが増えてきました。
Windowsでも手軽に使えるようになったのでインストールしておこうと思います。

0)VT-xの有効化
Docker自体はHyper-VのゲストOSとして扱われます。
Hyper-VにはCPUの仮想化支援VT-xが必要なのでBIOSで有効にしておきます。
(VT-dは特に必要ありません。)

1)Hyper-Vを有効にする
コントロールパネル
 Windowsの機能の有効化または無効化
  Hyper-V
にチェック
再起動が必要です。

2)Docker Desktopをダウンロード
Dokcer Hubのアカウント
作る
https://docs.docker.com/docker-for-windows/install/
作らない
https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe

3)インストール
普通にインストールすればOK
起動するとHyper-VのゲストOSとして起動してきます。

4)GUI管理
Dockerコマンドも使えますが、GUI管理ツールも使ってみたい場合は
kitematicが古いといわれるので、別途ダウンロード
https://github.com/docker/kitematic/releases
ダウンロードしたあとは
C:\Program Files\Docker\Kitematic
におけばOK

portainerのアップデート

お久しぶりです

Docker管理ツールとしてportainerを使っているのですが、
アップデート方法を書いておきます。。。

portainerのコンテナを作るときに、
portainer_data:/data」というオプションを設定して、
マウントポイントを指定してたのでデータはそのまま移行できます。

一旦、起動中のportainerを削除してから作り直せばOK。

# docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                                                                 NAMES
20258c0b59da        portainer/portainer              "/portainer"             5 months ago      1 months ago        0.0.0.0:9000->9000/tcp                                                portainer

# docker stop portainer
# docker rm portainer
# docker run -d -p 9000:9000 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer

これだけ!!