Skip to main content

Posts

Automation With Paramiko

  Automation With Paramiko Network automation menurut Techopedia adalah proses mengotomasi konfigurasi, manajemen, dan operasi jaringan komputer. Ini juga merupakan metodologi yang digunakan untuk mengotomasi proses jaringan. Biasanya digunakan oleh perusahaan dan penyedia layanan atau service provider untuk meningkatkan efisiensi dan mengurangi kesalahan manusia dan biaya operasi. Network automation memainkan peran kunci dalam network virtualization, network orchestration, dan juga jaringan yang ditentukan oleh perangkat lunak (software-defined networking).  Automasi dapat diterapkan dalam beberapa tipe jaringan yaitu termasuk data center network, wide area network (WANs), wireless network, local area network (LANs), dan cloud networks. Intinya, sumber daya jaringan apa pun yang dikontrol melalui application programming interface (API) maupun command-line interface (CLI) dapat diautomasi.  Menurut Margaret Rouse dalam artikelnya menyebutkan bahwa ada tiga manfaat utama d...

Automation With Paramiko

  Automation With Paramiko Kita buat sebuah script pyton sederhana menggunakan python untuk melakukan konfigurasi dasar pada router. Ubuntu root@NetworkAutomation-1:~# nano paramiko1.py root@NetworkAutomation-1:~# cat paramiko1.py import paramiko import time ip_address = "192.168.10.2" username = "cisco" password = "cisco123" ssh_client = paramiko.SSHClient() ssh_client.set_missing_host_key_policy(paramiko.AutoAddPolicy() ) ssh_client.connect (hostname=ip_address,username=username, password=password) print "Success login to {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") time.sleep(1) output = conn.recv(65535) print output ssh_client.close() Sekarang COBA JALANKAN PARAMIKO1.PY Ubuntu root@NetworkAutomation-1:~# python paramiko1.py Success login to 192.168.10.2 R1#conf t Enter configuration commands, oneper line.End wit...

Konfigurasi Scheduling Events

  Konfigurasi Scheduling Events   R1 R1(config)#event manager applet BACKUP_BERKALA R1(config-applet)# event timer watchdog time 60 R1(config-applet)# action 1.0 cli command "enable" R1(config-applet)# action 2.0 cli command "write memory" R1(config-applet)# action 3.0 syslog priority informational msg "Configuration has been saved" R1(config-applet)# exit R1(config)# cek dengan debug selesai

Konfigurasi Event OSPF Adjacency (Email)

  Konfigurasi Event OSPF Adjacency (Email) LAB INI LANJUTAN SAMA SEPERTI LAB SEBELUM SEBELUMNYA Selain event syslog tadi kita juga bisa memanfaatkan EEM ini untuk mengirimkan informasi ke email kita, misalnya OSPF kita down maka, router kita otomatis akan mengirimkan debug ospf ke email kita. Untuk topology masih sama. KONFIG R1 R1(config)#event manager applet OSPF_DOWN R1(config-applet)#event syslog pattern "Nbr 2.2.2.2 on FastEthernet0/0 from FULL to DOWN" R1(config-applet)#action 1.0 cli command "enable" R1(config-applet)#action 2.0 cli command "debug ip ospf adj" R1(config-applet)#action 3.0 mail server "smtp.gmail.com" to "uuqeili@gmail.com" from "R1@idn.id" subject "OSPF IS DOWN" body "Please fix OSPF" R1(config-applet)#exit Untuk Pengecekkan, kita bisa coba debug aja,  dan hapus EEM interface down,  Dan kita bisa lihat di email kita apa hasilnyaa... selesai

Event Syslog

  Event Syslog Konfigurasi Event Syslog Konfigurasikan IP Address dan routing OSPF pada kedua route r R1 R1(config)# interface f0/0 R1(config-if)# ip address 12.12.12.1 255.255.255.0 R1(config-if)# no shutdown R1(config-if)# exit ! R1(config)# interface loopback0 R1(config-if)# ip address 1.1.1.1 255.255.255.255 R1(config-if)# exit ! R1(config)# router ospf 10 R1(config-router)# network 1.1.1.1 0.0.0.0 area 0 R1(config-router)# network 12.12.12.0 0.0.0.255 area 0 R1(config-router)# exit R2 R2(config)# interface f0/0 R2(config-if)# ip address 12.12.12.2 255.255.255.0 R2(config-if)# no shutdown R2(config-if)# exit ! R2(config)# interface loopback0 R2(config-if)# ip address 2.2.2.2 255.255.255.255 R2(config-if)# exit ! R2(config)# router ospf 10 R2(config-router)# network 2.2.2.2 0.0.0.0 area 0 R2(config-router)# network 12.12.12.0 0.0.0.255 area 0 R2(config-router)# exit Coba buat custom syslog dengan EEM R1 R1(config)#event manager applet INTERFACE_DOWN R1(config-applet)#event syslo...

Konfigurasi Event CLI

Konfigurasi Event CLI =LAB INI LANJUTAN DARI LAB SEBELUMNYA TOPOLOGI 1 R1(config)#event manager applet SHOW_INTERFACE_UP R1(config-applet)#event cli pattern "show ip interface brief" sync yes R1(config-applet)#action 1.0 cli command "enable" R1(config-applet)#action 2.0 cli command "show ip interface brief | include up" R1(config-applet)#action 3.0 puts "$_cli_result" R1(config-applet)#action 4.0 set $_exit_status "0" SETELAH ITU BISA KALIAN CEK DENGAN DO SH IP INT BR 

GLBP (Gateway Load Balancing Protocol)

  GLBP (Gateway Load Balancing Protocol) Load balancing adalah sebuah konsep yang gunanya untuk menyeimbangkan beban atau muatan. Seperti itulah prinsip kerja dari Gateway Load Balancing Protocol (GLBP). Intinya adalah membagi kerja Router yang besarnya sama atau seimbang/balance. Gateway Load Balancing Protocol (GLBP) melindungi trafik data dari kerusakan router atau jalur data. GLBP melindungi trafik dengan cara routerrouternya diberi sebuah default gateway yang sama sedangkan yang membedakan pada virtual MACnya dari masing-masing router. Pada Gambar dibawah ini Router 5 sebagai router active, sedangkan router 6 berperan sebagai router standby apabila terjadi congesti. Sebuah router dipilih sebagai active router yang nantinya akan membawa paket melalui virtual IP address dalam group tersebut. KONFIG SEPERTI DIBAWAH INI R1 dan R2 default int f0/1 Konfigurasi di R1 R1 R1(config)#int Fa0/1 R1(config-if)#ip address 192.168.12.1 255.255.255.0 R1(config-if)#glbp 1 ip 192.168.12.254 R2 ...