Difference between revisions of "OpenWRT: Mikrotik RB433"

From OnnoWiki
Jump to navigation Jump to search
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
Mikrotik RB433 / RB433AH / RB433UAH
+
==Konfigurasi Minimal agar OpenWRT di RB433 jalan dengan baik==
Hardware
 
  
RB433 and RB433AH are rather similar boards, except for the microSD slot (RB433AH only), CPU frequency (300 vs. 680 MHz) and RAM size (64 vs. 128 MB). RB433UAH adds USB connector and 5V DCDC to power USB devices to RB433AH.
+
Set root password
RB433
 
  
RB433 Datasheet
+
passwd
RB433AH
 
  
RB433AH Datasheet
+
Aktifkan semua wlan
RB433UAH
 
  
RB433UAH Datasheet
+
ifconfig wlan0 up
 +
ifconfig wlan1 up
 +
ifconfig wlan2 up
  
UAH is the same board as AH, but with USB-connectors and dc/dc for 5V USB assembled. Adding unpowered USB to other boards could be easy, just solder in connector or simply wires.
+
Pastikan wlan nyala menggunakan perintah
MicroSD Slot
 
  
The MicroSD Slot needs SPI-Bus sharing support, which is not implemented in Backfire.
+
iwconfig
  
SPI-Bus sharing has been implemented in Trunk r22862 the MicroSD Slot is usable now. Read speed ist about 0.92 MB/s (11/13/10: I get I/O and -89 errors on the SPI bus while assessing the microSD card)
 
Netboot
 
  
The bootloader of RB433 is able to load an image in elf format via BOOTP into RAM and execute it.
+
Melalui Interface Web http://192.168.1.1/ Masuk ke
Build the Target
 
  
You need to get OpenWrt trunk. In menuconfig choose:
+
Administration > Network > LAN > Connect
  
    Target System: Atheros AR71xx/AR7240/AR913x/AR934x
+
Administration > Network > Wifi
    Subtarget: Devices with NAND flash (mostly Mikrotik)
+
      Generic MAC80211 802.11abgn (radio0) ENABLE
    Target Images: ramdisk
+
      Generic MAC80211 802.11abgn (radio1) ENABLE
 +
      Generic MAC80211 802.11abgn (radio2) ENABLE
  
Now build the ram disk version. While it's building create the tftp-root directory if not already done and a symlink to the ram disk image
+
Untuk memastikan semua Interface wlan up dan di konfigurasi.
  
sudo mkdir -p /tftpboot
+
'''PENTING:'''  Edit
sudo ln -sf $(HOME)/openwrt/rb433uah-netboot/bin/ar71xx/openwrt-ar71xx-nand-vmlinux-initramfs.elf /tftpboot/openwrt.elf
 
  
Setup the Host
+
/etc/config/wireless
  
You need a BOOTP and a TFTP server on your host machine, we use dnsmasq here, since it can provide both services. Install dnsmasq with:
+
Pastikan semua
  
sudo apt-get install dnsmasq
+
option disabled '0'
  
Changes in /etc/dnsmasq.conf:
 
  
    only listen on the interface which is directly connected to the RouterBoards WAN (PoE) port. e.g.
+
Jika wlan tidak di aktifkan di awal, seringkali pada saat konfigurasi lebih lanjut jadi tidak terdeteksi.
  
    interface=eth0
 
  
    allow a DHCP range, e.g.
 
  
    dhcp-range=192.168.6.100,192.168.6.119,12
 
  
    allocate an IP address to the board, e.g.
+
Reboot melalui terminal
  
    dhcp-host=00:0C:42:XX:XX:XX,192.168.6.101
+
reboot
  
    (replace the XX with the MAC address of your board!)
+
==Konfigurasi MESH melalui Web Interface==
  
    enable dnsmasq's built-in TFTP server
+
Administration > Freifunk > Basic Settings
 +
      Hostname  namemesin
  
    enable-tftp
+
Administration > Freifunk > Mesh Wizard > radio0
 +
        Channel  1
 +
        Mesh IP  10.x.x.x
  
    set the root directory for files available via FTP.
+
Network > Interfaces > Wireless0 > Edit
 +
        IPv4 Netmask  255.0.0.0
  
    tftp-root=/tftpboot
+
Network > Wifi > radio0 > Edit
 +
        Channel        1
 +
        Transmit Power 20dBm 100mW
 +
        ESSID          MESH
 +
        Mode          Ad-Hoc
 +
        BSSID          02:CA:FF:EE:BA:BE
  
    set filename (produced above) and tftpd server for BOOTP, e. g.
