• Tidak ada hasil yang ditemukan

BAB V PENUTUP

5.2 Saran

Berdasarkan dari hasil penelitian analisis kinerja otomasi jaringan BGP menggunakan library Paramiko dan Napalm, maka saran yang diajukan untuk penelitian lebih lanjut mengenai topik ini,yaitu :

1. Penelitian selanjutnya diharapkan untuk mengkaji lebih banyak sumber maupun refrensi yang terkait dengan kinerja otomasi jaringan agar hasil penelitian lebih baik dan lebih lengkap lagi.

35

2. Penelitian selanjutnya diharapkan dapat diimplentasikan pada perangkat asli jaringan skala produksi.

36

DAFTAR PUSTAKA

[1] Ahmad, “Implementasi Routing Protocol Open Shortest Path First (OSPF) Pada Model Topology Ring,” vol. 8, no. 2, pp. 92–99, 2015.

[2] R. A. Wiryawan and N. R. Rosyid, “PENGEMBANGAN APLIKASI OTOMATISASI ADMINISTRASI JARINGAN BERBASIS WEBSITE MENGGUNAKAN BAHASA PEMROGRAMAN PYTHON,” vol. 10, no. 2, p. 12, 2019.

[3] “Bahasa Pemrograman Python : Pengertian, sejarah, kelebihan dan

kekurangan,” BAKTIKOMINFO, Sep. 02, 2019.

https://www.baktikominfo.id/id/informasi/pengetahuan/bahasa_pemrograma

n_python_pengertian_sejarah_kelebihan_dan_kekurangannya-954#:~:text=Pengertian%20Bahasa%20Pemrograman%20Python,untuk%20 memberikan%20tingkat%20keterbacaan%20syntax. (accessed Dec. 20, 2020).

[4] S. Xing, A. Huarng, X. Meng, and A. Bader, “On the Application of BGP Routing Views,” in 2011 International Conference of Information Technology, Computer Engineering and Management Sciences, Nanjing, Jiangsu, China, Sep. 2011, pp. 336–339. doi: 10.1109/ICM.2011.377.

[5] K. Nugroho, “Perbandingan Kinerja Library Paramiko dan Netmiko Dalam Pross Otomasi Jaringan,” vol. 5, no. 1, 2020.

[6] P. Mihăilă, T. Bălan, R. Curpen, and F. Sandu, “Network Automation and Abstraction using Python Programming Methods,” MACRo 2015, vol. 2, no.

1, pp. 95–103, Oct. 2017, doi: 10.1515/macro-2017-0011.

[7] S. U. Masruroh, A. Fiade, M. F. Iman, and Amelia, “Performance evaluation of routing protocol RIPv2, OSPF, EIGRP with BGP,” in 2017 International Conference on Innovative and Creative Information Technology (ICITech), Salatiga, Nov. 2017, pp. 1–7. doi: 10.1109/INNOCIT.2017.8319134.

[8] S. Muslimin, “Analisis Performansi Routing Broder Gateway Protokol (BGP) Pada Jaringan Ipv4 dan Ipv6,” vol. 4, no. 3, Sep. 2012.

[9] Skudou, “Network Automation (Otomasi Jaringan),” bagiinterest.medium, Desember 2020. https://bagiinterest.medium.com/network-automation-otomasi-jaringan-115ef45b45ac (accessed Dec. 20, 2020).

[10] Jithin Aby Alex, Network Automation Using Python 3 an Administrtors’s Handbook Edition 1, 1st ed. SMTEBOOKS, 2018.

[11] “Pendahuluan Python,” Belajarpython.

https://belajarpython.com/tutorial/apa-itu-python (accessed Dec. 20, 2020).

[12] A. Rosid Komarudin, Otomatisasi Administrasi Jaringan Dengan Script Python. Jasakom, 2018.

[13] Pratapworkmail, “Python – Install Paramiko on Windows and Linux,”

GeeksforGeeks, Aug. 11, 2020. https://www.geeksforgeeks.org/python-install-paramiko-on-windows-and-linux/

[14] M. Hanif, “NAPALM: Library Python Untuk Network Automation Dan

Programmability,” hanifmu.com, Mar. 19, 2018.

https://hanifmu.com/posts/napalm-library-python-untuk-network-automation-dan-programmability/

37

[15] H. Jusuf, “Penggunaan Secure Shell (SSH) Sebagai Sistem Komunikasi Aman Pada Web Ujian Online,” Oktober 2015, vol. 2, no. 2, pp. 75–84.

[16] Wardana, Belajar Pemrograman dan Hacking Menggunakan Python. PT Elex Media Komputindo, 2019.

[17] Edi S. Mulyanta, S.SI., Pengenalan Protokol Jaringan Wireless Komputer.

