EEM Lab 1 : Konfigurasi Event Syslog

 LAB 1


Konfigurasikan IP Address dan routing OSPF pada kedua router.

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 syslog pattern "Interface FastEthernet0/0, changed state to 
down" 
R1(config-applet)#action 1.0 cli command "enable" 
R1(config-applet)#action 2.0 cli command "conf term" 
R1(config-applet)#action 3.0 cli command "interface fa0/0" 
R1(config-applet)#action 4.0 cli command "no shut" 

Script diatas berarti kalo ada log dengan tulisan seperti ini “Interface FastEthernet0/0, changed state to down" maka tolong tulis enable dan no shutdown interfacenya. Dan coba lakukan debug untuk melihat prosesnya. Lalu shutdown interface f0/0.

R1

R1#debug event manager action cli Debug EEM action cli debugging is on

R1(config)#interface f0/0 
R1(config-if)#shutdown 
R1(config-if)#exit 

Lihat hasil debug yang keluar, jika diperhatikan perangkat kita langsung menjalankan script untuk menghidupkan kembali interface f0/0.



Comments