Sebeum melakukan setting atau configurasi pada router kira-kira gambaran topology nya seperti dibawah ini.
Sebelum melakukan yang lain usahakan
menamai interface sesuai yang di pasang pada jaringan, hanya untuk
memudah kan saja. Misalkan disini yang kita pakai ether1 (to-pc), ether2
(antar-router), dan ether3 (ke-router-berikutnya). Sesuaikan lah dengan
pengkabelan pada jaringan anda. Untuk dns sesuaikan dengan dns yang
anda pakai misal: mlink 27.124.92.92, 27.124.94.94. Sekarang masuk pada
konfigurasi:
ROUTER A
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
[admin@router a]/interface set ether1 name=to-internet
[admin@router a]/interface set ether2 name=to-router-b
[admin@router a]/interface set ether3 name=to-router-d
[admin@router a]/ip address add address=10.10.10.2/30 interface=to-internet disabled=no
[admin@router a]/ip address add address=10.10.1.1/30 interface=to-router-b disabled=no
[admin@router a]/ip address add address=10.10.1.9/30 interface=to-router-d disabled=no
[admin@router a]/ip route add gateway=10.10.10.1 comment="Default Route"
[admin@router a]/ip route add dst-address=192.168.2.0/24 gateway=10.10.1.2 comment="PC B" disabled=no
[admin@router a]/ip route add dst-address=192.168.3.0/24 gateway=10.10.1.2 comment="PC C" disabled=no
[admin@router a]/ip route add dst-address=192.168.4.0/24 gateway=10.10.1.10 comment="PC D" disabled=no
[admin@router a]/ip route add dst-address=192.168.5.0/24 gateway=10.10.1.10 comment="PC E" disabled=no
[admin@router a]/ip route add dst-address=10.0.1.4/30 gateway=10.10.1.2 comment="ROUTER B-C" disabled=no
[admin@router a]/ip route add dst-address=10.0.1.12/30 gateway=10.10.1.10 comment="ROUTER D-E" disabled=no
[admin@router a]/ip firewall nat add chain=srcnat out-interface=to-internet action=masquerade disabled=no
|
ROUTER B
|
[admin@router b]/interface set ether1 name=to-pc-b
[admin@router b]/interface set ether2 name=to-router-a
[admin@router b]/interface set ether3 name=to-router-c
[admin@router b]/ip address add address=192.168.2.1/24 interface=to-pc-b disabled=no
[admin@router b]/ip address add address=10.10.1.2/30 interface=to-router-a disabled=no
[admin@router b]/ip address add address=10.10.1.5/30 interface=to-router-c disabled=no
[admin@router b]/ip route add gateway=10.10.1.1 comment="Default Route"
[admin@router b]/ip route add dst-address=192.168.3.0/24 gateway=10.10.1.6 comment="PC C" disabled=no
|
ROUTER C
|
[admin@router c]/interface set ether1 name=to-pc-c
[admin@router c]/interface set ether2 name=to-router-b
[admin@router c]/ip address add address=192.168.3.1/24 interface=to-pc-c disabled=no
[admin@router c]/ip address add address=10.10.1.6/30 interface=to-router-b disabled=no
[admin@router c]/ip route add gateway=10.10.1.5 comment="Default Route"
|
ROUTER D
|
[admin@router d]/interface set ether1 name=to-pc-d
[admin@router d]/interface set ether2 name=to-router-a
[admin@router d]/interface set ether3 name=to-router-e
[admin@router d]/ip address add address=192.168.4.1/24 interface=to-pc-d disabled=no
[admin@router d]/ip address add address=10.10.1.10/30 interface=to-router-a disabled=no
[admin@router d]/ip address add address=10.10.1.13/30 interface=to-router-e disabled=no
[admin@router d]/ip route add gateway=10.10.1.9 comment="Default Route"
|
ROUTER E
|
[admin@router e]/interface set ether1 name=to-pc-e
[admin@router e]/interface set ether2 name=to-router-d
[admin@router e]/ip address add address=192.168.5.1/24 interface=to-pc-e disabled=no
[admin@router e]/ip address add address=10.10.1.14/30 interface=to-router-d disabled=no
[admin@router e]/ip route add gateway=10.10.1.13 comment="Default Route"
|
Keseluruhan Router
|
Jika mikrotik v 3.xx
[admin@router x]/ip dns set primary-dns=27.124.92.92 secondary-dns=27.124.94.94 allow-remote-requests=yes
Jika mikrotik v 4.xx ke atas
[admin@router x]/ip dns set servers=27.124.92.92,27.124.94.94 allow-remote-requests=yes
|
Sampai disini routing di mikrotik sudah
siap, namun jika anda menggunakan dhcp-server untuk masing-masing
network setup lah sesuai kebutuhan. Nat pada router A digunakan jika
menggunakan ip private yang akan di sambungkan ke internet, jika IP
public lewatkan saja. Selamat mencoba…
Tidak ada komentar:
Posting Komentar