Penerbit Andi, 2005.

[18] R. Yoga, “Macam-macam Routing Protocol,” Diary Config, Jul. 31, 2017.

https://www.diaryconfig.com/2017/07/macam-macam-routing-protokol.html#:~:text=Di%20dalam%20Interior%20Gateway%20Protocol,v ector%20adalah%20%3A%20RIP%20dan%20EIGRP. (accessed Apr. 18, 2020).

[19] Tiphon, “Telecommunications and Internet Protocol Harmonization Over Networks (TIPHON); General aspects of Quality of Service (QoS).” Jun.

1999.

38

LAMPIRAN

A. Waktu Pengujian Library Paramiko

1. Konvergensi Library Paramiko Percobaan

Ke- R1 R2 R3 R4 R5 R6 R7 R8 Total Rata-rata

1 6,32 5,86 5,61 5,68 5,75 5,86 4,01 3,9 42,990 5,37375 2 6,09 5,63 5,65 5,71 5,6 5,69 3,87 3,85 42,090 5,26125 3 9,02 5,78 5,77 5,88 5,75 5,45 3,97 3,59 45,210 5,65125 4 6,45 5,58 5,6 5,71 5,66 5,64 3,78 3,53 41,950 5,24375 5 6,23 5,59 5,69 6,08 5,76 5,55 3,85 3,76 42,510 5,31375 6 6,61 5,58 5,76 5,9 6,09 5,72 3,72 3,64 43,020 5,3775 7 6,37 5,56 5,59 5,61 5,59 5,49 3,88 3,98 42,070 5,25875

R1-R4 R2-R3

1 5,374 274 273 14,570 1,624

2 5,261 164 166 8,015 1,694

3 5,651 167 169 5,011 1,447

4 5,244 172 170 5,051 0,323

5 5,314 170 169 4,276 1,578

6 5,378 170 166 5,507 0,336

7 5,259 204 173 12,167 3,174

8 5,321 171 174 20,771 1,803

9 5,501 178 173 7,581 1,077

10 5,343 167 176 18,787 1,691

Percobaan

Paramiko

SSH-Konvergensi

BGP-Konvergensi (s)

Throughput (Mbps) Delay (ms)

39

8 6,54 5,7 5,75 5,8 5,87 5,64 3,64 3,63 42,570 5,32125 9 6,65 5,59 6,3 5,75 5,81 6,03 3,98 3,9 44,010 5,50125 10 6,37 5,65 5,68 6,01 5,68 5,77 3,62 3,96 42,740 5,3425

2. Throughput Library Paramiko

3. Delay Library Paramiko

Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total

1 437 6,376 68,538 1203 171,91 6,998 1679 277,626 6,048 2465 372,535 6,617 3256 470,487 6,920 4066 553,203 7,350 4522 635,31 7,118 4952 709,967 6,975 116,564 14,5705 2 439 23,237 18,892 1199 162,652 7,372 1680 308,268 5,450 2461 401,345 6,132 3247 493,456 6,580 4022 578,461 6,953 4491 681,715 6,588 4684 761,264 6,153 64,119 8,0149 3 536 196,416 2,729 1287 275,748 4,667 1736 383,304 4,529 2531 464,283 5,451 3303 556,253 5,938 3605 645,94 5,581 4159 735,256 5,657 4767 860,498 5,540 40,092 5,0115 4 5313 1166,345 4,555 6269 1283,937 4,883 6720 1410,707 4,764 7539 1513,409 4,981 8326 1598,17 5,210 8744 1685,399 5,188 9590 1774,305 5,405 10027 1848,213 5,425 40,411 5,0514 5 472 215,033 2,195 1232 307,442 4,007 1692 436,527 3,876 2486 593,95 4,186 3281 704,881 4,655 4073 800,838 5,086 4546 887,614 5,122 4983 980,779 5,081 34,207 4,2758 6 5439 1077,86 5,046 6195 1161,87 5,332 6653 1242,398 5,355 7454 1339,117 5,566 8259 1454,285 5,679 9048 1571,333 5,758 9514 1670,03 5,697 9955 1770,235 5,624 44,057 5,5071 7 10410 1869,381 5,569 11172 1961,491 5,696 11630 2122,995 5,478 12431 2225,187 5,586 809 15,872 50,970 1594 118,659 13,433 2361 442,584 5,335 2803 531,785 5,271 97,338 12,1673 8 3255 621,442 5,238 4015 709,906 5,656 4478 835,456 5,360 772 8,868 87,055 1580 120,144 13,151 2389 209,68 11,394 2865 415,367 6,898 419 13,336 31,419 166,169 20,7711 9 871 96,144 9,059 1625 195,788 8,300 2088 282,748 7,385 2881 377,981 7,622 3657 516,374 7,082 4481 604,501 7,413 4928 699,732 7,043 5374 796,514 6,747 60,650 7,5813 10 443 5,139 86,204 1195 90,941 13,140 1661 177,235 9,372 2451 276,027 8,880 3258 373,09 8,732 4042 472,023 8,563 4511 572,39 7,881 4951 657,996 7,524 150,296 18,7870

