Ubiquiti EdgeRouter: Unterschied zwischen den Versionen

Aus Opennet
Wechseln zu: Navigation, Suche
(Firmware flashen)
(Firmware flashen)
(4 dazwischenliegende Versionen von einem Benutzer werden nicht angezeigt)
Zeile 42: Zeile 42:
 
=== Firmware flashen ===
 
=== Firmware flashen ===
  
* Vorab: Download Dateien (Factory, Upgrade) müssen passend ersetzt werden; IP Adressierung zunächst statisch innerhalb 192.168.1.0/24
+
* Vorab: Download Dateien (Factory, Upgrade) müssen passend ersetzt werden; IP Adressierung statisch innerhalb 192.168.1.0/24
 
* zunächst von Originalfirmware (Besonderheit: Flash Größe) auf OpenWrt/LEDE wechseln per ''initramfs'' Factory Image, via Port eth0:
 
* zunächst von Originalfirmware (Besonderheit: Flash Größe) auf OpenWrt/LEDE wechseln per ''initramfs'' Factory Image, via Port eth0:
 
  wget https://downloads.opennet-initiative.de/ubnt/edgeos/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
 
  wget https://downloads.opennet-initiative.de/ubnt/edgeos/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
Zeile 49: Zeile 49:
 
   <bzw. ER-X-SFP> scp openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar ubnt@192.168.1.1:/tmp
 
   <bzw. ER-X-SFP> scp openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar ubnt@192.168.1.1:/tmp
 
  ssh ubnt@192.168.1.1  [ PW = ubnt ]
 
  ssh ubnt@192.168.1.1  [ PW = ubnt ]
cd /tmp
+
  add system image /tmp/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
  add system image openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
+
 
   <bzw. ER-X-SFP> add system image openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar
 
   <bzw. ER-X-SFP> add system image openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar
 
   Checking upgrade image...Done
 
   Checking upgrade image...Done
Zeile 71: Zeile 70:
 
   The system is going down for reboot NOW!
 
   The system is going down for reboot NOW!
 
* anschließend OpenWrt/LEDE auf die passende Opennet Firmware aktualisieren, via Port eth1
 
* anschließend OpenWrt/LEDE auf die passende Opennet Firmware aktualisieren, via Port eth1
  wget https://downloads.opennet-initiative.de/openwrt/stable/0.5.5/targets/ramips/mt7621/openwrt-0.5.5-2750-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
+
  wget https://downloads.opennet-initiative.de/openwrt/stable/0.5.6/targets/ramips/mt7621/openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
   <bzw. ER-X-SFP> wget https://downloads.opennet-initiative.de/openwrt/stable/0.5.5/targets/ramips/mt7621/openwrt-0.5.5-2750-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin
+
   <bzw. ER-X-SFP> wget https://downloads.opennet-initiative.de/openwrt/stable/0.5.6/targets/ramips/mt7621/openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin
  scp openwrt-0.5.5-2750-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
+
  scp openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
   <bzw. ER-X-SFP> scp openwrt-0.5.5-2750-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
+
   <bzw. ER-X-SFP> scp openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
 
  ssh root@192.168.1.1  [ PW = <leer> ]
 
  ssh root@192.168.1.1  [ PW = <leer> ]
  cd /tmp
+
  sysupgrade /tmp/openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
sysupgrade openwrt-0.5.5-2750-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
+
   <bzw. ER-X-SFP> sysupgrade openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin
   <bzw. ER-X-SFP> sysupgrade --force -n openwrt-0.5.5-2750-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin
+
 
   Cannot save config while running from ramdisk.
 
   Cannot save config while running from ramdisk.
 
   killall: watchdog: no process killed
 
   killall: watchdog: no process killed
Zeile 157: Zeile 155:
 
==== HNA/NAT - Routing via OLSR ====
 
==== HNA/NAT - Routing via OLSR ====
  
Notwendig für Nachbarn ohne eigenen OLSR Dienst, wie [[MikroTik RouterBoard]] oder [[Ubiquiti NanoBeam AC]]. Einrichtung siehe [[Opennet Firmware für Fortgeschrittene]].
+
Notwendig für Nachbarn ohne eigenen OLSR Dienst, wie [[MikroTik RouterBoard]] oder [[Ubiquiti GigaBeam]]. Einrichtung siehe [[Opennet Firmware für Fortgeschrittene]].
  
 
==== SFP Slot - Status abrufen ====
 
==== SFP Slot - Status abrufen ====

Version vom 11. September 2022, 17:45 Uhr

Inhaltsverzeichnis

Allgemeines

