sederhana sebagai gateway server.
MikroTik v2.9.7
Login: admin <enter>
Password: (kosongkan) <enter>
dan tanpa password, tinggal ketik admin kemudian tekan tombol enter.
[admin@Mikrotik] > password
old password: *****
new password: *****
retype new password: *****
[admin@ Mikrotik]] >
[admin@Mikrotik] > system identity set name=XAVIERO
[admin@XAVIERO] >
[admin@XAVIERO] > interface print
Flags: X – disabled, D – dynamic, R – running
# NAME TYPE RX-RATE TX-RATE MTU
0 R ether1 ether 0 0 1500
1 R ether2 ether 0 0 1500
[admin@XAVIERO] >
netmask=255.255.255.0 interface=ether1
[admin@XAVIERO] > ip address add address=172.16.0.1
netmask=255.255.255.0 interface=ether2
[admin@XAVIERO] >ip address print
Flags: X – disabled, I – invalid, D – dynamic
# ADDRESS NETWORK BROADCAST INTERFACE
0 192.168.0.1/24 192.168.0.0 192.168.0.63 ether1
1 172.16.0.1/24 172.16.0.0 172.16.0.255 ether2
[admin@XAVIERO] >
[admin@XAVIERO] > /ip route add gateway=192.168.0.254
[admin@XAVIERO] > ip route print
Flags: X – disabled, A – active, D – dynamic,
C – connect, S – static, r – rip, b – bgp, o – ospf
# DST-ADDRESS PREFSRC G GATEWAY DISTANCE INTERFACE
0 ADC 172.16.0.0/24 172.16.0.1 ether2
1 ADC 192.168.0.0/26 192.168.0.1 ether1
2 A S 0.0.0.0/0 r 192.168.0.254 ether1
[admin@XAVIERO] >
[admin@XAVIERO] > ping 192.168.0.254
192.168.0.254 64 byte ping: ttl=64 time<1 ms
192.168.0.254 64 byte ping: ttl=64 time<1 ms
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0/0.0/0 ms
[admin@XAVIERO] >
[admin@XAVIERO] > ip dns set primary-dns=192.168.0.10 allow-remoterequests=no
[admin@XAVIERO] > ip dns set secondary-dns=192.168.0.11 allow-remoterequests=no
[admin@XAVIERO] > ip dns print
primary-dns: 192.168.0.10
secondary-dns: 192.168.0.11
allow-remote-requests: no
cache-size: 2048KiB
cache-max-ttl: 1w
cache-used: 16KiB
[admin@XAVIERO] >
[admin@XAVIERO] > ping yahoo.com
216.109.112.135 64 byte ping: ttl=48 time=250 ms
10 packets transmitted, 10 packets received, 0% packet loss
round-trip min/avg/max = 571/571.0/571 ms
[admin@XAVIERO] >
[admin@XAVIERO]> ip firewall nat add action=masquerade outinterface=
ether1 chain:srcnat
[admin@XAVIERO] >
[admin@XAVIERO]ip firewall nat print
Flags: X – disabled, I – invalid, D – dynamic
0 chain=srcnat out-interface=ether1 action=masquerade
[admin@XAVIERO] >
yang bisa di download dari Mikrotik.com atau dari server mikrotik kita.
mikrotik kita 192.168.0.1, via browser buka http://192.168.0.1 dan download WinBox dari situ.
Jika kita menginginkan client mendapatkan IP address secara otomatis maka perlu kita setup dhcp server pada Mikrotik. Berikut langkah-langkahnya :
/ip pool add name=dhcp-pool ranges=172.16.0.10-172.16.0.20
/ip dhcp-server network add address=172.16.0.0/24 gateway=172.16.0.1
/ip dhcp-server add interface=ether2 address-pool=dhcp-pool
[admin@XAVIERO]> ip dhcp-server print
Flags: X – disabled, I – invalid
# NAME INTERFACE RELAY ADDRESS-POOL LEASE-TIME ADD-ARP
0 X dhcp1 ether2
Tanda X menyatakan bahwa DHCP server belum enable maka perlu dienablekan terlebih dahulu pada langkah 5.
/ip dhcp-server enable 0
c:\>ping www.yahoo.com
[admin@XAVIERO] queue simple> add name=Komputer01
interface=ether2 target-address=172.16.0.1/24 max-limit=65536/131072
[admin@XAVIERO] queue simple> add name=Komputer02
interface=ether2 target-address=172.16.0.2/24 max-limit=65536/131072
dan seterusnya…