Percobaan ke- R6 R7 R8

Total Rata-rata

R1 R2 R3 R4 R5

Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total

1 437 2,581 0,0059 1203 2,117 0,0018 1679 2,596 0,0015 2465 2,896 0,0012 3256 2,847 0,0009 4066 2,818 0,0007 4522 2,705 0,0006 4952 2,170 0,0004 0,0130 0,0016 1,624

2 439 2,852 0,0065 1199 2,116 0,0018 1680 2,738 0,0016 2461 2,830 0,0011 3247 3,042 0,0009 4022 2,789 0,0007 4491 2,560 0,0006 4684 1,47596 0,0003 0,0136 0,0017 1,694

3 536 2,944 0,0055 1287 2,214 0,0017 1736 2,327 0,0013 2531 2,839 0,0011 3303 2,705 0,0008 3605 2,003 0,0006 4159 0,764 0,0002 4767 1,640 0,0003 0,0116 0,0014 1,447

4 5313 1,834 0,0003 6269 2,122 0,0003 6720 2,464 0,0004 7539 2,951 0,0004 8326 3,045 0,0004 8744 2,550 0,0003 9590 2,466 0,0003 10027 2,301 0,0002 0,0026 0,0003 0,323

5 472 2,515 0,0053 1232 2,248 0,0018 1692 2,619022 0,0015 2486 2,878 0,0012 3281 3,091 0,0009 4073 3,032 0,0007 4546 2,706 0,0006 4983 2,386 0,0005 0,0126 0,0016 1,578

6 5439 2,367 0,0004 6195 2,132 0,0003 6653 2,330 0,0004 7454 2,872 0,0004 8259 3,331 0,0004 9048 2,643 0,0003 9514 2,384 0,0003 9955 2,264 0,0002 0,0027 0,0003 0,336

7 10410 2,382 0,0002 11172 2,15198 0,0002 11630 2,316 0,0002 12431 2,848 0,0002 809 2,917 0,0036 1594 2,527 0,0016 2361 43,73418 0,0185 2803 2,323 0,0008 0,0254 0,0032 3,174

8 3255 2,421 0,0007 4015 2,125 0,0005 4478 2,378 0,0005 772 2,548 0,0033 1580 2,873 0,0018 2389 2,826 0,0012 2865 2,358 0,0008 419 2,303 0,0055 0,0144 0,0018 1,803

9 871 2,371 0,0027 1625 2,104 0,0013 2088 2,660 0,0013 2881 2,971 0,0010 3657 2,512 0,0007 4481 3,135 0,0007 4928 2,282 0,0005 5374 2,375 0,0004 0,0086 0,0011 1,077

10 443 2,523 0,0057 1195 2,179 0,0018 1661 3,187974 0,0019 2451 3,300 0,0013 3258 3,225 0,0010 4042 2,778 0,0007 4511 2,697 0,0006 4951 2,329 0,0005 0,0135 0,0017 1,691

R5

40 B. Waktu Pengujian Library Napalm

1. Konvergensi Library Napalm Percobaan

Ke- R1 R2 R3 R4 R5 R6 R7 R8 Total

Rata-rata 1 7,66 6,91 7,12 7,75 7,09 7,61 7,55 6,96 58,650 7,331 2 8,09 8,28 8,84 8,79 8,95 9,02 8,83 8,93 69,730 8,716 3 10,01 7,87 8,66 8,77 9,13 8,92 8,64 9,23 71,230 8,904 4 9,7 7,53 9,39 8,92 9,54 9,25 9,59 10,39 74,310 9,289 5 9,77 11,62 9,02 8,87 9,58 8,74 8,82 8,78 75,200 9,400 6 9,33 12,15 12,23 12,41 11,69 11,95 12,02 11,59 93,370 11,671 7 7,22 6,59 6,52 7,17 6,66 6,78 6,41 6,49 53,840 6,730 8 7,38 6,48 6,43 12,98 6,44 6,58 6,42 6,4 59,110 7,389 9 7,27 6,68 6,28 6,74 6,37 6,55 6,27 6,59 52,750 6,594 10 7,68 6,81 6,95 6,77 7,15 8,56 6,12 6,91 56,950 7,119

R1-R4 R2-R3

1 7,331 239 213 50,938 11,058

