MikroTik

⌘K
  1. Home
  2. Docs
  3. MikroTik
  4. Container
  5. Cara Deploy iperf Server di Container Mikrotik

Cara Deploy iperf Server di Container Mikrotik

Dokumentasi ini mencontohkan langkah-langkah deploy iperf3 server di container mikrotik menggunakan dua metode yaitu YAML /app atau manual /container di RouterOS v7.23++. Yang bertujuan menjadikan router mikrotik menjadi iperf3 server untuk menguji throughputjitter langsung dari router dan memanfaatkan container lightweight yang hemat resource.

Prasyarat

Metode A — Deploy iperf3 dengan YAML Compose

Simpan YAML berikut sebagai referensi, lalu import lewat Winbox -> App -> klik [+] (Add New) -> tab YAML -> paste YAML ini ke dalam kotak YAML:

name: iperf3-server
descr: iperf3 server untuk throughput, latency, dan jitter testing
page: https://iperf.fr/
category: network
default-credentials: none
services:
  iperf:
    image: docker.io/alpine:latest
    ports:
      - 5201:5201:tcp
      - 5201:5201:udp
    command: /bin/sh -c "apk add --no-cache iperf3 && iperf3 -s"

Metode B — Deploy Manual dengan /container

Jika Anda memerlukan kontrol penuh atau menggunakan RouterOS versi lama, gunakan metode manual:

# ============================================
# 1. Konfigurasi Container Environment
# ============================================
/container config
set registry-url=https://registry-1.docker.io tmpdir=usb1-part1/pull

# ============================================
# 2. Buat Virtual Ethernet (veth)
# ============================================
/interface veth
add address=172.21.0.52/24 gateway=172.21.0.254 name=veth-iperf3

# ============================================
# 3. Tambahkan veth ke Bridge LAN
# ============================================
/interface bridge port
add bridge=br-lan interface=veth-iperf3

# ============================================
# 4. Tambahkan Environment Variables (opsional)
# ============================================
/container envs
add name=iperf3_envs key=TZ value="Asia/Jakarta"

# ============================================
# 5. Deploy Container iperf3
# ============================================
/container
add remote-image=quay.io/tangent/iperf3:latest \
  interface=veth-iperf3 \
  root-dir=usb1-part1/iperf3 \
  envlist=iperf3_envs \
  start-on-boot=yes \
  logging=yes

# ============================================
# 6. Start Container
# ============================================
/container start 0

Image quay.io/tangent/iperf3:latest adalah image ultra-lightweight (~0.2 MiB) yang dioptimalkan untuk MikroTik.

Pertanyaan yang Sering Ditanyakan (FAQ)

Berapa resource minimum untuk menjalankan iperf3 container?

Alpine Linux dengan iperf3 memerlukan sekitar 20–50 MB RAM dan < 10 MB storage. Namun, external storage tetap direkomendasikan untuk optimal performance.

Bagaimana cara update image iperf3 ke versi terbaru?

Untuk metode /app, gunakan /app update [nama-app]. Untuk metode manual, hapus container lama dan tambahkan ulang dengan image tag terbaru.

Kesimpulan

Deploy iperf3 di MikroTik RouterOS v7.23++ menggunakan YAML Compose melalui fitur /app adalah metode modern yang sangat efisien. Dengan cara ini, Anda dapat men-deploy iperf3 server dalam hitungan menit, menguji throughputjitter langsung dari router dan memanfaatkan container lightweight yang hemat resource.

Tags , ,
guest

0 Comments
Oldest
Newest Most Voted