+
Services > OLSR > HNA Announcements
 +
        192.168.x.x 255.255.255.0
  
    dhcp-boot=/tftpboot/openwrt.elf,boothost,192.168.6.1
+
Services > OLSR > Plugins
  
Finally restart dnsmasq
 
  
sudo /etc/init.d/dnsmasq restart
+
==Konfigurasi /etc/config/olsrd==
  
Setup the Target
+
config olsrd 'olsrd'
 +
        option IpVersion '4'
 +
        option RtTable '111'
 +
        option RtTableDefault '112'
 +
 +
config LoadPlugin 'olsrd_arprefresh'
 +
        option library 'olsrd_arprefresh.so.0.1'
 +
        option ignore '0'
 +
 +
config LoadPlugin 'olsrd_nameservice'
 +
        option library 'olsrd_nameservice.so.0.3'
 +
        option latlon_file '/var/run/latlon.js'
 +
#      option hosts_file '/var/etc/hosts.olsr'
 +
        option hosts_file '/etc/hosts'
 +
        option sighup_pid_file '/var/run/dnsmasq.pid'
 +
        option services_file '/var/run/services_olsr'
 +
        option suffix '.olsr'
 +
        option ignore '0'
 +
        option interval '120'
 +
        list name 'base-densurta'
 +
 +
config LoadPlugin 'olsrd_txtinfo'
 +
        option library 'olsrd_txtinfo.so.0.1'
 +
        option accept '0.0.0.0'
 +
        option ignore '0'
 +
 +
config InterfaceDefaults 'InterfaceDefaults'
 +
        option Ip4Broadcast '255.255.255.255'
 +
 +
config LoadPlugin 'olsrd_watchdog'
 +
        option library 'olsrd_watchdog.so.0.1'
 +
        option file '/var/run/olsrd.watchdog'
 +
        option interval '30'
 +
        option ignore '0'
 +
 +
config LoadPlugin 'olsrd_jsoninfo'                 
 +
        option library 'olsrd_jsoninfo.so.0.0'     
 +
        option ignore '0'                           
 +
                                                     
 +
config Interface 'wireless0'                       
 +
        option interface 'wireless0'               
 +
                                                     
 +
config LoadPlugin                                   
 +
        option library 'olsrd_pgraph.so.1.1'       
 +
        option ignore '0'                           
 +
                                                     
 +
config LoadPlugin                                   
 +
        option library 'olsrd_httpinfo.so.0.1'     
 +
        option ignore '1'                   
 +
                                             
 +
config LoadPlugin                           
 +
        option library 'olsrd_quagga.so.0.2.2'
 +
        option ignore '1'                   
 +
                                             
 +
config LoadPlugin                           
 +
        option library 'olsrd_bmf.so.1.7.0' 
 +
        option ignore '1'                   
 +
                                             
 +
config LoadPlugin                           
 +
        option library 'olsrd_dot_draw.so.0.3'
 +
        option ignore '0'                   
 +
                                                   
 +
config LoadPlugin                                 
 +
        option library 'olsrd_pud.so.1.1.0'       
 +
        option ignore '1'                         
 +
                         
 +
config LoadPlugin                                   
 +
        option library 'olsrd_sgwdynspeed.so.1.0.0' 
 +
        option ignore '0'                           
 +
                                                     
 +
config LoadPlugin                                   
 +
        option library 'olsrd_dyn_gw_plain.so.0.4' 
 +
        option ignore '1'                           
 +
                                             
 +
config LoadPlugin                           
 +
        option library 'olsrd_p2pd.so.0.1.0'     
 +
        option ignore '1'                         
 +
                                                   
 +
config LoadPlugin                           
 +
        option library 'olsrd_secure.so.0.6'     
 +
        option ignore '1'                       
 +
                                                 
 +
config LoadPlugin                           
 +
        option library 'olsrd_dyn_gw.so.0.5' 
 +
        option ignore '0'                   
 +
                                             
 +
config LoadPlugin                                 
 +
        option library 'olsrd_mdns.so.1.0.1'     
 +
        option ignore '1'                         
 +
                                                   
 +
config Hna4                                       
 +
        option netaddr '192.168.247.0'           
 +
        option netmask '255.255.255.0'
  
    Connect to the serial port with a null modem cable (115200, 8N1).
+
==Pranala Menarik==
    Press a key shortly after powering the board.
 
    Press o to change the boot device
 
    Press e to boot from ethernet in the future.
 
    Press x to leave setup (-o-e-x is needed only once, the boot method is saved in non-volatile memory)
 
 
 
If everything is setup correctly it should look like:
 
 
 