2 8,716 191 195 32,779 13,288

3 8,904 196 196 49,503 14,827

4 9,289 198 202 34,483 14,847

5 9,400 241 218 39,322 13,732

6 11,671 196 198 52,601 9,707

7 6,730 190 191 30,473 10,717

8 7,389 198 198 60,344 10,162

9 6,594 197 199 59,971 10,570

10 7,119 188 191 49,287 12,545

Percobaan SSH-Konvergensi

BGP-Konvergensi (s)

Throughput (Mbps) Delay (ms)

41 2. Throughput Library Napalm

3. Delay Library Napalm

Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total Data Waktu Total

1 1109 48,712 22,76646 1409 16,755 84,0943 1145 14,476 79,09644 1570 21,712 72,31024 1555 31,444 49,453 1558 27,491 56,67309 1181 24,014 49,17965 1157 26,669 43,3837 407,504 50,938 2 555 9,102 60,97561 553 19,407 28,49487 560 23,589 23,73988 555 10,965 50,6156 544 6,58 82,67477 556 15,197 36,58617 571 19,103 29,89059 564 17,666 31,92573 262,228 32,779 3 563 8,786 64,07922 540 7,882 68,51053 560 9,229 60,6783 567 9,112 62,22564 572 15,827 36,14077 567 17,534 32,33717 574 7,048 81,44154 568 21,232 26,75207 396,024 49,503 4 566 11,397 49,66219 536 7,808 68,64754 573 17,461 32,81599 577 20,49 28,16008 570 16,97 33,58869 565 26,275 21,50333 561 13,74 40,82969 464 13,55 34,24354 275,862 34,483 5 368 4,034 91,22459 366 23,416 15,63034 565 9,107 62,04019 566 16,429 34,45128 42 14,516 2,893359 560 12,18 45,97701 563 26,177 21,50743 561 12,825 43,74269 314,574 39,322 6 1080 12,709 84,97915 1464 15,472 94,62254 1081 29,166 37,0637 1457 22,675 64,25579 1479 12,689 116,5576 1473 24,505 60,11018 1095 30,436 35,97713 1090 24,884 43,80325 420,812 52,601 7 538 7,625 70,55738 537 17,456 30,76306 528 17,609 29,98467 547 25,985 21,05061 533 8,827 60,38292 539 17,709 30,4365 536 19,937 26,88469 543 15,922 34,10376 243,781 30,473 8 532 7,821 68,02199 529 5,112 103,482 538 7,299 73,70873 533 5,164 103,2146 534 5,297 100,8118 537 11,108 48,34354 530 9,058 58,51181 537 19,547 27,47225 482,755 60,344 9 536 10,642 50,36647 528 5,344 98,8024 524 6,023 86,99983 534 5,281 101,1172 524 5,102 102,7048 546 7,34 74,38692 536 11,772 45,53177 554 24,557 22,55976 479,764 59,971 10 272 3,491 77,91464 537 7,274 73,82458 535 7,543 70,92669 532 5,23 101,7208 546 9,441 57,83286 545 24,778 21,99532 542 20,731 26,14442 539 24,756 21,7725 394,299 49,287 Total Rata-rata

Percobaan ke- R1 R2 R3 R4 R5 R6 R7 R8

Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total Data Delay Total

1 1109 14,509 0,0131 1409 13,163 0,0093 1145 14,427 0,0126 1570 14,633 0,0093 1555 14,468 0,0093 1558 14,727 0,0095 1181 14,916 0,0126 1157 14,729 0,0127 0,0885 0,0111 11,05771

2 555 8,840 0,0159 553 7,837 0,0142 560 6,776 0,0121 555 6,767 0,0122 544 6,527 0,0120 556 8,807 0,0158 571 6,978 0,0122 564 6,684 0,0119 0,1063 0,0133 13,28771

3 563 8,720 0,0155 540 7,838 0,0145 560 8,876 0,0159 567 9,055 0,0160 572 6,862 0,0120 567 9,138 0,0161 574 7,048 0,0123 568 9,317 0,0164 0,1186 0,0148 14,82744

4 566 9,078 0,0160 536 7,767 0,0145 573 9,306 0,0162 577 9,234 0,0160 570 7,109 0,0125 565 9,368 0,0166 561 9,139 0,0163 464 4,947 0,0107 0,1188 0,0148 14,84749

5 368 3,967 0,0108 366 3,711 0,0101 565 8,978 0,0159 566 8,959 0,0158 42 0,730 0,0174 560 9,018 0,0161 563 6,630 0,0118 561 6,710 0,0120 0,1099 0,0137 13,73177

