Mikrotik Basic
Mikrotik Basic
Mikrotik Basic
AKM Jahangir
Mikrotik Listed Consultant
4
3. Select file type as All files now select your ISO file
4. Install procedure: After write your CD, boot from CD ROM (select BIOS 1st boot setting CDROM).
press a for select all package, then select i for install, Press y, y. Thats all, Install will be
completed.
Start Configure:
Connect your Mikrotik Router with your PC with a UTP cable.
ISP / Internet Connection
5
Collect Winbox software (or download it from www.mikrotik.com), Click on MAC scan, select the mac
which has shown, login with admin user, no password.
Internet Share in LAN: (ISP will provide you WAN IP, Subnet mask, Gateway, dns)
a) IP > Address > + 202.191.124.125/29 > Interface = ether1 (when ISP is connected with ether1)
b) IP > Route > + Gateway = 202.191.124.121
c) IP > dns > settings > Primary dns = 202.191.120.2
d) new terminal > ping google.com (if you get reply then ISP connection is ok).
e) IP > Address > + 10.0.35.1/28 > Interface=ether2 (when your LAN is connected with ether2)
f) IP > Firewall > NAT > + Src address = 10.0.35.0/24, Action = Masquerade
Bandwidth Control: Queue > General > + > Client Name = aktel > Target IP = 192.168.0.2 >
upload = 1M, download = 1M
Shared Package:
Queues > + > General > name = Ochi group > target address = 10.0.0.1/24 > target upload = 2M
> target download = 2M > ok
Again queues > + > general > > name = MD > target address = 10.0.0.2 > target upload =
512k > target download = 512k > ok
Advence > Parent = Oichi group ok
MRTG:
a) Tools > Graphing > queue rules + select any client name, > allowed IP = IP of this client
b) + select all, > allowed IP= IP of administrator of this router.
1. IP > Web Proxy > Web proxy settings > Enable OK.
2. IP > Web Proxy > Access List > a) + > Src. Address = 192.168.0.0/24 > Action = alow, OK
b) + > action = deny, OK (this is last and must rule)
c) + > Src. Address = 192.168.0.2 dst host= www.prothom-alo.com, accept, OK
d) + > Src. Address = 192.168.0.2 deny, ok, drag c & d rule to the top.
e) + > Src. Address = 192.168.0.3 > path= /*porn* > action = deny ok, drag it to the top.
10
3. Redirect rule:
IP > Firewall > NAT > + chain = dstnat > src address= 192.168.0.0/24 dst address = ! 192.168.0.1
protocol = 6 (tcp) dst port = 80, action > action = redirect > to ports = 8080
2. Action > remote address = 192.168.0.2 (IP of windows PC in which log will store)
11
5. If log does not received, LAN properties > Advance > Firewall > Exception > add program > browse
> c:\program files > syslog > syslog service and syslog demon.
Firewall Configure:
1. Basic Rule for router security(all IP network of router=allow, not those network drop):
a) IP > Firewall > + chain=input, src address=202.191.120.0/21, action=accept
b) + chain=input, src address=192.168.0.0/24, action=accept
c) + chain=input, src address=10.0.0.0/24, action=accept
d) + chain=input, src address= ! 202.191.120.0/21, action=drop
e) + chain=input, src address= ! 192.168.0.0/24, action=drop
f) + chain=input, src address= ! 10.0.0.0/24, action=drop
2. Virus Port Block:
a) + chain = forward, protocol
b) + chain = forward, protocol
c) + chain = forward, protocol
d) + chain = forward, protocol
=
=
=
=
12
d) Now Drag n Drop this rule to the top of the queue list.
13
Secret > name = johne > password = 12345 > service = PPPtP profile = america > local address
= 10.0.2.1 > remote = 10.10.2.3 (clint IP) > ok.
Windows based VPN dialer required when you have internet but no VPN router:
a) Right Click on My Network Place > Properties > Create New Connection > Connect to the
network at my work place > Virtual Private Network Connection > Company name= any
name > Dont Dial initial connection > VPN Server IP = Head office end Real IP > Finish.
b) Connect with Internet at first, Then Connect with VPN dialer, Then Go to Shared Folder.
c) Double click on My Network Place. > Then Click on Search, Type any private IP, Press Enter
and Wait.
VLAN:
Interface
14
e1 e2 e3
e1 e2 e3
e1 e2 e3
e1 e2 e3
15
1. IP
>
chain=output
chain=output
chain=output
chain=output
connection-mark=link1
connection-mark=link2
connection-mark=link3
connection-mark=link4
action=mark-routing
action=mark-routing
action=mark-routing
action=mark-routing
new-routing-mark=to_wan1
new-routing-mark=to_wan2
new-routing-mark=to_wan3
new-routing-mark=to_wan4
5. IP > route:
+ gateway=10.0.1.1 routing-mark=to_wan1
+ gateway=10.0.2.1 routing-mark=to_wan2
+ gateway=10.0.3.1 routing-mark=to_wan3
+ gateway=10.0.4.1 routing-mark=to_wan4
Hotspot:
1. System Packages: hotspot & Usermanager package must be installed here.
16
2.
IP > Hotspot > Server Setup > Ether3 (your LAN Interface) next > next > next > next > next
> dns name=hotspot.bijoy.net >user admin password admin123 > Finished
3. IP > Hotspot > Server Profile >hsprof1 > general > hotspot address=WAN IP of this router, >
Radius > use radius = yes.
4. Radius > hotspot=yes, login=yes, IP= WAN IP of this router, secret=admin123
incoming=yes,
5. Tool Usermanager Customer add login=admin password=admin123 permission=owner
6. Tool Usermanager Router add subscriber=admin ip=wan ip of this router sharedsecret=admin123
7. Now create package of different speed and user of different time and speed from
http://routerIP/userman
Color Combination of Straight and Cross Cable:
Straight Cable
One end
Another End
1. White of Orange
2. Orange
3. White of Green
4.Blue
5.White of Blue
6. Green
7.White of Brown
8.Brown
1. White of Orange
2. Orange
3. White of Green
4.Blue
5.White of Blue
6. Green
7.White of Brown
8.Brown
Cross Cable
One end
1. White of Orange
2. Orange
3. White of Green
4.Blue
5.White of Blue
6. Green
7.White of Brown
8.Brown
Another End
1. White ofGreen
2. Green
3. White of Orange
4.Blue
5.White of Blue
6. Orange
7.White of Brown
8.Brown
Cable no 1, 2, 3 & 6 are active, 4,5,7,8 is useless. Both end straight is called straight cable. One end
Straight and other end Cross is called Cross cable.
Utilization of Cross or Straight Cable:
Same device to same device = Cross Cable, example: PC to PC, Switch to switch
One device to another device = straight cable, example: switch to PC.
17
Subnet Calculate:
Subnet Mask
0.0.0.0
128.0.0.0
192.0.0.0
224.0.0.0
240.0.0.0
248.0.0.0
252.0.0.0
254.0.0.0
255.0.0.0
255.128.0.0
255.192.0.0
255.224.0.0
255.240.0.0
255.248.0.0
255.252.0.0
255.254.0.0
255.255.0.0
255.255.128.0
255.255.192.0
255.255.224.0
255.255.240.0
255.255.248.0
255.255.252.0
255.255.254.0
255.255.255.0
255.255.255.128
255.255.255.192
255.255.255.224
255.255.255.240
255.255.255.248
255.255.255.252
255.255.255.254
255.255.255.255
On Bit
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
IP per Subnet
256 X 256 X 256 X 256
256 X 256 X 256 X 128
256 X 256 X 256 X 64
256 X 256 X 256 X 32
256 X 256 X 256 X 16
256 X 256 X 256 X 8
256 X 256 X 256 X 4
256 X 256 X 256 X 2
256 X 256 X 256
256 X 256 X 128
256 X 256 X 64
256 X 256 X 32
256 X 256 X 16
256 X 256 X 8
256 X 256 X 4
256 X 256 X 2
256 X 256
256 X 128
256 X 64
256 X 32
256 X 16
256 X 8
256 X 4
256 X 2
256
128
64
32
16
8
4
2
1