You are on page 1of 84

Virtualised MikroTik

Installing and Configuring MikroTik in a Virtualised Hardware Environment Trainer: Class: Tom Smyth 13/06/2007

Copyright Wireless Connect Ltd 2007

Objectives

Understand What is Virtualisation Receive a high-level overview of Vmware Server Understand the basics of Vmware Virtual Network Configuration Understand how to configure a virtual machine for use with Router OS 2.9 & Router OS 3 Understand how to configure a virtual machine Understand where Virtualisation can help Understand where Virtualisation can not help Copyright Wireless Connect Ltd 2007
2

What is Virtualisation?

Abstraction of physical hardware

The same virtual hardware is presented to the guest operating system despite the underlying hardware of the server single powerful host server can be divided into many discrete separate virtual servers. Each of these servers can run different operating systems.
Copyright Wireless Connect Ltd 2007 3

Logical division of physical hardware

What is Virtualisation?

Copyright Wireless Connect Ltd 2007

What is Vmware Server

Vmware server installs and runs as an application on top of a host Windows or Linux operating system. A thin virtualisation layer partitions the physical server so that multiple virtual machines can be run simultaneously on a single server. Vmware Server isolates each virtual machine from its host and other virtual machines. Data does not leak across virtual machines and applications can only communicate over Copyright Wireless Connect Ltd 2007 5 configured network connections

Simple Virtualisation Example

Copyright Wireless Connect Ltd 2007

Increased Availability using Vmware and VRRP

Copyright Wireless Connect Ltd 2007

Security & Flexibility with Single Purpose MikroTik Appliances

Copyright Wireless Connect Ltd 2007

Creating a Virtual Test Network

Copyright Wireless Connect Ltd 2007

Securing a Laptop with a MikroTik Virtual Router Firewall

Copyright Wireless Connect Ltd 2007

10

The Power of Virtualisation

Run MikroTik on incompatible hardware such as


Raid Controllers, SCSI Disks Custom Network hardware

Flexibility for proactive Disaster recovery in the event of hardware failure Increased hardware usage through more comprehensive driver support (DMA) in the underlying operating system
Copyright router Ltd 2007 Break up individual Wireless Connecttasks into separate 11

Virtual Machines

A virtual machine is like a server, but instead of an electronic mother board it uses a software mother board. All configuration and data are stored as files. All VMs are hardware independent and run on Vmware server on any x86 physical server. Can access physical host hardware resources through emulated hardware Are completely isolated and secure.
Copyright Wireless Connect Ltd 2007 12

Increased Flexibility

Responsive DR functionality full systems can be easily moved from one physical server to another, even while in operation. Can be built and distributed as plug-and-play virtual appliances (help sales and expose product to new markets and new customers)

Copyright Wireless Connect Ltd 2007

13

Virtualisation Applications

Core of Networks

Using VRRP for increased availability Linux Clusters for maximum availability Provide an end to end MikroTik Solutions Provide high performance multigigabit throughput** Provide Multi purpose logically separate services

Laptops (fire walling & Security) Marketing

Place Host server in Data Centre containing Demo Network Configuration showing Dude & MikroTik Power and Ease of use

Test labs

Testing Dynamic Routing Protocol Configuration Testing QOS policies

Copyright Wireless Connect Ltd 2007

14

Virtualisation Advice

Virtualisation is not practical in all cases are there alternatives?


RB1000 better applied in Distribution Networks Cluster 2x RB 1000s for high availability Do you need to have scalability ? Do you need to add complexity ?

Virtualisation requires good hardware to function


Xeon /Opteron Processors Multiple PCI/X busses Multiple PCIExpress lanes Copyright Wireless Connect Ltd 2007 Memory on the host server must be of adequate capacity
15

Virtual Machine Core Specifications

Virtual Processor

Intel Pentium II or later, or AMD Athlon or later, depending on host processor; Intel EMT64VT (experimental support) Single and multiprocessor per virtual machine on symmetric multiprocessor (SMP) systems.

Virtual Chipset

Intel 440BX based motherboard with NS338 SIO chip and 82093AA IOAPIC

Virtual BIOS

PhoenixBIOS 4.0 Release 6 with VESA BIOS DMI/SMBIOS compliant for system Ltd 2007 management agent support Copyright Wireless Connect
16

