26 (edytowany przez Payti 2024-04-03 19:39:22)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Heh, w sumie przypadkowo doszedłem do ustawień aby wkładka GPON SFP ONT była osiągalna (GUI i ssh) z OpenWRT w BPi-R3
lub kompa w sieci LAN.

Podaję potrzebne info:

Zawartość pliku /etc/rc.local - powoduje, że interfejs 'wan' podnosi pracę i dostaje IP z DHCP zaraz po uruchomieniu i zbootowaniu GPON SFP ONT

root@BananaPi_BPi-R3 /root [#]# cat /etc/rc.local

(sleep 5; /sbin/ifdown wan) &
(sleep 60; /sbin/ifup wan) &

exit 0
root@BananaPi_BPi-R3 /root [#]#

Zawartość pliku /etc/config/network gdzie:
'sfp' - interfejs o IP: 192.168.1.15 na wkładkę GPON SFP ONT,  która ma IP: 192.168.1.10
'wan' - interfejs WAN na porcie eth1 (sfp) w BPi-R3, roboczy na wkładce GPON ONT , autoryzacja i IP po DHCP u mnie
'wan_lte' - interfejs na modem LTE (Fibocom L860-GL-16)
'lan' - interfejs LAN na 4 portach 'LAN1-4' i dwa radia WiFi oraz port sfp2
'wan6' - jest bo jest ale nieużywany i nieskonfigurowany (ma tylko przypięty port 'ETH WAN' i VLAN wink)
'eth1.200' - mój VLAN na eth1 od operatora FTTH

root@BananaPi_BPi-R3 /root [#]# cat /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 'fd6d:dea7:1422::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'sfp2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '10.0.0.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'br-wan'
        option type 'bridge'
        list ports 'eth1.200'
        list ports 'wan'

config device
        option name 'eth1'
        option macaddr '2a:12:0f:92:cc:11'

config device
        option name 'wan'
        option macaddr '2a:12:0f:92:cc:11'

config interface 'wan'
        option device 'eth1'
        option proto 'dhcp'

config interface 'wan6'
        option device 'br-wan'
        option proto 'dhcpv6'

config interface 'wan_lte'
        option proto 'xmm'
        option device '/dev/ttyACM0'
        option pincode '1234'
        option apn 'internet'
        option auth 'auto'
        option pdp 'ip'
        option delay '10'

config interface 'sfp'
        option proto 'static'
        option device 'eth1'
        option ipaddr '192.168.1.15'
        option netmask '255.255.255.0'

config device
        option type '8021q'
        option ifname 'eth1'
        option vid '200'
        option name 'eth1.200'

root@BananaPi_BPi-R3 /root [#]#

Interfejs 'sfp' trzeba podpiąć także do strefy 'wan' w ustawieniach zapory sieciowej.
Zawartość /etc/config/firewall

root@BananaPi_BPi-R3 /root [#]# cat /etc/config/firewall

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'
        option flow_offloading '1'
        option flow_offloading_hw '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'wwan'
        list network 'wan_lte'
        list network 'sfp'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
...
...

A tu dowód, że działa i GPON SFP ONT jest osiągalne:

root@BananaPi_BPi-R3 /root [#]# ping 192.168.1.10
PING 192.168.1.10 (192.168.1.10): 56 data bytes
64 bytes from 192.168.1.10: seq=0 ttl=64 time=0.405 ms
64 bytes from 192.168.1.10: seq=1 ttl=64 time=0.349 ms
64 bytes from 192.168.1.10: seq=2 ttl=64 time=0.349 ms
64 bytes from 192.168.1.10: seq=3 ttl=64 time=0.463 ms
64 bytes from 192.168.1.10: seq=4 ttl=64 time=0.596 ms
^C
--- 192.168.1.10 ping statistics ---
5 packets transmitted, 5 packets received, 0% packet loss
round-trip min/avg/max = 0.349/0.432/0.596 ms
root@BananaPi_BPi-R3 /root [#]#

root@BananaPi_BPi-R3 /root [#]# ssh ONTUSER@192.168.1.10
ONTUSER@192.168.1.10's password:


BusyBox v1.22.1 (2018-05-22 14:47:30 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

 OpenWrt - (14.07_ltq) --- Lantiq Edition for GPON
 ----------------------------------------------
ONTUSER@SFP:~# onu ploamsg
errorcode=0 curr_state=5 previous_state=4 elapsed_msec=4294731192
ONTUSER@SFP:~# ping 192.168.1.15
PING 192.168.1.15 (192.168.1.15): 56 data bytes
64 bytes from 192.168.1.15: seq=0 ttl=64 time=0.488 ms
64 bytes from 192.168.1.15: seq=1 ttl=64 time=0.449 ms
64 bytes from 192.168.1.15: seq=2 ttl=64 time=0.464 ms
^C
--- 192.168.1.15 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 0.449/0.467/0.488 ms
ONTUSER@SFP:~# exit
Connection to 192.168.1.10 closed.
root@BananaPi_BPi-R3 /root [#]#
Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

27

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Czas "wstawania" wkładki był istotny, pamiętam że leox bardzo długo wstawał ale nie podumałem aż tyle nad tym. Dziekuje

28

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

W network w sekcji wan można dodać auto 0, wtedy interfejs nie wstanie po restarcie. A w /etc/rc.local tylko

(sleep 60; /sbin/ifup wan) &

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

29

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Cezary napisał/a:

W network w sekcji wan można dodać auto 0, wtedy interfejs nie wstanie po restarcie. A w /etc/rc.local tylko

(sleep 60; /sbin/ifup wan) &

O w sumie, też fajnie ...

Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

30 (edytowany przez Payti 2024-04-07 19:37:21)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

@Cezary z czym może być problem w takim przypadku, wprost z BPi-R3 próbuję po ssh wbić się na wkładkę i mam:

root@BananaPi_BPi-R3 /root [#]# ssh ONTUSER@192.168.1.10

ssh: Connection to ONTUSER@192.168.1.10:22 exited: No matching algo kex
root@BananaPi_BPi-R3 /root [#]#

Natomiast czy z kompa czy z innego OpenWRT w LAN wbijam po SSH na wkładkę bez problemu.
Inne starsze OpenWRT działają bez kłopotu, we wszystkich przypadkach na wszystkich OpenWRT mam cipher identycznie:

root@BananaPi_BPi-R3 /root [#]# ssh -c help
ssh: Available ciphers: chacha20-poly1305@openssh.com,aes128-ctr,aes256-ctr

ssh: Exited: .
root@BananaPi_BPi-R3 /root [#]#

Czego może być wina, że lokalnie połączenie SSH nie znajduje cipher algo?

Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

31

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Wkładka ma starszą wersję ssh i inny algorytm. Jaki to zobacz jako dasz ssh -v ONTUSER@192.168.1.10  z komputera. Wtedy albo musisz sobie dropbear skompilować z takim algorytmem (jak ma) albo zainstaluj sobie openssl-client

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

32 (edytowany przez Payti 2024-04-07 20:15:53)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Ok, to z kompa mam:

Microsoft Windows [Version 10.0.19045.4170]
(c) Microsoft Corporation. Wszelkie prawa zastrzeżone.

C:\Users\Tomek>ssh -v ONTUSER@192.168.1.10
OpenSSH_for_Windows_8.1p1, LibreSSL 3.0.2
debug1: Connecting to 192.168.1.10 [192.168.1.10] port 22.
debug1: Connection established.
debug1: identity file C:\\Users\\Tomek/.ssh/id_rsa type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_rsa-cert type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_dsa type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_dsa-cert type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_ecdsa type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_ecdsa-cert type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_ed25519 type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_ed25519-cert type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_xmss type -1
debug1: identity file C:\\Users\\Tomek/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_for_Windows_8.1
debug1: Remote protocol version 2.0, remote software version dropbear_2014.63
debug1: no match: dropbear_2014.63
debug1: Authenticating to 192.168.1.10:22 as 'ONTUSER'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: diffie-hellman-group14-sha1
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: kex: client->server cipher: aes128-ctr MAC: hmac-sha1 compression: none
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY
debug1: Server host key: ssh-rsa SHA256:BuZTGE5wUUJXcXPnW2dTqITEBrlvniSuBjeWnDc7zAU
debug1: Host '192.168.1.10' is known and matches the RSA host key.
debug1: Found key in C:\\Users\\Tomek/.ssh/known_hosts:1
debug1: rekey out after 4294967296 blocks
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: rekey in after 4294967296 blocks
debug1: pubkey_prepare: ssh_get_authentication_socket: No such file or directory
debug1: Will attempt key: C:\\Users\\Tomek/.ssh/id_rsa
debug1: Will attempt key: C:\\Users\\Tomek/.ssh/id_dsa
debug1: Will attempt key: C:\\Users\\Tomek/.ssh/id_ecdsa
debug1: Will attempt key: C:\\Users\\Tomek/.ssh/id_ed25519
debug1: Will attempt key: C:\\Users\\Tomek/.ssh/id_xmss
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Trying private key: C:\\Users\\Tomek/.ssh/id_rsa
debug1: Trying private key: C:\\Users\\Tomek/.ssh/id_dsa
debug1: Trying private key: C:\\Users\\Tomek/.ssh/id_ecdsa
debug1: Trying private key: C:\\Users\\Tomek/.ssh/id_ed25519
debug1: Trying private key: C:\\Users\\Tomek/.ssh/id_xmss
debug1: Next authentication method: password
debug1: read_passphrase: can't open /dev/tty: No such file or directory
ONTUSER@192.168.1.10's password:

A byłbyś w stanie skompilować pakiet dropbear'a (bo chyba w nim jest ssh) pod mediatek/filogic z takim algo: diffie-hellman-group14-sha1
Byłbym wdzięczy bo w sumie nie mam naczym póki co.

Dla openssl-client (po 'opkg update') mam:

root@BananaPi_BPi-R3 /root [#]# opkg install openssl-client
Unknown package 'openssl-client'.
Collected errors:
 * opkg_install_cmd: Cannot install package openssl-client.
root@BananaPi_BPi-R3 /root [#]#

Chyba, ze chodzi o 'openssh-client' -> 9.7p1-r1 - OpenSSH client, to taki jest dostępny ?

Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

33

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

openssh-client a nie openssl-client smile

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

34

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Niestety, openssh-client też nie pomogło:

root@BananaPi_BPi-R3 /root [#]# opkg install openssh-client
Multiple packages (libgcc1 and libgcc1) providing same name marked HOLD or PREFER. Using latest.
Installing openssh-client (9.7p1-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/aarch64_cortex-a53/packages/openssh-client_9.7p1-r1_aarch64_cortex-a53.ipk
Configuring openssh-client.
root@BananaPi_BPi-R3 /root [#]# ssh ONTUSER@192.168.1.10
Unable to negotiate with 192.168.1.10 port 22: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1,kexguess2@matt.ucc.asn.au
root@BananaPi_BPi-R3 /root [#]#
Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

35

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

A teraz zrób

ssh -o KexAlgorithms=diffie-hellman-group14-sha1 ONTUSER@192.168.1.10
Masz niepotrzebny router, uszkodzony czy nie - chętnie przygarnę go.

36

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Cezary napisał/a:

A teraz zrób

ssh -o KexAlgorithms=diffie-hellman-group14-sha1 ONTUSER@192.168.1.10

To jest tak:

root@BananaPi_BPi-R3 /root [#]# ssh -o KexAlgorithms=diffie-hellman-group14-sha1 ONTUSER@192.168.1.10
Unable to negotiate with 192.168.1.10 port 22: no matching host key type found. Their offer: ssh-rsa,ssh-dss
root@BananaPi_BPi-R3 /root [#]#
Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

37

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

ssh -o KexAlgorithms=diffie-hellman-group14-sha1  -oHostKeyAlgorithms=+ssh-dss ONTUSER@192.168.1.10

Ale masz tam staroć.

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

38 (edytowany przez Payti 2024-04-07 20:29:56)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Cezary napisał/a:
ssh -o KexAlgorithms=diffie-hellman-group14-sha1  -oHostKeyAlgorithms=+ssh-dss ONTUSER@192.168.1.10

Ale masz tam staroć.

O teraz poszło:

root@BananaPi_BPi-R3 /root [#]# ssh -o KexAlgorithms=diffie-hellman-group14-sha1  -oHostKeyAlgorithms=+ssh-dss ONTUSER@192.168.1.10
The authenticity of host '192.168.1.10 (192.168.1.10)' can't be established.
DSA key fingerprint is SHA256:00xBTBUm6bNOsMBFuezcIYw+d0qCRhYC5bP1c9t7+z8.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.10' (DSA) to the list of known hosts.
ONTUSER@192.168.1.10's password:


BusyBox v1.22.1 (2018-05-22 14:47:30 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

 OpenWrt - (14.07_ltq) --- Lantiq Edition for GPON
 ----------------------------------------------
ONTUSER@SFP:~#

Da się te opcje jakoś dodać do .ssh/config ?

Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

39

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Tak,

Host *
    KexAlgorithms +diffie-hellman-group1-sha1
    HostKeyAlgorithms +ssh-dss

Czy coś podobnego.

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

40 (edytowany przez Payti 2024-04-07 20:32:20)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Dobra stworzyłem plik .ssh/config i w nim:

host 192.168.1.10
KexAlgorithms=diffie-hellman-group14-sha1
HostKeyAlgorithms=+ssh-dss

i teraz ładnie działa:

root@BananaPi_BPi-R3 /root [#]# cat .ssh/config
host 192.168.1.10
KexAlgorithms=diffie-hellman-group14-sha1
HostKeyAlgorithms=+ssh-dss

root@BananaPi_BPi-R3 /root [#]# ssh ONTUSER@192.168.1.10
ONTUSER@192.168.1.10's password:


BusyBox v1.22.1 (2018-05-22 14:47:30 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

 OpenWrt - (14.07_ltq) --- Lantiq Edition for GPON
 ----------------------------------------------
ONTUSER@SFP:~#

Dzięki za pomoc.

Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

41 (edytowany przez Payti 2025-01-26 09:53:42)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Po wielu testach podaję jak dla mnie najlepsze ustawienia interfejsów, bridge'a dla wkładek GPON SFP w BPI-R3.
VLAN oczywiście trzeba podać swój jaki daje operator.

root@BananaPi_BPi-R3 /root [#]# cat /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 'fd6d:dea7:1422::/48'
        option packet_steering '1'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'
        list ports 'sfp2'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '20.0.0.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'br-wan'
        option type 'bridge'
        list ports 'wan'

config device
        option name 'eth1'
        option macaddr '2b:10:1f:92:cc:55'

config device
        option name 'wan'

config interface 'wan'
        option device 'eth1.300'
        option proto 'dhcp'

config interface 'wan6'
        option device 'br-wan'
        option proto 'dhcpv6'

config interface 'sfp'
        option proto 'static'
        option device 'eth1'
        option ipaddr '192.168.1.15'
        option netmask '255.255.255.0'

config device
        option type '8021q'
        option ifname 'eth1'
        option vid '300'
        option name 'eth1.300'

root@BananaPi_BPi-R3 /root [#]#

Wkładka GPON osiągalna z GUI, SSH z adersu: 192.168.1.10
Poniżej opóźnienie podniesienia interfejsu WAN dobrane dla startu linuxa w SFP GPON.

root@BananaPi_BPi-R3 /root [#]# cat /etc/rc.local

(sleep 5; /sbin/ifdown wan) &
(sleep 60; /sbin/ifup wan) &

exit 0
root@BananaPi_BPi-R3 /root [#]#

Oraz co ma być w /etc/config/firewall:

root@BananaPi_BPi-R3 /root [#]# cat /etc/config/firewall

config defaults
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option synflood_protect '1'
        option flow_offloading '1'
        option flow_offloading_hw '1'

config zone
        option name 'lan'
        option input 'ACCEPT'
        option output 'ACCEPT'
        option forward 'ACCEPT'
        list network 'lan'

config zone
        option name 'wan'
        option input 'REJECT'
        option output 'ACCEPT'
        option forward 'REJECT'
        option masq '1'
        option mtu_fix '1'
        list network 'wan'
        list network 'wan6'
        list network 'sfp'

config forwarding
        option src 'lan'
        option dest 'wan'

config rule
...
...
...

root@BananaPi_BPi-R3 /root [#]#
Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

42

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Polecicie jakąś wkładkę SFP RJ45 na 2.5Gbit? Mam sytuację podobną jak ktoś z BPi-R4 w tym wątku i podobnie nie chcę dokładać switcha, a tylko wkładkę na miedź.

Spojrzałem na
https://www.aliexpress.com/item/1005005201644428.html
i
https://www.aliexpress.com/item/1005006786478583.html
- czy to się różni czymkolwiek poza ceną? Może iść w coś takiego? A jeśli nie, to w co?

43 (edytowany przez Payti 2025-05-07 18:27:56)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Moim zdaniem spokojnie tą tańszą możesz kupić (87,59zł) z pierwszego linku ... Powinna działać (wg opisu kompatybilna z BPi-R3).
Jak już Ci dotrze pochwal się, dopiszemy do info o wkładkach jak się zgłasza wg mojej metody testów ... (uname -a, dmesg | tail, ethtool sfp2, ethtool -m sfp2)

Banana Pi BPI-R3 + SFP GPON ONT Nokia G-010S-A + LTE FIBOCOM L860-GL-16 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3600 (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
Xiaomi AX3000T (OpenWrt 25.12-SNAPSHOT, kernel 6.12.71)
All OpenWRT compilations from ASU by @Cezary

44

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Ceną też nie wiele się różnią, ta pierwsza z wysyłką 124,16 zł, druga 112,10 zł .
Przynajmniej mnie się takie ceny wyświetlają.

45

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

podobna cena za multigig 1/2.5/5/10Gb ?>

Dom : router https://i.imgur.com/IuB6Zwy.png | TP-LINK T1700G-28TQ |Zyxel XGS-1210-12 | 6x Ruckus r310 unleashed  + Ruckus icx7150-c12p | Truenas scale 124TB 25Gb| Xpenology 12TB | apc smart ups 750 lcd smile 100Mb/s - 25Gb/s
Podróżne : GL.Inet MT3000  +1TB hdd
Działka : rb260gs 1j wdm 1Gb+ ruckus r310 + nb m5 + kilka kamer ip  + panel 285Wp + lifepo4 12v 60Ah .

46

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Faktycznie nie zwróciłem uwagi, że w pierwszym linku cena była bez kosztów wysyłki - i finalnie wychodziło cenowo podobnie.
Zamówiłem sztukę, jak dotrze i zepnę do routera - podeślę info.
A najważniejsze na koniec będzie dla mnie jak spisuje się wydajnościowo cała konfiguracja NAS <--2.5G--> router, chociaż póki co nie mam jak wykorzystać tej przepustowości dalej do klientów.

47

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Jak masz coś po drugiej stronie 2.5 to sprawdź czy zestawia się na 2.5 i sprawdź iperferm czy te 2.5 jest w stanie przerzucić.

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

48

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Tutaj kupiłem do r3
https://s.click.aliexpress.com/e/_EuiXu9C

Warto sprzedawcy napisać do czego wkładka będzie użyta.

49

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

Dzięki, ale już za późno. Kupiłem to https://www.aliexpress.com/item/1005006786478583.html i już jest w drodze.

50 (edytowany przez sqoorch 2025-05-23 09:12:06)

Odp: BPi-R3 i wkładka SFP GPON ONT oraz inne wkładki SFP 1Gbps, 2.5Gbps

sqoorch napisał/a:

Zamówiłem sztukę, jak dotrze i zepnę do routera - podeślę info.

Testowałem na 23.05 r24176-880258bb1d, przy okazji dłubania zrobię aktualizację do 24.10, wymianę wiatraczka itp.

# uname -a
Linux trzykorony 5.15.180 #0 SMP Sun Apr 13 00:53:07 2025 aarch64 GNU/Linux

# dmesg | tail
sfp sfp-2: module OEM              SFP-2.5G-T-R-RM  rev 1.0  sn 2502190019       dc 250220  
hwmon hwmon4: temp1_input not attached to any thermal zone

# ethtool -m sfp2
    Identifier                                : 0x03 (SFP)
    Extended identifier                       : 0x04 (GBIC/SFP defined by 2-wire interface ID)
    Connector                                 : 0x07 (LC)
    Transceiver codes                         : 0x00 0x01 0x00 0x00 0x00 0x00 0x02 0x00 0x00
    Transceiver type                          : SONET: OC-48, short reach
    Encoding                                  : 0x05 (SONET Scrambled)
    BR, Nominal                               : 2500MBd
    Rate identifier                           : 0x00 (unspecified)
    Length (SMF,km)                           : 0km
    Length (SMF)                              : 0m
    Length (50um)                             : 300m
    Length (62.5um)                           : 200m
    Length (Copper)                           : 0m
    Length (OM3)                              : 0m
    Laser wavelength                          : 850nm
    Vendor name                               : OEM
    Vendor OUI                                : 00:00:00
    Vendor PN                                 : SFP-2.5G-T-R-RM
    Vendor rev                                : 1.0
    Option values                             : 0x00 0x1a
    Option                                    : RX_LOS implemented
    Option                                    : TX_FAULT implemented
    Option                                    : TX_DISABLE implemented
    BR margin, max                            : 0%
    BR margin, min                            : 0%
    Vendor SN                                 : 2502190019
    Date code                                 : 250220
    Optical diagnostics support               : Yes
    Laser bias current                        : 6.000 mA
    Laser output power                        : 0.5000 mW / -3.01 dBm
    Receiver signal average optical power     : 0.4000 mW / -3.98 dBm
    Module temperature                        : 41.88 degrees C / 107.39 degrees F
    Module voltage                            : 3.3255 V
    Alarm/warning flags implemented           : Yes
    Laser bias current high alarm             : Off
    Laser bias current low alarm              : Off
    Laser bias current high warning           : Off
    Laser bias current low warning            : Off
    Laser output power high alarm             : Off
    Laser output power low alarm              : Off
    Laser output power high warning           : Off
    Laser output power low warning            : Off
    Module temperature high alarm             : Off
    Module temperature low alarm              : Off
    Module temperature high warning           : Off
    Module temperature low warning            : Off
    Module voltage high alarm                 : Off
    Module voltage low alarm                  : Off
    Module voltage high warning               : Off
    Module voltage low warning                : Off
    Laser rx power high alarm                 : Off
    Laser rx power low alarm                  : Off
    Laser rx power high warning               : Off
    Laser rx power low warning                : Off
    Laser bias current high alarm threshold   : 15.000 mA
    Laser bias current low alarm threshold    : 1.000 mA
    Laser bias current high warning threshold : 13.000 mA
    Laser bias current low warning threshold  : 2.000 mA
    Laser output power high alarm threshold   : 1.9952 mW / 3.00 dBm
    Laser output power low alarm threshold    : 0.1584 mW / -8.00 dBm
    Laser output power high warning threshold : 1.5848 mW / 2.00 dBm
    Laser output power low warning threshold  : 0.1778 mW / -7.50 dBm
    Module temperature high alarm threshold   : 95.00 degrees C / 203.00 degrees F
    Module temperature low alarm threshold    : -50.00 degrees C / -58.00 degrees F
    Module temperature high warning threshold : 90.00 degrees C / 194.00 degrees F
    Module temperature low warning threshold  : -45.00 degrees C / -49.00 degrees F
    Module voltage high alarm threshold       : 3.6000 V
    Module voltage low alarm threshold        : 3.0000 V
    Module voltage high warning threshold     : 3.5000 V
    Module voltage low warning threshold      : 3.1000 V
    Laser rx power high alarm threshold       : 1.1220 mW / 0.50 dBm
    Laser rx power low alarm threshold        : 0.0199 mW / -17.01 dBm
    Laser rx power high warning threshold     : 1.0000 mW / 0.00 dBm
    Laser rx power low warning threshold      : 0.0223 mW / -16.52 dBm

# ethtool sfp2
Settings for sfp2:
    Supported ports: [ FIBRE ]
    Supported link modes:   2500baseX/Full 
    Supported pause frame use: Symmetric Receive-only
    Supports auto-negotiation: Yes
    Supported FEC modes: Not reported
    Advertised link modes:  2500baseX/Full 
    Advertised pause frame use: Symmetric Receive-only
    Advertised auto-negotiation: Yes
    Advertised FEC modes: Not reported
    Speed: 2500Mb/s
    Duplex: Full
    Port: FIBRE
    PHYAD: 0
    Transceiver: internal
    Auto-negotiation: on
    Supports Wake-on: d
    Wake-on: d
    Link detected: no

# dmesg przy wpięciu kabla 
[268940.512547] mt7530-mdio mdio-bus:1f sfp2: Link is Up - 2.5Gbps/Full - flow control off
[268940.512740] br-lan: port 5(sfp2) entered blocking state
[268940.525845] br-lan: port 5(sfp2) entered forwarding state

# + zmiana w ethtool sfp2
    Link detected: yes

Nieco smuci, że obsługuje tylko link 2.5G, więc nie posłuży za dodatkowy port 1G w razie potrzeby.

Test przepustowości - na drugim końcu kabla wpięty QNAP TS-216G, który ma port 2.5G.
Iperf serwer uruchomiony na BPi-R3, testy puszczane z nasa:

$ ./iperf3 -c 10.0.0.1 -t 30
Connecting to host 10.0.0.1, port 5201
[  5] local 10.0.0.3 port 44736 connected to 10.0.0.1 port 5201
[ ID] Interval           Transfer     Bitrate         Retr  Cwnd
[  5]   0.00-1.00   sec   263 MBytes  2.20 Gbits/sec    0   1.27 MBytes       
[  5]   1.00-2.00   sec   255 MBytes  2.14 Gbits/sec    0   1.34 MBytes       
[  5]   2.00-3.00   sec   266 MBytes  2.23 Gbits/sec    0   1.49 MBytes       
[  5]   3.00-4.00   sec   261 MBytes  2.19 Gbits/sec    0   1.66 MBytes       
[  5]   4.00-5.00   sec   260 MBytes  2.18 Gbits/sec    0   2.05 MBytes       
[  5]   5.00-6.00   sec   242 MBytes  2.03 Gbits/sec    0   2.05 MBytes       
[  5]   6.00-7.00   sec   254 MBytes  2.13 Gbits/sec    0   2.16 MBytes       
[  5]   7.00-8.00   sec   262 MBytes  2.20 Gbits/sec    0   2.16 MBytes       
[  5]   8.00-9.00   sec   261 MBytes  2.19 Gbits/sec    0   2.28 MBytes       
[  5]   9.00-10.00  sec   255 MBytes  2.14 Gbits/sec    0   2.28 MBytes       
[  5]  10.00-11.00  sec   243 MBytes  2.04 Gbits/sec    0   2.28 MBytes       
[  5]  11.00-12.00  sec   258 MBytes  2.16 Gbits/sec    0   2.28 MBytes       
[  5]  12.00-13.00  sec   255 MBytes  2.14 Gbits/sec    0   2.28 MBytes       
[  5]  13.00-14.00  sec   243 MBytes  2.04 Gbits/sec    0   2.39 MBytes       
[  5]  14.00-15.00  sec   263 MBytes  2.21 Gbits/sec    0   2.39 MBytes       
[  5]  15.00-16.00  sec   259 MBytes  2.17 Gbits/sec    0   2.39 MBytes       
[  5]  16.00-17.00  sec   250 MBytes  2.10 Gbits/sec    0   2.39 MBytes       
[  5]  17.00-18.00  sec   234 MBytes  1.96 Gbits/sec    0   2.39 MBytes       
[  5]  18.00-19.00  sec   235 MBytes  1.97 Gbits/sec    0   2.39 MBytes       
[  5]  19.00-20.00  sec   219 MBytes  1.84 Gbits/sec    0   2.39 MBytes       
[  5]  20.00-21.00  sec   211 MBytes  1.77 Gbits/sec    0   2.39 MBytes       
[  5]  21.00-22.00  sec   280 MBytes  2.35 Gbits/sec    0   2.57 MBytes       
[  5]  22.00-23.00  sec   231 MBytes  1.94 Gbits/sec    0   3.85 MBytes       
[  5]  23.00-24.00  sec   243 MBytes  2.04 Gbits/sec    0   3.85 MBytes       
[  5]  24.00-25.00  sec   249 MBytes  2.09 Gbits/sec    0   3.85 MBytes       
[  5]  25.00-26.00  sec   267 MBytes  2.24 Gbits/sec    0   3.85 MBytes       
[  5]  26.00-27.00  sec   232 MBytes  1.95 Gbits/sec    0   3.85 MBytes       
[  5]  27.00-28.00  sec   248 MBytes  2.08 Gbits/sec    0   3.85 MBytes       
[  5]  28.00-29.00  sec   234 MBytes  1.96 Gbits/sec    0   3.85 MBytes       
[  5]  29.00-30.00  sec   261 MBytes  2.18 Gbits/sec    0   3.85 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-30.00  sec  7.32 GBytes  2.10 Gbits/sec    0             sender
[  5]   0.00-30.01  sec  7.31 GBytes  2.09 Gbits/sec                  receiver

iperf Done.

$ ./iperf3 -c 10.0.0.1 -t 30 -R
Connecting to host 10.0.0.1, port 5201
Reverse mode, remote host 10.0.0.1 is sending
[  5] local 10.0.0.3 port 44802 connected to 10.0.0.1 port 5201
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   272 MBytes  2.28 Gbits/sec                  
[  5]   1.00-2.00   sec   266 MBytes  2.23 Gbits/sec                  
[  5]   2.00-3.00   sec   247 MBytes  2.07 Gbits/sec                  
[  5]   3.00-4.00   sec   218 MBytes  1.83 Gbits/sec                  
[  5]   4.00-5.00   sec   241 MBytes  2.02 Gbits/sec                  
[  5]   5.00-6.00   sec   275 MBytes  2.30 Gbits/sec                  
[  5]   6.00-7.00   sec   274 MBytes  2.29 Gbits/sec                  
[  5]   7.00-8.00   sec   276 MBytes  2.32 Gbits/sec                  
[  5]   8.00-9.00   sec   273 MBytes  2.29 Gbits/sec                  
[  5]   9.00-10.00  sec   263 MBytes  2.21 Gbits/sec                  
[  5]  10.00-11.00  sec   277 MBytes  2.33 Gbits/sec                  
[  5]  11.00-12.00  sec   280 MBytes  2.35 Gbits/sec                  
[  5]  12.00-13.00  sec   276 MBytes  2.31 Gbits/sec                  
[  5]  13.00-14.00  sec   279 MBytes  2.34 Gbits/sec                  
[  5]  14.00-15.00  sec   271 MBytes  2.27 Gbits/sec                  
[  5]  15.00-16.00  sec   280 MBytes  2.35 Gbits/sec                  
[  5]  16.00-17.00  sec   279 MBytes  2.34 Gbits/sec                  
[  5]  17.00-18.00  sec   271 MBytes  2.27 Gbits/sec                  
[  5]  18.00-19.00  sec   244 MBytes  2.05 Gbits/sec                  
[  5]  19.00-20.00  sec   276 MBytes  2.32 Gbits/sec                  
[  5]  20.00-21.00  sec   185 MBytes  1.55 Gbits/sec                  
[  5]  21.00-22.00  sec   221 MBytes  1.86 Gbits/sec                  
[  5]  22.00-23.00  sec   279 MBytes  2.34 Gbits/sec                  
[  5]  23.00-24.00  sec   266 MBytes  2.24 Gbits/sec                  
[  5]  24.00-25.00  sec   272 MBytes  2.29 Gbits/sec                  
[  5]  25.00-26.00  sec   274 MBytes  2.30 Gbits/sec                  
[  5]  26.00-27.00  sec   274 MBytes  2.29 Gbits/sec                  
[  5]  27.00-28.00  sec   275 MBytes  2.30 Gbits/sec                  
[  5]  28.00-29.00  sec   278 MBytes  2.33 Gbits/sec                  
[  5]  29.00-30.00  sec   278 MBytes  2.33 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bitrate         Retr
[  5]   0.00-30.00  sec  7.76 GBytes  2.22 Gbits/sec  2582             sender
[  5]   0.00-30.00  sec  7.76 GBytes  2.22 Gbits/sec                  receiver

iperf Done.

Największa wartość, jaką zaobserwowałem w ciągu paru minut, to 2.30 Gbits/sec przy serwerze odpalonym na qnapie i kliencie na BPi-R3.