this guide is valid for mikrotik 4xx, 75x, 91x, 95x, 2011...

11
Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09 This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 models This guide describes how to load ChilliWRT on a Mikrotik router and run it natively. At the time of writing the following models are supported: Routerboard 411, 411A, 411AH, 411U Routerboard 433, 433AH, 433UAH Routerboard 450, 450G Routerboard 493, 493AH Routerboard 750, 750GL, 750UP Routerboard 751G-2HnD, 751U-2HnD Routerboard RB911G-2HPnD, RB911G-5HPnD Routerboard RB912UAG-2HPnD, RB912UAG-5HPnD Routerboard RB951G-2HnD, RB951Ui-2HnD Routerboard RB2011iL-IN, RB2011iL-RM, RB2011iLS-IN, RB2011UiAS-IN, RB2011UiAS-RM, RB2011UiAS-2HnD-IN Other Routerboards are currently not supported. However, there is the possibility to run ChilliWrt (which is based on OpenWrt) to run this firmware on a virtual server using Mikrotik’s Metarouter (http://wiki.mikrotik.com/wiki/Manual:Metarouter)

Upload: hangoc

Post on 31-Jan-2018

253 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 models

This guide describes how to load ChilliWRT on a Mikrotik router and run it natively. At the time of writing the following models are supported:

• Routerboard 411, 411A, 411AH, 411U • Routerboard 433, 433AH, 433UAH • Routerboard 450, 450G • Routerboard 493, 493AH • Routerboard 750, 750GL, 750UP • Routerboard 751G-2HnD, 751U-2HnD • Routerboard RB911G-2HPnD, RB911G-5HPnD • Routerboard RB912UAG-2HPnD, RB912UAG-5HPnD • Routerboard RB951G-2HnD, RB951Ui-2HnD • Routerboard RB2011iL-IN, RB2011iL-RM, RB2011iLS-IN, RB2011UiAS-IN, RB2011UiAS-RM,

RB2011UiAS-2HnD-IN

Other Routerboards are currently not supported. However, there is the possibility to run ChilliWrt (which is based on OpenWrt) to run this firmware on a virtual server using Mikrotik’s Metarouter (http://wiki.mikrotik.com/wiki/Manual:Metarouter)

Page 2: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

What you need:

Hardware

1) A null-modem serial cable (Female/Female) 2) Assuming your computer does not have its own male serial RS232 port, you need a RS232 (DB9) to USB

converter cable

Software

3) Chillifire firmware for initial flash of the Mikrotik router http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/mikrotik/openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf

4) Putty software to access the router via serial console (Windows installer putty-*-installer.exe http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

5) Tftpd32 software to load the initial firmware on the router (standard edition - installer - http://tftpd32.jounin.net/tftpd32_download.html)

6) tftpd32.ini file from our support website on http://support.chillifire.net/downloads/tftpd32.ini (optional, but makes things easier for you)

Page 3: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

Preparations

1) Download putty and install on your computer. Connect your computer via the null-modem cable (and usb cable if your computer has no serial port). Set up the connection with 115200 baud rate, 8 data bits, 1 stop bit, no parity and no flow control. In our example the serial port is on COM3, but this may vary from computer to computer.

2) If unsure which com port go to Window’s control panel’s device manager to check which COM ports are active.

3) Click on Open, and then power up the router. 4) When you get this message press any key to stop the

boot process. Be quick, there are just two seconds before the router starts booting.

5) You will see this main menu. Press i

Page 4: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

6) You will see the board information as follows. Note down the eth1 MAC address. It is 00:0C:42:53:F0:71 in this example. This mac address is required for the next process step. Press any key to continue.

7) You will be back at the main menu. Press p (Boot protocol) Press 2 (dhcp)

8) You will be back at the main menu. Press o (Boot device) Press e (ethernet)

9) You will be back at the main menu.

10) Now it is time to prepare the tftp server. Install tftpd32 on your computer. Replace the file tftpd.ini with the one you can download from our website. The important thing to check is

