Lakukan konfigurasi terlebih dahulu di router 1
dikarenakan hanya router 1 yang terhubung dengan internet.
wawan-R1
[admin@MikroTik] > system identity set name=R1
[admin@wawan-R1]
> ip dhcp-client add interface=ether1 use-peer-dns=yes use-peer-ntp=yes add-default-route=yes
disable=no
[admin@wawan-R1]
> ip address add address=12.12.12.1/24 interface=ether2
[admin@wawan-R1]
> ip dns set server=8.8.8.8 allow-remote-requests=yes
[admin@wawan-R1]
> ip firewall nat add chain=srcnat action=masqurade out-interface=ether1
[admin@wawan-R1]
> ip dhcp-server setup
Select interface to run DHCP server on
dhcp server interface: ether2
Select network for DHCP addresses
dhcp address space: 172.16.1.0/24
Select gateway for given network
gateway for dhcp network: 172.16.1.1
If this is remote network, enter address of DHCP
relay
There is no such IP network on selected interface
dhcp relay: 172.16.1.1
Select pool of ip addresses given out by DHCP server
addresses to give out: 172.16.1.2-172.16.1.254
Select DNS servers
dns servers: 172.16.1.1
Select lease time
lease time: 3d
wawan-R2
[admin@wawan-R2]
> interface bridge add name=bridge
[admin@wawan-R2]
> interface bridge port add interface=ether1 bridge=bridge
[admin@wawan-R2]
> interface bridge port add interface=ether2 bridge=bridge
[admin@wawan-R1]
> ip address add address=12.12.12.2/24 interface=bridge
wawan-R3
[admin@wawan-R3]
> interface bridge add name=bridge
[admin@wawan-R3]
> interface bridge port add bridge=bridge interface=ether3
[admin@wawan-R3]
> interface bridge port add bridge=bridge interface=ether4
[admin@wawan-R3]
> ip address add address=12.12.12.3/24 interface=ether1
[admin@wawan-R3]
> ip address add address=172.16.1.0/24 interface=bridge
[admin@wawan-R3]
> ip address add address=172.16.2.0/24 interface=ether2
[admin@wawan-R3]
> ip route add gateway=12.12.12.1
[admin@wawan-R3]
> ip dns set servers=12.12.12.1 allow-remote-requests=yes
[admin@wawan-R3]
> ip dhcp-relay add dhcp-server=12.12.12.1 disable=no interface=bridge.
[admin@wawan-R3]
> ip dhcp-server setup
Select interface to run DHCP server on
dhcp server interface: ether2
Select network for DHCP addresses
dhcp address space: 172.16.2.0/24
Select gateway for given network
gateway for dhcp network: 172.16.2.1
Select pool of ip addresses given out by DHCP server
addresses to give out: 172.16.2.2-172.16.2.254
Select DNS servers
dns servers: 12.12.12.1
Select lease time
lease time: 3d
[admin@wawan-R3]
> ip firewall filter add chain=input src-mac-address=00:50:79:66:68:01
dst-address=172.16.1.0/24 action=drop protocol=icmp
[admin@wawan-R2] > queue simple add
max-limit=1M/1M name=limit-all target-addresses=172.16.1.0/24
[admin@wawan-R2]
> queue simple add limit-at=256k/256k max-limit=512k/512k name=limit-pc-1
parent=limit-all target-addresses=172.16.1.254
[admin@wawan-R2]
> queue simple add limit-at=256k/256k max-limit=512k/512k name=limit-pc-2
parent=limit-all target-addresses=172.16.1.253
[admin@wawan-R2]
/ip firewall mangle>
> add action=mark-connection chain=prerouting
new-connection-mark=mark-1 src-address=172.168.2.253
> add action=mark-connection chain=prerouting
new-connection-mark=mark-1 src-address=172.168.2.254
> add action=mark-connection chain=prerouting
new-connection-mark=mark-2 src-address=172.168.2.253
> add action=mark-connection chain=prerouting
new-connection-mark=mark-2 src-address=172.168.2.254
> add action=mark-packet chain=prerouting
new-packet-mark=mark-1p connection-mark=mark-1 passthrough=no
> add action=mark-packet chain=prerouting
new-packet-mark=mark-2p connection-mark=mark-2 passthrough=no
[admin@wawan-R2]
/queue tree>
> add max-limit=1M name=parent
parent=global-total queue=default
> add limit-at=256k max-limit=512k name=pc1
packet-mark=mark-1 parent=parent queue=default
> add limit-at=256k max-limit=512k name=pc2
packet-mark=mark-2 parent=parent queue=default

Tidak ada komentar:
Posting Komentar