Professional Documents
Culture Documents
Schedule
MikroTik RouterOS
Training
Routing
www.LearnMikroTik.ir
MikroTik 2008
MikroTik 2008
Instructors
Housekeeping
Course materials
Routers, cables
Break times and lunch
Restrooms and smoking area locations
MikroTik 2008
Course Objective
MikroTik 2008
Introduce Yourself
Please, introduce yourself to the class
Your name
Your Company
Your previous knowledge about RouterOS
Your previous knowledge about networking
What do you expect from this course?
My number is:_________
MikroTik 2008
MikroTik 2008
7/4/2014
Class Setup
MikroTik 2008
Simple Routing
MikroTik 2008
10
MikroTik 2008
11
MikroTik 2008
12
7/4/2014
IP Network
Structure
To Main AP
To
Laptop
Questions!
Is it possible to manually create routes that will
ensure
load balancing
To Laptop
failover
best path
To Laptop
10.10.Z.0/30
To Laptop
MikroTik 2008
13
14
Check-gateway Option
ECMP Routes
ECMP (Equal Cost
Multi Path) routes
have more than one
gateway to the same
remote network
Gateways will be
used in Round Robin
per SRC/DST
address combination
Same gateway can be
written several times!!
MikroTik 2008
MikroTik 2008
15
ECMP Lab
16
Configuration Example
17
MikroTik 2008
18
7/4/2014
Distance Option
MikroTik 2008
19
MikroTik 2008
20
Configuration Example
To Laptop
To Laptop
BACKUP
LINK
To Laptop
To Laptop
MikroTik 2008
21
Observed Behaviour
MikroTik 2008
22
Routing Mark
To assign specific traffic to the route traffic
must be identified by routing mark
Solution:
If traffic starts to go anticlockwise, it should be
routed anticlockwise until it reaches destination
23
MikroTik 2008
24
7/4/2014
MikroTik 2008
25
Configuration Example
MikroTik 2008
26
27
Changing TTL
MikroTik 2008
28
MikroTik 2008
29
MikroTik 2008
30
7/4/2014
Scope/Target-Scope
Route's scope contains all routes that scope
value is less or equal to its target-scope value
Example:
0 ADC dst-address=1.1.1.0/24 pref-src=1.1.1.1
interface=ether1 scope=10 target-scope=0
1 A S dst-address=2.2.2.0/24 gateway=1.1.1.254
interface=ether1 scope=30 target-scope=10
2 A S dst-address=3.3.3.0/24 gateway=2.2.2.254
interface=ether1 scope=30 target-scope=30
MikroTik 2008
31
Other Options
32
Clean-up Lab
MikroTik 2008
MikroTik 2008
33
MikroTik 2008
34
OSPF Protocol
Open Shortest Path First
(OSPF)
MikroTik 2008
MikroTik 2008
36
7/4/2014
OSPF Areas
MikroTik 2008
37
OSPF AS
MikroTik 2008
38
Router Types
Autonomous System Border Router (ASBR) - a
router that is connected to more than one AS.
An ASBR is used to distribute routes received from
other ASes throughout its own AS
Area
Area
Area
Area
39
MikroTik 2008
40
Backbone Area
OSPF AS
ASBR
ABR
Area
Area
ABR
ABR
Area
Area
ASBR
MikroTik 2008
41
MikroTik 2008
42
7/4/2014
OSPF AS
Virtual Links
Used to connect
remote areas to
the backbone
area through a
non-backbone
area
area-id=0.0.0.1
area-id=0.0.0.0
Virtual Link
area-id=0.0.0.2
area-id=0.0.0.3
ASBR
43
OSPF Areas
MikroTik 2008
44
OSPF Networks
It is necessary to
specify networks
and associated
areas where to
look for other
OSPF routers
45
MikroTik 2008
46
area-id=0.0.0.<Z>
2-Way:
bidirectional
communication
established
Down,Attempt,Init,Loading,ExStart,Exchange:
not completely running!
MikroTik 2008
MikroTik 2008
48
7/4/2014
OSPF Settings
What to Redistribute?
Router ID
must be
unique
within the
AS
1
2
}
Router ID can be left as 0.0.0.0 then largest IP
address assigned to the router will be used
MikroTik 2008
{
MikroTik 2008
49
Redistribution Settings
Cost=10
Cost=10
Cost=10
Source
Total Cost=49
Total Cost=10
Destination
ASBR
51
MikroTik 2008
52
Redistribution Lab
Enable type 1 redistribution for all connected
routes
Cost
trivial
Cost
trivial
Cost=10
Cost=10
Cost=9
Cost=10
Cost=10
Total Cost=40
50
Cost
trivial
Source
Cost
trivial
Total Cost=9
Cost
trivial
Cost=9
Destination
ASBR
MikroTik 2008
53
MikroTik 2008
54
7/4/2014
Interface Cost
Designated Routers
All interfaces
have default
cost of 10
To override
default setting
you should add
new entry in
interface menu
MikroTik 2008
55
56
Costs
To Main AP
To Laptop
ABR
100
10
To Laptop
100
10
BACKUP
LINK
???
???
To Laptop
10
100
57
NBMA Neighbors
MikroTik 2008
58
Stub Area
For non-broadcast
networks it is
necessary to
specify neighbors
manually
100
To Laptop
59
MikroTik 2008
60
10
7/4/2014
area-id=0.0.0.0
default
area-id=0.0.0.1
Virtual Link
area-id=0.0.0.2
NSSA
62
OSPF AS
default
MikroTik 2008
61
area-id=0.0.0.3
Stub
ASBR
MikroTik 2008
MikroTik 2008
63
Passive interface
It is necessary to
assign client
networks to the
area or else stub
area will consider
those networks as
external.
64
Area Ranges
Address ranges are used to aggregate
(replace) network routes from within the area
into one single route or delete them
It is possible to
assign specific
cost to
aggregate route
It is a security
issue!!!
Passive option allow you to disable OSPF
Hello protocol on client interfaces
MikroTik 2008
65
MikroTik 2008
66
11
7/4/2014
Summary
MikroTik 2008
MikroTik 2008
67
68
ABR
PPPoE
server
Area1
Problems:
PPPoE
server
69
PPPoE
server
MikroTik 2008
~ 100 PPPoE
clients
MikroTik 2008
70
~250 PPPoE
clients
PPPoE
server
~ 100 PPPoE
clients
71
MikroTik 2008
72
12
7/4/2014
Routing Filters
MikroTik 2008
73
MikroTik 2008
74
75
MikroTik 2008
76
MikroTik 2008
78
13
7/4/2014
VLAN Example
2.2.2.0/24
1.1.1.0/24
Any Ethernet
Network
vlan1: 1.1.1.1/24
vlan2: 2.2.2.1/24
vlan3: 3.3.3.1/24
3.3.3.0/24
MikroTik 2008
79
VLAN on Switch
MikroTik 2008
80
VLAN Lab
81
IPIP
MikroTik 2008
82
83
MikroTik 2008
84
14
7/4/2014
IPIP Lab
/30 Addressing
P2P_int2: 2.2.2.2/30
P2P_int3: 3.3.3.2/30
Any IP
network
Tunnel1: 1.1.1.1/30
Tunnel2: 2.2.2.1/30
Tunnel3: 3.3.3.1/30
MikroTik 2008
85
MikroTik 2008
Point-to-point Addressing
Point-to-point Addressing
P2P_int2: 3.3.3.3/32
Network: 1.1.1.1
P2P_int3: 4.4.4.4/32
Network: 1.1.1.1
Any IP network
(LAN, WAN, Internet)
86
87
Addressing Lab
P2P_int1: 1.1.1.1/32
Network: 2.2.2.2
P2P_int2: 1.1.1.1/32
Network: 3.3.3.3
P2P_int3: 1.1.1.1/32
Network: 4.4.4.4
Network: 1.1.1.1
P2P_int1: 2.2.2.2/32
MikroTik 2008
MikroTik 2008
88
89
MikroTik 2008
90
15
7/4/2014
Any IP network
(LAN, WAN, Internet)
Bridge
Bridge
Local network
192.168.0.1/24 - 192.168.0.100/24
MikroTik 2008
91
Local network
192.168.0.101/24 - 192.168.0.254/24
MikroTik 2008
92
EoIP Lab
Replace all IPIP tunnels (from previous lab) with
EOIP tunnels
MikroTik 2008
93
16