EdgeRouter X mit Switch / AP

Der EdgeRouter eignet sich als OLSR, VPN Router oder Switch mit Opennet Firmware. Es besitzt keine WLAN Schnittstellen.

Der ER-X besitzt einen Gigabit Port mit Passiv PoE Eingang (24 V, eth0) und kann so ohne Netzteil betrieben werden. Weiterhin gibt es beim ER-X einen Gigabit Port und bei ER-X-SFP fünf Gigabit Ports mit Passiv PoE Ausgang (24 V, eth4 bzw. eth0..4) um Access Points anzuschließen. Beim ER-X gibt es dann noch drei weitere Gigabit Ports zur weiteren Verwendung (eth1/2/3) ohne PoE. Der ER-X-SFP besitzt einen SFP Port, welcher mit Kupfer oder LWL Transceivern bestückt werden kann (eth5).

In der Originalfirmware findet das Management via 192.168.1.1/24 auf eth0 per HTTPS und SSH statt (Benutzer ubnt). In OpenWrt/LEDE über den Port eth1.

Modelle

Hier behandeln wir den "EdgeRouter X" (ER-X). Es gibt weitere Modelle, diese sind ggf. nicht OpenWrt/LEDE tauglich.

Modell Abmessungen Prozessor Arbeitsspeicher (MB) Flash (MB) Gewinn Anmerkungen
Ubiquiti EdgeRouter X 110 x 75 x 22 Dual-Core 880 MHz, MIPS1004Kc 256 (DDR3) 256 - 175 g / Passive PoE-In + 1x PoE-Out
Ubiquiti EdgeRouter X SFP 142 x 75 x 23 Dual-Core 880 MHz, MIPS1004Kc 256 (DDR3) 256 - 215 g / 5x Passive PoE-Out (50 W) + 1 Gigabit-SFP

SFP: https://help.ubnt.com/hc/en-us/articles/205220850-EdgeSwitch-SFP-SFP-and-DAC-Compatibility-List

Firmware flashen

  • Vorab: Download Dateien (Factory, Upgrade) müssen passend ersetzt werden; IP Adressierung statisch innerhalb 192.168.1.0/24
  • zunächst von Originalfirmware (Besonderheit: Flash Größe) auf OpenWrt/LEDE wechseln per initramfs Factory Image, via Port eth0:
wget https://downloads.opennet-initiative.de/ubnt/edgeos/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
 <bzw. ER-X-SFP> wget https://downloads.opennet-initiative.de/ubnt/edgeos/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar
scp openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar ubnt@192.168.1.1:/tmp
 <bzw. ER-X-SFP> scp openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar ubnt@192.168.1.1:/tmp
