Monday 10 December 2012

[New post] Vritualization: 3 in 1 > Using Mikrotik + Squid Proxy + Radius on single machine to save resources :)

Post : Vritualization: 3 in 1 > Using Mikrotik + Squid Proxy + Radius on single machine to save resources :)
URL : http://aacable.wordpress.com/2012/12/10/vritualization-3-in-1-using-mikrotik-squid-proxy-radius-on-single-machine-to-save-resources/
Posted : December 10, 2012 at 1:12 PM
Author : Syed Jahanzaib / Pinochio~:)
Tags : mikrotik with ESXi, Vmware Virtual Switch, Vritualizing mikrotik
Categories : IBM Related, Mikrotik Related, Radius Manager, VMware ESXi Related
http://nguoidentubinhduong.files.wordpress.com/2011/09/virtualized_by_vmware1.jpg&h=181 Virtualizing Mikrotik + Squid + Radius
3 in 1 using ESXi
~ By Syed Jahanzaib ~
http://aacable.files.wordpress.com/2012/12/virtual-network.png (http://aacable.wordpress.com/?attachment_id=2846)
.
Recently I did an installation of a network where they were low in hardware resources but still they wanted to utilize the benefits of Mikrotik Router OS with external Squid proxy server and also the Radius Billing Server . So in total they required at least 3 physical machines, but I managed to install all of them on single server using Virtualization technology of VMWARE ESXi 5.x (64bit) and it worked so great :)
Here is how I did it.
> Note: Because of some time shortage, I am just giving you an idea how it can be done, I am not writing in pin point details on how to connect every machine with Virtual/Physical switches. I will write about it soon.
Hardware Used for the Example:
64bit Server Class machine
Multiple SATA HDD's (the more Faster drives (like 10-15krpm) you have, the better result you will be able to achieve. Preferably in RAID mode, either 10 or 0, depend on your management and goals, in this example I used 7200krpm SATA HDD, I dedicate each hdd for each OS, I tested it on IBM xseries with RAID0 and found RAID 0 much more faster with 15krpm but its not redundant, one drive fail and your whole RAID will go down, so if you want redundancy, go with at least RAID 5 or RAID 10 , Raid 1 is also good as it mirrors each drive, but requires additional drives and also for proxy, its useless to use mirroring as it would be requiring more read/write burden on controller, oh GOD, in which argument I got into :p)
16GB RAM (Mikrotik doesn't requires much RAM in fact it officially supports maximum of 2G, but Radius and Squid do requires some good amount of RAM, I dedicated 8 GB to SQUID, 4GB to Radius, 2 GB to Mikrotik)
4 Network Adapters ( In this article, dueto time shortage, I have only mentioned howto add two network adapters for LAN and WAN link using virtual Switch tech)
Software Used:
1) Vmware ESXi 5.x  64bit as a Virtual Hyper-visor Server
Guest OS installed in it are as following
2) Mikrotik Router-OS 5.22
3) Ubuntu 10.4 for SQUID Proxy (2.7)
4) Ubuntu 10.4 for Radius Manager Billing System
First install Vmware ESXi. You can get its free edition from www.vmware.com  , just register and download the latest version , it would be in .iso format, Simply burn it to CD, and install it on your server , its very simple to install the ESXi, nothing more then just clicking NEXT NEXT :)
After ESXi installed, configure IP address on it, so you can manage it using its client called Vsphere client.
To shorten the story I am using only two interfaces for the mikrotik, LAN and WAN. in this example (shorten version) ESXi have two interfaces connected , one with the LAN user switch and other interface connected with the WAN (physically)
Creating Virtual Switch and bind Network Adapters with this switch.
Goto Configuration tab
From the list appear in Hardware section, click on Networking and click on ADD Networking
As showed in the image below , , ,
http://aacable.files.wordpress.com/2012/12/add-virtual-switch.png&h=118
http://aacable.files.wordpress.com/2012/12/2-add-network-wizard.png&h=218
http://aacable.files.wordpress.com/2012/12/3-add-network-wizard.png&h=220
http://aacable.files.wordpress.com/2012/12/4-add-network-wizard.png&h=220
http://aacable.files.wordpress.com/2012/12/5-add-network-wizard.png&h=219
Ok, our virtual switch is created.
Now its time to bind our WAN adapter in this switch. (So it can later be used for WAN for all hosts we will requiring for)
Click on the Properties
http://aacable.files.wordpress.com/2012/12/6-add-network-wizard.png&h=204
http://aacable.files.wordpress.com/2012/12/7-add-network-wizard.png&h=220
Done.
Creating Mikrotik in VM and assigning network adapters.
Now create new Virtual Machine for your Mikrotik.
Select necessary hardware that you required as required per user load. for example
Mikrotik = 1 CPU / 1 GB RAM / 10 GB HDD /
In Network Adapter Section, by default only one adapter is added, You have to add another adapter by selecting the number of adapters in drop down listing.
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/8-adding-lan-wan-in-host.png&h=285
Once the configuration is completed. Simply install the Mikrotik in newly created hosts you just created in above steps.
After configuration is complete, review once again the host settings,
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/9-mikrotik-network-adapters.png&h=266
After the installation is done, Connect to mikrotik with WINBOX  and look for interfaces
As showed in the image below . . .
http://aacable.files.wordpress.com/2012/12/mikrotik-interface.png&h=113
.
I will write more on it later.

































No comments:

Post a Comment