a. that the correct file path is in there, where the file you want to use for booting the routerboard is actually located (C:\Download in our example file) the correct file is openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf

b. and that you update the mac address that points to the ip address 192.168.12.101 to reflect the mac address you have recorded in step 6 above.

11) Once that is done, start the tftpd32 program Note: In the case of issues you can switch on a log facility in the settings. A udp error usually means the file cannot be found. In that case make sure the correct file is really in the C:\Downloads location or adjust filename or path accordingly.

Page 5: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

Load ChilliWRT on the Routerboard

12) Connect your computer to port eth1 of your router 13) Give your computer a fixed IP address of 192.168.12.100 14) Go back to the serial console on putty and

Press x on the main menu. The system will look for the file defined in the tftpd32.ini in the path defined in there. For the connection to happen the router has to receive an ip address like 192.168.12.101, for which the mac address assignment you have made before is required. What you will see will be something like this (and more):

Page 6: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

15) The transfer of the firmware only takes a few seconds. The boot will take some time, and when finished, you can press the enter key on the serial console and you will see the OpenWrt signature:

16) Now that you know the flash works, we need to replace the temporary ChilliWrt image with a permanent one that will be stored on the router, which will not be lost on reboot. To do so you can reboot, press a key to stop the boot process so you are back to the main menu of step 5. To prepare the router to accept a permanent image, Press e then type yes and press enter to format the Nand partition. You will be back at the main menu

Page 7: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

17) Press x to reboot the router with the openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf file, until the Openwrt signature is back (press enter to get the OpenWrt signature).

18) Now connect the eth1 port to the internet. Type /etc/init.d/network restart Press Enter when the process come to an end, to get the command prompt back. Type ping support.chillifire.net to check you have access to the internet. If not, check the internet connection to the routerstation.

19) If you get a ping response (like in the screen print, you are ready to load the final firmware image. Type:

a. wget2nand http://support.chillifire.net/downloads Note: If you get the message ‘tmp/wget2nand already exists’, type rm -R /tmp/wget2nand and press enter. Correct the wget2nand command and try again

20) The system will upload two files and proceed to copy files into nand.

21) When finished, you will be asked to reboot.

Page 8: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

Type reboot and stop the reboot process by pressing any key within two seconds to arrive at the Routerboard’s main menu.

22) From the main menu Press o Press n Press x The router will reboot again, but not from the openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf file but using the ChilliWrt file we have saved into the Routerboards Nand storage. When finsihed booting and pressing enter, you will see the OpenWrt firmware signature again. YOU ARE DONE! PS: The Chillifire firmware includes the ath9k wireless driver, which can handlke 802.11bgn wireless network cards in the 2.4 and 5GHz spectrum. While the Routerboards with built in network cards should be covered, those boards without a fixed wireless card but PCI slots to fit any possible wireless card, may or may not be supported by the ath9k driver. Before purchasing wireless cards to add to your routerboard, enquire on forum.openwrt.org whether the PCI card in question is supported. Atheros chipset based wireless cards have the best odds of being supported by these drivers, however, there are a lot more wireless drivers available from the OpenWret site on www.openwrt.org site. PPS: If this is all too hard and you do not mind the wait and shipping costs, you can order a preloaded routerboard from us. Pelase enquire on http://support.chillifire.net for prices.

Page 9: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

Flash process for Mikrotik routers without serial interface (75x Series)

Configure the TFTP and DHCP Server (Windows Users)

1. Download a patched TFTPD version Download the program from here http://support.chillifire.net/downloads/tftpd32_mikrotik.zip and sample configuration files for TFTPD32 arehere: http://support.chillifire.net/downloads/tftpinis.zip The first archive contains an executable file that you should run as a TFTPD32 replacement. Background for why this is required look here: https://forum.openwrt.org/viewtopic.php?pid=161843#p161843 and following two posts

2. Continue with steps 10 and 11 of ‘Preparation’s section above then continue here 3. To perform the ramdisk flash use instructions below ‘Booting the Ramdisk Image’