ssh ubnt@192.168.1.1  [ PW = ubnt ]
add system image /tmp/openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-initramfs-factory.tar
 <bzw. ER-X-SFP> add system image openwrt-18.06-snapshot-r7911-f65330d27d-ramips-mt7621-ubnt-erx-sfp-initramfs-factory.tar
  Checking upgrade image...Done
  Preparing to upgrade...Done
  Copying upgrade image.../usr/bin/ubnt-upgrade: line 509: [: too many arguments
  Done
  Removing old image...Done
  Checking upgrade image...Done
  Copying config data...Done
  Finishing upgrade...Done
  Upgrade completed
show system image
  The system currently has the following image(s) installed:
  ramips r5484-69d22a6 SNAPSHOT (default boot) 
  v1.7.1.4821926.151103.1114 (running image) 
  A reboot is needed to boot default image
reboot 
  Proceed with reboot? [confirm][y]
  Broadcast message from root@ubnt (pts/1) (Thu Jan  1 01:10:25 2015):
  The system is going down for reboot NOW!
  • anschließend OpenWrt/LEDE auf die passende Opennet Firmware aktualisieren, via Port eth1
wget https://downloads.opennet-initiative.de/openwrt/stable/0.5.6/targets/ramips/mt7621/openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
 <bzw. ER-X-SFP> wget https://downloads.opennet-initiative.de/openwrt/stable/0.5.6/targets/ramips/mt7621/openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin
scp openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
 <bzw. ER-X-SFP> scp openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
ssh root@192.168.1.1  [ PW = <leer> ]
sysupgrade /tmp/openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
 <bzw. ER-X-SFP> sysupgrade openwrt-0.5.6-2885-ramips-mt7621-ubnt-erx-sfp-squashfs-sysupgrade.bin
  Cannot save config while running from ramdisk.
  killall: watchdog: no process killed
  Commencing upgrade. All shell sessions will be closed now.
  Connection to 192.168.1.1 closed by remote host.
  Connection to 192.168.1.1 closed.
  • anschließend per DHCP Client via Port eth1 verbinden, Opennet Firmware per 172.16.0.1 erreichbar (Anmeldung root/admin)
Belegung als OLSR Router

Konfiguration

VLAN Konfiguration

Netzwerk

Beispiel bei Einsatz als WLAN-LAN-Router (Backbone mit 802.11ac WLAN Technik):

  • eth0 = WAN, Anpassung auf on_eth_0 vornehmen; der Port ist gleichzeitig die Stromversorgung (PoE In)
  • eth1/2/3 = LAN, bleibt als Management Port; die Ports sind ohne PoE
  • eth4 = LAN, Anpassung auf on_eth_1 vornehmen, Firewall Zone "on_mesh", hierzu unter "Switch" ein VLAN 3 anlegen (CPU = tagged, LAN4 = untagged, Rest = Aus; LAN4 auf anderen VLANs auf "Aus" setzen); der Port liefert gleichzeitig Strom (PoE Out)
Interface Konfiguration

Auf on_eth_1 wird die IP Adresse der Form 192.168.1x.y gesetzt, also die IP Adresse des APx.y für das zweite OLSR Interface lt. Adressierungsschema.

Kontrolle der physikalischen Ports des integrierten Switches per Kommandozeile:

swconfig list
swconfig dev switch0 port 5 show
swconfig dev switch0 vlan 3 show

PoE Durchleitung

Mit Integration ins Webinterface siehe: https://dev.opennet-initiative.de/ticket/197#comment:9

Ursprüngliche Lösung für ER-X (bereits im Opennet Webinterface):

# enable poe-out eth4
echo "0" > /sys/class/gpio/export
echo "out" > /sys/class/gpio/gpio0/direction
echo "1" > /sys/class/gpio/gpio0/value
Serial Pinout

Lösung für ER-X-SFP (noch nicht im Opennet Webinterface):

uci set system.poe_power_port0.value='0'
uci set system.poe_power_port1.value='0'
uci set system.poe_power_port2.value='1'
uci set system.poe_power_port3.value='1'
uci set system.poe_power_port4.value='1'
uci commit

Siehe auch: https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka#specific_configuration

Serielle Console - Firmware Recovery

Mit zwei Schrauben lässt sich das Gehäuse problemlos öffnen und der Zugang zur Console (Pins J3) ist möglich. Serial Einstellung ist 57600,8,N,1. Das Belegung der Pins ist 3.3V, RX, TX, Ground.

screen /dev/<usb-serial-interface> 57600

Über die Console kann auch die Wiederherstellung via TFTP Firmware Flash Vorgang eingeleitet werden. Details siehe auch http://sector5d.org/openwrt-on-the-ubiquiti-edgerouter-x.html

Im Bootmenü bestehen folgende Optionen (beim Einschalten passende Option wählen - 1 oder 2, Tastenanschlag muss vor der Anzeige des Menüs erfolgen):

Please choose the operation: 
  1: Load system code to SDRAM via TFTP. 
  2: Load system code then write to Flash via TFTP. 
  3: Boot system code via Flash (default).
  4: Entr boot command line interface.
  7: Load Boot Loader code then write to Flash via Serial. 
  9: Load Boot Loader code then write to Flash via TFTP. 
  r: Start TFTP recovery. 
default: 3

Laden eines Images in den RAM (eth0, TFTP Server unter 172.16.0.1):

1: System Load Linux to SDRAM via TFTP. 
Please Input new ones /or Ctrl-C to discard
       Input device IP (172.16.3.212) ==:172.16.0.100
       Input server IP (172.16.3.210) ==:172.16.0.1
       Input Linux Kernel filename (vme50) ==:ubnt-erx-sfp-initramfs-kernel.bin

HNA/NAT - Routing via OLSR

Notwendig für Nachbarn ohne eigenen OLSR Dienst, wie MikroTik RouterBoard oder Ubiquiti GigaBeam. Einrichtung siehe Opennet Firmware für Fortgeschrittene.

SFP Slot - Status abrufen

  • Link Status: phytool print eth0/7 - "flags +aneg-complete +link" = Verbindung ist aktiv (via Modul on-goodies)
  • Alternativ kann geprüft werden: /sys/class/mdio_bus/mdio-bus/device/net/eth0 und /sys/class/net
  • Transceiver Modell und Seriennummer: i2cdump -y 0 0x50 (via Paket i2c-tools)
Meine Werkzeuge
Namensräume

Varianten
Aktionen
Start
Opennet
Kommunikation
Karten
Werkzeuge