IMPLEMENTASI ALGORITMA GOSIP SEBAGAI PROTOKOL JARINGAN
Oleh :
Aditya Nugraha Tama NIM : 622013002
Skripsi
Untuk melengkapi salah satu syarat memperoleh Gelar Sarjana Teknik
Program Studi Sistem Komputer Fakultas Teknik Elektronika dan Komputer
ABSTRACT
Gossip algorithm is an algorithm that manages the process of data exchange among connected nodes. In this algorithm all nodes run an identical function or in other words there is no client/server. The advantage of this algorithm is simple and quick in spreading an information. This algorithm found a lot usability on distributed system.
This thesis is about gossip algorithm implementation, where Raspberry Pi is used for node which will run either active thread or passive thread. Active thread is assigned to select the nodes that will be invited to exchange data, while passive thread waits for invitation from neighbor to exchange data. With the connected node it will occur the process of sending and updating data from each node. After all nodes run active thread, it will form a graph showing the connection that occurs between the nodes which exchange data. When there is a node that go off, the node which connected to it will automatically search other nodes to exchange data. Likewise, when a new node is active, the node will automatically search for other nodes to exchange data. All the process for selecting the other nodes to exchange data are randomly generated.
The result of gossip algorithm implementation can be represented by a graph which all nodes are connected each other and the data is similar in each node. The possibility of double graph formation can be solved with protection in the selections of neighbor. The communication beetwen nodes run perfectly. When there is a node that go off, nodes which connected with that node is able to choose the other node randomly. Likewise, when there is a new node that active it can be randomly connected with the other node.
KATA PENGANTAR
Puji dan syukur kepada Tuhan yang Maha Esa, karena atas limpahan berkat dan rahmat-Nya penulis mampu menyelesaikan skripsi ini sebagai syarat untuk menyelesaikan studi pada Fakultas Teknik Elektronika dan Komputer Universitas Kristen Satya Wacana.
Dalam proses penyusunan dan penyelesaian skripsi ini, penulis mendapatkan bimbingan, saran serta bantuan dari orang-orang di sekitar. Oleh karena itu, penulis ingin mengucapkan terimakasih kepada:
1. Bapak Saptadi Nugroho, M.Sc dan Bapak Hartanto Kusuma W, M.T selaku pembimbing dan para dosen FTEK atas bimbingan, saran, serta nasehat yang telah diberikan selama proses pembuatan skripsi.
2. Bapak Darmawan Utomo, M.Eng selaku wali studi atas arahan serta nasehat yang telah diberikan selama berkuliah di Fakultas Elektronika dan Komputer Universitas Kristen Satya Wacana.
3. Kedua orang tua terkasih, dan Theresia Dwi Okta Aristia Putri atas dukungan berupa dukungan moral, doa serta materiil yang telah diberikan kepada penulis.
4. Teman-teman dan sahabat seperjuangan FTEK angkatan 2013 serta teman-teman dari angkatan lain yang telah menemani dan memberikan doa, motivasi, masukan serta semnagat kepada penulis.
5. Seluruh karyawan Tata Usaha yang telah membantu kelancaran penyelesaian pembuatan skripsi ini.
6. Seluruh pihak yang membantu penulis selama proses pembuatan skripsi yang tidak dapat disebutkan satu per satu.
Dalam penulisan skripsi ini peneliti menyadari masih banyak kekurangan baik dalam isi, penyampaian, serta penulisan. Sehingga, dibutuhkan kritik dan saran yang membangun demi perbaikan skripsi ini ke depannya.
DAFTAR ISI
INTISARI ... Error! Bookmark not defined.
ABSTRACT... 5
KATA PENGANTAR ... iii
DAFTAR ISI ... Error! Bookmark not defined. DAFTAR GAMBAR ... vii
DAFTAR TABEL... ix
DAFTAR SINGKATAN ... x
DAFTAR KODE ... xi BAB I PENDAHULUAN
... Erro r! Bookmark not defined.
1. 1. Tujuan
Error! Bookmark not defined. 1. 2. Latar Belakang
Error! Bookmark not defined. 1. 2. 1. Pendahuluan
Error! Bookmark not defined. 1. 2. 2. Permasalahan
Error! Bookmark not defined. 1. 3. Spesifikasi Sistem
Error! Bookmark not defined. 1. 4. Sistematika Penulisan
BAB II DASAR TEORI
Error! Bookmark not defined. 2. 2. 2. Soket
Error! Bookmark not defined. 2. 3. Algoritma Gosip
Error! Bookmark not defined. 2. 3. 1. Push-Pull
Error! Bookmark not defined. 2. 4. IPv4
Error! Bookmark not defined. 2. 4. 1. Prefix dan Subnet Mask
Error! Bookmark not defined. 2. 4. 2. Gateway
BAB III PERANCANGAN
Error! Bookmark not defined.
3. 1. 1. 1. Active Thread ... 13
3. 1. 1. 2. Passive Thread ... 16
3. 1. 2. Realisasi Sistem Error! Bookmark not defined. 3. 1. 2. 1. Node ... 18 Error! Bookmark not defined. 4. 1. 1. 1. Telnet ... 34
4. 1. 1. 3. Analisa Perbandingan Telnet dengan SSH ... 35
4. 1. 2. Pembentukan Graph Error! Bookmark not defined. 4. 1. 2. 1. Pengacakan Urutan ... 37
BAB V KESIMPULAN DAN SARAN ... 60
DAFTAR GAMBAR
Gambar 2. 1. Raspberry Pi 3 model B ... 4
Gambar 2. 2. Routerboard Mikrotik ... 10
Gambar 2. 3. Router Linksys WRT310n ... 10
Gambar 2. 4. Mekanisme SSH ... 11
Gambar 3.1. Gambaran Sistem ... 12
Gambar 3. 2. Diagram Alir Active Thred ... 14
Gambar 3. 3. Diagram Alir Pemilihan Tetangga ... 15
Gambar 3. 4. Diagram Alir Passive Thread ... 16
Gambar 3. 5. Realisasi Sistem ... 18
Gambar 3. 6. Tampilan aplikasi SDFormatter ... 19
Gambar 3. 7. Tampilan aplikasi Win32DiskImager ... 19
Gambar 3. 8. File dhcpcd.conf ... 20
Gambar 3. 9. Pemasangan Library Paramiko ... 21
Gambar 3. 10. File Hasil Telnet Router ... 25
Gambar 3. 11. File Hasil SSH Router ... 25
Gambar 3. 12. File Hasil Saringan ... 27
Gambar 3. 13. Isi File tabelGraph ... 29
Gambar 3. 14. Tampilan Aplikasi Winbox ... 32
Gambar 3. 15. Tampilan Jendela Menu IP Addresses ... 33
Gambar 4. 1. Hasil Telnet Disimpan Dalam File ... 36
Gambar 4. 2. Hasil SSH Disimpan Dalam File ... 36
Gambar 4. 3. Tampilan Active Thread pada Node 3 ... 38
Gambar 4. 4. Tampilan Passive Thread pada Node 1 ... 38
Gambar 4. 5. Tampilan Active Thread pada Node 1 ... 39
Gambar 4. 6. Tampilan Passive Thread pada Node 3 ... 39
Gambar 4. 7. Tampilan Active Thread pada Node 5 ... 40
Gambar 4. 8. Tampilan Passive Thread pada Node 3 ... 40
Gambar 4. 9. Tampilan Active Thread pada Node 4 ... 41
Gambar 4. 10. Tampilan Passive Thread pada Node 2 ... 41
Gambar 4. 11. Tampilan Active Thread pada Node 2 ... 42
Gambar 4. 12. Tampilan Passive Thread pada Node 5 ... 42
Gambar 4. 13. Graph Penghidupan Node Tanpa Proteksi Pemilihan Tetangga ... 43
Gambar 4. 14. Graph Penghidupan Node Dengan Proteksi Pemilihan Tetangga .... 43
Gambar 4. 15. Graph yang Terbentuk ... 48
Gambar 4. 16. Graph yang Terbentuk ... 48
Gambar 4. 17. Graph yang Terbentuk ... 52
Gambar 4. 18. Tampilan Node 1 Setelah Node 4 Dimatikan ... 52
Gambar 4. 19. Tampilan Node 2 Setelah Node 4 Dimatikan ... 53
Gambar 4. 20. Tampilan Node 3 Setelah Node 4 Dimatikan ... 53
Gambar 4. 21. Perubahan Bentuk Graph ... 54
Gambar 4. 22. Tampilan Node 4 Setelah Dihidupkan ... 54
DAFTAR TABEL
Tabel 2. 1. Tabel Pembagian Kelas IP address ... 8
Tabel 3. 1. Tabel Pembagian IP Address pada Sistem ... 17
Tabel 4. 1. Waktu yang Dibutuhkan untuk Telnet ... 34
Tabel 4. 2. Waktu yang Dibutuhkan untuk SSH ... 35
Tabel 4. 3. Urutan Untuk Menghidupkan Node ... 37
Tabel 4. 4. Hasil Pengujian Penghidupan Node Tanpa Proteksi Pemilihan Tetangga ... 44
Tabel 4. 5. Hasil Pengujian Penghidupan Node Dengan Proteksi Pemilihan Tetangga ... 46
Tabel 4. 6. Hasil Pengujian Penghidupan Node Dengan Mode Otomatis ... 49
DAFTAR SINGKATAN
ARM Advanced RISC Machine
ARP Address Resolution Protocol
DHCP Dynamic Configuration Protocol
GB Gigabyte
HDMI High Definition Multimedia Interface
ID Identifier
IP Internet Protocol
LAN Local Area Network
MAC Media Access Control
RAM Random Access Memory
SD Secure Digital
SDHC Secure Digital High Capacity
SDXC Secure Digital Extended Capacity
SSH Secure Shell
DAFTAR KODE
Kode 2. 1. PseudocodeActive Thread dan Passive Thread ... 7
Kode 3. 1. Mengatur IP Address secara static ... 20
Kode 3. 2. Pemasangan Library Paramiko ... 21
Kode 3. 3. Tunggu Selama t Waktu dan Pemilihan Tetangga ... 22
Kode 3. 4. Telnet Router ... 22
Kode 3. 5. SSH Router ... 24
Kode 3. 6. Saring File routeroutput ... 26
Kode 3. 7. Proteksi Pemilihan Tetangga ... 27
Kode 3. 8. Acak IP Address ... 29
Kode 3. 9. Soket ... 29
Kode 3. 10. Siapkan Data dan Kirim ... 30
Kode 3. 11. Tunggu Balasan Tetangga ... 30
Kode 3. 12. Terima Data dan Perbarui Data ... 31
Kode 3. 13. Passive Thread ... 32