[Berlin-wireless] TP-Link CPE210 v1.0 mit Berliner Hedy 1.0.6 (port switch) - Github-Issue 292

Daniel Stobbe daniel at mameso.com
Do Jun 18 00:51:41 CEST 2020


Hallo Sven,

schön zu sehen das da an einem Script gearbeiet wird.

Ich hatte bisher nur diese "Außen-Hotspots" - bei meinem ersten Dez 2014
beim Congress erworben, hatte mir noch jemand vor Ort gezeigt wie das
switchen geht und ich hatte es bei den CPE's und Nanostation Loco's immer
irgendwie hin bekommen - meist mit Hilfe hier aus der Mailingliste oder dem
Forum.

Ich hab es mal mit dem Script versucht:
 - CPE210 reseted
 - Passwort gesetzt & wizard durchgespielt (mitmachen und internet teilen)
 - ssh roo login und dann das:

*/# cat /etc/config/network*

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

config globals 'globals'
option ula_prefix 'fd48:8113:eebd::/48'

config interface 'lan'
option type 'bridge'
option ifname 'eth0.1'
option proto 'static'
option netmask '255.255.255.0'
option ip6assign '60'
option ipaddr '192.168.42.1'

config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
option peerdns '0'
option type 'bridge'

config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'
option peerdns '0'

config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'

config switch_vlan
option device 'switch0'
option vlan '1'
option ports '5 0t'

config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 0t'

config interface 'ffuplink'
option ifname 'ffuplink'
option ip4table 'ffuplink'
option ip6table 'ffuplink'
option proto 'dhcp'

config interface 'tunl0'
option ifname 'tunl0'
option proto 'none'

config device 'ffuplink_dev'
option name 'ffuplink'
option macaddr 'fe:16:63:11:f4:07'

config rule 'olsr_allif_ipv4'
option lookup 'olsr'
option priority '1000'

config rule 'localnets_allif_ipv4'
option lookup 'localnets'
option priority '2000'

config rule 'olsr_tunnel_tunl0_ipv4'
option lookup 'olsr-tunnel'
option priority '19999'
option in 'tunl0'

config rule 'olsr_default_tunl0_ipv4'
option lookup 'olsr-default'
option priority '20000'
option in 'tunl0'

config rule 'olsr_default_unreachable_tunl0_ipv4'
option action 'unreachable'
option priority '20001'
option in 'tunl0'


*/# cd /tmp//tmp# wget
https://raw.githubusercontent.com/freifunk-berlin/firmware-packages/configtools/addons/freifunk-berlin-configtools/root/usr/share/freifunk-berlin/sharenet-switch.sh
<https://raw.githubusercontent.com/freifunk-berlin/firmware-packages/configtools/addons/freifunk-berlin-configtools/root/usr/share/freifunk-berlin/sharenet-switch.sh>*

*/tmp# chmod +x ./sharenet-switch.sh/tmp# ./sharenet-switch.sh*
usage ./sharenet-switch.sh -c [commit]
share my internet - set WAN to PoE-port
cpe210
cpe210 - found swapping switch ports
checking interface cfg081ec7
 vlan "1" has ports "5 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
checking interface cfg0a1ec7
 vlan "2" has ports "4 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
checking interface cfg081ec7
 vlan "1" has ports "5 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
checking interface cfg0a1ec7
 vlan "2" has ports "4 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
---
found port 4 in config-section "cfg0a1ec7 cfg081ec7 "
found port 5 in config-section "cfg0a1ec7 cfg081ec7 "
---
change section cfg0a1ec7
 current ports: 4 0t
  replacing 4 with 5
change section cfg081ec7
 current ports: 5 0t
  replacing 4 with 5
change section cfg0a1ec7
 current ports: 4 0t
  replacing 5 with
change section cfg081ec7
 current ports: 4 0t
  replacing 5 with
uci dont commit network

*/tmp# ./sharenet-switch.sh -c*
usage ./sharenet-switch.sh -c [commit]
share my internet - set WAN to PoE-port
cpe210
cpe210 - found swapping switch ports
checking interface cfg081ec7
 vlan "1" has ports "5 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
checking interface cfg0a1ec7
 vlan "2" has ports "5 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
checking interface cfg081ec7
 vlan "1" has ports "5 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
checking interface cfg0a1ec7
 vlan "2" has ports "5 0t"
./sharenet-switch.sh: eval: line 1: _option_contains_: not found
 -> not found
---
found port 4 in config-section "cfg0a1ec7 cfg081ec7 "
found port 5 in config-section "cfg0a1ec7 cfg081ec7 "
---
change section cfg0a1ec7
 current ports: 5 0t
  replacing 4 with 5