Virtual Machine Storage Specifications

Virtual Memory

Up to 3600MB of memory per virtual machine, depending on the host system's configuration and the amount of memory on the physical host Up to four devices: IDE HDDs, CDROM or DVD Hard disks can be virtual disks or physical disks.IDE virtual disks up to 950GB CDROM can be a physical device or an ISO image file
Copyright Wireless Connect Ltd 2007 17

Virtual IDE Drives


Virtual Machine Network Specifications

Virtual Ethernet Card


Up to four virtual Ethernet cards AMD Pcnet PCI II compatible PXE ROM version 2.0 (you can use net install) 10 Virtual Ethernet switches (virtual Networks / Vmnets) supports most Ethernet based protocols

Virtual Networking

Copyright Wireless Connect Ltd 2007

18

Virtual Machine Remote Management

Vmware Remote Console connects to server on TCP port 902 (Linux and Windows) (secure)

Most Powerful VM Management tool Allows you local console access to routers.

Vmware Server MUI secure website listens on TCP port 8333 ( requires optional pack for Linux and ISS on Windows) RDP (local Console access ) (windows) SSH (linux)
Copyright Wireless Connect Ltd 2007 You can configure Out of Band Management. 19

Vmware Server Preparation on Windows /Linux

Setup of Physical and virtual NICs

If Firewall remove IP address from all physical interface on the host OS Minimise Virtual Adapters on the host Setup additional Vmware Vmnets (virtual networks)

Minimise vmnets for performance (Production boxes) Maximise vmnets for testing flexibility (test/training boxes)

Disable Vmware Server Nat Service Disable Vmware DHCP Config Service
Copyright Wireless Connect Ltd 2007 20

Preparing A Vmware Server on Windows for MikroTik

Copyright Wireless Connect Ltd 2007

21

Check The Memory Allocation

Copyright Wireless Connect Ltd 2007

22

Note the Maximum total amount of RAM allocated to VMs

Copyright Wireless Connect Ltd 2007

23

Setting Up the Virtual Networks

Copyright Wireless Connect Ltd 2007

24

Look at the summary watch out for NAT & DHCP

Copyright Wireless Connect Ltd 2007

25

Limit the amount of Host Virtual Adapters

Copyright Wireless Connect Ltd 2007

26

Remove all DHCP Networks Stop DHCP Server Service

Copyright Wireless Connect Ltd 2007

27

Disable NAT Service

Copyright Wireless Connect Ltd 2007

28

Configure Physical/ Virtual Network Connections

Copyright Wireless Connect Ltd 2007

29

Creating a Virtual Machine for MikroTik Router OS 2.9.XX

Note that MT ROS 2.9.XX is based on the 2.4 Linux kernel series. Note that MT ROS2.9.XX supports 1 CPU Note that MT ROS2.9.XX requires a min 32MB (X86) of RAM up to a max 1GB of RAM Note that MT ROS2.9.XX requires IDE Storage All virtual disks should be preallocated fixed size files (better performance)
Copyright Wireless Connect Ltd 2007 30

Vmware Main Console Screen

Copyright Wireless Connect Ltd 2007

31

New Virual Machine Wizard

Copyright Wireless Connect Ltd 2007

32

Select the Correct Guest OS

Copyright Wireless Connect Ltd 2007

33

Name the Virtual Machine

Copyright Wireless Connect Ltd 2007

34

Make Virtual Machine Private

Copyright Wireless Connect Ltd 2007

35

Select Machine User Context

Copyright Wireless Connect Ltd 2007

36

Processor Configuration MikroTik 2.9.XX Supports 1 Processor only

Copyright Wireless Connect Ltd 2007

37

Configure 1 Network Card

st

Copyright Wireless Connect Ltd 2007

38

Create New Virtual Disk

Copyright Wireless Connect Ltd 2007

39

Select I/O Adapter (not Relevant for MikroTik)

Copyright Wireless Connect Ltd 2007

40

Select IDE Storage (essential for MikroTik operation)

Copyright Wireless Connect Ltd 2007

41

Vmware Main Console Screen

Copyright Wireless Connect Ltd 2007

42

Virtual Machine Bare Bones

Copyright Wireless Connect Ltd 2007

43

Add Network Cards to the Virtual Machine

