Assalamualaikum Wr.Wb
Assalamualaikum Wr.Wb
Disini saya akan menjelaskan tentang Setting koneksi internet dan interfaces di mikrotik virtual, untuk lebih jelasnya bacalah artikel dibawah ini.
Here I will explain about the internet connection settings and interfaces in the virtual mikrotik, for more details please see the article below.
A. Bahan
A. Materials
- Perangkat Keras
- Hardware
1. PC/Laptop
1. PC/Laptop
2. Hostpot
2. Hostpot
- Perangkat Lunak
- Software
1. Winbox
1. Winbox
2. ISO Mikrotik2. Mikrotik ISO
B. Tujuan
B. Purpose
1. Dapat mengetahui cara koneksi internet dan interfaces di mikrotik
1. Can know how to internet connection and interfaces in mikrotik
2. Dapat mengetahui cara setting DNS di mikrotik
2. Can know how to the DNS settings in mikrotik
3. Dapat mengetahui cara setting DHCP Client di mikrotik
3. Can know how to set the DHCP Client in mikrotik
4. Dapat mengetahui cara setting NTP di mikrotik
4. Can know how to NTP settings in mikrotik
5. Dapat mengetahui cara mengganti master port menjadi local di mikrotik
5. Can knows how to change the port to a local master in mikrotik
6. Dapat mengetahui cara setting IP Route di mikrotik
6. Can know how to set the IP Route in mikrotik
7. Dapat mengetahui cara setting IP Firewall di mikrotik
7. Can know how to IP Firewall settings in mikrotik
C. Keterangan Warna
C. Description Color
1. Ungu = File
1. Purple = File
2. Hijau = Yang dapat dirubah
2. Green = That can be changed
3. Merah = Salah
3. Red = False
4. Biru = Folder
4. Blue = Folder
D. Langkah-langkah
D. Steps
1. Pada mikrotik virtual kita login menggunakan Admin dan enter.
1. In we the virtual mikrotik login using the Admin and enter.
[admin@MikroTik]> system reset-configuration no-default=yesLalu tekan ‘y'
2. Then reset the Mikrotik by entering the command no default to reset back and did not obtain an IP mikrotik directly.
[admin@MikroTik]> system reset-configuration no-default=yes
Then press 'y'
3. Masukan IP Address yang ingin dibuat sebagai ether1 dengan perintah
[admin@MikroTik]> ip address add address=192.168.43.122/24 interface=ether1
[admin@MikroTik]> ip address print
Ket : IP 122 adalah nomor absen anda menggunakan /24 dijadikan ratusan.
3. Enter the IP Address that you want to create as ether1 with the command
[admin@MikroTik]> ip address add address=192.168.43.122/24 interface=ether1
[admin@MikroTik]> ip address print
Note: IP 122 is absent numbers you use / 24 made hundreds.
4. Kemudian bukalah WinBox.
4. Then open WinBox
5. Dan masuk menggunakan MAC Address dari IP yang sudah dibuat tadi.
5. And it makes using the MAC address of the IP that you have created.
6. Click "Connect" to connecting.
7. Proses login sedang berjalan.
7. The login process is running.
8. Bukalah “New Terminal” lalu sekarang buat IP Address untuk ether2 dengan perintah
[admin@MikroTik]> ip address add address=192.168.22.1/29 interface=ether2
Ket : IP 22 adalah nomor absen anda menggunakan /29.
8. Open the "New Terminal" and now create the IP Address for ether2 with the command
[admin@MikroTik]> ip address add address=192.168.22.1/29 interface=ether2
Note: IP 22 is absent numbers you use / 29.
9. Klik "IP" pilih "Addresses"
9. Click the "IP" select "Addresses"
10. In the GUI click the plus icon (+) and then enter the IP Address that you want to create / how many, and also the name input the interfaces network, and then click "OK".
11. Lalu IP Address akan seperti gambar dibawah ini
ether1 dan ether2.
11. Then the IP Address will be like the picture below ether1 and ether2.
12. Lalu sekarang mengganti nama interface menjadi
local dan public, masukanlah perintah
[admin@MikroTik]> interface print
[admin@MikroTik]> interface set 0 name=public
[admin@MikroTik]> interface set 1 name=local
[admin@MikroTik]> interface print
Setelah
nama interface terganti, sekarang kita ganti lewat cara GUI nya.
12. And now rename into local and public interface, enter the command
[admin@MikroTik]> interface print
[admin@MikroTik]> interface set 0 name=public
[admin@MikroTik]> interface set 1 name=local
[admin@MikroTik]> interface print
After the interface name replaced, now change via the GUI.
13. Klik "IP" pilih "Addresses"
13. Click the "IP" select "Addresses"
14. Nama ether1 dan ether2 sudah berganti menjadi
local dan public.
14. Name ether1 and ether2 already changed into local and public.
15. Lalu sekarang disable lah interface ether 3 dan
4, secara CLI dengan perintah
[admin@MikroTik]> interface print
[admin@MikroTik]> disable interface 0,1
[admin@MikroTik]> interface print
Ket :
disable 0,1 adalah angka dari nomor interfacenya bukan dari ethernya.
15. And now disable the interface ether 3 and 4, in CLI with the command
[admin@MikroTik]> interface print
[admin@MikroTik]> disable interface 0,1
[admin@MikroTik]> interface print
Note: disable 0,1 is a number of interfaces not of ether.
16. Secara GUI nya klik “Interface” lihat tampilan
dibawah adalah sudah didisable lewat CLI tadi.
16. In the GUI click the "Interface" see the view below is already disabled via the CLI before.
17. Lalu sekarang mengenable ether3 saja lewat CLI,
dengan perintah
[admin@MikroTik]> interface enable 0
Kemudian
klik “Interface” dan lihat ether3 sudah dienable lewat CLI tadi.
17. And now ether3 only be enabled via CLI, the command
[admin@MikroTik]> interface enable 0
Then click the "Interface" and see ether3 already CLI is enabled via before.
18. Lalu icon Centang itu untuk mengenable
interface, sedangkan Silang (X) untuk mendisable interface.
18. Then the Ceklis icon to be enabled interfaces, while the cross (X) to disable the interface.
19. Kemudian tambahkan vlan dengan perintah
[admin@MikroTik]> interface vlan add name=vlan1 interface=local vlan-id=100
[admin@MikroTik]> interface vlan add name=vlan2 interface=local vlan-id=200
[admin@MikroTik]> interface print
19. Then add vlan with the command
[admin@MikroTik]> interface vlan add name=vlan1 interface=local vlan-id=100
[admin@MikroTik]> interface vlan add name=vlan2 interface=local vlan-id=200
[admin@MikroTik]> interface print
20. Kemudian lihatlah secara GUI nya, klik “Interface” lalu lihat vlan1 dan vlan2 sudah terbuat dari cara CLI tadi.
20. Then look is the GUI, click the "Interface" and see VLAN1 and VLAN2 has been made of the way CLI before.
21. Bisa klik “VLAN” lalu akan muncul bagian vlan nya saja, seperti dibawah ini.
22. Lalu removelah vlan1 dan vlan2 lewat GUI dengan klik tanda minus (-), seperti dibawah ini.
22. Then remove VLAN1 and VLAN2 via GUI by click the minus (-), as shown below.
23. Kemudian enable ether4 secara GUI, kliklah tanda centang untuk mengenable.
23. Then enable ether4 is the GUI, click the checkmark to be enabled.
24. Secara CLI nya seperti berikut, menggunakan perintah
[admin@MikroTik]> interface print
[admin@MikroTik]> interface enable 1
[admin@MikroTik]> interface print
24. In the following CLI, use the command
[admin@MikroTik]> interface print[admin@MikroTik]> interface enable 1
[admin@MikroTik]> interface print
25. Lalu sekarang ubah master-port menjadi local, disini karena memakai virtual tidak bisa melakukan master-port. Gambar dibawah menggunakan RB real. Masukan perintah
[admin@MikroTik]> interface print
[admin@MikroTik]> interface ethernet set 2 master-port=local
[admin@MikroTik]> interface ethernet set 3 master-port=local
[admin@MikroTik]> interface ethernet set 4 master-port=local
[admin@MikroTik]> interface ethernet print
25. And now change into a local master-port, here because the virtual wearing can not do a master-port. The picture below using real RB. enter the command
[admin@MikroTik]> interface print
[admin@MikroTik]> interface ethernet set 2 master-port=local
[admin@MikroTik]> interface ethernet set 3 master-port=local
[admin@MikroTik]> interface ethernet set 4 master-port=local
[admin@MikroTik]> interface ethernet print
26. Kemudian mengatur IP Route dengan perintah
[admin@MikroTik]> ip route add gateway=192.168.43.1 dst-address=0.0.0.0/0
[admin@MikroTik]> ip route print
26. Then set the IP Route with the command
[admin@MikroTik]> ip route add gateway=192.168.43.1 dst-address=0.0.0.0/0
[admin@MikroTik]> ip route print
27. Secara GUI, klik "IP" pilih "Routes".
27. In the GUI, click "IP" select "Routes".
28. Pada Route List akan muncul IP Public dengan keterangan AS. Jika ingin menambahkan Route klik icon plus (+).
28. In the Route List will appear with a description AS Public IP. If you want to add Route click the plus icon (+).
29. Lalu isi dst address dan gateway, lalu klik "OK".
29. Then fill in dst address and gateway, and then click "OK".
30. Kemudian setting DNS dengan perintah
[admin@MikroTik]> ip dns print
[admin@MikroTik]> ip dns set servers=192.168.43.1 allow-remote-request=yes
[admin@MikroTik]> ip dns print
30. Then the DNS settings with the command
[admin@MikroTik]> ip dns print
[admin@MikroTik]> ip dns set servers=192.168.43.1 allow-remote-request=yes
[admin@MikroTik]> ip dns print
31. Secara GUI, klik "IP" pilih "DNS".
31. In the GUI, click "IP" select "DNS".
32. Lalu masukan servers dengan IP gateway, lalu centang pada kotak Allow Remote Request, kemudian klik "OK".
32. Then enter the IP gateway servers, then check the box Allow Remote Request, and then click "OK".
33. Kemudian setting IP Firewall secara CLI dengan perintah
[admin@MikroTik]> ip firewall nat add chain=srcnat out-interface=public action=masquerade
[admin@MikroTik]> ip firewall nat print33. Then the IP Firewall settings with the CLI command
[admin@MikroTik]> ip firewall nat add chain=srcnat out-interface=public action=masquerade
[admin@MikroTik]> ip firewall nat print
34. Secara GUI, klik "IP" pilih "Firewall".
34. In the GUI, click "IP" select "Firewall".
35. Kemudian klik "NAT" akan muncul srcnat. Jika ingin menambahkan Ip Firewall klik icon plus (+).
35. Then click "NAT" will appear srcnat. If you want to add Ip Firewall click the plus icon (+).
36. Kemudian masukan chain.
36. Then input chain.
37. Klik "Action" lalu pilih "Masquerade", kemudian klik "OK".
37. Click the "Action" and select "Masquerade", then click "OK".
38. Buka "New Terminal" lakukan PING ke DNS dan PING google.
[admin@MikroTik]> ip firewall nat print
34. Secara GUI, klik "IP" pilih "Firewall".
34. In the GUI, click "IP" select "Firewall".
35. Kemudian klik "NAT" akan muncul srcnat. Jika ingin menambahkan Ip Firewall klik icon plus (+).
35. Then click "NAT" will appear srcnat. If you want to add Ip Firewall click the plus icon (+).
36. Kemudian masukan chain.
36. Then input chain.
37. Klik "Action" lalu pilih "Masquerade", kemudian klik "OK".
37. Click the "Action" and select "Masquerade", then click "OK".
38. Buka "New Terminal" lakukan PING ke DNS dan PING google.
[admin@MikroTik]> ping 192.168.43.1
[admin@MikroTik]> ping google.com38. Open the "New Terminal" do PING DNS and PING google.
[admin@MikroTik]> ping 192.168.43.1
[admin@MikroTik]> ping google.com
39. Lalu hapus IP Address Public dengan perintah.
[admin@MikroTik]> ip address remove 0
[admin@MikroTik]> ip address print39. Then remove the Public IP Address with the command.
[admin@MikroTik]> ip address remove 0
[admin@MikroTik]> ip address print
40. Kemudian setting DHCP Client secara CLI dengan perintah.
[admin@MikroTik]> ip dhcp-client add interface=public add-default-route=yes use-peer-dns=yes use-peer-ntp=yes
[admin@MikroTik]> ip dhcp-client print
[admin@MikroTik]> ip dhcp-client enable 0
[admin@MikroTik]> ip dhcp-client print40. Then DHCP Client CLI settings with the command.
[admin@MikroTik]> ip dhcp-client add interface=public add-default-route=yes use-peer-dns=yes use-peer-ntp=yes
[admin@MikroTik]> ip dhcp-client print
[admin@MikroTik]> ip dhcp-client enable 0
[admin@MikroTik]> ip dhcp-client print
[admin@MikroTik]> ip dhcp-client print
[admin@MikroTik]> ip dhcp-client enable 0
[admin@MikroTik]> ip dhcp-client print
41. Kemudian cek IP Dhcp Client yang didapat, klik "IP" pilih "Addresses".
41. Then check the DHCP Client IP earned, click "IP" select "Addresses".
42. IP Public berubah menjadi IP Dhcp yang didapat tadi.
42. public IP address turned into a DHCP IP earned before.
43. Kemudian buka cmd, lakukanlah PING ke IP DHCP Client dan PING google.
C:\Users\General User> ping 192.168.43.46
C:\Users\General User> ping google.com43. Then open cmd, do PING IP DHCP Client and PING google.
C:\Users\General User> ping 192.168.43.46
C:\Users\General User> ping google.com
C:\Users\General User> ping google.com
44. Setting DHCP Client GUI, click "IP" select "DHCP Client".
45. Akan muncul seperti gambar dibawah ini, jika ingin menambahkan DHCP Client klik icon plus (+).
45. It would appear like the picture below, if you want to add the DHCP Client click the plus icon (+).
46. Pilih Interface "Public", lalu centang kotak Peer DNS dan Peer NTP, lalu klik "OK".
46. Select Interface "Public", then check the box Peer DNS and Peer NTP, and then click "OK".
47. Lalu hapus DHCP Client yang sudah dibuat tadi, di "IP" pilih "DHCP Client" kemudian klik icon minus (-) untuk meremove.
47. Then remove the DHCP Client that you have created, in the "IP" select "DHCP Client" and then click the icon minus (-) to remove.
48. Secara CLI ketik perintah.
[admin@MikroTik]> ip dhcp-client print48. In the CLI type the command.
[admin@MikroTik]> ip dhcp-client print
[admin@MikroTik]> ip dhcp-server setup
Kemudian enter terus.
49. Then the DHCP server settings, is CLI command input.
[admin@MikroTik]> ip dhcp-server setup
Then enter continues.
50. Secara GUI, klik "IP" pilih "DHCP Server".
50. In the GUI, click "IP" select "DHCP Server".
51. Akan muncul tampilan seperti dibawah ini, jika ingin menambahkan DHCP Server klik icon plus (+).
51. The display will appear as below, if you want to add a DHCP Server click the plus icon (+).
52. Masukan nama, interface, lease time, lalu klik "OK".
52. Enter the name, interface, lease time, and then click "OK".
53. Then check the DHCP Server IP earned, right click on WIFI "Indry" select "Status".
54. Kemudian klik "Details".
54. Then click "Details".
55. IP DHCP Server sudah didapat yaitu 192.168.22.2
55. IP DHCP Server has been obtained that is 192.168.22.2
56. Lalu tambahkan kembali IP Public dengan nomor absen anda, lalu lakukan PING google. Masukan perintah.
[admin@MikroTik]> ip address print
[admin@MikroTik]> ip address add address=192.168.43.122/24 interface=public
[admin@MikroTik]> ip address print
[admin@MikroTik]> pin google.com56. Then add back the number absent public IP address you, then do PING google. enter the command.
[admin@MikroTik]> ip address print
[admin@MikroTik]> ip address add address=192.168.43.122/24 interface=public
[admin@MikroTik]> ip address print
[admin@MikroTik]> pin google.com
57. Kemudian cek kembali di "IP" klik "Addresses".
57. Then check back in "IP" click "Addresses".
58. IP sudah muncul seperti awal lagi.
58. IP already appeared as the beginning again.
59. Cek IP Address, masukan perintah
[admin@MikroTik]> ip address print59. Check the IP Address, input the command
[admin@MikroTik]> ip address print
60. Kemudian klik "Open Network and Sharing Center".
60. Then click "Open Network and Sharing Center".
61. Lalu klik "Wirelles Network (Connection Indry)".
61. Then click "Wirelles Network (Connection Indry)".
62. Klik "Properties".
62. Click on "Properties".
63. Klik "Internet Protocol Version 4 (TCP/IPv4)", pilih "Properties".
63. Click "Internet Protocol Version 4 (TCP / IPv4)", select "Properties".
64. Masukan IP Address Local, seperti dibawah ini.
64. Enter the IP Address Local, as shown below.
65. Setelah sudah disetting IP Addressnya, klik "Close".
65. After the already in the setting IP address, click "Close".
66. Jika sudah seperti gambar dibawah ini, sudah tersambung.
66. If it like the picture below, is connected.67. Bukalah CMD.
67. Open CMD.
68. Lakukanlah PING ke IP Address Local, public, gateway, dan PING google.
C:\Users\General User> ping 192.168.22.1
C:\Users\General User> ping 192.168.43.122
C:\Users\General User> ping 192.168.43.1
C:\Users\General User> ping google.com68. Do PING to the IP Address Local, public, gateway, and PING google.
C:\Users\General User> ping 192.168.22.1
C:\Users\General User> ping 192.168.43.122
C:\Users\General User> ping 192.168.43.1
C:\Users\General User> ping google.com
69. Sekarang setting ntp Client, klik "System" pilih "NTP Client".
69. Now ntp client settings, click "System" select "NTP Client".
70. Centang pada bagian "Enabled", pilih mode "Unicast" dan masukan NTP Server, lalu klik "OK".
70. Check on the "Enabled", select mode "Unicast" and input NTP Server, and then click "OK".
71. Secara CLI, masukan perintah
[admin@MikroTik]> system ntp client set primary-ntp=203.160.128.3 enabled=yes mode=unicast
[admin@MikroTik]> system clock set time-zone-name=Asia/Jakarta
[admin@MikroTik]> system clock printTampilan jam akan muncul.
71. In the CLI, input the command
[admin@MikroTik]> system ntp client set primary-ntp=203.160.128.3 enabled=yes mode=unicast
[admin@MikroTik]> system clock set time-zone-name=Asia/Jakarta
[admin@MikroTik]> system clock print
Clock display will appeared.
72. Cek pada tanggalan di PC/Laptop anda, jika sama maka proses NTP Client berhasil.
72. Check the calendar in the your PC / Laptop, if at the NTP Client process successfully.
The above explanation is how to setup internet connection and interfaces in the Mikrotik in Virtual, if already tried and succeeded means you have successfully done. Many explanations from me, more or less apologize. Hopefully useful, thank you.
Wassalamualaikum Wr.Wb
Wassalamualaikum Wr.Wb
[LAB 1.5] Setting Koneksi Internet dan Interfaces di Mikrotik Virtual
4/
5
Oleh
indryani sukma