Labels
Mikrotik
Tuesday, June 14, 2016
11.Mikrotik Unlimited Browsing Limited Download (Using Mangle Rule)
Simple Diagram:
Suppose we have Ether1 is WAN interface.
Here the Script:
/ip firewall mangle add action=mark-connection chain=prerouting connection-bytes=262146-4294967295 in-interface=ether1 new-connection-mark=download protocol=tcp src-port=21,80 add action=mark-packet chain=prerouting connection-mark=download in-interface=ether1 new-packet-mark=download passthrough=no /queue type add kind=pcq name=shape pcq-classifier=src-address pcq-dst-address6-mask=64 pcq-rate=128k pcq-src-address6-mask=64 /queue tree add max-limit=128k name=Download packet-mark=download parent=global queue=shape
Saturday, June 11, 2016
10.Mikrotik Limit Different Bandwidth In Day and Night
Suppose we have one network
192.168.1.0/24
and want to limit Bandwidth for
Day
and
Night
Time:
LAN = 192.168.1.0/24 Day Time = 06:00am – 18:00pm – Normal Speed = 1Mbps Night Time = 18:00pm – 06:00am – Double Speed = 2Mbps
Simple Diagram:
STEP 1
: Create Queue Simple:
/queue simple add comment="1MbpsDoubleNight" disabled=no target=192.168.1.5 max-limit=1M/1M name="Client1" add comment="1MbpsDoubleNight" disabled=no target=192.168.1.6 max-limit=1M/1M name="Client2" add comment="1MbpsDoubleNight" disabled=no target=192.168.1.7 max-limit=1M/1M name="Client3"
STEP 2
: Create Scheduler:
/system scheduler add comment="" disabled=no interval=1d name="Day" on-event="/queue simple\r\n set [find comment=1MbpsDoubleNight] max-limit=1M/1M\r\n" start-date=Jun/11/2016 start-time=06:00:00 add comment="" disabled=no interval=1d name="Night" on-event="/queue simple\r\n set [find comment=1MbpsDoubleNight] max-limit=2M/2M\r\n" start-date=Jun/11/2016 start-time=18:00:00
Wednesday, June 8, 2016
9.Mikrotik Hotspot Server Configuration (Limit Speed - User Profiles)
Simple Diagram:
See PDF Press Here!
Tuesday, June 7, 2016
8.Mikrotik Hotspot Server Configuration (Basic)
Simple Diagram:
See PDF Press Here!
Monday, May 23, 2016
7.Mikrotik Share Bandwidth Equal for All Online Clients But Limit on Maximum (PCQ)
Simple Diagram:
There are two ways how to make this: using mangle and queue trees, or, using simple queues.
-First Method Using Mangle and Queue Tree:
/ip firewall mangle add chain=prerouting action=mark-packet \ in-interface=ether1 new-packet-mark=client_upload /ip firewall mangle add chain=prerouting action=mark-packet \ in-interface=ether2 new-packet-mark=client_download /queue type add name="PCQ_download" kind=pcq pcq-rate=1M \ pcq-classifier=dst-address /queue type add name="PCQ_upload" kind=pcq pcq-rate=1M \ pcq-classifier=src-address /queue tree add parent=global queue=PCQ_download packet-mark=client_download /queue tree add parent=global queue=PCQ_upload packet-mark=client_upload
-Second Method Using Simple Queue:
/queue type add name="PCQ_download" kind=pcq pcq-rate=1M \ pcq-classifier=dst-address /queue type add name="PCQ_upload" kind=pcq pcq-rate=1M \ pcq-classifier=src-address /queue simple add target-addresses=192.168.1.0/24 queue=PCQ_upload/PCQ_download
Wednesday, May 18, 2016
6.Mikrotik Share Bandwidth Equal for All Online Clients (PCQ)
Simple Diagram:
Script:
/ip firewall mangle add chain=forward src-address=192.168.1.0/24 action=mark-connection new-connection-mark=conn1 /ip firewall mangle add connection-mark=conn1 action=mark-packet new-packet-mark=pack1 chain=forward /queue type add name=pcq_downsteam kind=pcq pcq-classifier=dst-address /queue type add name=pcq_upstream kind=pcq pcq-classifier=src-address /queue tree add parent=ether1 queue=pcq_downsteam packet-mark=pack1 /queue tree add parent=LAN queue=pcq_upstream packet-mark=pack1
See PDF Press Here!
More Detail about PCQ Press Here!
Sunday, May 15, 2016
5.Mikrotik GRE Tunnel Site-To-Site Configuration
Simple Diagram:
See PDF Press Here!
Wednesday, May 11, 2016
4.Mikrotik Basic Configuration First Setup (Static IP WAN)
Simple Diagram:
See PDF Press Here:
3.Mikrotik Basic Configuration First Setup (DHCP Client WAN)
Simple Diagram:
See PDF Press Here!
Tuesday, May 10, 2016
2.Mikrotik Load Balancing and Fail Over For 2 Static IP WAN (PCC Method)
Simple Diagram:
Script:
/interface ethernet set 0 name=WAN1 set 1 name=WAN2 set 2 name=LAN /ip address add address=192.168.10.2/24 interface=WAN1 add address=192.168.20.2/24 interface=WAN2 add address=192.168.1.1/24 interface=LAN /ip dns set allow-remote-requests=yes cache-max-ttl=1w cache-size=5000KiB max-udp-packet-size=512 servers=8.8.8.8,8.8.4.4 /ip firewall nat add chain=srcnat out-interface=WAN1 action=masquerade add chain=srcnat out-interface=WAN2 action=masquerade /ip firewall mangle add chain=input in-interface=WAN1 action=mark-connection new-connection-mark=conn1 add chain=input in-interface=WAN2 action=mark-connection new-connection-mark=conn2 add chain=output connection-mark=conn1 action=mark-routing new-routing-mark=To_WAN1 add chain=output connection-mark=conn2 action=mark-routing new-routing-mark=To_WAN2 add chain=prerouting dst-address=192.168.10.0/24 action=accept in-interface=LAN add chain=prerouting dst-address=192.168.20.0/24 action=accept in-interface=LAN add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/0 action=mark-connection new-connection-mark=conn1 passthrough=yes add chain=prerouting dst-address-type=!local in-interface=LAN per-connection-classifier=both-addresses-and-ports:2/1 action=mark-connection new-connection-mark=conn2 passthrough=yes add chain=prerouting connection-mark=conn1 in-interface=LAN action=mark-routing new-routing-mark=To_WAN1 add chain=prerouting connection-mark=conn2 in-interface=LAN action=mark-routing new-routing-mark=To_WAN2 /ip route add dst-address=0.0.0.0/0 gateway=192.168.10.1 routing-mark=To_WAN1 check-gateway=ping add dst-address=0.0.0.0/0 gateway=192.168.20.1 routing-mark=To_WAN2 check-gateway=ping add dst-address=0.0.0.0/0 gateway=192.168.10.1 distance=1 check-gateway=ping add dst-address=0.0.0.0/0 gateway=192.168.20.1 distance=2 check-gateway=ping
Saturday, May 7, 2016
1.Mikrotik Load Balancing and Fail Over For 2 Static IP WAN (NTH Method)
Simple Diagram:
Script:
/interface ethernet set 0 name=WAN1 set 1 name=WAN2 set 2 name=LAN /ip address add address=192.168.10.2/24 network=192.168.10.0 broadcast=192.168.10.255 interface=WAN1 add address=192.168.20.2/24 network=192.168.20.0 broadcast=192.168.20.255 interface=WAN2 add address=192.168.1.1/24 network=192.168.1.0 broadcast=192.168.1.255 interface=LAN /ip firewall mangle add chain=prerouting in-interface=LAN connection-state=new nth=2,1 action=mark-connection new-connection-mark=conn1 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=LAN connection-mark=conn1 action=mark-routing new-routing-mark=conn1 passthrough=no comment="" disabled=no add chain=prerouting in-interface=LAN connection-state=new nth=2,2 action=mark-connection new-connection-mark=conn2 passthrough=yes comment="" disabled=no add chain=prerouting in-interface=LAN connection-mark=conn2 action=mark-routing new-routing-mark=conn2 passthrough=no comment="" disabled=no /ip firewall nat add chain=srcnat connection-mark=conn1 action=masquerade out-interface=WAN1 comment="" disabled=no add chain=srcnat connection-mark=conn2 action=masquerade out-interface=WAN2 comment="" disabled=no /ip route add dst-address=0.0.0.0/0 gateway=192.168.10.1 scope=255 target-scope=10 routing-mark=conn1 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=192.168.20.1 scope=255 target-scope=10 routing-mark=conn2 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=192.168.10.1 comment="" disabled=no add dst-address=0.0.0.0/0 gateway=192.168.20.1 comment="" disabled=no
Newer Posts
Home
Subscribe to:
Posts (Atom)