Alpine Two Nodes

(Lab Series)

1 Overview

         VM1            Container           VM2
          +                 +                +
      191.0.0.10 eth1 +----br1----+ eth1 191.0.0.20
      192.0.0.10 eth2 +----br2----+ eth2 192.0.0.20
      193.0.0.10 eth3 +----br3----+ eth3 193.0.0.20
          +                                  +

2 Setup

2.1 Setup Container

host$ git clone https://github.com/thachmpham/lab.git
host$ cd lab/alpine/2-nodes
host$ docker compose build
host$ docker compose up --detach

2.2 Setup VM1

host$ docker exec -it apk bash
cont$ ./create_vm1.sh
vm1$ setup-alpine -e -f ans_vm1

vm1$ poweroff
cont$ ./start_vm1.sh
vm1$ vi /etc/ssh/sshd_config
# ------------------------------ #
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes
# ------------------------------ #

vm1$ rc-service sshd restart
cont$ ssh vm1
vm$ vi /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.24/main
http://dl-cdn.alpinelinux.org/alpine/v3.24/community

2.3 Setup VM2

cont$ ./create_vm2.sh
vm2$ setup-alpine -e -f ans_vm2

vm2$ poweroff
cont$ ./start_vm2.sh
vm2$ vi /etc/ssh/sshd_config
# ------------------------------ #
PermitRootLogin yes
PasswordAuthentication yes
PermitEmptyPasswords yes
# ------------------------------ #

vm2$ rc-service sshd restart
cont$ ssh vm2
vm$ vi /etc/apk/repositories
http://dl-cdn.alpinelinux.org/alpine/v3.24/main
http://dl-cdn.alpinelinux.org/alpine/v3.24/community

3 Shortcuts

QEMU keys:

4 References