Nachádzate sa tu

Ubiquiti EdgeRouter - OpenWRT install via TFTP with Raspberry Pi

Download Tftpd64 installer.

http://tftpd32.jounin.net/tftpd32_download.html
Install Tftpd64.

Ubiquiti EdgeRouter X
Download
Firmware OpenWrt Install: openwrt-18.06.4-ramips-mt7621-ubnt-erx-initramfs-kernel.bin
Firmware OpenWrt Upgrade: openwrt-18.06.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.tar
https://openwrt.org/toh/ubiquiti/ubiquiti_edgerouter_x_er-x_ka

Set DHCP IP for PC:
netsh interface ip set dns "Ethernet" dhcp
netsh interface ip set address "Ethernet" dhcp
pause

Prepare folder EdgeRouterOpenWrt with file:
for example: openwrt-18.06.4-ramips-mt7621-ubnt-erx-initramfs-kernel.bin
and rename the file to: vme50

Set static IP for PC:
192.168.1.2 (Input server IP)
255.255.255.0
192.168.1.1
Bat file: netsh interface ip set address "Ethernet" static 192.168.1.2 255.255.255.0 192.168.1.1
pause

Run Tftpd64 as admin
Settings

GLOBAL tab
TFTP Server, DHCP Server

TFTP tab
Base Directory: C:\Users\user\Desktop\EdgeRouterOpenWrt
TFTP Security: None
PXE Compatibility: checked
Binde TFTP to this address: 192.168.1.2
Allow "\" As virtual root

DHCP tab
IP pool start address: 192.168.1.3
Size of pool: 4
Lease: 90
Boot File: vme50
DHCP Options
Def. router: 192.168.1.1
Mask: 255.255.255.0
DNS Servers: 192.168.1.1

OK, restart Tftpd64 as admin

Connect cable to EdgeRouter LAN1(eth0 Internet port)

Connect EdgeRouter with Raspberry Pi.
EdgeRouter GND -> Raspberry Pi pin 6 - GND
EdgeRouter Rx -> Raspberry Pi pin 8 - GPIO14 (UART Tx)
EdgeRouter Tx -> Raspberry Pi pin 10 - GPIO15 (UART Rx)

From Raspberry Pi:
cu -l /dev/ttyAMA0 -s 57600

Turn on EdgeRouter.

Choose quickly from menu:
1: System Load Linux to SDRAM via TFTP.
Input device IP (172.16.3.211) ==:192.168.1.1
Input server IP (172.16.3.210) ==:192.168.1.2
Input Linux Kernel filename (vme50) ==:

restart Tftpd64

After restart Tftpd64, Tftp Server sends the Boot File.
Close Tftpd64, EdgeRouter has OpenWRT on IP: 192.168.1.1 on LAN2-5(eth1-eth4).

Remove cable from LAN1(eth0 Internet port)

Set DHCP IP for PC:
netsh interface ip set dns "Ethernet" dhcp
netsh interface ip set address "Ethernet" dhcp
pause

Connect cable to LAN2-5
PC gets IP: 192.168.1.0/24
OpenWRT is on IP: 192.168.1.1
Powered by LuCI openwrt-18.06 branch (git-19.020.41695-6f6641d) / OpenWrt 18.06.2 r7676-cddd7b4c77

Flash OpenWRT to EdgeRouter.
Login to router 192.168.1.1
System->Backup / Flash Firmware
Flash new firmware image
Image: openwrt-18.06.4-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.tar
Flash image.
Done when LAN2 port is off and web interface is restarted.
Change LAN IP if necessary.
Done.


Raspberry Pi serial port setup:

µCast #18: Configure the Serial Port on the Raspberry Pi
https://www.youtube.com/watch?v=bKHLTn_nXUM

Raspberry Pi enable (serial) UART:
confix.txt
enable_uart=1

EdgeRouter

Connect: Rx, Tx and GND!

Raspberry Pi 3 UART Pins