Saturday, 15 November 2025

Set Mikrotik 2 ruang limit kecil

 /ip address add address=192.168.100.2/24 interface=ether1 comment="WAN"
/ip address add address=10.10.10.1/24 interface=ether2 comment="Ruang Komputer"
/ip address add address=10.10.20.1/24 interface=ether3 comment="Ruang Bahasa"

/ip dns set servers=8.8.8.8,1.1.1.1 allow-remote-requests=yes

/ip firewall nat
add chain=srcnat out-interface=ether1 action=masquerade comment="NAT ke internet"

/ip firewall filter
add chain=forward connection-state=established,related action=accept comment="allow established"
add chain=forward in-interface=ether2 out-interface=ether1 action=accept comment="ether2->WAN"
add chain=forward in-interface=ether3 out-interface=ether1 action=accept comment="ether3->WAN"

# DHCP Ruang Komputer
/ip pool add name=pool10 ranges=10.10.10.10-10.10.10.200
/ip dhcp-server add name=dhcp10 interface=ether2 address-pool=pool10 lease-time=1h
/ip dhcp-server network add address=10.10.10.0/24 gateway=10.10.10.1 dns-server=10.10.10.1

# DHCP Ruang Bahasa
/ip pool add name=pool20 ranges=10.10.20.10-10.10.20.200
/ip dhcp-server add name=dhcp20 interface=ether3 address-pool=pool20 lease-time=1h
/ip dhcp-server network add address=10.10.20.0/24 gateway=10.10.20.1 dns-server=10.10.20.1

/ip dhcp-server enable dhcp10
/ip dhcp-server enable dhcp20

/ip route add dst-address=0.0.0.0/0 gateway=192.168.100.1

/queue type
add name=pcq-download-fair kind=pcq pcq-classifier=dst-address
add name=pcq-upload-fair   kind=pcq pcq-classifier=src-address

/queue simple
add name="Komputer_All" target=10.10.10.0/24 max-limit=40M/10M limit-at=32M/8M queue=pcq-download-fair/pcq-upload-fair
add name="Bahasa_All"   target=10.10.20.0/24 max-limit=40M/10M limit-at=31M/8M queue=pcq-download-fair/pcq-upload-fair

Share:

0 comments:

Post a Comment