01 - MTCNA v5.4 - ALL
01 - MTCNA v5.4 - ALL
01 - MTCNA v5.4 - ALL
http://www.belajarmikrotik.com
Training Schedule
08.30 – 10.15 10.30 – 12.15 13.15 – 15.00 15.15 – 17.00
http://www.belajarmikrotik.com
What to Expect
Identify various RouterBOARD models and types
Learn all basic functions of MikroTik RouterOS for
daily usage
Learn basic knowledge of MikroTik RouterOS for
preparation to get the Advanced Course
Learning-by-doing (if you wish)
Get prepared for Certification Test
http://www.belajarmikrotik.com
Certification Test
Online at www.mikrotik.com
There will be 25 question, time limit is 1 hour
No need to check the question with your friend, they
will get different question
Passing grades is 60%
Those with score between 50% and 59% will eligible to
have second chance (if they want to)
Those who pass will get completion certificate
Those who don’t, will get attendance certificate
http://www.belajarmikrotik.com
About Me
Using MikroTik since middle 2004
First MikroTik version used was 2.7
What I do currently :
DuxTel Pty Ltd (Australia) as Consultant Engineer
Harvl Tech (Indonesia) as Technology Consultant
BelajarMikroTik.COM (Indonesia) as Trainer
Personal Qualification
MikroTik Certified Trainer (2006)
MTCNA (2005), MTCWE (2010), MTCTCE (2010), MTCUME
(2010), MTCRE (2010), MTCINE (2012)
MikroTik Certified Consultant (2007)
http://www.belajarmikrotik.com
Introduce Yourself
Please introduce yourself to the class
Name
Company
Prior experience in MikroTik
Prior experience in Networking
What do you expect from this training
Is there any specific material that you want to emphasize?
Is there any case that you think could be solved by MikroTik but
you don’t know how to solve it?
Does your company send you here for a mission on a particular
case or scenario?
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MTCNA
Fundamental Class
MTCINE
Advanced
InterNetworking
http://www.belajarmikrotik.com
Trainers
BelajarMikroTik.COM was founded by Trainers, but
we encourage lots more people to help us
All of our trainers either MikroTik Trainer or Consultant
MTCUME
MTCTCE
MTCINE
MTCWE
MTCNA
MTCRE
Trainer
Name Position
MikroTik
RouterOS and RouterBOARD
http://www.belajarmikrotik.com
MikroTikls SIA
Software and Hardware vendor
Motto : Routing the World
Location : Riga, Latvia (North Europe)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
RouterOS
Operating system, based on UNIX platform
More than just a “router”
Support lots of peripheral’s driver
If there is a new unknown device, there is no way to
install the driver ourselves
Submit the suppout.rif file to MikroTik when the device
is attached to the RouterOS
http://www.belajarmikrotik.com
RouterOS Features
There are lots of RouterOS
features that cannot be
explained here
Most of them will be
covered during this training
class
http://www.belajarmikrotik.com
RouterBOARD
Hardware, designed and produced by MikroTik and
use RouterOS as it’s operating system
Various models, types, number of interfaces, etc.
Developed on several architecture :
MIPS be
MIPS le
PPC
TILE
http://www.belajarmikrotik.com
RouterBOARD Architecture
RouterBOARD build with different architecture
Different architecture means different characteristic in
processing and addressing memory
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
RBABCX
Number of miniPCI slot
RouterBOARD Series
RB751U-2HnD
1 Wireless Interface
RouterBOARD 700 Series
http://www.belajarmikrotik.com
RBAACCX-X
Interface Information
RB2011UAS-2HnD
Additional 2GHz card, High
11 Interfaces (one of them is SFP)
power, MIMO and Dual Chain
http://www.belajarmikrotik.com
NAME-X
SXT-5HnD
SEXTANT
Groove-2
OmniTik
http://www.belajarmikrotik.com
RouterBOARD Comparison
At least twice a year,
MikroTik will release Product
Catalog
You can get the full spec of
each type at the Product
Catalog
http://www.belajarmikrotik.com
TCP/IP Basic
http://www.belajarmikrotik.com
OSI Standard
OSI = Open System Interconnection
OSI is used to create other networking protocols
such as TCP/IP, IPX, etc
OSI consist of layers, there are 7 layers in OSI
(that’s why it’s called 7 OSI Layer)
Advantages of using layer model are :
Every layer in OSI responsible in specific jobs, thus
changing one technology will not effecting another
layer
Lots of technology can be collaborated with the same
standard
http://www.belajarmikrotik.com
7 OSI Layer
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MAC-Address
MAC Address (Media Access Control address) is the
application of OSI Layer 2
MAC Addresses is unique addressing in every NIC
(Network Interface Card)
First 8 octet of MAC address is a manufacturer code
Last 8 octet of MAC address is a serial number created
by the manufacturer to distinguish one mac with
another
Unmanaged devices has no mac-address attached
Example of MAC-address: 00:0C:42:04:9F:AE
Manufacturer Unique ID
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
IP Addressing
IP (Internet Protocol) is part of Network Layer (L3)
IP address used to address a PC (host) logically (not
physically)
There are 2 methods of addressing
IPv4
32 bit addressing
Number of host 4.294.967.296
Predicted to be exhausted on 2012
IPv6
128 bit addressing
Total host 340.282.366.920.938.463.463.374.607.431.768.211.456
Simpler header than IPv4
http://www.belajarmikrotik.com
IPv4
10011111.10001110.00001010.01100101
128 + 8 + 4 + 2 = 142
159.142.10.101
http://www.belajarmikrotik.com
IPv4 Grouping
IP address is design to be used as a group (sub-
network)
Subnetting is a way to separate and distribute some
groups of IP address
Host/device that set in the same subnet, can
communicate one-another directly (without needed
any ROUTER)
http://www.belajarmikrotik.com
Subnet Notation
Subnet is written in 32 bit format (just like ip-address)
11111111.11111111.11111111.11000000
8 + 8 + 8 +2
/26
255.255.255.192
Just like IP, rather than using the binary notation, we
use a “human readable” notation for subnet
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NETWORK –
first IP of a
network group
BROADCAST –
last IP of a
network group
http://www.belajarmikrotik.com
“Human-readable” Notation
Decimal Notation
IP Address = 159.142.10.101
Subnet = 255.255.255.192
Bit Notation
IP Address = 159.142.10.101/26
http://www.belajarmikrotik.com
IP Subnetting Calculation
Subnet Mask Subnet Number of Usable IP
IP
255.255.255.0 /24 256 254
255.255.255.128 /25 128 126
255.255.255.192 /26 64 62
255.255.255.224 /27 32 30
255.255.255.240 /28 16 14
255.255.255.248 /29 8 6
255.255.255.252 /30 4 2
255.255.255.254 /31 2 -
255.255.255.255 /32 1 -
http://www.belajarmikrotik.com
IP Subnetting Calculation
IPAddress = 159.142.10.101/26
Number of IP = 64
Network = 159.142.10.___
64 IP = 159.142.10.101
Broadcast = 159.142.10.___
http://www.belajarmikrotik.com
IP Subnetting Calculation
Network = 159.142.10.___
101
= 1,578125
IP = 159.142.10.101 64
64
Broadcast = 159.142.10.___
1 x 64 = 64
64 + 64 - 1 = 127
Network = 159.142.10.64
IP = 159.142.10.65
Can
…
PING/connect
IP = 159.142.10.126 each other
Broadcast = 159.142.10.127
http://www.belajarmikrotik.com
4.
Store the MAC-address
received from other side to
the local cache
http://www.belajarmikrotik.com
Inter-subnet Connection
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Protocol
Protocol assist the method of transferring data
There are several well-known-protocols
TCP (Transport Control Protocol)
Used by most application
Deliver the packet two-ways (with handshake and authentication)
UDP (User Data Packet)
Simple traffic (no handshake)
Used mostly for DNS, traffic flooding, Game Online, etc
ICMP
Used widely to check network quality (ping, traceroute, etc) and to
discover a network topology
GRE
Used widely for tunnel mechanism
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MikroTik RouterOS
First Time Use
http://www.belajarmikrotik.com
Text Based
Additional
Need IP
Custom
Device
Access Via Condition
GUI
Keyboard/Monitor IF installed in a PC O
Serial Console With serial console cable O O
Telnet and SSH O O
WinBox Used program called winbox.exe O O O
FTP O
API Socket programming O O
Web (HTTP) O O
MAC-WinBox Layer 2 connection O O
MAC-Telnet Layer 2 connection O
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Winbox - Login
Connect to the
Router
http://www.belajarmikrotik.com
MAC-Winbox
Winbox is connected using mac-
address (no IP needed)
http://www.belajarmikrotik.com
Connect to RouterOS
Connect your laptop Ethernet to one of Router’s
Ethernet port
Open winbox.exe
Access your RouterBOARD with mac-winbox
method
Default username : admin
Default password : <blank>
http://www.belajarmikrotik.com
Configuration Reset
For some reason, we need to reset the configuration
When we totally forgot the username and password
When the configuration is too complex so it’s much
easier to reset to repair them
Configuration reset can be done using several
method
Hard-reset, reset the configuration physically (through
the board)
Soft-reset, reset the configuration through
winbox/terminal/web
http://www.belajarmikrotik.com
Hard-reset
Only for RouterBOARD
Every RouterBOARD has a
jumper mechanism that can
be used to force the
RouterOS back to initial
configuration
To do this, connect the
jumper, then turn-on the
Router
http://www.belajarmikrotik.com
Hard-reset
Every RouterBOARD
have a “reset-button”
that will force the Router
to reset the configuration
if pushed more than 10
seconds while turning on
the router
http://www.belajarmikrotik.com
Soft-reset
If you still can access the RouterOS, you can
execute a soft-reset command using
/system reset-configuration
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Reset Configuration
Reset your router configuration (using hard-reset)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Winbox - Interface
Delaying
change Hide/show password
Undo / Redo
Winbox
traffic
Status BAR, display IP, Resource information,
version, RouterBOARD right click to show/hide Secure
type information connection
active
Working area
Menu
http://www.belajarmikrotik.com
Lab Topology
Trainer will assign XY number for each of you
10.1.1.254
10.1.1.XY/24
WAN/Internet
Your Router
ClassAP
192.168.XY.254/24
LAN
http://www.belajarmikrotik.com
Laptop’s Settings
Your laptop’s IP
Your router’s IP
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Export
You MUST specify “file=???”, otherwise it will only
show the current configuration
http://www.belajarmikrotik.com
Import
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
/import initial-99.rsc
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
WebFig
To be able to make global-compatibility for Winbox,
since version 5, MikroTik introduce webfig, a winbox-
like web interface
http://www.belajarmikrotik.com
WebFig
http://www.belajarmikrotik.com
WebFig
http://www.belajarmikrotik.com
Non-GUI configuration
In special case, when GUI configuration cannot be
made (due to very-low-bandwidth, need automation
with script, etc.)
Terminal-based configuration can be made with
several method
Telnet (unsecured connection to port 23)
SSH (secured connection to port 22)
New-terminal (via winbox/webfig)
Serial console (via serial console cable)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
SSH Client
http://www.belajarmikrotik.com
Serial Console
In a case that Router cannot be access through all
the interfaces (e.g., unintentionally disabled all the
interfaces), you need to use serial-console to access
the RouterOS
Serial console is a connection between a PC and
RouterOS through serial-interface
PC and Router need to have a serial port connection
(or used USB to Serial converter)
Used Terminal program (e.g. hyperterminal)
NULL-MODEM cable needed
http://www.belajarmikrotik.com
NULL-MODEM Cable
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MikroTik RouterOS
Version and License
http://www.belajarmikrotik.com
MikroTik Version
MikroTik features depend on the current version
installed on the device
Current version can be viewed both in the status-bar
of Winbox or in the package installed in the
RouteroS
Installed packages also show what kind of features
available in the Router
Package can be a combined package or individual
packages
http://www.belajarmikrotik.com
MikroTik Version
MikroTik Version
http://www.belajarmikrotik.com
MikroTik Packages
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Package Manipulation
Individual package installed can be :
Enabled
Disabled
Uninstall
A package should be removed if it’s totally unused and we need
to free-up some disk space
All above process is not executed directly, but will be
scheduled to be executed when the router reboot
(restart)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Package Manipulation
Inspect your interface-list
Try to disabled wireless and routing packages, then
reboot
http://www.belajarmikrotik.com
Package Manipulation
Look at your “free-HDD-space”
Uninstall package IPv6 and Hotspot then REBOOT
BEFORE AFTER
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Drag-and-drop to
this area, make
sure the file is in
the root-folder
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Upgrade Process
http://www.belajarmikrotik.com
Downgrade Process
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
License
RouterOS features also depend on licensing level
that attach to the hardware
License lifetime (maximum upgradable version) also
depends on what level the license is
License of RouterOS is attached to the storage
device
E.g. : harddisk, NAND, USB, Compact Flash
If the storage media is formatted with non-mikrotik
partition, then the license will be invalid
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Purchasing License
License can be purchased online through
www.mikrotik.com (you must have a username)
Every participant will get FREE license level 4 on
their account (prepaid-key)
This prepaid key can be used to generate a license
License also can be purchased through
Credit-card
Nearest MikroTik Resellers
http://www.belajarmikrotik.com
Purchasing License
http://www.belajarmikrotik.com
BASIC Configuration
http://www.belajarmikrotik.com
Router Identity
Identity used to distinguish one Router from another
Identity configuration can be changed in SYSTEM
http://www.belajarmikrotik.com
Router Identity
Identity of the Router will be showned on
Winbox Status Bar (top)
Terminal Console prompt
Neighbor Discovery from Neighbor Router/Winbox
WebFig front page
http://www.belajarmikrotik.com
Login Management
Access to the Router is configured in USER menu
User management is configured by
GROUP – profile of a user, consist of what kind of
privilege is given to a user
USER – login, consist of username and password of a
user
User session (current connected users) is showed at
“Active Users” tab
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
WebFig
Skin
http://www.belajarmikrotik.com
Group
Privilege
Service Management
By default, RouterOS provide some services to
access it’s configuration
http://www.belajarmikrotik.com
Service Management
http://www.belajarmikrotik.com
Network Time
RouterBOARD doesn’t have any CMOS Battery to
save the time
http://www.belajarmikrotik.com
Network Time
Use NTP (Network Time Protocol) to allow the
RouterBOARD to synchronize the time with a valid
server
http://www.belajarmikrotik.com
Network Time
Mode = UNICAST
IP NTP Server
• time.apple.com
• time.windows.com
http://www.belajarmikrotik.com
Network Time
By default, all NTP is GMT+0
To get a valid time, change your timezone based on
your area
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
FILE
Default name for backup is
<ROUTERID>-DDMMYYYY-HHMM
File can be dragged to the local PC
http://www.belajarmikrotik.com
Binary - Backup
Can also be executed from Terminal
You can freely change the name (customized)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NetInstall
http://www.belajarmikrotik.com
Reinstall
Fresh-installation can rollback the configuration back
to first-time-config (without any configuration)
Installation can be using
CD Installation
Use CD-ROM as the installation media
Netinstall
Using EtherBIOS as installation media
Every RouterBOARD, can only be installed using
Netinstall
http://www.belajarmikrotik.com
Step-by-step Netinstall
UTP Eth1
RS232
Serial/Null Modem (optional)
http://www.belajarmikrotik.com
Preparation
Allow this program to passed through any firewall
http://www.belajarmikrotik.com
Preparation
These IP should be in the
Activate EtherBOOT same network subnet
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Netinstall - DONE
http://www.belajarmikrotik.com
Post Installation
After doing Netinstall, then the configuration and files
will be totally empty (even default-configuration will
be removed)
Get in to the Router through MAC-winbox, then do a
soft-reset or restore your previous backup
http://www.belajarmikrotik.com
Wireless
http://www.belajarmikrotik.com
Wireless
Wireless, as the name, is a connection without wire,
where data is send through wave using the
combination of frequency and amplitude
Usage of wireless connection is highly dependent on
the type of wireless card used, since it is the main
broadcaster and receiver
http://www.belajarmikrotik.com
Wireless in MikroTik
RouterOS support many wireless card module which
allow a connection through air using frequency
2.4GHz, 5GHz or 900Mhz)
MikroTik offer compatible solution for IEEE
802.11a/b/g/n standard
802.11a – frequency 5 GHz, 54Mbps
802.11b – frequency 2.4GHz, 11Mbps
802.11g – frequency 2.4GHz, 54Mbps
802.11n – frequency 2.4GHz or 5GHz, 300Mbps
http://www.belajarmikrotik.com
Wireless BAND
BAND is a working mode of a wireless device
To connect two or more devices, all of them have to
work with the same band
Band options
that shown here
is based on the
band supported
by the wireless
card
http://www.belajarmikrotik.com
Band Variation
Band also manage the width of the frequency used
By default, channel width for a frequency is 22MHz
(written as 20Mhz to simplified)
Higher channel-width will increase the throughput but
will be more sensitive to interference
http://www.belajarmikrotik.com
Frequency
Generally, all wireless card will support the usage of
this frequency range :
For 2.4GHz : 2412 – 2499 MHz
For 5GHz : 4920 – 6100 MHz
Since the channel-width is wider than each channel
range, than a channel will tend to interfere with
channels above and below it, if used in the same
area
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Frequency Regulation
Every country has their own regulation regarding
ISM frequency mode, and in MikroTik, this database
is kept in “country-regulation”
Country Regulation
http://www.belajarmikrotik.com
Scan List
Wireless station always scan to every frequency if
it’s unable to connected to an AP
By default, the process will scan all default frequency
in the frequency list
We can customize what frequency to be scanned
during this process
The frequency selected as scan must be available in
the frequency list
http://www.belajarmikrotik.com
Scan List
http://www.belajarmikrotik.com
Country Regulation
Since the usage of country-regulation will take effect
on the working frequency selection, then it is highly
recommended that AP and station use the same
country regulation
Teacher will try to use different country mode in the
ClassAP
http://www.belajarmikrotik.com
MIMO
MIMO = standard wireless 802.11n
http://www.belajarmikrotik.com
802.11n Advantages
Increasing data rate up to 300Mbps
Can utilize channel width 20MHz or 2x20MHz
Works both in 2.4GHz and 5GHz frequency
Use multiple antenna
MikroTik .11n features
MIMO (Multiple In Multiple Out)
Data Rates 802.11N
Channel Bonding
Frame Aggregation
TX-Power settings for wireless card N
Transparent bridging for MIMO Link
MPLS/VPLS Tunnel
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
802.11n HT Config
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Wireless
Stations
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
These settings
must be equal to
the settings in AP
http://www.belajarmikrotik.com
Connect to AP - SCAN
Scan is used to view what signal is detected
When SCAN is running, the wireless connection is
disconnected
http://www.belajarmikrotik.com
Connecto to AP - SCAN
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Registration Table
Signal strength that received
from other side
http://www.belajarmikrotik.com
Wireless Tools
If both side can ping each others, then change the
frequency to get better result
There are some tools that can help you decide which
frequency to use
To view traffic (ip, port, protocol) that passed
through this interface. This is a REAL-TIME
tools based on Layer3 information and
bandwidth usage for each IP
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Optimization
Try to use Frequency Usage or Snooper tool to find
better frequency
http://www.belajarmikrotik.com
Wireless Security
There are several security method that we can use
Authentication using passphrase
Encryption
MAC Filtering
Tunnel
http://www.belajarmikrotik.com
Wireless Encryption
Encryption is aimed to increase security
Encryption method is depend on Wireless Card
(hardware) and the OS being used
MikroTik support these encryption
WEP
TKIP
AES
MikroTik also support wireless authentication
WPA and WPA2 Pre-shared Key
RADIUS (MAC or EAP)
http://www.belajarmikrotik.com
Wireless Encryption
http://www.belajarmikrotik.com
WPA
Select Dynamic Keys
to use WPA
if StaticKey is selected,
then the encryption is
using WEP (obsolete)
AUTHENTICATION
ENCRYPTION
Passpharase for
authentication
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Security Profile
Inspect your security profile
You will see a profile named “default” with security key
inside (because we set it up through quickset)
Change or modified the key or method
Implement the profile to the wireless interface
Look under 801.1x tab on Registration Table
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MAC Filtering
In order to secure the connection between AP and
Station, we can set policy for what client could be
connected to an AP and vice versa
As a station, we also can lock to access only registered
mac-address of AP in order to prevent the station from
connecting to FAKE AP
http://www.belajarmikrotik.com
Connect List
Connect-list is a list for CLIENT/Station that list what
mac-address of AP to connect-to
http://www.belajarmikrotik.com
Connect List
Which interface is
allowed
Access List
Access List is for Access Point, maintain the list of
mac-address of station(s) that can be connected to
this AP
Or station(s) that are not authorized to connect
http://www.belajarmikrotik.com
Access List
MAC-address of
clients
Condition of
specific signal rate
that can be
connected
Authorized to connect
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Default Authenticate
http://www.belajarmikrotik.com
Default Forward
http://www.belajarmikrotik.com
MAC-filtering
Try to filter each mac-address so your PTP
connection will not be easily screwed by others
Don’t forget to put the list in the right place
Put to CONNECT-LIST if your interface is STATION
Put to ACCESS-LIST if your interface is Access Point
Try to make another AP with the same SSID, and
see if your PTP is bullet-proofed
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NStreme
Nstreme is MikroTik proprietary since version 2.x
There is no driver/application for nstreme in other OS,
then if an AP activate nstreme, laptop/PC with
windows/linux/macosx will not be able to connect to
this AP
Increase performance of wireless connection for
long-range connection
In order to use Nstreme, all AP and client/station
must activate nstreme
http://www.belajarmikrotik.com
NStreme
Nstreme activated through the interface setup
ENABLE/DISABLE
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NStreme Status
http://www.belajarmikrotik.com
NStreme Advantages
Client Polling
Ability to disabled CSMA
No protocol limit (even if more than 7 mile)
Low protocol overhead per frame, since the packets
are stored inside a buffer before send, thus can
increase the data rate
No performance decreasing in long-range
connection
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NV2 Configuration
http://www.belajarmikrotik.com
Protocol Usage
Options Setting on AP Setting on Client
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NStreme DUAL
Nstreme DUAL utilize the polling based system used
in nstreme, but using 2 interface in a time (one for
TX and the other for RX)
http://www.belajarmikrotik.com
Since this is
a slave, all
configuration
stated here
will be
ignored
http://www.belajarmikrotik.com
Physical interface
should be 2
This is the
configuration for
the RADIO, TX
config here must
be equal to RX
config at the
other end
http://www.belajarmikrotik.com
MAC address
will appear once
the setting has
been applied
Framer policy,
this is the same
as NStreme
http://www.belajarmikrotik.com
Dual NSTREME
Dual NSTREME Status
http://www.belajarmikrotik.com
Wireless Bridge
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Bridge Interface
Bridge is a Virtual Interface
You can create as many as you like
Bridge connect interfaces that supposed to be
connected through layer3 to be connected using
layer2
Bridge creation concept
Create a bridge interface
Put physical interfaces into the bridge as it’s PORT
http://www.belajarmikrotik.com
Bridge Creation
http://www.belajarmikrotik.com
Put in to bridge
called BRIDGE1
http://www.belajarmikrotik.com
Bridge Port
STUDY CASE
http://www.belajarmikrotik.com
Wireless Bridge
ETHERNET interface can be bridged out-of-the-box
Wireless AP (mode=ap-bridge, or mode=bridge) also
can be bridged without problem
Wireless Client (mode=station) cannot be bridged
because the limitation of protocol 802.11
However, several method can be used to bridge a
station
Tunnel
Mode=station-pseudobridge (or pseudobridge-clone)
Mode=station-bridge, introduced since version 5
WDS (Wireless Distribution System)
http://www.belajarmikrotik.com
Tunnel Bridge
Tunnel available for bridging wireless are
EoIP
VPLS
VPLS is the best method for bridging N links since it
has lower overhead
http://www.belajarmikrotik.com
VPLS Tunnel
Interface Virtual Private LAN Service (VPLS) is
interface tunnel like EoIP but runs through MPLS
Ether-like interface
Used to connect 2 different site in transparent
ethernet mode (bridge)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
OPTIONAL if
the interface
has multiple IP
http://www.belajarmikrotik.com
MPLS - Status
D – Dynamic
O - Operational
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
VPLS - Status
http://www.belajarmikrotik.com
Wireless Connection
Disconnect your WLAN1 from ClassAP and we will
make connection between your WLAN to your
partner’s WLAN
WLAN1
Connect each other in point-to-point
http://www.belajarmikrotik.com
Wireless Connection
R = Running
Connection establish
http://www.belajarmikrotik.com
10.1.1.99/24
10.1.1.98/24
http://www.belajarmikrotik.com
BRIDGE
http://www.belajarmikrotik.com
Station Pseudobridge
Pseudobridge is an emulator for pseudo-interface
Pseudobridge use mac-nat, which is a mac-address
translation for every traffic that passed through
Every packet that passed through will be checked and
will be put into a conversion table (IP to mac-address)
All packet will be sent to AP with the new mac-address
(of the pseudo-interface) and the reply will be re-
translated using the table created before
http://www.belajarmikrotik.com
Pseudobridge - Drawback
All entry in the table is single-entry
For NON-IP packet or layer 2 packet
More than one client using non-ip connection cannot
depend on this method (e.g. PPPoE)
IPv6 cannot passed through this interface
WLAN
00:0C:43:A1:21:34
http://www.belajarmikrotik.com
WLAN
00:0C:43:A1:21:34
http://www.belajarmikrotik.com
Wireless Bridge
Since v5, MikroTik offer a new proprietary protocol
that claims run better than pseudobridge called
“station-bridge”
Since this is proprietary, it only can connect to MikroTik
AP and version above v5
http://www.belajarmikrotik.com
Wireless Pseudobridge
Disabled VPLS interface
Connect WLAN1 with your neighbor’s using mode
station-pseudobridge and AP
Put the wlan1 to the bridge-port (on both router)
MODE = station-pseudobridge
MODE = ap-bridge (or bridge)
http://www.belajarmikrotik.com
Wireless Bridge
Change the station into “station-bridge”
MODE = station-bridge
MODE = ap-bridge (or bridge)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Station WDS
Station WDS will create a station interface ethernet-
like (can be bridged)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
If CHECKED
Will make the connection ignore the All WDS interfaces create on-the-fly will
SSID, thus only see the mac- be automatically added into BRIDGE as
address/frequency and band a PORT
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Station WDS
AP WDS (dynamic)
http://www.belajarmikrotik.com
AP WDS – AP WDS
AP WDS can be connected to another AP WDS
This is a connection system between AP and AP (not
traditional connection between AP and Station) using
WDS
Use widely as REPEATER
http://www.belajarmikrotik.com
AP WDS – Condition
To be able to establish AP WDS with another AP
WDS, there are conditions that should be aware of
SSID between all AP must be the same (we can
override this setting later)
Must use the same Band
Must use the same Frequency
http://www.belajarmikrotik.com
AP WDS - Filter
In dynamic-wds, it is possible to filter which AP to
associate with
Use connect-list to allow registered mac-address to
associate
Disable default-authenticate
In static-wds, the filter is automatically created by the
system (if you don’t put the mac-address as the wds-
interface, then it won’t connect)
http://www.belajarmikrotik.com
AP WDS (optional)
Create a AP WDS connection (statically)
Make sure you are using the same BAND, FREQ,
SSID
http://www.belajarmikrotik.com
AP WDS (optional)
Check the option "WDS ignore SSID"
Now you can create your own SSID
http://www.belajarmikrotik.com
AP WDS (optional)
Make sure the frequency is 2.4Ghz
Connect your laptop wireless LAN to each of your SSID
(try to ping to your neighbor’s laptop)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
WDS MESH
http://www.belajarmikrotik.com
Bridge
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Bridge Interface
Bridge is a Virtual Interface
You can create as many as you like
Bridge connect interfaces that supposed to be
connected through layer3 to be connected using
layer2
Bridge creation concept
Create a bridge interface
Put physical interfaces into the bridge as it’s PORT
http://www.belajarmikrotik.com
Bridge Creation
http://www.belajarmikrotik.com
Put in to bridge
called BRIDGE1
http://www.belajarmikrotik.com
Bridge Port
STUDY CASE
http://www.belajarmikrotik.com
Bridge - ETH
Throughout this session, we will create a bridge with
ethernet (rather than wlan)
Disable your WLAN
Remove your WLAN from bridge-port
DISABLED DISABLED
http://www.belajarmikrotik.com
Bridge - ETH
Connect your eth5 with your neighbor’s
http://www.belajarmikrotik.com
Bridge - ETH
Put all ethernet into the bridge-port
http://www.belajarmikrotik.com
Bridge - ETH
Logically, your laptop is connected directly now
http://www.belajarmikrotik.com
Bridge Loop
Imagine a condition where two or more connection is
made through those bridges
In bridge topology, this condition will get the bridge
into confusion because they will keep exchanging
the information from those links
This is called BRIDGE LOOP
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Rapid STP
RSTP = Rapid Spanning Tree Protocol
This method is called Spanning Tree because the
algorithm will prune (cut-off) the redundant path and
make all connected bridge into a TREE
There will be one router as ROOT router
Another router will be the child of the root
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
RSTP
Enable RSTP at both router and then plugged your
ETH4 to your neighbor
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Interface Cost
Each interface has a cost value to define how much
it cost to passed a traffic through that interface
The lower the cost, the more preferable that interface
will be
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Packet Flow
Packet Flow is a diagram that shows how a network
packet is managed inside RouterOS
In RouterOS v3.x the packet flow has been
separated between Layer2 and Layer3
This session will only cover the Layer2 Packet Flow
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Firewall Filter
Basic Configuration
http://www.belajarmikrotik.com
Firewall
Firewall is used to create a policy for the router
To protect router and client from unauthorized access
To prevent any local or remote device from using
unwanted resources
To allow some devices/address to goes in and out from
the router
Firewall can be implemented in MikroTik using
features Filter and NAT
Another feature that support firewall is Mangle and
Connection-Tracking
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Access to
RouterOS via
WINBOX
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Firewall Filter
INPUT
http://www.belajarmikrotik.com
OUTPUT
PING to some outside server
INPUT
Response from outside
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Protocol
(TCP/UDP/ICMP/etc), usually
the source port is the port in
laptop/PC side (randomly
picked) and the destination is
based on the service
requested
Interface from where the
traffic is going in and out,
improper selection will
cause the rule fails to run
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PASSTHROUGH – do nothing,
used widely to check whether
a rule is ever meet the criteria
(looked for the counter)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
THEN
Accept this packet and process for further
process
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
3
1 INPUT
INPUT
DNS REPLY to the Router
Laptop is requesting
(DROP at the DROP ALL rule)
DNS(ACCEPT)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MAC Filtering
Even if you blocked all the IP, you still can access
the Winbox using mac-winbox (layer 2)
This is happened because FIREWALL only blocked the
layer 3 connection
MAC layer configuration can be managed through
menu MAC-Server
http://www.belajarmikrotik.com
MAC Filtering
Stated which Define which interfaces Enable/disable mac-ping
interface is is allowed to accept features
allowed to mac-winbox
receive mac-
telnet
http://www.belajarmikrotik.com
Address List
In some conditions, we might need to assign some
IPs not in the same subnet format to a source-
address or destination-address of a rule, for example
192.168.10.21 – TCP – dstport=8291 – DROP
192.168.10.10 – TCP – dstport=8291 – DROP
192.168.10.40 – TCP – dstport=8291 – DROP
192.168.10.83 – TCP – dstport=8291 – DROP
All the rules above can be simplified using address-
list
http://www.belajarmikrotik.com
Address List
Address list is IPs that grouped into a specific name
Address list can be utilize in
FILTER
MANGLE
NAT
http://www.belajarmikrotik.com
Address List
Address format is :
Single IP
192.168.1.100
Range IP
10.1.1.1 – 10.1.1.100
Subnet IP
192.168.10.128/29
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Address List
Create one address-list named “allowed”
Assign IP that you allowed to access your router
(such as your IP, your trusted neighbor’s IP, etc)
http://www.belajarmikrotik.com
Address List
Use the lists in the condition rule (rather than using
src-address, now we are using src-address-list)
http://www.belajarmikrotik.com
Custom Chain
Besides default-chains (INPUT, OUTPUT,
FORWARD), we can create any chain that we need
(so called custom-chain)
But by default, only default-chain will be executed
during the process of a packet
To execute custom-made chain, we need to make a
JUMP rule from default-chain
http://www.belajarmikrotik.com
Custom Chain
INPUT
VIRUS LIST
http://www.belajarmikrotik.com
Custom Chain
http://www.belajarmikrotik.com
Custom Chain
We will create 2 specific chain to access the router
CUSTOMER
DNS (default udp/53)
Web (default tcp/80)
ICMP (default icmp)
ADMIN, with privilege to
WinBox (default tcp/8291)
ICMP (default icmp)
Telnet + SSH (default tcp/23 and tcp/22)
FTP (default tcp/21)
http://www.belajarmikrotik.com
IP Services
Before you make the limitation, check out the
available service at IP Services and make sure all
the service you need is open/enabled
Check their respective port
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Address List
Create address list on what IP can access as ADMIN
or CUSTOMER
http://www.belajarmikrotik.com
All Rules
Arrange the rules accordingly
http://www.belajarmikrotik.com
Firewall LOG
Firewall activity can be saved in LOG
Log rules must be placed before another rule (or
above checked rule)
http://www.belajarmikrotik.com
Firewall LOG
Log Prefix
http://www.belajarmikrotik.com
Firewall Log
Let’s log what IP is accessing (or try to access)
winbox of this router
http://www.belajarmikrotik.com
Firewall Log
Arrangement and Result
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Connection Tracking
http://www.belajarmikrotik.com
Connection Tracking
In a router, all active traffic will be recorded real-time
in order to return them back to the correct callers
In MikroTik RouterOS, this feature is called
connection-tracking
http://www.belajarmikrotik.com
Connection Tracking
Connection tracking keep all information of a
connection (protocol, port, including the status/state
of that connection)
Disabling connection-tracking will result in disabled
all firewall features (FILTER + NAT + MANGLE)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Connection Tracking
Every connection has state or status
This status is called connection-state
Connection State <> TCP State
http://www.belajarmikrotik.com
Connection State
http://www.belajarmikrotik.com
Connection State
Invalid
Suddenly appear traffic without any request from internal,
can be a virus or traffic comes from multi-backbone
New
Newly created packet from a stream
Establish
Packet that follow new packet which is a continuous
streams of first packet
Related
Packet that suddenly appear but still have correlation to
establish or new packet
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Firewall
Network Address Translation
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Source NAT
Change the source address of a packet into new IP
(local IP change to public IP)
192.168.98.1 10.1.1.98
SRC-NAT
PACKET PACKET
SRC=192.168.98.1 SRC=10.1.1.98
DST=www.yahoo.com DST=www.yahoo.com
http://www.belajarmikrotik.com
Source NAT
Source NAT is widely used for :
Securing internal network (so outsider cannot access
your local devices directly)
Allowing local IP to be known as public IP from the
outside/internet
Manage local ip allocation
There are 2 source NAT type
SourceNAT
Masquerade
http://www.belajarmikrotik.com
MASQUERADE
10.1.1.98
192.168.98.1
PACKET PACKET
SRC=192.168.98.1 SRC=10.1.1.98
DST=www.yahoo.com DST=www.yahoo.com
http://www.belajarmikrotik.com
Source NAT
Other source NAT is called pure SourceNAT (src-nat)
SourceNAT is the same as masquerade, but we can
choose what IP to be changed to
Used if :
Gateway is using static IP from the ISP (cannot be
used in dynamic public IP)
There are more than 1 public IP assigned
http://www.belajarmikrotik.com
Source NAT
10.1.1.98 Use SourceNAT if
there are more than
1 public IP
10.1.1.101
192.168.98.1
PACKET PACKET
SRC-NAT
SRC=192.168.98.1 SRC=10.1.1.101
DST=www.yahoo.com DST=www.yahoo.com
http://www.belajarmikrotik.com
Source NAT
Currently, if your LAN (laptop) connect to outside, it
will automatically recognized from IP 10.1.1.XY (your
own public IP) automatically since we are using
masquerade
This lab will try to make another public IP and we will
set our outside IP into the new IP (10.1.1.100+XY)
There will be 2 IPs in the WLAN1 (WAN)
First IP is 10.1.1.XY
Statically added 2nd IP: 10.1.1.100+XY
http://www.belajarmikrotik.com
Source NAT
Add IP 10.1.1.(100+XY) at WLAN1
Interface WLAN1
Adjust with your own XY
http://www.belajarmikrotik.com
Source NAT
Make a rule to change src-ip into new IP
[10.1.1.(100+XY)] for browsing activity only (TCP
port 80)
http://www.belajarmikrotik.com
Source NAT
http://www.belajarmikrotik.com
Source NAT
Don’t forget to arrange them accordingly
Why we should put the src-nat above the masquerade?
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NAT Helpers
Host behind a router with NAT cannot have real end-
to-end connection
There are some protocols that might be unable to run
smoothly
Services that need TCP initialization from outside or
stateless protocol like UDP, will have a problems with
this
There are several protocols that basically incompatible
with NAT (e.g. Authentication Header from IPSec)
http://www.belajarmikrotik.com
NAT Helpers
This drawbacks can be resolved with NAT Helpers,
which allow NAT Traversal for several protocols
http://www.belajarmikrotik.com
Destination NAT
Destination NAT will change a packet destination
address into new address
10.1.1.98
192.168.98.1
PACKET
SRC=115.10.100.4
DST-NAT
DST=10.1.1.98
PACKET
SRC=115.10.100.4
DST=192.168.98.1
http://www.belajarmikrotik.com
Destination NAT
Destination NAT widely used for :
Accessing internal resources (PC, Printer, Server) from
outside (using Public IP)
Change destination port and redirect them to the
Router (for proxy and dns)
There are 2 destination NAT we can use :
dst-nat
redirect
http://www.belajarmikrotik.com
Redirect
Redirect will automatically change destination IP to
become the router IP
REDIRECT
10.1.1.98
192.168.98.1
PACKET
SRC=192.168.98.1 PACKET
DST=115.10.100.6 SRC=192.168.98.1
DST=10.1.1.98
http://www.belajarmikrotik.com
Redirect
We will force the DNS request to take all DNS from
our local cache
If a traffic is in
destination-nat
chain
http://www.belajarmikrotik.com
Redirect
Then we will redirect the traffic to router itself
http://www.belajarmikrotik.com
Redirect
Since Router is become our DNS server, try to
change the IP of a domain, say www.facebook.com
or www.cnn.com into local IP
http://www.belajarmikrotik.com
Destination NAT
Dst NAT is used to change destination IP :
Internet traffic wants to go to your public IP
You can create a dst-nat so when it arrived at the
router, the destination is changed into your local IP
10.1.1.98
192.168.98.1
PACKET PACKET
SRC=115.10.100.4
DST-NAT
SRC=115.10.100.4
DST=192.168.98.1 DST=10.1.1.98
http://www.belajarmikrotik.com
Destination NAT
Traffic fill filtered in dst-nat
chain
If the destination is IP
10.1.1.98 (IP Public
Gateway)
http://www.belajarmikrotik.com
Destination NAT
Then the action is, change the destination
IP (before=public IP) into local IP
http://www.belajarmikrotik.com
Destination NAT
Accessing your local laptop from your public IP
Try to create a DST-NAT to allow your neighbor to
access your local IP through your public WLAN IP
Make sure you have a service running in your laptop,
for example Remote Desktop or VNC or web server
Trainer will give you an example
http://www.belajarmikrotik.com
Destination NAT
IF
Public IP
IP = 10.1.1.XY
IP = 192.168.XY.1
Local IP
http://www.belajarmikrotik.com
NAT Action
DST-NAT – only for dst-nat
Advanced
Firewall Forward
http://www.belajarmikrotik.com
IP 192.168.98.100
NO BROWSING
NO PING
ALLOW TELNET
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Filter Forward
Make a rule in chain forward
The objective is to filter services from laptop to
outside servers
Service that we are going to filter :
HTTP
ICMP
TELNET
Change the rules order in order to see the effect
http://www.belajarmikrotik.com
Service Ports
These ports are used by
the service provider
Example
Server www.yahoo.com will
open TCP port 80
Thus, if we want to disallow
a client from going to
www.yahoo.com, then the
rule should block access to
destination port 80
http://www.belajarmikrotik.com
Service Ports
REQUEST Traffic
Protocol=tcp, dst-port=80 YAHOO
RESPONSE Traffic
Protocol=tcp, src-port=80
http://www.belajarmikrotik.com
Filter Forward
Make a rule to block specific IP so those IPs cannot
browse to the internet
Use protocol TCP and port 80
CHAIN = FORWARD
SRC-IP = 192.168.98.1 Adjust with your
PROTOCOL = TCP own IP
DST-PORT = 80
ACTION=DROP
http://www.belajarmikrotik.com
Filter Forward
Make a rule to block ping/traceroute (ICMP) for IP
unless your own IP
Try to PING to www.cnn.com
RESULT = _________
CHAIN = FORWARD
SRC-IP = !192.168.98.1
This sign (!) is NOT, means PROTOCOL = ICMP
that the condition will be
match if there is packet ACTION=DROP
comes from NOT your IP
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
CHAIN = FORWARD
SRC-IP = !192.168.98.1
PROTOCOL = ICMP
IN-INTERFACE = ether1
ACTION=DROP
http://www.belajarmikrotik.com
Filter Forward
Make a rule so your IP can browse to the
MainRouter, while still cannot browse to outside
CHAIN = FORWARD
SRC-IP = 192.168.98.1
DST-IP = 10.1.1.254
PROTOCOL = TCP
DST-PORT = 80
ACTION=ACCEPT
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Mangle
Mangle is a facility to mark specific
packet/connection to be used later at different facility
Mangle can be utilized at
Firewall Filter
Firewall NAT
Queue
Routing
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Marking Mangle
There are 3 marking mangle :
Routing mark used for routing
Connection mark used for marking a session (like in
the connection tracking)
Packet mark used to mark the packet
Queue, filter, NAT, and other features can only recognized
packet mark, but not connection mark
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
connection-mark
packet-mark
http://www.belajarmikrotik.com
Connection Mark
Connection mark will define the 1st packet that
initiate the connection-tracking
Will be viewed as customer side’s request
The specific protocol and port will be defined (as well
as in or out interface)
Cannot be used in Queue and Routing facility
Most of the time, “passthrough” will be checked
To allowed the 1st packet to be marked as packet-mark
as well
http://www.belajarmikrotik.com
Connection Mark
http://www.belajarmikrotik.com
Packet Mark
Packet mark will mark the whole packet that belongs
to a connection
In indirect packet-mark, the only parameter for
packet-mark rule is the connection-mark
Packet mark can be used in all firewall facility +
queue (but not routing)
Most of the time, packet mark is not “passthrough”
http://www.belajarmikrotik.com
Packet Mark
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Policy Routing
Policy Routing is advanced routing based on
rule/policy that we had defined
Can only work if there are 2 or more gateway
Next-hop (gateway) will be selected based on the rule
we defined
Policy example could be
Source or destination IP / network
Protocol and/or port (http, ftp, winbox, etc)
Interface (in or out)
Traffic type (p2p, traffic normal, etc)
http://www.belajarmikrotik.com
10.2.2.254
Policy Routing HTTP ONLY
10.1.1.254
ALL TRAFFIC
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Policy Routing
Create NEW VLAN under your WLAN1
VLAN100
IP Address : 10.255.100.XY/24
Gateway : 10.255.100.254
VLAN200
IP Address : 10.255.200.XY/24
Gateway : 10.255.200.254
Set the Gateway to VLAN200 with routing-mark
Destination : 0.0.0.0/0
Gateway : 10.255.200.254
Routing-mark : <create-your-own>
http://www.belajarmikrotik.com
Policy Routing
Make a Policy Routing so traffic browsing (HTTP) will
choose to go through gateway 10.255.200.254 while
the others (e.g. HTTPS) will go to 10.255.100.254
Inspect through Torch is there any traffic passing
through VLAN1 or VLAN2?
Adjust your MASQ rule accordingly (or add new
masquerade and assign out-interface as all-vlan)
http://www.belajarmikrotik.com
Routing
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Routing Concept
Destination = IP/Network that want to be reached
Gateway = exit point, which is transit IP to reach the
destination
Gateway has to be IP with the same subnet with the
one exist in the router physically
Gateway always a single IP
Every routing has to be created two-way
Every IP can only talk with IPs with the same subnet
http://www.belajarmikrotik.com
Routing Concept
DST-Address = 192.168.98.0/24
GATEWAY = 10.10.10.1
DST-Address = 192.168.50.0/24
GATEWAY = 10.10.10.20 10.10.10.20
10.10.10.1
192.168.50.8/24
192.168.98.1/24
http://www.belajarmikrotik.com
Routing Concept
192.168.98.1/24
10.10.10.8/24 192.168.77.1/24
10.20.20.4/24
192.168.98.254/24 192.168.77.254/24
http://www.belajarmikrotik.com
Routing Concept
172.16.1.1/24 10.7.6.11/24
10.7.6.5/24
172.16.1.80/24
10.10.10.11/24 10.20.20.21/24
192.168.98.1/24
10.10.10.8/24 192.168.77.1/24
10.20.20.4/24
192.168.98.254/24 192.168.77.254/24
http://www.belajarmikrotik.com
Routing Concept
10.10.10.8/24
10.20.20.4/24
192.168.98.254/24 192.168.77.254/24
Default Gateway =
http://www.belajarmikrotik.com Default Gateway =
192.168.98.254 192.168.77.254
Routing Concept
Dst-address = 192.168.98.0/24 172.16.1.1/24
GATEWAY = 10.10.10.8
172.16.1.80/24
10.10.10.11/24
Dst-address=192.168.77.0/24
GATEWAY = 172.16.1.1
192.168.98.1/24
10.10.10.8/24 192.168.77.1/24
http://www.belajarmikrotik.com
Routing Concept
172.16.1.1/24 10.7.6.11/24
10.7.6.5/24
172.16.1.80/24
Dst-address = 192.168.98.0/24
GATEWAY = 172.16.1.80 Dst-address = 192.168.77.0/24
GATEWAY = 10.7.6.5
192.168.98.1/24
192.168.77.1/24
http://www.belajarmikrotik.com
10.7.6.11/24
10.7.6.5/24
10.20.20.21/24
Dst-address = 192.168.98.0/24
GATEWAY = 10.7.6.11
192.168.98.1/24
192.168.77.1/24
10.20.20.4/24
http://www.belajarmikrotik.com
Routing in MikroTik
Routing Concept in MikroTik also have the same rule
(with the dst-address and gateway principle)
http://www.belajarmikrotik.com
Routing Abbreviation
STATUS
D – Dynamic
S – Static DISTANCE
A – Active A symbol of cost to reach a destination.
C – Connected Lower distance means that the route will
o – OSPF get higher priority
b – BGP
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Default Gateway
Default gateway is a case where every destination
will be directed to one particular gateway
All destination => dst-address=0.0.0.0/0
We will need this if the way out of a traffic from a
router is only through a single IP only
Also used as last-choice of a routing table, where it
will be used when no other route is match
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
ECMP
ECMP configuration is pretty simple which you need
only to add another gateway to your default route
http://www.belajarmikrotik.com
ECMP
Uplink with unequal capacity can have multiple entry
in the gateway
http://www.belajarmikrotik.com
ECMP
Try ECMP using VLAN100 and VLAN200
http://www.belajarmikrotik.com
CASE
1 2 3
Request IP 202.148.11.4
http://www.belajarmikrotik.com
Topology
Connect one of your ethernet to your friends
Assign new IP for the ethernet
Example : 10.1.AB.0/24
(AB = your XY + your neighbor’s XY)
10.1.197.2
10.1.197.1
192.168.98.1/24 192.168.99.1/24
http://www.belajarmikrotik.com
Simple Routing
Create one static-routing (each router)
DST-Address = 192.168.98.0/24
GATEWAY=10.1.197.1
DST-Address = 192.168.99.0/24
GATEWAY=10.1.197.2
10.1.197.2
10.1.197.1
192.168.98.1/24 192.168.99.1/24
http://www.belajarmikrotik.com
Simple Routing
Create one static-routing (each router)
DST-Address = 192.168.99.0/24
GATEWAY=10.1.197.2
10.1.197.2
10.1.197.1
192.168.98.1/24 192.168.99.1/24
http://www.belajarmikrotik.com
Static Routing
Look at your routing table
R1
R2
http://www.belajarmikrotik.com
Dynamic Routing
Dynamic routing is a configuration to connect
inter-network with automatic routing sharing
Dynamic routing is mostly used in a huge network
(imagine if you have to create static routing for 80
networks in 10 router)
Dynamic Routing will force each router to share their
routing table with another router automatically
Dynamic Routing is simple in configuration, but a little
bit more complicated in troubleshoot (since all added
automatically)
Dynamic routing need much more resource
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
OSPF Configuration
http://www.belajarmikrotik.com
OSPF Instances
Instance is
global
configuration for
a router
http://www.belajarmikrotik.com
OSPF Instances
Redistribute DEFAULT :
means that it will distribute it’s
default route to another route.
Do this only if this router is a
global gateway to all the
networks
OSPF Network
OSPF is activated once you put ospf-network in both
router (using the connected network IP)
Network IP that will implement
OSPF. Usually is the IP
network of an interface
http://www.belajarmikrotik.com
10.1.197.2
OSPF
10.1.197.1
192.168.98.1/24 192.168.99.1/24
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NEW Topology
WLAN1 WLAN1
connect to connect to
SSID = JACK SSID = JILL
http://www.belajarmikrotik.com
Assign New IP
WLAN1 WLAN1
connect to connect to
SSID = JACK 10.20.200.XY/24 SSID = JILL
10.10.100.XY/24
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
OSPF
Remove Default-GATEWAY
Make sure there is no default gateway
http://www.belajarmikrotik.com
OSPF
To use full features of route, we need to disable any
NAT rules
http://www.belajarmikrotik.com
OSPF
We will create a huge network so our network will be
connected each other
. .
. .
. .
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
IP Tunnel
http://www.belajarmikrotik.com
VPN
VPN (Virtual Private Network) is a system created to
access local networks through a virtual secure
connection
http://www.belajarmikrotik.com
VPN Advantages
Secure connection to access local resources in the
office, through
Hotspot/wifi connection
Lease Line
Wireless local loop whether using the same ISP or
different ISP
Office resource (mail server, printer, email, etc) can
only be accessed through people through
authentication and encrypted connection
http://www.belajarmikrotik.com
Tunnel Protocol
Simple configuration
No authentication (login) needed
No encryption needed
Protocol in this type are :
IPIP (IP over IP)
EoIP (Ethernet over IP)
VLAN (Virtual LAN)
GRE Tunnel
http://www.belajarmikrotik.com
VPN Tunnels
Most of them are Point-to-Point
Offer authentication (login)
Implement data encryption
Protocols in this type are :
PPPoE (Point-to-Point Protocol over Ethernet)
PPTP (Point-to-Point Tunneling Protocol)
L2TP (Layer 2Tunneling Protocol)
IPSec (IP Secure)
SSTP (Secure Socket Tuneling Protocol)
OpenVPN
http://www.belajarmikrotik.com
LAB Topology
OSPF Network
WLAN1 WLAN1
connect to 10.20.200.0/24 connect to
SSID = JACK SSID = JILL
10.10.100.0/24
http://www.belajarmikrotik.com
PPTP
One of the most preferable tunnel protocol in
MikroTik is PPTP (Point-to-Point Tunneling Protocol)
PPTP works in layer 3 (through routers) which make
this protocol available to be used through different
ISP
PPTP use TCP port 1723 and IP protocol 47 (GRE)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
2 3 5 5
1 192.168.XY.1
http://www.belajarmikrotik.com
1 10.10.10.???
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Office-to-Office Tunnel
Tunnel also used to connect 2 office location that
separated through a cloud (whether by different or
same ISP)
To create office-to-office connection tunnel, we need
to set PPTP Server and PPTP Client
Server and client, both will use MikroTik RouterOS
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
DHCP Client
http://www.belajarmikrotik.com
DHCP Client
Client configuration is considered completed once
the status is “bound”
http://www.belajarmikrotik.com
PPTP Server
PPTP Server is activated in a router
Means that all interfaces will automatically response to
any PPTP request
There are 2 types of PPTP Server interface
configuration :
Static interface
Created permanently, will always there even there is no
connection at that time
Dynamic interface
Add automatically on-the-fly every time a connection is establish
http://www.belajarmikrotik.com
PPTP Server
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PPP Profile
http://www.belajarmikrotik.com
PPP Secret
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Preparation
Before we start, this is some checklist to do
Disable any OSPF network
Enable your NAT rule
Make sure you have default-gateway
You should be able to access your neighbor’s
PUBLIC IP
You shouldn’t be able to access your neighbor’s
LAPTOP IP (it’s protected by NAT rule)
http://www.belajarmikrotik.com
10.10.100.0/24
http://www.belajarmikrotik.com
_______________
_______________
http://www.belajarmikrotik.com
PPTP Client
PPTP Server
_______________
_______________
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Route Tunnel
Tunnel we created was a routing tunnel
Subnet at both side is different
NETWORK
NETWORK
192.168.77.0/24
192.168.98.0/24
Melbourne
Sydney
http://www.belajarmikrotik.com
Bridge Tunnel
MikroTik also have several tunnel that can connect
two networks with the same subnet even though
they are separated physically
Those are EoIP Tunnel and VPLS Tunnel
NETWORK
NETWORK
192.168.98.0/24
192.168.98.0/24
Melbourne
Sydney
http://www.belajarmikrotik.com
EoIP
EoIP is a proprietary (only connect with MikroTik
devices) tunneling method
EoIP use protocol 47/GRE
EoIP is a variant of ether-like interface, thus it can be
bridge just like ethernet
EoIP runs in all network that connected through
layer3 connection
Maximum number of EoIP interfaces in a router is
65535
http://www.belajarmikrotik.com
EoIP
EoIP can be bridge just as Ethernet (considered as
Layer-2 Tunnel, upon successfully connected)
The main function is to connect 2 location that
separated far away in order to utilize the same local
network subnet
There are no encryption mechanism in EoIP, so it is
very recommended that EoIP runs above another
encrypted tunnel (like PPTP)
http://www.belajarmikrotik.com
EoIP Implementation
Any Network
(LAN, WAN, Internet)
Bridge Bridge
http://www.belajarmikrotik.com
EoIP Setup
EoIP Setup
10.20.200.210/24
10.10.100.208/24
http://www.belajarmikrotik.com
EoIP Setup
Bridge EoIP and ether1 interface
http://www.belajarmikrotik.com
EoIP
Create a same subnet between your local laptop IP
and your partner’s local laptop IP
Create EoIP Tunnel
Since EoIP doesn’t have encryption, optionally you can
create the EoIP on top of PPTP
http://www.belajarmikrotik.com
VPLS Tunnel
Interface Virtual Private LAN Service (VPLS) is
interface tunnel like EoIP but runs through MPLS
Ether-like interface
Used to connect 2 different site in transparent
ethernet mode (bridge)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
NETWORK
NETWORK
192.168.98.0/24
192.168.98.0/24
12.12.12.2/32
PPTP
11.11.11.1/32
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MPLS - Status
D – Dynamic
O - Operational
T – Transport
V – VPLS active
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
VPLS - Status
http://www.belajarmikrotik.com
Quality of Service
http://www.belajarmikrotik.com
Quality of Service
In MikroTik, bandwidth limitation is managed in
Quality of Service
Quality of service not only managed bandwidth
usage, but also managed bandwidth priority,
burstable, dual limit, etc
That’s why it’s called Quality-of-Service
QoS implement queuing mechanism where traffic is
not dropped, but arranged in a queue
http://www.belajarmikrotik.com
Simple Queue
QoS implementation is configured in Queue menu
The most simple form of QoS is Simple Queue
Simple Queue can limit
Client Upload
Client Download
Client Total (upload/download)
http://www.belajarmikrotik.com
Simple Queue
To use Simple Queue, we must fill the
Target (Address or Interface)
Max-Limit
Simple Queue will arrange all the queue rules in
orders, means that above rule will be executed
before below rules, thus this make the order
important
http://www.belajarmikrotik.com
Simple Queue
http://www.belajarmikrotik.com
Simple Queue
http://www.belajarmikrotik.com
Simple Queue
Let’s limit your IP with this bandwidth
download 64k
upload 64k
http://www.belajarmikrotik.com
Traffic Monitoring
Can be viewed in Statistic/Traffic
http://www.belajarmikrotik.com
Traffic Monitoring
Can also be seen in INTERFACE
http://www.belajarmikrotik.com
Tools - TORCH
Torch is used to monitor the traffic real-time and
complete
http://www.belajarmikrotik.com
Tools - TORCH
The information will be depend
on these options checked
source-ip:source-port
destination-ip:destination-port
http://www.belajarmikrotik.com
Graphing
http://www.belajarmikrotik.com
Allow othe
TARGET-
ADDRESS to view
this graph
http://www.belajarmikrotik.com
Accessing Graph
Router’s IP
Click Here
http://www.belajarmikrotik.com
Graph
http://www.belajarmikrotik.com
External Graphing
To store the graphic externally, we can use SNMP
SNMP is a standard industry protocol that used to
monitor and manage lots of devices through internet,
such as switch, router, workstation, etc by remote
SNMP can be used to view
Device status
Traffic utilization
Device uptime
IP lists
http://www.belajarmikrotik.com
Activating SNMP
SNMP is not enabled by default
http://www.belajarmikrotik.com
Activating SNMP
http://www.belajarmikrotik.com
DESTINATION limit
Besides using client IP as the options, we can
combine them to limit to a particular
target/destination
http://www.belajarmikrotik.com
Destination Limit
Limiting bandwidth to specific server
Add www.mikrotik.com IP address as a destination
for your new Queue
Check the IP by doing PING to the Name
Use the same bandwidth limit 32k/64k
Try to open www.mikrotik.com and to other site, see
if you can distinguish the traffic
http://www.belajarmikrotik.com
Destination Limit
http://www.belajarmikrotik.com
Destination Limit
Since the order is very important, adjust your new
rule so they will be arranged properly
http://www.belajarmikrotik.com
Advanced Queue
Simple Queue can be modified to make more
advanced limitation
This advanced configuration can be configured by
using mangle features in firewall
Advanced Queue can even make a balanced
limitation to all the clients by only using some rules
http://www.belajarmikrotik.com
Firewall Mangle
Mangle is used to mark a packet
The mark created by mangle can be used in :
Firewall Filter and NAT
Routing
Queue
Rule in mangle is the same as other Firewall (top-
down, if-then, etc)
The mark created by mangle only valid inside the
router (the mark will be removed once the packet
ready to leave the router)
http://www.belajarmikrotik.com
Firewall Mangle
http://www.belajarmikrotik.com
Marking Mangle
There are 3 marking mangle :
Routing mark used for routing
Connection mark used for marking a session (like in
the connection tracking)
Packet mark used to mark the packet
Queue, filter, NAT, and other features can only recognized
packet mark, but not connection mark
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Mangle Connection
Mark the connection based on protocol and port
Use feature “passthrough” for connection-mark
http://www.belajarmikrotik.com
Mangle Packet
Since the connection has
been marked, we then
mark every packet of the
connection
No passthrough in packet
http://www.belajarmikrotik.com
Specific Limitation
Limit traffic based on specific requirement
Try to mark the traffic and make the limitation
HTTP (TCP/80) – 64k/128k
http://www.belajarmikrotik.com
Specific Limitation
Make a new queue for the marked packet
http://www.belajarmikrotik.com
Specific Limitation
Since this rule is specific, we move to re-arrange the
whole queue
Try the new queue you have created
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Dual Limitation
Dual limitation implemented in limit-at
The objective of limit-at is to give guarantee
bandwidth even in worse-case scenario (all
bandwidth is utilized)
Committed Information
Rate (CIR), bandwidth
guarantee
Mbps Mbps
Client2 traffic
MIR 1 CIR 2
MIR 1
Client1 traffic
MIR 2 MIR 2
CIR 1
sec sec
Before After
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Queue Priority
If we have more than 1 queue, priority of each queue
can be modified to give some queue a higher priority
Priority queue is a number from 1 – 8
Higher priority is 1 (preferable)
Lowest priority is 8
Priority will take effect only if the current queue is a
child queue
Every number in priority has the same value
Priority 1 is not 8x larger than priority 8
http://www.belajarmikrotik.com
Queue Priority
Since v6, you can define different priority for upload
and download
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
MIR
CIR
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Burst 1
http://www.belajarmikrotik.com
Burst 2
http://www.belajarmikrotik.com
Queues - Bursting
Since the actual burst-duration not only depend on
the burst-time, then other configuration should be
consider as well
Example (5s burst)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Queue Algorithm
Queue algorithm can be classified into 2 part, by the
influence to the traffic
Scheduler queue, will change the order of the packets.
This method is not limiting any bandwidth, just
arranging the order of the packets
Shaper queues, control data-flow, this shaper also do a
scheduling job
http://www.belajarmikrotik.com
Queue Types
RouterOS has 4 types of queue + 1 custom-made
Scheduler
FIFO – First In First Out (for Bytes or for Packets)
RED – Random Early Detect (or Drop)
SFQ – Stochastic Fairness Queuing
Shaper
PCQ – Per connection Queue (Proprietary)
HTB – Hierarchical Token Bucket
http://www.belajarmikrotik.com
Queue Types
http://www.belajarmikrotik.com
FIFO Algorithm
There are 2 FIFO
PFIFO (Packet FIFO)
BFIFO (Byte FIFO)
mq-FIFO (multiple
queue FIFO)
FIFO method is a
simple method where
no re-ordering occur,
the packet will queue
as they are
http://www.belajarmikrotik.com
RED Algorithm
Random Early Detect
(Random Early Drop)
Generally, RED is used
in a very congested
environment
Work well with TCP, but
not very well with UDP
http://www.belajarmikrotik.com
SFQ Algorithm
http://www.belajarmikrotik.com
PCQ Algorithm
http://www.belajarmikrotik.com
HTB
All QoS implemented in RouterOS is basically a HTB
HTB can create complex hierarchy of parent-and-
child with separation between upload and download
RouterOS has 1 virtual HTB (global) and another
HTB in every interface
http://www.belajarmikrotik.com
Queue Tree
Queue tree is direct implementation of HTB
Queue tree is limiting bandwidth one way at a rule
To limit upload and download traffic, we have to make 2
rules separately
Queue tree only works with packet marks
Packet Mark created in firewall mangle
Queue tree has ability to make complex hierarchy of
queue
http://www.belajarmikrotik.com
Queue Tree
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Mangle-Queue Tree
http://www.belajarmikrotik.com
Download’s parent is
ETHER1, because there is
where the traffic GO OUT
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PCQ
PCQ is one of Advanced Queue implementation
PCQ used classifier to group the traffic, the classifier
can be source or destination (IP or port)
Since v5, PCQ also have ability to :
Limit based on subnet group
Recognizing IPv6
Burstable to each of the sub queue
http://www.belajarmikrotik.com
PCQ Rate
Classification has to be made both on
download and upload
The type = PCQ
Burstable configuration
(per user basis)
http://www.belajarmikrotik.com
73k
128k
73k
128k 73k
queue=pcq-down
73k
max-limit=512k
128k 128k 73k
73k
128k 128k
73k
http://www.belajarmikrotik.com
73k
256k 73k
73k
queue=pcq-down
512k 73k
max-limit=512k
73k
256k 73k
73k
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PCQ
Make a rule to equally allocate bandwidth for all user
inside a LAN (rate=0)
Make another rule to set a maximum bandwidth for
per user basis (rate= non zero)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
ARP
ARP = Address Resolution Protocol
ARP is a mapping of logical address (IP address)
with physical address (mac-address)
ARP works automatically, but can be modified to
works manually
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Static ARP
To increase network security, ARP can be created
manually or static
User can only access/get replied from the router if their
IP and mac-address has been registered to router
If one of the entry changed (for example a laptop with
registered mac-address change it’s IP), then the router
cannot recognize the laptop anymore
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Interface Configuration
Every interface has it’s own ARP configuration
ENABLED
ARP will automatically replied and
stored in the table
DISABLED
ARP request won’t be replied, in
this case, laptop also have to
create it’s own ARP table
REPLY-ONLY
Router only replied an ARP based
on the ARP table defined
PROXY-ARP
Will act as a proxy to ARP request
http://www.belajarmikrotik.com
Static ARP
Add your laptop IP statically to the ARP table (or
user “make-static” feature)
Change ARP in ether1 into reply-only
Try to PING to the gateway
While PINGing the gateway, change the entry of the
ARP table
http://www.belajarmikrotik.com
DHCP Server
http://www.belajarmikrotik.com
DHCP Server
DHCP Server allow you to assign IP and some other
attribute to a client
Some attribute that can be assign
Subnet
Gateway
NTP Server
WINS Server
Before creating a DHCP Server, first we have to
assign the IP in the interface where DHCP server
will be created
http://www.belajarmikrotik.com
DHCP Server
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
DNS Server
DNS server that will be used
to assign to the client
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
DHCP Server
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Dynamic Address
Added automatically
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Web Proxy
http://www.belajarmikrotik.com
Web Proxy
Web Proxy have 3 main purposes
HTTP traffic caching
DNS name filtering
DNS redirection
Web Proxy have 2 operation method
Regular – browser manually add the proxy information
Transparent – user will be redirected automatically
Traffic HTTPS cannot and would not be cache!!!
http://www.belajarmikrotik.com
Proxy Setup
To activate proxy, we only need to ENABLE
http://www.belajarmikrotik.com
Proxy Setup
Proxy is activated
and ready to use
Fill in parent-proxy
information here (if your ISP
has a proxy themselves)
Transparent Proxy
To redirect all traffic automatically through proxy, we
use destinationNAT
10.1.1.98
192.168.98.1
REDIRECT
PAKET PAKET
SRC=192.168.98.1 SRC=192.168.98.1
PROTO=TCP PROTO=TCP
DST-PORT=80 DST-PORT=8080
DST=www.yahoo.com DST=10.1.1.98
http://www.belajarmikrotik.com
Transparent Proxy
http://www.belajarmikrotik.com
Web Proxy
Activate web proxy
Create transparent proxy
Check whether the proxy has been use
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
HTTP Firewall
Proxy can be used to create a DNS level firewall
URL of a
website
Path/directory of
the web server
http://www.belajarmikrotik.com
URL Filtering
http://www.mikrotik.com/docs/ros/2.9/graphics:packet_flow31.jpg
Special character
“*” – represent ANY characters
“?” – represent ANY single character
www.mi?roti?.com
www.mikrotik*
* mikrotik*
http://www.belajarmikrotik.com
URL Filtering
http://www.belajarmikrotik.com
Path Filtering
Filtering can be specific to a path of website
http://www.mikrotik.com/download.html
While access to
http://www.mikrotik.com
Is still allowed
http://www.belajarmikrotik.com
Filtering Result
http://www.belajarmikrotik.com
Filtering Redirect
In a case we are denying access, instead of
blocking, we can redirect them to other website
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
HTTP Logging
With proxy, we can log HTTP activity
http://www.belajarmikrotik.com
HTTP Logging
http://www.belajarmikrotik.com
Store
Storage device that can be used to store various
features data
Currently store can be utilize for :
Web Proxy
User Manager
The Dude
Can be stored to another media
Each is used differently and specifically based on
their purposes
Easy to migrate the data to another machine
http://www.belajarmikrotik.com
Store
http://www.belajarmikrotik.com
Store - Disk
Check the disk (cannot be checked if the Clean or Format the drive
device is running/active)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PPPoE
http://www.belajarmikrotik.com
PPPoE
Point-to-Point Protocol over Ethernet (PPPoE) is one
of Tunneling mechanism that use Layer 2 as it’s
connection based
There should be no router between PPPoE client and
PPPoE server
Generally used to control client connection through
DSL, Cable-Modem, and local LAN
MikroTik RouterOS support PPPoE client and server
features
http://www.belajarmikrotik.com
PPPoE
PPPoE work in OSI Layer 2 (Data Link Layer)
Means Server and Client have to be in the same
physical network (local network)
http://www.belajarmikrotik.com
PPPoE Client
PPPoE Client is a host that will dial to PPPoE Server
and will be given network information (IP, subnet,
gateway, etc) once it’s successfully authenticated
PPPoE Client used widely as DSL client (for
example Speedy ADSL or Streamyx ADSL)
MikroTik has the features of PPPoE Client
PPPoE client available to all well-known OS
(including Windows, Linux, and MacOSX)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
SPECIFIC to an interface
http://www.belajarmikrotik.com
PPPoE Client
Trainer will disabled DHCP Client in WAN
Disable your WLAN1 IPs
Watch that currently we don’t have any IP in WAN
PPPoE Client @ WLAN1
Username : class
Password : class
http://www.belajarmikrotik.com
PPPoE Client
Now our internet is not going out through WLAN1
anymore but pppoe-out1
http://www.belajarmikrotik.com
PPPoE Server
PPPoE server listen to client connection through
SPECIFIC interface
Client can be authenticated through
Local PPP database (PPP Secret)
Remote RADIUS server (other location)
User Manager (MikroTik RADIUS) locally or remotely
Client can automatically given rate-limit based on the
profile used
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PPP Profile
Use the IP Pool in the profile
http://www.belajarmikrotik.com
PPP Secret
Make dial-in username and use the profile
http://www.belajarmikrotik.com
PPPoE Server
Create PPPoE Server
Specific in 1 particular
interface
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
PPPoE Server
Create PPPoE Server in ETHER3
Create a broadband interface in your LAN
Next slide will show you the step-by-step
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Hotspot
http://www.belajarmikrotik.com
Hotspot
Hotspot is a feature to give a plug-and-play feature
to a local network
Hotspot offer client authentication before accessing
public network by using username and password
Hotspot also provide user-accounting (user usage
recording) feature
Hotspot is a system, not infrastructure
Hotspot can be implemented on any media like
wireless, ethernet, fiber, etc, as long as they run fully
Layer 2 connection
http://www.belajarmikrotik.com
Hotspot Usage
In open Access Point
Airport
Café
University / campus
Login with simpler way (only need browser)
Flexible accounting
http://www.belajarmikrotik.com
Hotspot Requirement
Valid IP in INTERNET and LOCAL interfaces
Internet connection is a must
Valid DNS server
In order to create a plug-and-play system, hotspot must
first resolve the DNS name
Minimal 1 hotspot user
In case we configured a hotspot through it’s interface,
after creation, we will lose access
http://www.belajarmikrotik.com
Hotspot Setup
For hotspot setup, it’s highly recommended to use
the wizard provided
Step-by-step Wizard to
create hotspot easily
http://www.belajarmikrotik.com
Hotspot Setup
1 Hotspot Interface
What interface will the hotspot
service activated, as soon as it’s
created, this interface is locked for
authenticated user only
2
Local Address of Network
IP address in the hotspot
interface
http://www.belajarmikrotik.com
Hotspot Setup
4
Select Certificate
SSL Certificate selection, only if
you create a hotspot with HTTPS
authentication method
http://www.belajarmikrotik.com
Hotspot Setup
5 IP Address of SMTP
Used to redirect all SMTP request
to your local SMTP. Trainer will
explain about this further.
6
DNS Server
DNS is mandatory since
hotspot server need to
resolve the DNS of the
request
http://www.belajarmikrotik.com
Hotspot Setup
DNS Name
7
Local URL for hotspot server
IMPORTANT, this entry here should be
FQDN (Fully Qualified Domain Name),
minimal with one “.” (dot), like .com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Hotspot Login
When a user look
for any websites,
hotspot server will
redirect them to
hotspot login page
To logout, type
http://router-ip or
http://Hotspot_DNS
http://www.belajarmikrotik.com
Hotspot
Create Hotspot in ETHER4
Be careful in creating hotspot, because you might need
to reset the configuration if you miss-configure them
Try to login with the username and password
If you set your IP statically, make sure your dns-server
setting is the same with gateway ip setting
http://www.belajarmikrotik.com
Hotspot - HOST
This is the list of connected host, whether it has
been authenticated or not yet authenticated
http://www.belajarmikrotik.com
Hotspot - ACTIVE
Is the list of authenticated user, including the
accounting (time and bytes)
Hotspot Server
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Hotspot User
http://www.belajarmikrotik.com
Hotspot User
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Hotspot User/Profile
Disable Login via COOKIES
Make 2 new login with
Uptime limit 5 minute
Bandwidth 128k/128k
See the simple queue created
http://www.belajarmikrotik.com
Hotspot Bypass
In some case, we might need to bypass hotspot for
several host or destination without authentication,
such as
Printer/Fax
Company promotion websites
VoIP devices that doesn’t have ability to browse
There are 2 ways to create such bypass procedure
Walled-Garden, will allow access to several web or
destination without authentication
Binding, totally allow a host to connect to the internet
http://www.belajarmikrotik.com
Walled Garden
Walled garden used if we want to grant access to
some resources (outside) without needed to
authenticate/authorize
Walled garden can be use either for HTTP or HTTPS
Walled garden also can be created based on IP and
services (like telnet, winbox, etc)
http://www.belajarmikrotik.com
http://www.belajarmikrotik.com
Same use as
firewall
http://www.belajarmikrotik.com
IP Binding
IP Binding is used to grant full-access for one host
to every destination, usually implement to devices
that cannot conduct a login via web, such as
VoIP Handset, Printer, or
Manager/Director
http://www.belajarmikrotik.com
Binding a Host
http://www.belajarmikrotik.com
Binding a Host
Mac-address of the device
Manual Binding
http://www.belajarmikrotik.com
Result
http://www.belajarmikrotik.com
Hotspot Bypass
Make a walled garden to
Access www.belajarmikrotik.com without login
Access www.mikrotik.com without login
Webfig to 10.1.1.254 without login
Bind your IP with mode
Bypass
Blocked
Regular
http://www.belajarmikrotik.com