Button Bar to Load Script in SecureCRT

This time i will write about activate button bar to load script in secureCRT. The background i write this topic because a few days ago, we had an unmanaged Node (Metro Ethernet) which caused by fan modules failed. everybody expected the cause of this incident was power problems. unfortunately, no one checks the log which told the fan failed or malfunction, so that the temperature of working modules getting higher until reach 110 degree Celsius and causing the system off.

From that case, i tried to create a script to capture modules state and log of the system. I decided to use button bar and python script to make it works in secureCRT. so that, when the problem happen again, we just run the script to log what we want and analyze the log.

  1. Activate button bar in SecureCRT. right click in empty bar then check the “Button Bar”.
    1. Right click button bar
  2.  Right click in button bar then select “New Button…”
    2. New Button Bar
  3. Select “Run Script” function and browse the script which being saved.
    3. Load Script
  4. Login to a Node (I use Nokia 7750 SR-7 with SROS)
  5. Click the “Button” to run the script
    4. Run Script

After you click the button, the script will run automatically, make sure you already log the session you established.

sample script to capture module state in SROS with python for secureCRT:

crt.Dialog.MessageBox("Pastikan sudah me-log session ini")

crt.Screen.Send ("\show system information | match \"System Name\" " + "\r")
crt.Screen.WaitForString ("# ")
row = crt.Screen.CurrentRow
str5 = crt.Screen.Get(row-1, 25, row-1, 50).strip()

if (str5 == ": 7210 SAS-R6") or (str5 == ": 7210 SAS-M 24F 2XFP ET"):
crt.Screen.Send ("show system information | match Name " + "\r")
crt.Screen.WaitForString ("# ")
row = crt.Screen.CurrentRow
str5 = crt.Screen.Get(row-2, 28, row-2, 50).strip()

crt.Screen.Send ("show system information | match Type " + "\r")
crt.Screen.WaitForString ("# ")
row = crt.Screen.CurrentRow
str6 = crt.Screen.Get(row-1, 28, row-1, 50).strip()
else:
crt.Screen.Send ("show system information | match Type " + "\r")
crt.Screen.WaitForString ("# ")
row = crt.Screen.CurrentRow
str6 = crt.Screen.Get(row-1, 26, row-1, 50).strip()

if (str6 == "7705 SAR-8") or (str6 == "7705 SAR-8 v2"):
crt.Screen.Send ("show card | match Active " + "\r")
crt.Screen.WaitForString ("# ")
str7 = crt.Screen.Get(row-1,0 , row-1,3).strip()
else:
crt.Screen.Send ("show card | match active " + "\r")
crt.Screen.WaitForString ("# ")
str7 = crt.Screen.Get(row-1,0 , row-1,3).strip()

str8 = str7 + ":" + str5

crt.Screen.Send ("\show time" + "\r")
crt.Screen.WaitForString (str8 + "# ")
crt.Screen.Send ("\environment no more" + "\r")
crt.Screen.WaitForString (str8 + "# ")
crt.Screen.Send ("\show card state" + "\r")
crt.Screen.WaitForString (str8 + "# ")
crt.Screen.Send ("\show chassis" + "\r")
crt.Screen.WaitForString (str8 + "# ")
crt.Screen.Send ("\show system alarms" + "\r")
crt.Screen.WaitForString (str8 + "# ")
crt.Screen.Send ("\show log log-id 99" + "\r")
crt.Screen.WaitForString (str8 + "# ")
crt.Screen.Send ("\show log log-id 50" + "\r")
crt.Screen.WaitForString (str8 + "# ")

Instalasi Arista vEOS di GNS3

Sistem operasi switch Arista disebut “Extensible Operating System” atau disingkat EOS. Arista mendeskripsikan EOS sebagai “… interface antara switch dan software yang mengontrol switch dan mengatur network”. Arti dari Extensible sendiri adalah Capable of being Extended”. EOS didesain agar memungkinkan pengembangan add-ons dari pihak ketiga. 

Kali ini saya akan mencoba membahas untuk menginstall virtual EOS (vEOS) di GNS3. sebelumnya, berikut adalah beberapa informasi mengenai kebutuhan software dan hardware yang saya gunakan:

PC Requirement:

  • Ubuntu 16.04 64-bit
  • GNS3 2.0.1
  • Qemu

Virtual Machine Requirement:

  • 2048 MB RAM
  • IDE CD-ROM Drive  untuk mount file “Aboot-veos-2.0.8.iso”
  • 2GB flash IDE disk untuk file “vEOS-lab-4.15.9M-combined.vmdk”
  • NIC tipe e1000 (Intel Gigabit Ethernet)

File “Aboot-veos-2.0.8.iso” dan “vEOS-lab-4.15.9M-combined.vmdk” bisa didapatkan pada web Arista dimana sebelumnya anda perlu registrasi akun arista dan menyetujui agreement sebelum men-download kedua file tersebut. Masuk ke menu support dan pilih “Software Download” untuk mendapatkan file tersebut.

Berikut langkah-langkah instalasi vEOS di GNS3 :

  1. Buka aplikasi GNS3 lalu masuk ke menu : Edit>preferences…
  2. Pada Preference window pilih “Qemu VMs” lalu klik New.

    1. New Qemu VMs

  3. Isi nama deskripsi untuk virtual machine Qemu yang akan kita buat, lalu klik Next.

    2. Deskripsi Nama

  4. Pada menu Qemu Binary dan Memory, pilih Qemu binary dengan : “qemu-system-x86_64” dan RAM : 2048 MB. lalu klik Next.

    3. Qemu Binary & Memory

  5. Pilih telnet sebagai tipe console, kemudian klik Next.

    4. Tipe Console

  6. Pada menu idsk image, pilih “new imgae” dan masukan file “vEOS-lab-4.15.9M-combined.vmdk”. klik Finish.

    5. Disk Image

  7. Setelah selesai, pilih menu edit>HDD untuk memasukan file “Aboot-veos-2.0.8.iso” pada bagian “HDC (Secondary Master)”.

    6. HDC Secondary Master

  8. Masih pada Qemu VM Configuration, pilih tab Network, kemudian isi adapter menjadi 8. hal ini akan menyebabkan jumlah interface yang terdapat pada vEOS ada 7 Interface dan 1 interface management.

    7. Adapter

  9. Pilih tab advance setting dan tambahkan “-enable-kvm” pada Additional Setting>Options:. Lalu Klik OK.

    8. Additional Setting

  10. Kembali ke menu utama GNS3, drag Arista EOS ke workspace dan Start perangkat tersebut.

    9. Main GNS3

  11. Butuh waktu cukup lama untuk booting, setelah pernagkat selesai booting masukan user : admin (tanpa password)

localhost login: admin
localhost>

10. Show Interface

11. Show Version

Referensi :

  1. Doanhue, Gary A. 2012. “Arista Warrior : A Real-World Guide to Understanding Arista Switches and EOS”:O’Reilly Media, Inc
  2. http://brezular.com/2014/10/03/arista-veos-on-gns3/?utm_source=tuicool