change section cfg081ec7
 current ports: 5 0t
  replacing 4 with 5
change section cfg0a1ec7
 current ports: 4 0t
  replacing 5 with
change section cfg081ec7
 current ports: 4 0t
  replacing 5 with
uci commit network
packet_write_wait: Connection to 192.168.11.186 port 22: Broken pipe

[Gerät neu gestartet aber war dann nicht mehr pingbar, obwohl noch beide
LAN Ports mit LAN Kabel bestückt, testweise auch mal mit entferntem 2ten
Kabel - aber auch nichts]

Ich schätze mal die "./sharenet-switch.sh: eval: line 1: _option_contains_:
not found" sind Fehler die dafür sorgen das es nicht funktioniert?

Was kann ich weiter machen?

BG und Danke für die Hilfe,
Daniel



Am Di., 16. Juni 2020 um 23:30 Uhr schrieb Sven Roederer <
freifunk at it-solutions.geroedel.de>:

> Hallo Daniel,
>
> Das Thema wird ja regelmäßig aufgeworfen.
> Für die aktuelle Entwicklungs-Firmware gibt es zaghafte Schritte, das
> anzugehen
> ([1] und [2]). Da die ID-Strings der Router hier aber meist
> unterschiedlich zu
> denen der veröffentlichten Firmwareversionen sind, wird das Script
> wahrscheinlich
> nicht funktionieren.
> Aber auch wenn 0.3.0 noch auf OpenWrt 15.x basiert, sollte sich das nicht
> vom
> Lede-17.x basierten Hedy-1.0.6 unterscheiden. Das "configtool"-script macht
> in der aktuellsten Version [3] nix anderes als die LAN-ports der VLans 1
> und 2
> am Switch zu vertauschen (Port 4 wird zu 5 und 5 wird zu 4). Das sollte so
> auch
> bei dir klappen.
> Sieh mal per SSH in die Datei /etc/config/network.
>
> Gruss Sven
>
> 1 - https://github.com/freifunk-berlin/firmware/issues/292
> 2 -
> https://github.com/freifunk-berlin/firmware-packages/tree/master/addons/freifunk-berlin-configtools
> 3 -
> https://github.com/freifunk-berlin/firmware-packages/blob/configtools/addons/freifunk-berlin-configtools/root/usr/share/freifunk-berlin/sharenet-switch.sh
>
>
> Am 16.06.20 um 10:43 schrieb Daniel Stobbe:
> > Hallo,
> >
> > seit ich CPE210 und 510 flashe, ist bei der Berliner Firmware eth0 und
> eth1 vertauscht. Für manche sicherlich sinnvoll, bei meinen Installationen
> leider nicht.
> >
> > eth0:
> > nimmt Strom via PoE und macht nen DHCP auf und verteilt das Netzt da
> auch vie WLAN verteilt wird
> >
> > eth1: nimmt sich eine IP via DHCP und nutzt damit das Internet,
> verbindet zum VPN
> >
> > Ich möchte aber nicht 2 LAN Kabel zum Router ziehen müssen.
> >
> > Daher habe ich bisher immer die Funktionalität so getauscht:
> >
> >   * flash firmware (yes - reset config)
> >   * z.B. v0.3.0: kathleen-0.3.0-cpe210-220-510-520-factory
> >   * LAN connect on second Port(LAN1), connect via dhcp, set password,
> ignore config wizard and go to Net/Switch change port4+5 on both VLANs
> >   * reboot, remove LAN1 cable and use wizard for config freifunk
> >
> > leider bekomme ich es in der aktuellen Firmware 1.0.6 nicht mehr hin.
> > Die Switch0 Config sieht anders aus und ich habe da mitterweile alle
> kombinationen getestet, so das ich glaube ich muss noch an anderer Stelle
> was ändern.
> >
> > Tauschen von untagged/aus + reboot reicht nicht mehr aus.
> >
> > Die Standardeinstellungen sind in den beiden Screenshots zu sehen.
> >
> > Weiß jemand was ich machen muss?
> >
> > Würde gern einige Router auf aktuelle Firmware updaten.
> >
> > Besten Dank,
> > Daniel.
>
>
-------------- nächster Teil --------------
Ein Dateianhang mit HTML-Daten wurde abgetrennt...
URL: <https://lists.berlin.freifunk.net/pipermail/berlin/attachments/20200618/6436b6c0/attachment.html>


Mehr Informationen über die Mailingliste Berlin