RouterBOOT booter 2.16
 
 
 
RouterBoard 433AH
 
 
 
CPU frequency: 680 MHz
 
  Memory size: 128 MB
 
 
 
Press any key within 2 seconds to enter setup..
 
trying bootp protocol.......... OK
 
Got IP address: 192.168.6.101
 
resolved mac address 4E:80:00:00:00:00
 
Gateway: 192.168.6.1
 
transfer started ................................... transfer ok, time=7.16s
 
setting up elf image... OK
 
jumping to kernel code
 
Linux version 2.6.26.7 (joerga@thinkpad) (gcc version 4.1.2) #2 Mon Nov 10 11:23:37 CET 2008
 
console [early0] enabled
 
...
 
 
 
Permanent Installation
 
 
 
You need a working netboot first, see above.
 
Erase the NAND Flash
 
 
 
If you want to install OpenWrt permanently into the NAND flash you once need to erase the NAND flash to get rid of the RouterOS stuff:
 
 
 
    connect via serial line
 
    press a key shortly after powering the RB433 up
 
    press e and type yes to format the flash from the bootloader
 
 
 
Setup the Host
 
 
 
An HTTP web server is required on the host, e.g. mini-httpd in Ubuntu. Install the mini-httpd web server
 
 
 
sudo apt-get install mini-httpd
 
 
 
In /etc/default/mini-httpd change
 
 
 
    Start daemon
 
 
 
    START=1
 
 
 
In /etc/mini-httpd.conf change
 
 
 
    On which host mini_httpd should bind
 
 
 
    host=192.168.6.1
 
 
 
    Run in chroot mode
 
 
 
    chroot
 
 
 
    Where are the web files stored
 
 
 
    data_dir=/home/openwrt/rb433uah/bin/ar71xx/
 
 
 
Restart the mini-httpd web server
 
 
 
sudo /etc/init.d/mini-httpd restart
 
 
 
Build the Target
 
 
 
You need to get OpenWrt trunk. In menuconfig choose:
 
 
 
    Target System: Atheros AR71xx/AR7240/AR913x/AR934x
 
    Subtarget: Devices with NAND flash (mostly Mikrotik)
 
    Target Images:
 
        [*] tar.gz
 
        [ ] jffs2
 
        [*] squashfs
 
 
 
Build it.
 
Install OpenWrt into Flash
 
 
 
    Start netboot (see above).
 
    Press ENTER to get a shell prompt.
 
    Execute:
 
 
 
wget2nand http://192.168.6.1
 
  
This script will set an IP address via dhcp on br-lan. The output should look like:
+
* [[OpenWRT]]
 +
* [[OpenWRT: Download Firmware yang sudah jadi]]
 +
* [[OpenWRT: Source Repository Download]]
 +
* [[OpenWRT: Melihat Daftar Package]]
  
root@OpenWrt:/# wget2nand http://192.168.6.1
+
===Build Firmware===
killall: udhcpc: no process killed
 
udhcpc (v1.11.3) started
 
Sending discover...
 
Sending select for 192.168.6.101...
 
Lease of 192.168.6.101 obtained, lease time 3600
 
adding router 192.168.6.1
 
deleting old routes
 
adding dns 192.168.6.1
 
Erasing filesystem...
 
Mounting /dev/mtdblock2 as new root and /dev/mtdblock1 as kernel partition
 
yaffs: dev is 32505858 name is "mtdblock2"
 
yaffs: passed flags ""
 
yaffs: Attempting MTD mount on 31.2, "mtdblock2"
 
yaffs: auto selecting yaffs1
 
yaffs: dev is 32505857 name is "mtdblock1"
 
yaffs: passed flags ""
 
yaffs: Attempting MTD mount on 31.1, "mtdblock1"
 
yaffs: auto selecting yaffs1
 
Erasing existing files...
 
rm: cannot remove '/tmp/wget2nand-rootfs/lost+found': Directory not empty
 
Copying filesystem...
 
Connecting to 192.168.6.1 (192.168.6.1:80)
 
-                      0% |                              |    0  --:--:-- ETA/
 
./jffs/
 
./tmp/
 
./www/
 
...
 
Image written, you can now reboot.  Remember to change the boot source to Boot from Nand
 
  
    Power-cycle the RB433 and change the boot source to NAND.
+
* [[OpenWRT: Build Firmware]]
 +
* [[OpenWRT: Build Firmware Download Source Pendukung]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300N]]
 +
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2]]
 +
* [[Buffalo]]
 +
* [[Buffalo: WZRHPG450H Cara Recovery]]
 +
