Temat: Agregacja portów OpenWRT - TPLINK

Cześć, czy orientuje się ktoś czy działa agregacja portów pomiędzy X86 OpenWRT a zarządzanym switch'em TPlink?

Komputer który pracuje jako router ma 3 porty gigabitowe: dwa z nich przeznaczone zostały na bounding, 2,5 Gbit na WAN. Switch ma skonfigurowany LAG, i działa on poprawnie pomiędzy dwoma switch'ami, jednak gdy zamiast drugiego switch'a podepnę router, transfer umiera. com może być nie tak?



___________                                  ______________
|                  | - - - - - - - - - - - - - - |                        |
| Router x86 |          LAG                  |     SWITCH       |
|__________| - - - - - - - - - - - - - -  |_____________|

2

Odp: Agregacja portów OpenWRT - TPLINK

Tzn zamiast tego switcha na rysunku dajesz router? A on ma skonfigurowanego lag'a?

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

3

Odp: Agregacja portów OpenWRT - TPLINK

Jak używam dwóch switchy i zestawiam LAG to działa, jeśli zamiast switcha dam router transfer umiera, chociaż ustawiam na interfejsach bounding 802.3ad.

Cos takiego chce osiągnąć:
+---------+              +---------+              +---------+
| Router  |=====LAG======| Switch 1|=====LAG======| Switch 2|
| OpenWrt |     (1)      |         |     (2)      |         |
+---------+              +---------+              +---------+

4

Odp: Agregacja portów OpenWRT - TPLINK

Znalazłem winowajcę

option bond_mode '802.3ad' powinno być 'balance-xor'

5

Odp: Agregacja portów OpenWRT - TPLINK

Opisz proszę konfiguracji agregacji w OpenWrt. Nie przypominam sobie żeby ktoś to bardziej szczegółowo opisał, więc zrób co i jak żeby było dla potomnych.

Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

6 (edytowany przez krypton_pl 2025-12-10 11:10:43)

Odp: Agregacja portów OpenWRT - TPLINK

Wieczorem machnę co i jak zrobić. Zastanawiam się tylko jak machnąć iperf3

7

Odp: Agregacja portów OpenWRT - TPLINK

Ja również poproszę o konfiguracje LAG pod OpenWrt.

8 (edytowany przez krypton_pl 2026-02-04 10:03:32)

Odp: Agregacja portów OpenWRT - TPLINK

Agregacja portów (static bonding) w OpenWrt

Sprzęt

Router: Fujitsu Futro S920
CPU: GX-424CC (4×2.4 GHz)
RAM: 8 GB
System: OpenWrt

Switch: TP-Link TL-SG108E (Static LAG, brak LACP)

Internet: eth0 → router Orange 1 Gb/s

Karty sieciowe:

01:00.0 Intel 82571EB
01:00.1 Intel 82571EB
02:00.0 Realtek RTL8111

Schemat sieci:

        ROUTER (OpenWrt)
     ┌───────────────────┐
     │  eth1 ─────┐       │
     │             ├─ bond0 (agr)
     │  eth2 ─────┘       │
     └────────┬──────────┘
              ││   2×1Gb
      ====================
              ││
     ┌────────▼▼─────────┐
     │      SWITCH        │
     │   Static LAG       │
     │  port1 + port2     │
     └───────────────────┘

Instalacja pakietu
opkg update
opkg install kmod-bonding

/etc/config/network

config interface 'loopback'
    option device 'lo'
    option proto 'static'
    option ipaddr '127.0.0.1'
    option netmask '255.0.0.0'


config globals 'globals'
    option ula_prefix 'fdef:ba19:12aa::/48'
    option packet_steering '0'


config interface 'lan'
    option device 'br-lan'
    option proto 'static'
    option gateway '192.168.2.6'
    list ipaddr '192.168.2.1/24'
    list dns '194.204.159.1'
    list dns '8.8.8.8'
    list dns '1.1.1.1'


config device
    option name 'br-lan'
    option type 'bridge'
    option bridge_empty '1'
    option ipv6 '0'
    list ports 'agr'
    list ports 'eth0'


config device
    option type 'bonding'
    option name 'agr'
    list ports 'eth1'
    list ports 'eth2'
    option policy 'balance-xor'
    option mtu '1500'
    option ipv6 '0'


Restart sieci

/etc/init.d/network restart

Sprawdzenie statusu bondingu

cat /proc/net/bonding/agr

Testy wydajności – iperf3 dwóch klientów jednocześnie

Klient 1 – Raspberry Pi

iperf3 -c 192.168.2.1

Wynik:

Connecting to host 192.168.2.1, port 5201
[  5] local 192.168.2.2 port 38938 connected to 192.168.2.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   959 Mbits/sec    0    274 KBytes
[  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec    0    269 KBytes
[  5]   2.00-3.00   sec   111 MBytes   933 Mbits/sec    0    272 KBytes
[  5]   3.00-4.00   sec   112 MBytes   944 Mbits/sec    0    269 KBytes
[  5]   4.00-5.00   sec   112 MBytes   938 Mbits/sec    0    266 KBytes
[  5]   5.00-6.00   sec   112 MBytes   943 Mbits/sec    0    269 KBytes
[  5]   6.00-7.00   sec   112 MBytes   935 Mbits/sec    0    272 KBytes
[  5]   7.00-8.00   sec   113 MBytes   946 Mbits/sec    0    274 KBytes
[  5]   8.00-9.00   sec   112 MBytes   940 Mbits/sec    0    272 KBytes
[  5]   9.00-10.00  sec   113 MBytes   944 Mbits/sec    0   5.66 KBytes
-----------------------------------------------------------
[  5]   0.00-10.00  sec  1.10 GBytes   943 Mbits/sec    0   sender
[  5]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec        receiver

Klient 2 – PC

iperf3 -c 192.168.2.1

Wynik:

Connecting to host 192.168.2.1, port 5201
[  5] local 192.168.2.3 port 45194 connected to 192.168.2.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   114 MBytes   958 Mbits/sec    0    297 KBytes
[  5]   1.00-2.00   sec   111 MBytes   934 Mbits/sec    0    291 KBytes
[  5]   2.00-3.00   sec   112 MBytes   941 Mbits/sec    0    272 KBytes
[  5]   3.00-4.00   sec   113 MBytes   949 Mbits/sec    0    274 KBytes
[  5]   4.00-5.00   sec   112 MBytes   938 Mbits/sec    0    288 KBytes
[  5]   5.00-6.00   sec   112 MBytes   940 Mbits/sec    0    277 KBytes
[  5]   6.00-7.00   sec   112 MBytes   943 Mbits/sec    0    283 KBytes
[  5]   7.00-8.00   sec   112 MBytes   940 Mbits/sec    0    280 KBytes
[  5]   8.00-9.00   sec   112 MBytes   940 Mbits/sec    0    274 KBytes
[  5]   9.00-10.00  sec   113 MBytes   948 Mbits/sec    0   5.66 KBytes
-----------------------------------------------------------
[  5]   0.00-10.00  sec  1.10 GBytes   944 Mbits/sec    0   sender
[  5]   0.00-10.00  sec  1.10 GBytes   941 Mbits/sec        receiver

Wynik końcowy

Dwa równoległe połączenia:

~940 Mbps + ~940 Mbps
Łącznie ~1.9 Gbps