6 1080 12,666 0,0117 1464 12,617 0,0086 1081 12,671 0,0117 1457 12,726 0,0087 1479 12,623 0,0085 1473 10,683 0,0073 1095 12,662 0,0116 1090 10,356 0,0095 0,0777 0,0097 9,706786

7 538 7,375 0,0137 537 5,176 0,0096 528 5,181 0,0098 547 7,419 0,0136 533 5,344 0,0100 539 5,380 0,0100 536 5,078 0,0095 543 5,178 0,0095 0,0857 0,0107 10,71749

8 532 5,285 0,0099 529 5,067 0,0096 538 7,253 0,0135 533 5,118 0,0096 534 5,250 0,0098 537 5,208 0,0097 530 5,092 0,0096 537 5,135 0,0096 0,0813 0,0102 10,16165

9 536 5,353 0,0100 528 5,304 0,0100 524 5,000 0,0095 534 5,231 0,0098 524 5,058 0,0097 546 7,267 0,0133 536 4,952 0,0092 554 7,196 0,0130 0,0846 0,0106 10,56989

10 272 3,450 0,0127 537 7,200 0,0134 535 5,145 0,0096 532 5,187 0,0098 546 7,405 0,0136 545 7,719 0,0142 542 7,408 0,0137 539 7,281 0,0135 0,1004 0,0125 12,54478

Rata-rata

42 4. Throughput Dengan Layanan Data

5. Delay Dengan Layanan Data

client 1- client 3 client 2-client 4 client 1- client 3 client 2-client 4

1 2939,901 2945,615 2946,611 2945,615

2 2939,933 2949,239 2939,901 2949,239

3 2942,450 2945,964 2939,933 2945,964

4 2942,399 2945,009 2942,450 2945,009

5 2942,234 2949,625 2942,399 2949,625

6 2947,106 2947,278 2942,234 2947,278

7 2945,587 2948,278 2947,106 2948,278

8 2945,613 2945,613 2945,587 2945,613

9 2944,674 2948,659 2945,613 2948,659

10 2943,651 2946,222 2944,674 2946,222

Total 2943,355 2947,150 2943,651 2947,150

Rata-rata 2,943 2,947 2,944 2,947

Automation Manual

Percobaan

Ke-client 1- Ke-client 3 client 2-client 4 client 1- client 3 client 2-client 4

1 0,062 0,052 0,060 0,052

2 0,059 0,052 0,062 0,052

3 0,060 0,049 0,059 0,049

4 0,062 0,050 0,060 0,050

5 0,060 0,052 0,062 0,052

6 0,061 0,049 0,060 0,049

7 0,059 0,050 0,061 0,050

8 0,060 0,050 0,059 0,050

9 0,060 0,049 0,060 0,049

10 0,060 0,051 0,060 0,051

Total 0,060 0,050 0,060 0,050

Rata-rata 60,182 50,499 60,172 50,499

Percobaan

Ke-Automation Manual

43 C. Konfigurasi Pada Router

R1(config)#int f0/0

R1(config-if)#ip add 10.10.10.2 255.255.255.240 R1(config-if)#no sh

R1(config-if)#exit

R1(config)#username laras secret proposal123 R1(config)#username laras privilege 15 R1(config)#ip domain-name telkom.com

R1(config)#crypto key generate rsa modulus 1024 R1(config)#line vty 0 4

R1(config-line)#transport input ssh R1(config-line)#login local

R1(config-line)#do wr R2(config)#int f0/0

R2(config-if)#ip add 10.10.10.3 255.255.255.240 R2(config-if)#no sh

R2(config-if)#exit

R2(config)#username laras secret proposal123 R2(config)#username laras privilege 15 R2(config)#ip domain-name telkom.com

R2(config)#crypto key generate rsa modulus 1024 R2(config)#line vty 0 4

R2(config-line)#transport input ssh R2(config-line)#login local

R2(config-line)#do wr R3(config)#int f0/0

R3(config-if)#ip add 10.10.10.4 255.255.255.240 R3(config-if)#no sh

R3(config-if)#exit

R3(config)#username laras secret proposal123 R3(config)#username laras privilege 15 R3(config)#ip domain-name telkom.com

R3(config)#crypto key generate rsa modulus 1024 R3(config)#line vty 0 4

R3(config-line)#transport input ssh R3(config-line)#login local

R3(config-line)#do wr R4(config)#int f0/0

R4(config-if)#ip add 10.10.10.5 255.255.255.240

44 R4(config-if)#no sh

R4(config-if)#exit

R4(config)#username laras secret proposal123 R4(config)#username laras privilege 15 R4(config)#ip domain-name telkom.com

R4(config)#crypto key generate rsa modulus 1024 R4(config)#line vty 0 4

R4(config-line)#transport input ssh R4(config-line)#login local

R4(config-line)#do wr R5(config)#int f0/0