* [[Buffalo: WZRHPG450H OpenWRT mengaktifkan setelah di flash]]
 +
* '''[[Buffalo: WZRHPG450H Membuat Firmware OpenWRT Sendiri]]''' '''RECOMMENDED'''
 +
* [[Buffalo: WZRHPG450H OpenWRT instalasi aplikasi Pendukung OLSRD]]
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStation2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Build Firmware Ubiquiti NanoStationM2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Build Firmware Mikrotik RB433]]
 +
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
 +
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
  
Switch setup
+
===APRX===
Ethernet Jacks
 
  
The ethernet jacks are mapped to port numbers of the IP175C switch (looking at the front of the board):
 
  
[ port 4 (PoE)] ( serial ) [port 1] [port 2]
+
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
  
Switch Ports (for VLANs)
+
===IPv6===
Interface Switch port
 
eth0 4
 
eth1 1 & 2
 
  
Port 1 and port 2 are switched in the default config.
+
* [[OpenWRT: IPv6]]
Useful Links
+
* [[OpenWRT IPv6: Build Firmware Linksys WRT160NL]]
 +
* [[OpenWRT IPv6: Build Firmware Linksys WRT160NL Tanpa WebGUI]]
 +
* [[OpenWRT IPv6: Build Firmware Buffalo WZRHPG450H]]
 +
* [[OpenWRT IPv6: Build Firmware Buffalo WZRHPG300NH2]]
 +
* [[OpenWRT IPv6: Setup tunnel ke tunnelbroker]]
 +
* [[OpenWRT IPv6: Konfigurasi]]
 +
* [[OpenWRT IPv6: Konfigurasi WAN6 dengan radvd]]
  
    Netboot for RB1xx
+
===Flash Firmware===
    phorn's patches for IP175C support with kmod-switch and swconfig
 
    a thread about RB433, IP175C and kmod-switch
 
  
 +
* [[OpenWRT: Flash Linksys WRT54GL]]
 +
* [[OpenWRT: Flash Linksys WRT160NL]]
 +
* [[OpenWRT: Flash Buffalo WZRHP450H]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Buffalo WZRHP300N]]
 +
* [[OpenWRT: Flash UBNT NanoStation2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash UBNT NanoStation Loco M2]]
 +
* [[OpenWRT: Flash UBNT Bullet M2]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Flash Mikrotik RB450]]
  
 +
===Misc===
  
==Referensi==
+
* [[OpenWRT: Setup WiFi]]
 +
* [[OpenWRT: Setup PPTP VPN Server]]
 +
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
 +
* [[OpenWRT: Mikrotik RB433]] '''RECOMMENDED'''
 +
* [[OpenWRT: Setup OLSR Sederhana]]
 +
* [[OpenWRT: Setup OLSR via Web]] '''RECOMMENDED'''
 +
* [[OLSR - di OpenWRT]]
 +
* [[OpenWRT: 3G modem]]
 +
* [[OpenWRT: Build Firmware dengan 3G Modem Support]]
 +
* [[OpenWRT: Setup Firewall]]
 +
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
 +
* [[OpenWRT: OLSR nameservice plugin]]
  
* http://wiki.openwrt.org/toh/mikrotik/rb433
+
===UBNT===
  
==Pranala Menarik==
+
* [[UBNT]]
 +
* [[UBNT: Teknik Recovery]]
 +
* [[UBNT: Upload Firmware]]
 +
* [[UBNT: Rebuild Firmware]]
 +
* [[UBNT: firmware dengan OLSR]]
 +
* [[UBNT: openwrt]]
 +
* [[UBNT: olsr dengan openwrt]]
 +
* [[UBNT: olsr dengan kamikaze openwrt]]
 +
* [[UBNT: olsr dengan backfire openwrt]]
 +
* [[UBNT: UniFi]]
 +
* [[UBNT: UniFi Konfigurasi Awal]]
 +
* [[UBNT: UniFi Manajemen HotSpot]]
 +
* [[UBNT: OLSR Pembuatan Firmware]]
 +
* [[UBNT: OLSR Konfigurasi]]
 +
* [[OLSR - di UBNT]]
 +
* [[OLSR - di Ubuntu]]
 +
* [[OpenWRT]]
 +
* [[OLSR: NAT di UBNT dengan OLSR]]

Latest revision as of 18:37, 23 December 2013

Konfigurasi Minimal agar OpenWRT di RB433 jalan dengan baik

Set root password

passwd

Aktifkan semua wlan

ifconfig wlan0 up
ifconfig wlan1 up
ifconfig wlan2 up

Pastikan wlan nyala menggunakan perintah

iwconfig