Configure the TFTP and DHCP Server (LINUX Users)

4. Configure your network Interface The network interface to which the Routerboard is connected must have a unique IP with a DHCP running on it. To make debugging easier, it is usually a good idea to directly connect the Routerboard to your NIC without other devices involved. Configure the Interface within the subnet 192.168.1.0/24 (OpenWRTs default subnet) but try to avoid 192.168.1.1 (OpenWRTs default IP). I have used 192.168.1.2.

5. Install DHCP and TFTP Servers You will need a DHCP Server to assign an IP address to the Routerboard for the flash process. Also, the DHCP server tells the board which file to use as image. Frankly, the tftp Server is responsible to provide the image file to the RB. On Ubuntu Linux, I have used these packages:

apt-get install dhcp3-server atftpd

6. Configure the DHCP Server The DHCP Server does not need much configuration. I use the following as /etc/dhcp3/dhcpd.conf:

allow booting;

allow bootp;

subnet 192.168.1.0 netmask 255.255.255.0 {

range 192.168.1.10 192.168.1.200;

}

Page 10: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

host routerboard {

hardware ethernet 00:0c:42:XX:YY:ZZ;

fixed-address 192.168.1.100;

next-server 192.168.1.2;

filename " openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf ";

}

7. You may want to modify the IP range to match your subnet, the hardware ethernet MAC address of your router board, the next-server address of your tftp server and the filename of the ramdisk image that should be booted over the network.

8. Configure the TFTP Server Edit /etc/default/atftps to avoid running the daemon over inetd. My file looks like this:

USE_INETD=false

OPTIONS="--tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 10

9. You can see, that the tftp server will look for image files in /tftpboot. Either change this directory or copy the OpenWRT ramdisk image (openwrt-ar71xx-nand-vmlinux-initramfs.elf) to /tftpboot.

cp bin/ar71xx/ openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf /tftpboot

10. Apply the changed configuration

/etc/init.d/dhcp3-server reload

/etc/init.d/atftpd reload

Page 11: This guide is valid for Mikrotik 4xx, 75x, 91x, 95x, 2011 ...support.chillifire.net/downloads/...Installation_Guide_Mikrotik.pdfChillifire Hotspot Router Installation Guide – Mikrotik

Chillifire Hotspot Router Installation Guide – Mikrotik Routerboard Version 12.09

Booting the Ramdisk Image without serial cable

The purpose of this step is to have a ramdisk version of OpenWRT running on the Routerboard. This is a good basis for our flashing process and can also be used to test images without flashing them. This involves the following steps:

1. Connecting the Routerboard Connect port 1 of the Routerboard with the Ethernet port that your DHCP and TFTP server listens on.

2. Boot the Routerboard Now press and hold the “RES” button of the router board and connect power. Both LEDs (PWR and ACT) will be constantly on, keep pressing the button. After some seconds the “ACT” LED starts flashing, keep pressing. After some more seconds, the “ACT” LED turns off, now you can stop pressing the button. The board will now try to obtain an IP address via DHCP/BOOTP and then download and boot the ramdisk image. You can see this activity by looking at the appropriate log files:

tail -f /var/log/daemon.log /var/log/messages

3. You should see something like this:

May 27 13:21:26 tk dhcpd: BOOTREQUEST from 00:0c:42:XX:YY:ZZ via eth1

May 27 13:21:26 tk dhcpd: BOOTREPLY for 192.168.1.101 to routerboard (00:0c:42:XX:YY:ZZ) via eth1

May 27 13:21:26 tk atftpd[26400]: Serving openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf to 192.168.1.101:33321

4. Sit and wait until 192.168.12.1 (or 192.168.1.1 if you are using a generic OpenWrt ramdisk image) starts replying to pings. Now you can log into the board using telnet (ssh login is not possible, since no password is set as of yet).

telnet 192.168.12.1

(or telnet 192.168.1.1 if you are using a generic OpenWrt ramdisk image)