# mar/02/2021 20:21:47 by RouterOS 6.48.1
# software id = 8HPW-CR7P
#
# model = RBD52G-5HacD2HnD
# serial number =
/interface bridge
add add-dhcp-option82=yes dhcp-snooping=yes igmp-snooping=yes name=bridgeLAN
/interface pppoe-client
add add-default-route=yes disabled=no interface=ether2 name=pppoe-VNPT \
password= user=
/interface wireless
set [ find default-name=wlan1 ] ssid=MikroTik
set [ find default-name=wlan2 ] ssid=MikroTik
/interface vlan
add interface=bridgeLAN name="KHACH VLAN20" vlan-id=20
add interface=bridgeLAN name="NHAN VIEN VLAN10" vlan-id=10
add interface=bridgeLAN name="NOIBO VLAN30" vlan-id=30
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip firewall layer7-protocol
add name="BLOCK DELL" regexp=
/ip pool
add name=dhcp_pool0 ranges=192.168.16.2-192.168.16.254
add name=dhcp_pool1 ranges=10.10.10.2-10.10.10.254
add name=dhcp_pool2 ranges=10.10.20.2-10.10.20.254
add name=dhcp_pool3 ranges=10.10.30.2-10.10.30.254
/ip dhcp-server
add address-pool=dhcp_pool0 disabled=no interface=bridgeLAN lease-time=30m \
name="dhcp LAN"
add address-pool=dhcp_pool1 disabled=no interface="NHAN VIEN VLAN10" \
lease-time=30m name=dhcpVLAV10
add address-pool=dhcp_pool2 disabled=no interface="KHACH VLAN20" lease-time=\
30m name=dhcpVLAN20
add address-pool=dhcp_pool3 disabled=no interface="NOIBO VLAN30" lease-time=\
30m name=dhcpVLAN30
/queue type
add kind=pfifo name="GOI TIN TONG" pfifo-limit=100
/queue simple
add max-limit=150M/150M name="TONG BANG THONG" queue=\
"GOI TIN TONG/GOI TIN TONG" target="192.168.16.0/24,KHACH VLAN20"
add name="1- BROWSING CON LAI" packet-marks=\
"BROWSING CONLAI- UPLOAD,BROWSING CONLAI- DOWNLOAD" parent=\
"TONG BANG THONG" priority=1/1 queue=\
pcq-upload-default/pcq-download-default target=\
"192.168.16.0/24,KHACH VLAN20"
add name="3- ICMP" packet-marks="ICMP- UPLOAD,ICMP- DOWNLOAD" parent=\
"TONG BANG THONG" priority=2/2 queue=\
pcq-upload-default/pcq-download-default target=\
"192.168.16.0/24,KHACH VLAN20"
add name="4- DNS" packet-marks="DNS- UPLOAD,DNS- DOWNLOAD" parent=\
"TONG BANG THONG" priority=3/3 queue=\
pcq-upload-default/pcq-download-default target=\
"192.168.16.0/24,KHACH VLAN20"
add max-limit=40M/40M name="5- ALL TRAFFIC" packet-marks="BROWSING- UPLOAD,BRO\
WSING- DOWNLOAD,HEAVY BROWSING- UPLOAD,HEAVY BROWSING- DOWNLOAD,FACEBOOK- \
UPLOAD,FACEBOOK- DOWNLOAD,YOUTUBE- UPLOAD,YOUTUBE- DOWNLOAD,ZALO- UPLOAD,Z\
ALO- DOWNLOAD,INSTAGRAM- UPLOAD,INSTAGRAM- DOWNLOAD,TIKTOK- UPLOAD,TIKTOK-\
\_DOWNLOAD" parent="TONG BANG THONG" priority=3/3 queue=\
"GOI TIN TONG/GOI TIN TONG" target="192.168.16.0/24,KHACH VLAN20"
add name="2. LAN LOCAL" parent="5- ALL TRAFFIC" priority=6/6 queue=\
pcq-upload-default/pcq-download-default target=\
"192.168.16.0/24,KHACH VLAN20"
add name="2- GAME ONLINE" packet-marks=\
"GAME ONLINE- UPLOAD,GAME ONLINE- DOWNLOAD" parent="TONG BANG THONG" \
priority=2/2 queue=pcq-upload-default/pcq-download-default target=\
"192.168.16.0/24,KHACH VLAN20"
/queue tree
add name="TONG BANG THONG" parent=global queue="GOI TIN TONG"
add max-limit=150M name="1- DOWNLOAD" parent="TONG BANG THONG" queue=\
pcq-download-default
add max-limit=150M name="2- UPLOAD" parent="TONG BANG THONG" queue=\
pcq-upload-default
add name="1. BROWSING CONLAI- DOWNLOAD" packet-mark=\
"BROWSING CONLAI- DOWNLOAD" parent="1- DOWNLOAD" priority=1 queue=\
pcq-download-default
add name="2. GAME ONLINE- DOWNLOAD" packet-mark="GAME ONLINE- DOWNLOAD" \
parent="1- DOWNLOAD" priority=2 queue=pcq-download-default
add name="3. ICMP- DOWNLOAD" packet-mark="ICMP- DOWNLOAD" parent=\
"1- DOWNLOAD" priority=2 queue=pcq-download-default
add name="4. DNS- DOWNLOAD" packet-mark="DNS- DOWNLOAD" parent="1- DOWNLOAD" \
priority=3 queue=pcq-download-default
add max-limit=40M name="5. ALL TRAFFIC- DOWNLOAD" parent="1- DOWNLOAD" queue=\
pcq-download-default
add limit-at=10M max-limit=28M name="1- BROWSING- DOWNLOAD" packet-mark=\
"BROWSING- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" priority=6 queue=\
pcq-download-default
add limit-at=20M max-limit=28M name="2- HEAVY BROWSING- DOWNLOAD" \
packet-mark="HEAVY BROWSING- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" \
priority=5 queue=pcq-download-default
add limit-at=20M max-limit=28M name="3- FACEBOOK- DOWNLOAD" packet-mark=\
"FACEBOOK- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" priority=7 queue=\
pcq-download-default
add limit-at=20M max-limit=28M name="4- YOUTUBE- DOWNLOAD" packet-mark=\
"YOUTUBE- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" priority=7 queue=\
pcq-download-default
add limit-at=10M max-limit=28M name="5- ZALO- DOWNLOAD" packet-mark=\
"ZALO- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" priority=7 queue=\
pcq-download-default
add limit-at=10M max-limit=28M name="6- INSTAGRAM- DOWNLOAD" packet-mark=\
"INSTAGRAM- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" priority=7 queue=\
pcq-download-default
add limit-at=10M max-limit=28M name="7- TIKTOK- DOWNLOAD" packet-mark=\
"TIKTOK- DOWNLOAD" parent="5. ALL TRAFFIC- DOWNLOAD" priority=7 queue=\
pcq-download-default
add name="1. BROWSING CONLAI- UPLOAD" packet-mark="BROWSING- UPLOAD" parent=\
"2- UPLOAD" priority=1 queue=pcq-upload-default
add name="2. GAME ONLINE- UPLOAD" packet-mark="GAME ONLINE- UPLOAD" parent=\
"2- UPLOAD" priority=2 queue=pcq-upload-default
add name="3. ICMP- UPLOAD" packet-mark="ICMP- UPLOAD" parent="2- UPLOAD" \
priority=2 queue=pcq-upload-default
add name="4. DNS- UPLOAD" packet-mark="DNS- UPLOAD" parent="2- UPLOAD" \
priority=3 queue=pcq-upload-default
add max-limit=40M name="5. ALL TRAFFIC- UPLOAD" parent="2- UPLOAD" queue=\
pcq-upload-default
add limit-at=20M max-limit=28M name="1- BROWSING- UPLOAD" packet-mark=\
"BROWSING- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=6 queue=\
pcq-upload-default
add limit-at=20M max-limit=28M name="2- HEAVY BROWSING- UPLOAD" packet-mark=\
"HEAVY BROWSING- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=5 \
queue=pcq-upload-default
add limit-at=20M max-limit=28M name="3- FACEBOOK- UPLOAD" packet-mark=\
"FACEBOOK- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=7 queue=\
pcq-upload-default
add limit-at=20M max-limit=28M name="4- YOUTUBE- UPLOAD" packet-mark=\
"YOUTUBE- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=7 queue=\
pcq-upload-default
add limit-at=10M max-limit=28M name="5- ZALO- UPLOAD" packet-mark=\
"ZALO- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=7 queue=\
pcq-upload-default
add limit-at=10M max-limit=28M name="6- INSTAGRAM- UPLOAD" packet-mark=\
"INSTAGRAM- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=7 queue=\
pcq-upload-default
add limit-at=10M max-limit=28M name="7- TIKTOK- UPLOAD" packet-mark=\
"TIKTOK- UPLOAD" parent="5. ALL TRAFFIC- UPLOAD" priority=7 queue=\
pcq-upload-default
/interface bridge port
add bridge=bridgeLAN interface=ether1 multicast-router=disabled
add bridge=bridgeLAN interface=ether3 multicast-router=disabled
add bridge=bridgeLAN interface=ether4 multicast-router=disabled
add bridge=bridgeLAN interface=ether5 multicast-router=disabled
add bridge=bridgeLAN interface=wlan1 multicast-router=disabled
add bridge=bridgeLAN interface=wlan2 multicast-router=disabled
/ip address
add address=192.168.16.1/24 interface=bridgeLAN network=192.168.16.0
add address=10.10.10.1/24 interface="NHAN VIEN VLAN10" network=10.10.10.0
add address=10.10.20.1/24 interface="KHACH VLAN20" network=10.10.20.0
add address=10.10.30.1/24 interface="NOIBO VLAN30" network=10.10.30.0
/ip cloud
set ddns-enabled=yes
/ip dhcp-server lease
add address=192.168.16.23 client-id=1:58:3:fb:9a:e2:29 comment=HIK3 \
mac-address=58:03:FB:9A:E2:29 server="dhcp LAN"
add address=192.168.16.24 client-id=1:58:3:fb:9a:e2:42 comment=HIK4 \
mac-address=58:03:FB:9A:E2:42 server="dhcp LAN"
add address=192.168.16.25 client-id=1:f8:4d:fc:c4:ad:ca comment=HIK5 \
mac-address=F8:4D:FC:C4:AD:CA server="dhcp LAN"
add address=192.168.16.19 client-id=1:4c:b0:8:21:3b:9b comment=IPCAM9 \
mac-address=4C:B0:08:21:3B:9B server="dhcp LAN"
add address=192.168.16.18 client-id=1:4c:b0:8:a4:6:18 comment=IPCAM8 \
mac-address=4C:B0:08:A4:06:18 server="dhcp LAN"
add address=192.168.16.6 client-id=1:0:50:56:0:0:2 comment=\
"NAS POINT OF VIEW" mac-address=00:50:56:00:00:02 server="dhcp LAN"
add address=192.168.16.97 client-id=1:54:48:10:ea:f7:23 comment="DELL WYSE" \
mac-address=54:48:10:EA:F7:23 server="dhcp LAN"
add address=192.168.16.27 client-id=1:ac:cb:51:d:a:5a comment=HIK7 \
mac-address=AC:CB:51:0D:0A:5A server="dhcp LAN"
add address=192.168.16.21 client-id=1:58:3:fb:6b:26:8a comment=HIK1 \
mac-address=58:03:FB:6B:26:8A server="dhcp LAN"
add address=192.168.16.22 client-id=1:94:e1:ac:b8:a7:7b comment=HIK2 \
mac-address=94:E1:AC:B8:A7:7B server="dhcp LAN"
add address=192.168.16.28 client-id=1:ac:cb:51:d:9:86 comment=HIK8 \
mac-address=AC:CB:51:0D:09:86 server="dhcp LAN"
add address=192.168.16.26 client-id=1:f8:4d:fc:c4:ac:55 comment=HIK6 \
mac-address=F8:4D:FC:C4:AC:55 server="dhcp LAN"
add address=192.168.16.93 client-id=1:80:2a:a8:d3:b5:b3 mac-address=\
80:2A:A8
3:B5:B3 server="dhcp LAN"
add address=192.168.16.92 client-id=1:80:2a:a8:19:30:1 mac-address=\
80:2A:A8:19:30:01 server="dhcp LAN"
add address=10.10.10.8 client-id=1:34:2e:b6:17:f9:2f comment=VU mac-address=\
34:2E:B6:17:F9:2F server=dhcpVLAV10
add address=10.10.20.2 client-id=1:fe:64:6:bc:81:93 comment=LOI mac-address=\
FE:64:06:BC:81:93 server=dhcpVLAN20
add address=10.10.20.8 client-id=1:34:2e:b6:17:f9:2f mac-address=\
34:2E:B6:17:F9:2F server=dhcpVLAN20
add address=10.10.10.4 client-id=1:6:7:3b:45:bc:85 comment=HONG mac-address=\
06:07:3B:45:BC:85 server=dhcpVLAV10
add address=10.10.10.5 client-id=1:86:1b:40:e5:27:b0 comment=TAN mac-address=\
86:1B:40:E5:27:B0 server=dhcpVLAV10
add address=10.10.10.3 client-id=1:4:b1:67:6f:df:94 comment=TUYEN \
mac-address=04:B1:67:6F
F:94 server=dhcpVLAV10
/ip dhcp-server network
add address=10.10.10.0/24 gateway=10.10.10.1
add address=10.10.20.0/24 gateway=10.10.20.1
add address=10.10.30.0/24 gateway=10.10.30.1
add address=192.168.16.0/24 gateway=192.168.16.1
/ip dns
set servers=1.1.1.1,1.0.0.1,8.8.8.8,8.8.4.4