R5(config-if)#ip add 10.10.10.6 255.255.255.240 R5(config-if)#no sh

R5(config-if)#exit

R5(config)#username laras secret proposal123 R5(config)#username laras privilege 15 R5(config)#ip domain-name telkom.com

R5(config)#crypto key generate rsa modulus 1024 R5(config)#line vty 0 4

R5(config-line)#transport input ssh R5(config-line)#login local

R5(config-line)#do wr R6(config)#int f0/0

R6(config-if)#ip add 10.10.10.7 255.255.255.240 R6(config-if)#no sh

R6(config-if)#exit

R6(config)#username laras secret proposal123 R6(config)#username laras privilege 15 R6(config)#ip domain-name telkom.com

R6(config)#crypto key generate rsa modulus 1024 R6(config)#line vty 0 4

R6(config-line)#transport input ssh R6(config-line)#login local

R6(config-line)#do wr R7(config)#int f0/0

R7(config-if)#ip add 10.10.10.8 255.255.255.240 R7(config-if)#no sh

R7(config-if)#exit

R7(config)#username laras secret proposal123

45 R7(config)#username laras privilege 15 R7(config)#ip domain-name telkom.com

R7(config)#crypto key generate rsa modulus 1024 R7(config)#line vty 0 4

R7(config-line)#transport input ssh R7(config-line)#login local

R7(config-line)#do wr R8(config)#int f0/0

R8(config-if)#ip add 10.10.10.9 255.255.255.240 R8(config-if)#no sh

R8(config-if)#exit

R8(config)#username laras secret proposal123 R8(config)#username laras privilege 15 R8(config)#ip domain-name telkom.com

R8(config)#crypto key generate rsa modulus 1024 R8(config)#line vty 0 4

R8(config-line)#transport input ssh R8(config-line)#login local

R8(config-line)#do wr

6. Program Menggunakan Library Paramiko import paramiko

import time def r1():

ip_address ="10.10.10.2"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 1.1.1.1 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.10.1 255.255.255.0\n")

46 conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.9.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 25\n")

conn.send ("neighbor 192.168.10.2 remote-as 35\n") conn.send ("network 1.1.1.1 mask 255.255.255.255\n") conn.send ("network 192.168.10.0 mask 255.255.255.0\n") conn.send ("network 192.168.9.0 mask 255.255.255.0\n") print("DONE")

time.sleep(1) r1()

def r2():

ip_address ="10.10.10.3"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 2.2.2.2 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.40.1 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.20.1 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/0\n")

conn.send("ip add 192.168.30.1 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/1\n")

conn.send("ip add 192.168.10.2 255.255.255.0\n")

47 conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 35\n")

conn.send ("neighbor 192.168.10.1 remote-as 25\n") conn.send ("neighbor 192.168.40.2 remote-as 35\n") conn.send ("neighbor 192.168.20.2 remote-as 35\n") conn.send ("neighbor 192.168.30.2 remote-as 35\n") conn.send ("network 2.2.2.2 mask 255.255.255.255\n") conn.send ("network 192.168.40.0 mask 255.255.255.0\n") conn.send ("network 192.168.20.0 mask 255.255.255.0\n") conn.send ("network 192.168.30.0 mask 255.255.255.0\n") conn.send ("network 192.168.10.0 mask 255.255.255.0\n") print("DONE")

time.sleep(1) r2()

def r3():

ip_address ="10.10.10.4"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 3.3.3.3 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.49.1 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.50.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 55\n")

48

conn.send ("neighbor 192.168.50.2 remote-as 35\n") conn.send ("network 3.3.3.3 mask 255.255.255.255\n") conn.send ("network 192.168.49.0 mask 255.255.255.0\n") conn.send ("network 192.168.50.0 mask 255.255.255.0\n") print("DONE")

time.sleep (1) r3()

def r4():

ip_address ="10.10.10.5"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 4.4.4.4 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.40.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.70.1 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/1\n")

conn.send("ip add 192.168.50.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/0\n")

conn.send("ip add 192.168.60.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 35\n")

conn.send ("neighbor 192.168.50.1 remote-as 55\n") conn.send ("neighbor 192.168.40.1 remote-as 35\n") conn.send ("neighbor 192.168.70.2 remote-as 35\n")

49

conn.send ("neighbor 192.168.60.2 remote-as 35\n") conn.send ("network 4.4.4.4 mask 255.255.255.255\n") conn.send ("network 192.168.50.0 mask 255.255.255.0\n") conn.send ("network 192.168.40.0 mask 255.255.255.0\n") conn.send ("network 192.168.70.0 mask 255.255.255.0\n") conn.send ("network 192.168.60.0 mask 255.255.255.0\n") print("DONE")

