Do you need advanced routing and networking features[md]and do you have an old PC lying around? If so, you can build your own enterprise-class router. One option is to use the MikroTik RouterOS software. It's comparable to that of Cisco routers, but at a fraction of the cost.
The RouterOS software has all the usual features: routing, firewall, bandwidth management, wireless access point, backhaul link, hotspot gateway, VPN server, and more. The free 24-hour trial provides all the features with no limitations. Then you must purchase a license for one of the software levels.
Other than gaining more control over your router, you can use the internal RADIUS server for the authentication requirement of enterprise Wi-Fi encryption. You could use the VPN server to access files remotely or use it to secure your connections at Wi-Fi hotspots. Another idea is to create virtual SSIDs or VLANs to segregate visitor access. Whether you're working on a business LAN or you're spicing up your home network, the possibilities are endless.
In this two-part tutorial, we'll set up the basic router features, and then you can experiment with the other features. In this part, we'll gather the required hardware and software and then install RouterOS onto a drive. Then we'll configure the RouterOS with our Internet connection and give the router an IP. You'll see how to use a GUI application on a remote PC to do the rest of the configuration.
Getting Started with RouterOS
First, you should make sure you have all the required hardware. Although RouterOS can be installed on other platforms, we're installing it on a regular (Intel/AMD 32-bit) PC. Though you can run RouterOS headless/remotely, you'll need a keyboard, mouse, and monitor at least during the installation. After that you can use WinBox or the other remote admin utilities.
You'll need to have some sort of storage device (IDE, SATA, USB, SD, etc.) dedicated to this setup. Before installing RouterOS it will automatically partition and format the disk, and it will make itself the default OS. RouterOS requires at least 64MB of space.
Of course, RouterOS supports many network adapters, including the new 10G Ethernet cards, 802.11a/b/g/n wireless cards, and 3G modems. You likely need at least two Ethernet cards: one to connect to the Internet and the other to connect to a switch to provide more ports for your computers.
Before you get started, download the remote GUI configuration tool, WinBox, to a different computer that can connect up to the RouterOS machine during the initial configuration. Of course, you also need to download the RouterOS ISO CD image and burn to a disc.
Installing it on the Drive
When you're ready to get started, pop in the CD and reboot. RouterOS should automatically load and go to the installation screen. Select the packages you want to install and then hit the I key. You might be interested in the following packages: system, lcd, dhcp, advanced-tools, routing, security, and hotspot.
Once the install is complete, you can log on to the command line interface using the username admin and a blank password.
The first thing you should do is change the password by typing password and hitting Enter.
Next, you need to figure out how the interfaces (network adapters) are labeled: which one is ether1 and which one is ether2. On the main menu, type interface, hit Enter, type monitor-traffic and first try the ether1 interface. Then you can usually sort it all out by plugging in a computer to each network adapter (to create traffic) and see which one shows activity.
Configuring the Internet and Router IP Settings
Just like when setting up an off-the-shelf router, you must configure the Internet connection. The following paragraphs cover a few different connection types.
If you have cable Internet or a connection that doesn't require specific configuration (a dynamic IP), you're probably used to just plugging in a router[md]and the Internet just works. RouterOS works similarly, but you must enable DHCP first. This is already turned on for off-the-shelf routers. Here's how to enable it in RouterOS:
- From the command line, type setup and hit Enter.
- Type d to bring up the DHCP client settings.
- Make sure that the correct name is given for the network interface/adapter that's connected to your Internet modem and hit Enter. You should have noted the interface names when monitoring the traffic earlier.
If you have a static Internet IP address (advanced service) from your ISP, and you are using a type that doesn't require login details, follow these steps to configure your connection:
- From the main menu, type setup and hit Enter.
- Type a to bring up the IP and gateway settings.
- Type a to create a new IP address.
- Make sure that the correct name is given for the network interface/adapter that's connected to your Internet modem and hit Enter. You should have noted the interface names when monitoring the traffic.
- Type the Internet IP address given to you by the ISP, followed by a forward slash (/) and netmask number, and then hit Enter (for example, 209.165.155.124/20).
- Type g to set the Default Gateway.
- Type the IP of the Default Gateway, given to you by the ISP, and hit Enter.
- Type x to exit the IP settings menu.
- Type x to save the changes you've made and to return to the main menu.
If you have a PPPoE or PPTP type of Internet connection, such as DSL, type setup from the main menu and hit Enter. Then depending upon which connection you have, type p or t and follow the prompts to input the details.
Next we'll create the IP address for your router. This enables the router to communicate on the network. It also gives you an address to use when connecting from the configuration utility. Follow these steps to add the IP information:
- From the main menu, type setup and hit Enter.
- Type a to bring up the IP and gateway settings.
- Type a to create a new IP address.
- Make sure the correct interface is defined and hit Enter. You should have noted the interface names when monitoring the traffic earlier (ether1).
- Type the desired IP and the netmask divided by the forward slash (/) and hit Enter (for example, 192.168.1.1/24).
- Type "g" to set the Default Gateway.
- Type the desired IP, which is probably the one you just created, and hit Enter.
- Type x to exit the IP settings menu.
- Type x to save the changes you've made and to return to the main menu.
Moving to the WinBox Configuration Utility
Now that you have an IP for the RouterOS machine, you can use the WinBox program to configure the settings rather than using the command line. Though it's a very simple program, it provides much quicker access to settings. The menus and settings are organized very similarly to the console interface.
Plug a computer into the Ethernet adapter you've designated for the local network. Then before you can make a remote connection to RouterOS, you must configure the computer's network card with a static IP that's within range of the IP address you created for RouterOS. For example, you can use 192.168.1.115 if the router IP is 192.168.1.1.
Now to connect, open WinBox, type in the IP you created for RouterOS, input the login credentials, and hit Connect.
Stay Tuned
In the next part, we'll finish configuring the router so users can start connecting to the Internet.
