First i want to make my design network
LAN —> Mikrotik RouterOS —> ADSL Modem —> INTERNET
For the LAN, we use a class C, with the network 192.168.0.0/24. For RouterOS, we need two ethernet cards. One (ether1 - 192.168.1.2/24) for connection to an ADSL modem and one more (ether2 - 192.168.0.1/24) for connection to the LAN. For ADSL Modem, our IP set 192.168.1.1/24.
Before typing anything, make sure you have been at the root menu by typing "/"
Set IP for each ethernet card ²
ip address add address = 192.168.1.2/24 interface = ether1
ip address add address = 192.168.0.1/24 interface = ether2
To display the results of the above command type the following command:
ip address print
Then do the testing by trying ping to the gateway or to a computer on the LAN. If the result is successful, then you are correct IP configuration
ping 192.168.1.1
ping 192.168.0.10
Adding Routing
ip route add gateway = 192.168.1.1
Setup DNS
ip dns set primary-dns = 202.134.1.10 allow-remote-requests = yes
ip dns set secondary-dns = 202.134.0.155 allow-remote-requests = yes
Please adjust your DNS provider.
After that try to do ping to yahoo.com for example:
ping yahoo.com
If the result is successful, then the DNS settings are correct
Source NAT (Network Address Translation) / Masquerading
For all existing computers on the LAN can connect to the internet as well, then you need to add NAT (Masquerade) on Mikrotik.
ip firewall nat add chain = srcnat action = masquerade out-interface = ether1
Now try to ping yahoo.com from your computer on the LAN
ping yahoo.com
If the result is successful, then the settings are correct masquerade
DHCP (DynamicHost Configuration Protocol)
Due to practical reasons, in my network i use the DHCP Server.because with DHCP if any people want to connect to my network i could't to setup IP again.
Creating an IP Address Pool
ip pool add name = dhcp-pool ranges = 192.168.0.2-192.168.0.254
Add a DHCP Network
ip dhcp-server network add address = 192.168.0.0/24 gateway = 192.168.0.1 dns-server = 202.134.1.10,202.134.0.155
Adding a DHCP Server
ip dhcp-server add name = DHCP_LAN disabled = no interface = ether2 address-pool = dhcp-pool
Now try testing from a client computer, to request the IP Address from a DHCP Server.
Bandwidth Control
For all client computers on the LAN bandwidth not fight each other, it is necessary to a distinguished name is bandwidth management or bandwidth control
The model that I use is to queue trees. To more clearly what it is, please refer to the site Mikrotik
His condition like this:
Speedy connection it said speednya until 384/64 Kbps (Download / Upload), well it was very rare condition is reached. So we must look for its estimated average ². So I take the minimum for downloading can get about 300 Kbps and 50 Kbps upload allocate aq. As for which its maximum, about ² to 380 Kbps download and 60 Kbps upload.
Then, the number of client computers that exist today are 10 pieces. So be prepared to share the bandwidth to 10 client.
² The calculation for each client like this:
Minimal Downloads: 300 / 10 * 1024 = 30720 bps
Max Downloads: 380 / 10 * 1024 = 38912 bps
Minimum uploads: 50 / 10 * 1024 = 5120 bps
Max Upload: 60 / 10 * 1024 = 6144 bps
Next we start the configuration:
Mark all packets came from LAN
ip firewall mangle add src-address = 192.168.0.0/24 action = mark-connection new-connection-mark = Clients-con chain = prerouting
ip firewall mangle add connection-mark = Clients-con action = mark-packet new-packet-mark = Clients chain = prerouting
Adding a rule that will limit the download and upload speeds
queue tree add name = Clients-Download parent = ether2 packet-mark = Clients limit-at = 30720 max-limit = 38 912
queue tree add name = Upload parent = Clients ether1-packet-mark = Clients limit-at = 5120 max-limit = 6144
Now try doing a test download from a few clients.if no any problems you has finis to setup microtik...
"Belajarlah dari Masa lalu "
Langganan:
Posting Komentar (Atom)

Comments (0)
Posting Komentar