time.sleep (1) r4()

def r5():

ip_address ="10.10.10.6"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 5.5.5.5 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f2/1\n")

conn.send("ip add 192.168.30.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.60.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/0\n")

conn.send("ip add 192.168.80.1 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.90.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 35\n")

conn.send ("neighbor 192.168.30.1 remote-as 35\n")

50

conn.send ("neighbor 192.168.60.1 remote-as 35\n") conn.send ("neighbor 192.168.80.2 remote-as 35\n") conn.send ("neighbor 192.168.90.2 remote-as 65\n") conn.send ("network 5.5.5.5 mask 255.255.255.255\n") conn.send ("network 192.168.60.0 mask 255.255.255.0\n") conn.send ("network 192.168.30.0 mask 255.255.255.0\n") conn.send ("network 192.168.80.0 mask 255.255.255.0\n") conn.send ("network 192.168.90.0 mask 255.255.255.0\n") print("DONE")

time.sleep (1) r5()

def r6():

ip_address ="10.10.10.7"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 6.6.6.6 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.80.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/1\n")

conn.send("ip add 192.168.70.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f2/0\n")

conn.send("ip add 192.168.20.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.100.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

51 conn.send ("router bgp 35\n")

conn.send ("neighbor 192.168.20.1 remote-as 35\n") conn.send ("neighbor 192.168.70.1 remote-as 35\n") conn.send ("neighbor 192.168.80.1 remote-as 35\n") conn.send ("neighbor 192.168.100.2 remote-as 45\n") conn.send ("network 6.6.6.6 mask 255.255.255.255\n") conn.send ("network 192.168.20.0 mask 255.255.255.0\n") conn.send ("network 192.168.70.0 mask 255.255.255.0\n") conn.send ("network 192.168.80.0 mask 255.255.255.0\n") conn.send ("network 192.168.100.0 mask 255.255.255.0\n") print("DONE")

time.sleep (1) r6()

def r7():

ip_address ="10.10.10.8"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 7.7.7.7 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.100.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.101.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 45\n")

conn.send ("neighbor 192.168.100.1 remote-as 35\n") conn.send ("network 7.7.7.7 mask 255.255.255.255\n") conn.send ("network 192.168.101.0 mask 255.255.255.0\n")

52

conn.send ("network 192.168.100.0 mask 255.255.255.0\n") print("DONE")

time.sleep (1) r7()

def r8():

ip_address ="10.10.10.9"

username = "laras"

password = "proposal123"

ssh_client = paramiko.SSHClient()

ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy())

ssh_client.connect(hostname=ip_address,username=username,password=pass word)

print ("Login Sukses di {0}".format(ip_address)) conn = ssh_client.invoke_shell()

conn.send("conf t\n") conn.send("int lo0\n")

conn.send("ip add 8.8.8.8 255.255.255.255\n") conn.send("no sh\n")

conn.send("int f1/1\n")

conn.send("ip add 192.168.90.2 255.255.255.0\n") conn.send("no sh\n")

conn.send("int f1/0\n")

conn.send("ip add 192.168.89.1 255.255.255.0\n") conn.send("no sh\n")

time.sleep (1)

conn.send ("router bgp 65\n")

conn.send ("neighbor 192.168.90.1 remote-as 35\n") conn.send ("network 8.8.8.8 mask 255.255.255.255\n") conn.send ("network 192.168.89.0 mask 255.255.255.0\n") conn.send ("network 192.168.90.0 mask 255.255.255.0\n") print("DONE")

time.sleep (1) r8()

7. Program Menggunakan Library Napalm from napalm import get_network_driver

53

device = driver(hostname=host[0], username="laras", password="proposal123", optional_args=others)

device.open()

print ("Login Sukses di {0}".format(host[0])) device.load_merge_candate(filename=host[1]) print ("Load Success {0}".format(host[1])) device.commit_config()

print("Done") device.close()

8. Inventory Library Napalm hostname R1

interface Lo0

ip address 1.1.1.1 255.255.255.255 no shutdown

interface FastEthernet1/0

ip address 192.168.9.1 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.10.1 255.255.255.0 no shutdown

router bgp 25

neighbor 192.168.10.2 remote-as 35 network 1.1.1.1 mask 255.255.255.255

54 network 192.168.9.0 mask 255.255.255.0 network 192.168.10.0 mask 255.255.255.0 end

hostname R2

interface Lo0

ip address 2.2.2.2 255.255.255.255 no shutdown

interface FastEthernet2/1

ip address 192.168.10.2 255.255.255.0 no shutdown

interface FastEthernet2/0

ip address 192.168.30.1 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.40.1 255.255.255.0 no shutdown

interface FastEthernet1/0

