User Tools

Site Tools


toh:mikrotik:rb951g_2hnd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Previous revision
toh:mikrotik:rb951g_2hnd [2013/04/18 15:03]
toh:mikrotik:rb951g_2hnd [2015/08/11 17:44] (current)
databeille Red light on L5 for RB951UI, not RB951G
Line 1: Line 1:
-====== MikroTik RouterBOARD 951G 2HnD ======+==== Mikrotik RouterBoard RB951G-2HnD ====
  
-===== Bord Layout ​Images =====+=== Hardware ​==
 +^ CPU ^ CPU Speed ^ RAM (MB) ^ NAND (MB) ^ Serial Flash ^ Ethernet Switch ^ PoE port ^ Wireless ^ USB ^ UART ^ JTAG ^ 
 +| AR9344 | 600 MHz | 128 (2x W9751G6KB-25) | 128 (1x TC58DVG02D5TA00-ND) | MX25L512E | Atheros AR8327 (10M/​100M/​1000M) | 1-in (2000mA) (7w) | AR9344-DC3A | 1x 2.0 | 1x onboard | 1x onboard | 
 +=== Download OpenWRT image === 
 +The 951G-2HnD is supported starting with OpenWRT 14.07. 
 +  wget -c https://​downloads.openwrt.org/​latest/​ar71xx/​mikrotik/​openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf 
 +  wget -c https://​downloads.openwrt.org/​latest/​ar71xx/​mikrotik/​openwrt-ar71xx-mikrotik-vmlinux-lzma.elf 
 +  wget -c https://​downloads.openwrt.org/​latest/​ar71xx/​mikrotik/​openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz 
 +  ln -s openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz openwrt-ar71xx-mikrotik-rootfs.tar.gz 
 +Installing OpenWRT is a two-stage process. First netboot the router via DHCP/TFTP to OpenWRT initramfs running in RAM. From that OpenWRT download/​install OpenWRT kernel and filesystem onto NAND Flash. That second stage overwrites the MikroTik OS (RouterOS) in NAND Flash, but it does not touch the MikroTik Bootloader. 
 +=== Netboot RG951G to OpenWrt in RAM === 
 +Connect port 1 (WAN port) to a network with a DHCP/TFTP server. Connect a PC to port 2..5 or WLAN. Log into RouterOS and set router to boot from ethernet once with DHCP: 
 +  - System -> Routerboard -> Settings -> Boot device: Try ethernet once then NAND 
 +  - System -> Routerboard -> Settings -> Force Backup Booter (Checked / Enabled !IMPORTANT) 
 +  - System -> Routerboard -> Settings -> Boot protocol: DHCP 
 +Copy openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf to your TFTP server location. Set up your DHCP server to point to your TFTP server as the next-server and to that file as the bootfile (see below how to use dnsmasq as DHCP+TFTP as an example).  
 +Reboot RG951G. If it netboots into OpenWRT, wireless LED will stay off. Otherwise, manually netboot RB951G: 
 +  - Unplug RB951G power jack  
 +  - Hold reset button 
 +  - Plug power jack 
 +  - Observe ACT LED.  
 +  - It first goes on continuously. Then it flashes. Then it goes on continuously. Then it goes off continuously. This will take 15..20 seconds. Then a beep sounds (5 seconds later). 
 +  - Release reset button. 
 +When successfull,​ You should be able to ping 192.168.1.1. 
 +If netbooting fails, reset RG951G to factory condition and try again: Same as netbooting, but release reset button when ACT flashed, then wait a minute or so until double-beep,​ then RouterOS is up and running. 
 + 
 +// How to use dnsmasq as DHCP + TFTP server // 
 + 
 +Copy openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf to /tftp/ 
 +Create script: nano /​tftp/​loader.sh 
 +  #/​bin/​bash 
 +  ifconfig eth0 192.168.1.10 up 
 +  dnsmasq -i eth0 --dhcp-range=192.168.1.100,​192.168.1.200 \ 
 +  --dhcp-boot=openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf \ 
 +  --enable-tftp --tftp-root=/​home/​user/​mikrotik/​trunk/​bin/​ar71xx/​ -d -u test -p0 -K --log-dhcp --bootp-dynamic 
 +Run script loader.sh 
 +Reboot RB951G as described above 
 + 
 +=== Flash OpenWRT to Mikrotik via wget2nand === 
 +Copy openwrt-ar71xx-mikrotik-vmlinux-lzma.elf and openwrt-ar71xx-mikrotik-rootfs.tar.gz to a HTTP/HTTPs server reachable from the RB951G (Port 1/Wan or Port2..5). Connect to the router via telnet to 192.168.1.1 (or Uart if you soldered a serial console). Example: http://​myhttpserver.org/​path/​openwrt-ar71xx-mikrotik-vmlinux-lzma.elf 
 +  root@OpenWrt:/#​ wget2nand http://​myhttpserver.org/​path 
 +Reboot. 
 + 
 +== Serial console == 
 + 
 +If you solder the UART pins on the board, you can enable the serial console, adding this line to /​etc/​inittab:​ 
 + 
 +  ttyS0::​askfirst:/​bin/​ash --login 
 + 
 +== Example VLAN configuration for switch ports == 
 + 
 +In /​etc/​config/​network,​ add these lines to enable the switch, and create 2 vlan interfaces (eth1.11 and eth1.12). The first for ports 5 and 4, and the later for ports 3 and 2. Port 1 on the router is eth0. 
 + 
 +  config switch '​eth1'​ 
 +        option enable '​1'​ 
 +        option enable_vlan '​1'​ 
 +  config switch_vlan 
 +        option device '​eth1'​ 
 +        option vlan '​11'​ 
 +        option vid '​11'​ 
 +        option ports '0t 1 2' 
 +  config switch_vlan 
 +        option device '​eth1'​ 
 +        option vlan '​12'​ 
 +        option vid '​12'​ 
 +        option ports '0t 3 4' 
 +         
 +=== Flash OpenWRT to Mikrotik manually === 
 + 
 +If wget2nand encounters problems, perform its steps manually from shell: 
 + 
 +Please see script for more details, this may not be the best setup if wget2nand does not work. [https://​dev.openwrt.org/​browser/​trunk/​target/​linux/​rb532/​base-files/​sbin/​wget2nand | wget2nand] 
 + 
 +  root@OpenWrt:/#​ passwd 
 +  root@OpenWrt:/#​ mtd erase /dev/mtd1 
 +  root@OpenWrt:/#​ mtd erase /dev/mtd2 
 +  root@OpenWrt:/#​ mkdir /​mnt/​kernel 
 +  root@OpenWrt:/#​ mkdir /​mnt/​rootfs 
 +  root@OpenWrt:/#​ mount /​dev/​mtdblock1 /​mnt/​kernel 
 +  root@OpenWrt:/#​ mount /​dev/​mtdblock2 /​mnt/​rootfs 
 +''​ Copy kernel & rootfs to RB951G''​ 
 +  $ scp bin/​ar71xx/​openwrt-ar71xx-mikrotik-vmlinux-lzma.elf root@192.168.1.1:/​tmp 
 +  $ scp bin/​ar71xx/​openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz root@192.168.1.1:/​tmp 
 +''​ Flash kernel & rootfs ''​ 
 +  root@OpenWrt:/#​ mv /​tmp/​openwrt-ar71xx-nand-vmlinux-lzma.elf /​mnt/​kernel/​kernel 
 +  root@OpenWrt:/#​ chmod +x /​mnt/​kernel/​kernel 
 +  root@OpenWrt:/#​ umount /​mnt/​kernel 
 +  root@OpenWrt:/#​ cd /​mnt/​rootfs 
 +  root@OpenWrt:/#​ tar -xvzf /​tmp/​openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz 
 +  root@OpenWrt:/#​ cd / 
 +  root@OpenWrt:/#​ umount /​mnt/​rootfs 
 +  root@OpenWrt:/#​ sync 
 +Reboot 
 +   
 +=== Compile OpenWRT yourself === 
 +This section was written before the rb951G was supported by released OpenWRT images. You only need this section if you plan to not use those supported images. 
 +  $ mkdir /​home/​user/​mikrotik/​ 
 +  $ cd /​home/​user/​mikrotik/​ 
 +  $ svn co -r 39392 svn://​svn.openwrt.org/​openwrt/​trunk/​ 
 +  $ cd /​home/​user/​mikrotik/​trunk 
 +  $ wget -c http://​patchwork.openwrt.org/​patch/​4773/​raw/​ -O OpenWrt-Devel-ar71xx-Add-support-for-MikroTik-RB951Ui-2HnD.patch 
 +  $ patch -u -p0 < OpenWrt-Devel-ar71xx-Add-support-for-MikroTik-RB951Ui-2HnD.patch 
 +// Configure image for booting from RAM // 
 +  $ make menuconfig 
 +  $ make kernel_menuconfig 
 +''​ Target = AR7XXX 
 + ​Subtarget = Mikrotik device with NAND flash 
 + ​Target ​Images = ramdisk''​ 
 +  $ make V=
 +// Configure image for booting from NAND // 
 +  $ make menuconfig 
 +''​ Target = AR7XXX 
 + ​Subtarget = Mikrotik device with NAND flash 
 + ​Target Images = tar.gz''​ 
 +  $ make V=s 
 +After compiling your image, go back to the section for Booting to OepnWrt in RAM. 
 +If your image predates 14.07, you may also need to install the WiFi driver (Install kmod-ath9k). 
 + 
 +''​About:​ 
 + 
 +http://​routerboard.com/​RB951Ui-2HnD 
 + 
 +Helpfull info: 
 + 
 +http://​www.lan23.ru/​forum/​showthread.php?​t=10780 (HowTo on Russian) 
 + 
 +http://​patchwork.openwrt.org/​patch/​3976/​ 
 + 
 +http://​www.ericconrad.com/​2012/​05/​installing-openwrt-on-routerboard-750gl.html 
 + 
 +http://​ayufan.eu/​projects/​openwrt-rb951g/​ 
 + 
 +http://​openwrt.ayufan.eu/​rb951g/​ 
 + 
 +Sister Board: 
 + 
 +[[rb951ui]] 
 + 
 + 
 +=== Board Layout Images ​===
 {{:​media:​rb951g2hnd-01.jpg|}} {{:​media:​rb951g2hnd-01.jpg|}}
 {{:​media:​rb951g2hnd-02.jpg|}} {{:​media:​rb951g2hnd-02.jpg|}}
 {{:​media:​rb951g2hnd-03.jpg|}} {{:​media:​rb951g2hnd-03.jpg|}}
toh/mikrotik/rb951g_2hnd.1366290186.txt.bz2 · Last modified: 2013/04/18 15:03 (external edit)