Copyright Wireless Connect Ltd 2007

44

Configure the Network Adapter

Copyright Wireless Connect Ltd 2007

45

Add Hardware Wizard

Copyright Wireless Connect Ltd 2007

46

Vmware Main Console Screen

Copyright Wireless Connect Ltd 2007

47

Select Virtual Network Connection

Copyright Wireless Connect Ltd 2007

48

Vmware Virtual Machine Hardware Screen

Copyright Wireless Connect Ltd 2007

49

Insert CD ROM in Virtual Machine

Copyright Wireless Connect Ltd 2007

50

Start the Virtual Machine

Copyright Wireless Connect Ltd 2007

51

The Virtual POST Screen

Copyright Wireless Connect Ltd 2007

52

MikroTik ISO Linux Boot Screen

Copyright Wireless Connect Ltd 2007

53

System Package Selection

Copyright Wireless Connect Ltd 2007

54

MikroTik Installation Progress

Copyright Wireless Connect Ltd 2007

55

MikroTik Installation Progress

Copyright Wireless Connect Ltd 2007

56

MikroTik Local Console Login Prompt

Copyright Wireless Connect Ltd 2007

57

Practical Excercise Now it's Your Turn!

Create a MikroTik Virtual Machine with the following specifications to run Router OS 2.9.XX

32 MB RAM 100 MB HDD Storage 4 Ethernet Network Interfaces

Copyright Wireless Connect Ltd 2007

58

Creating a Virtual Machine for MikroTik Router OS 3

Note that MT ROS 3 is based on the 2.6 Linux kernel series. Note that MT ROS 3 supports 1 CPU up 2 CPU (SMP Experimental support) Note that MT ROS2.9.XX requires a min 32MB (X86) of RAM up to a max 2GB of RAM Note that MT ROS 3 supports IDE & SATA Storage All virtual disks should be preallocated fixed size files (better performance) Copyright Wireless Connect Ltd 2007
59

Virtual Machine Network Specifications

Copyright Wireless Connect Ltd 2007

60

Virtual Machine Wizard

Copyright Wireless Connect Ltd 2007

61

Select Custom Settings

Copyright Wireless Connect Ltd 2007

62

Virtual Machine Network Specifications

Copyright Wireless Connect Ltd 2007

63

Virtual Machine Network Specifications

Copyright Wireless Connect Ltd 2007

64

Virtual Machine Network Specifications

Copyright Wireless Connect Ltd 2007

65

Virtual Machine Network Specifications

Copyright Wireless Connect Ltd 2007

66

Specify Processor Option 1 or 2 CPUs Your Choice

Copyright Wireless Connect Ltd 2007

67

Virtual Machine Memory Config

Copyright Wireless Connect Ltd 2007

68

Virtual Machine Network Use Bridged Networking

Copyright Wireless Connect Ltd 2007

69

Select I/O Adapter (Irrelevant for Mikrotik)

Copyright Wireless Connect Ltd 2007

70

Virtual Machine Network Specifications

Copyright Wireless Connect Ltd 2007

71

Select IDE Storage for MikroTik Router

Copyright Wireless Connect Ltd 2007

72

Specify Disk Size

Copyright Wireless Connect Ltd 2007

73

Specify Virtual Disk File Location

Copyright Wireless Connect Ltd 2007

74

Bare Bones System Configuration

Copyright Wireless Connect Ltd 2007

75

Insert CD ROM in Virtual Machine

Copyright Wireless Connect Ltd 2007

76

Start the Virtual Machine

Copyright Wireless Connect Ltd 2007

77

The Virtual POST Screen

Copyright Wireless Connect Ltd 2007

78

MikroTik ISO Linux Boot Screen

Copyright Wireless Connect Ltd 2007

79

System Package Selection

Copyright Wireless Connect Ltd 2007

80

MikroTik Installation Progress

Copyright Wireless Connect Ltd 2007

81

MikroTik Installation Progress

Copyright Wireless Connect Ltd 2007

82

MikroTik Local Console Login Prompt

Copyright Wireless Connect Ltd 2007

83

Further Reading

http://mikrotik.com http://shop.wirelessconnect.eu/ http://vmware.com http://centos.org http://redhat.com http://microsoft.com/virtualserver

Copyright Wireless Connect Ltd 2007

84