ip address 192.168.20.1 255.255.255.0 no shutdown

router bgp 35

neighbor 192.168.10.1 remote-as 25 neighbor 192.168.40.2 remote-as 35 neighbor 192.168.20.2 remote-as 35 neighbor 192.168.30.2 remote-as 35 network 2.2.2.2 mask 255.255.255.255 network 192.168.10.0 mask 255.255.255.0 network 192.168.40.0 mask 255.255.255.0 network 192.168.20.0 mask 255.255.255.0 network 192.168.30.0 mask 255.255.255.0 end

hostname R3

interface Lo0

ip address 3.3.3.3 255.255.255.255

55 no shutdown

interface FastEthernet1/0

ip address 192.168.49.1 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.50.1 255.255.255.0 no shutdown

router bgp 55

neighbor 192.168.50.2 remote-as 35 network 3.3.3.3 mask 255.255.255.255 network 192.168.49.0 mask 255.255.255.0 network 192.168.50.0 mask 255.255.255.0 end

hostname R4

interface Lo0

ip address 4.4.4.4 255.255.255.255 no shutdown

interface FastEthernet2/1

ip address 192.168.50.2 255.255.255.0 no shutdown

interface FastEthernet2/0

ip address 192.168.60.1 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.70.1 255.255.255.0 no shutdown

interface FastEthernet1/0

ip address 192.168.40.2 255.255.255.0 no shutdown

router bgp 35

neighbor 192.168.50.1 remote-as 55 neighbor 192.168.40.1 remote-as 35

56 neighbor 192.168.70.2 remote-as 35 neighbor 192.168.60.2 remote-as 35 network 4.4.4.4 mask 255.255.255.255 network 192.168.50.0 mask 255.255.255.0 network 192.168.40.0 mask 255.255.255.0 network 192.168.70.0 mask 255.255.255.0 network 192.168.60.0 mask 255.255.255.0 end

hostname R5

interface Lo0

ip address 5.5.5.5 255.255.255.255 no shutdown

interface FastEthernet2/1

ip address 192.168.30.2 255.255.255.0 no shutdown

interface FastEthernet2/0

ip address 192.168.80.1 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.60.2 255.255.255.0 no shutdown

interface FastEthernet1/0

ip address 192.168.90.1 255.255.255.0 no shutdown

router bgp 35

neighbor 192.168.60.1 remote-as 35 neighbor 192.168.30.1 remote-as 35 neighbor 192.168.80.2 remote-as 35 neighbor 192.168.90.2 remote-as 65 network 5.5.5.5 mask 255.255.255.255 network 192.168.60.0 mask 255.255.255.0 network 192.168.30.0 mask 255.255.255.0 network 192.168.80.0 mask 255.255.255.0 network 192.168.90.0 mask 255.255.255.0 end

57 hostname R6

interface Lo0

ip address 6.6.6.6 255.255.255.255 no shutdown

interface FastEthernet2/1

ip address 192.168.70.2 255.255.255.0 no shutdown

interface FastEthernet2/0

ip address 192.168.20.2 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.80.2 255.255.255.0 no shutdown

interface FastEthernet1/0

ip address 192.168.100.1 255.255.255.0 no shutdown

router bgp 35

neighbor 192.168.20.1 remote-as 35 neighbor 192.168.70.1 remote-as 35 neighbor 192.168.80.1 remote-as 35 neighbor 192.168.100.2 remote-as 45 network 6.6.6.6 mask 255.255.255.255 network 192.168.20.0 mask 255.255.255.0 network 192.168.70.0 mask 255.255.255.0 network 192.168.80.0 mask 255.255.255.0 network 192.168.100.0 mask 255.255.255.0 end

hostname R7

interface lo0

ip address 7.7.7.7 255.255.255.255 no shutdown

interface FastEthernet1/0

ip address 192.168.101.1 255.255.255.0

58 no shutdown

interface FastEthernet1/1

ip address 192.168.100.2 255.255.255.0 no shutdown

router bgp 45

neighbor 192.168.100.1 remote-as 35 network 7.7.7.7 mask 255.255.255.255 network 192.168.101.0 mask 255.255.255.0 network 192.168.100.0 mask 255.255.255.0 end

hostname R8

interface Lo0

ip address 8.8.8.8 255.255.255.255 no shutdown

interface FastEthernet1/0

ip address 192.168.89.1 255.255.255.0 no shutdown

interface FastEthernet1/1

ip address 192.168.90.2 255.255.255.0 no shutdown

router bgp 65

neighbor 192.168.90.1 remote-as 35 network 8.8.8.8 mask 255.255.255.255 network 192.168.89.0 mask 255.255.255.0 network 192.168.90.0 mask 255.255.255.0 end