Robot Framework を使うために、Docker環境を整える

#環境を拡張する
[Robot Framework 使ってみる①](https://qiita.com/navasato/items/862b7715595319a63239 "Robot Framework 使ってみる①")
現在の環境はこんな感じ
![VPS001.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/284963/4972679a-3367-edbc-4827-eae6e4b634d5.png)
#やること
①検証用に仮想サーバを追加
②172.17.0.xはマネジメントセグにして別の通信試験セグを作成
###仮想サーバ追加
centosのコンテナを2つ作成しただけ。
###セグメント追加
docker network コマンドでネットワークの作成とコンテナへの接続ができるみたい。
[Dockerで自由なネットワーク構成を組む](https://qiita.com/marufeuille/items/b4065c8756e2a92b18aa "Dockerで自由なネットワーク構成を組む")　を参考にさせていただいた。

```text:docker&nbsp;network
# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
f21796bdf622        bridge              bridge              local
853e2c382475        host                host                local
39a262b4b23b        none                null                local
#
# docker network create -d bridge --subnet=192.168.100.0/24 test_nw1
4ffad7c169cb24f4e38b459c0eb391bc2f770d025e40983261cd702a00e60324
# docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
f21796bdf622        bridge              bridge              local
853e2c382475        host                host                local
39a262b4b23b        none                null                local
4ffad7c169cb        test_nw1            bridge              local
#
# docker network connect test_nw1 vyos
# docker network connect test_nw1 vyos2
# docker network connect test_nw1 VM1
# docker network connect test_nw1 VM2
#
```

できた！

```text
[root@VM1 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
84: eth0@if85: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:ac:11:00:05 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.5/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever
93: eth1@if94: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:c0:a8:64:04 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.100.4/24 brd 192.168.100.255 scope global eth1
       valid_lft forever preferred_lft forever
[root@VM1 ~]#

[root@VM2 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
86: eth0@if87: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:ac:11:00:06 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 172.17.0.6/16 brd 172.17.255.255 scope global eth0
       valid_lft forever preferred_lft forever
95: eth1@if96: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
    link/ether 02:42:c0:a8:64:05 brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.100.5/24 brd 192.168.100.255 scope global eth1
       valid_lft forever preferred_lft forever
[root@VM2 ~]# ping 192.168.100.4
PING 192.168.100.4 (192.168.100.4) 56(84) bytes of data.
64 bytes from 192.168.100.4: icmp_seq=1 ttl=64 time=0.131 ms
64 bytes from 192.168.100.4: icmp_seq=2 ttl=64 time=0.098 ms
^C
--- 192.168.100.4 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.098/0.114/0.131/0.019 ms
[root@VM2 ~]#
```

疎通もOK。
現在の構成はこんな感じ。
![VPS001_02.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/284963/f8726031-4d9d-8859-80d0-4146e7e12cbf.png)

#さらに拡張(2019.09.11)
![VPS001_03.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/284963/62375342-3c34-7a9a-b934-4a0a75f5d040.png)