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

GNS3のWEBUIを使ってみる

久々にネットワークを触ってみようかと思い。

ここからHyper-V用のVMをダウンロードしてきます
https://www.gns3.com/software/download-vm

ダウンロードされた「GNS3.VM.Hyper-V.2.2.15.zip」を解凍すると、
Hyper-V用のPowershellスクリプトが入っているのでそれを実行します
(中をみると、メモリ1GB、ディスクを2つ使う、みたいなことが書かれています))

管理者権限でPowershellを起動。
Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned
一時的にPowershellの実行を許可(このプロセスを閉じるまで有効)

PS C:\WINDOWS\system32> Set-ExecutionPolicy -Scope Process -ExecutionPolicy RemoteSigned

実行ポリシーの変更
実行ポリシーは、信頼されていないスクリプトからの保護に役立ちます。実行ポリシーを変更すると、about_Execution_Policies
のヘルプ トピック (https://go.microsoft.com/fwlink/?LinkID=135170)
で説明されているセキュリティ上の危険にさらされる可能性があります。実行ポリシーを変更しますか?
[Y] はい(Y)  [A] すべて続行(A)  [N] いいえ(N)  [L] すべて無視(L)  [S] 中断(S)  [?] ヘルプ (既定値は "N"): y
PS C:\WINDOWS\system32>

同じディレクトリにあるPowerShellスクリプト「create-vm.ps1」を実行します

PS C:GNS3.VM.Hyper-V.2.2.15> .\create-vm.ps1

Name    State CPUUsage(%) MemoryAssigned(M) Uptime   Status     Version
----    ----- ----------- ----------------- ------   ------     -------
GNS3 VM Off   0           0                 00:00:00 正常稼働中 9.0

これでVMが作成されていると思います、
あとは「Default Switch」やCPUの数など環境に合わせて設定してください

続きを読む

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

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

Winodwsでハッシュ値を出力する

ちょっと信用できないファイルがあり、
ハッシュ値を調べる必要があったので。。。

Powershellだと
Get-FileHash
を使う。

Get-FileHash [-Path] <String[]> [-Algorithm <String>] [<CommonParameters>]

使える「Algorithm」(ハッシュ関数)は
SHA1
SHA256
SHA384
SHA512
MACTripleDES
MD5
RIPEMD160

まぁやってみる

続きを読む