Melalui Interface Web http://192.168.1.1/ Masuk ke

Administration > Network > LAN > Connect
Administration > Network > Wifi
      Generic MAC80211 802.11abgn (radio0) ENABLE
      Generic MAC80211 802.11abgn (radio1) ENABLE
      Generic MAC80211 802.11abgn (radio2) ENABLE

Untuk memastikan semua Interface wlan up dan di konfigurasi.

PENTING: Edit

/etc/config/wireless

Pastikan semua

option disabled '0'


Jika wlan tidak di aktifkan di awal, seringkali pada saat konfigurasi lebih lanjut jadi tidak terdeteksi.



Reboot melalui terminal

reboot

Konfigurasi MESH melalui Web Interface

Administration > Freifunk > Basic Settings
      Hostname   namemesin
Administration > Freifunk > Mesh Wizard > radio0
       Channel   1
       Mesh IP   10.x.x.x
Network > Interfaces > Wireless0 > Edit
       IPv4 Netmask   255.0.0.0
Network > Wifi > radio0 > Edit
       Channel        1
       Transmit Power 20dBm 100mW 
       ESSID          MESH
       Mode           Ad-Hoc
       BSSID          02:CA:FF:EE:BA:BE
Services > OLSR > HNA Announcements
       192.168.x.x 255.255.255.0
Services > OLSR > Plugins


Konfigurasi /etc/config/olsrd

config olsrd 'olsrd'
        option IpVersion '4'
        option RtTable '111'
        option RtTableDefault '112'

config LoadPlugin 'olsrd_arprefresh'
        option library 'olsrd_arprefresh.so.0.1'
        option ignore '0'

config LoadPlugin 'olsrd_nameservice'
        option library 'olsrd_nameservice.so.0.3'
        option latlon_file '/var/run/latlon.js'
#       option hosts_file '/var/etc/hosts.olsr'
        option hosts_file '/etc/hosts'
        option sighup_pid_file '/var/run/dnsmasq.pid'
        option services_file '/var/run/services_olsr'
        option suffix '.olsr'
        option ignore '0'
        option interval '120'
        list name 'base-densurta'

config LoadPlugin 'olsrd_txtinfo'
        option library 'olsrd_txtinfo.so.0.1'
        option accept '0.0.0.0'
        option ignore '0'

config InterfaceDefaults 'InterfaceDefaults'
        option Ip4Broadcast '255.255.255.255' 

config LoadPlugin 'olsrd_watchdog'
        option library 'olsrd_watchdog.so.0.1'
        option file '/var/run/olsrd.watchdog'
        option interval '30'
        option ignore '0' 

config LoadPlugin 'olsrd_jsoninfo'                   
        option library 'olsrd_jsoninfo.so.0.0'       
        option ignore '0'                            
                                                     
config Interface 'wireless0'                         
        option interface 'wireless0'                 
                                                     
config LoadPlugin                                    
        option library 'olsrd_pgraph.so.1.1'         
        option ignore '0'                            
                                                     
config LoadPlugin                                    
        option library 'olsrd_httpinfo.so.0.1'       
        option ignore '1'                     
                                              
config LoadPlugin                             
        option library 'olsrd_quagga.so.0.2.2'
        option ignore '1'                     
                                              
config LoadPlugin                             
        option library 'olsrd_bmf.so.1.7.0'   
        option ignore '1'                     
                                              
config LoadPlugin                             
        option library 'olsrd_dot_draw.so.0.3'
        option ignore '0'                     
                                                   
config LoadPlugin                                  
        option library 'olsrd_pud.so.1.1.0'        
        option ignore '1'                          
                          
config LoadPlugin                                    
        option library 'olsrd_sgwdynspeed.so.1.0.0'  
        option ignore '0'                            
                                                     
config LoadPlugin                                    
        option library 'olsrd_dyn_gw_plain.so.0.4'   
        option ignore '1'                            
                                              
config LoadPlugin                             
        option library 'olsrd_p2pd.so.0.1.0'       
        option ignore '1'                          
                                                   
config LoadPlugin                             
        option library 'olsrd_secure.so.0.6'      
        option ignore '1'                         
                                                  
config LoadPlugin                             
        option library 'olsrd_dyn_gw.so.0.5'  
        option ignore '0'                     
                                              
config LoadPlugin                                  
        option library 'olsrd_mdns.so.1.0.1'       
        option ignore '1'                          
                                                   
config Hna4                                        
        option netaddr '192.168.247.0'             
        option netmask '255.255.255.0'

Pranala Menarik

Build Firmware

APRX

IPv6

Flash Firmware

Misc

UBNT