pada posting ini saya akan mencontohkan fungsi dari IOS EEM--Embedded Event Manger, jika kita melakukan shutdown pada interface lo0, dengan fungsi EEM ini, interface lo0 akan bisa dengan automatically up kembali....
mari kita lihat example dari EEM....
di R1 kita buat dulu interface lo0, lalu kita ketik EEM commandnya :
R1#conf t
R1(config)#inter lo0
R1(config-if)#ip add 1.1.1.1 255
*Mar 1 00:03:14.971: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0,
changed state to u
R1(config-if)#ip add 1.1.1.1 255.255.255.255
R1(config-if)#event manager applet Lo0
R1(config-applet)#event syslog occurs 2 pattern "Loopback0, changed state to admin"
R1(config-applet)#action 1.0 syslog msg "testing shutdown loopback0 - automatic no shut sendiri"
R1(config-applet)#action 1.1 syslog msg "Lo0 down, automatic lo0 nyala lagi"
R1(config-applet)#action 1.2 cli command "enable"
R1(config-applet)#action 1.3 cli command "configure ter"
R1(config-applet)#action 1.4 cli command "int lo0"
R1(config-applet)#action 1.5 cli command "no shut"
R1(config-applet)#action 1.6 syslog msg "OK lo0 sudah aktif kembali"
R1(config-applet)#
R1(config-applet)#do sh run | s event
event manager applet Lo0
event syslog occurs 2 pattern "Loopback0, changed state to admin"
action 1.0 syslog msg "testing shutdown loopback0 - automatic no shut sendiri"
action 1.1 syslog msg "Lo0 down, automatic lo0 nyala lagi"
action 1.2 cli command "enable"
action 1.3 cli command "configure ter"
action 1.4 cli command "int lo0"
action 1.5 cli command "no shut"
action 1.6 syslog msg "OK lo0 sudah aktif kembali"
R1(config-applet)#end
R1#
R1#conf t
R1(config)#
R1(config-if)#inter lo0
R1(config-if)#no shu
R1(config-if)#no shutdown
R1(config-if)#
*Mar 1 00:05:57.531: %LINK-3-UPDOWN: Interface Loopback0, changed state to up
*Mar 1 00:05:58.531: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0,
changed state to up
R1(config-if)#end
R1#
*Mar 1 00:06:04.967: %SYS-5-CONFIG_I: Configured from console by console
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#inter lo0
R1(config-if)#shu
R1(config-if)#
*Mar 1 00:07:49.459: %LINK-5-CHANGED: Interface Loopback0, changed state to adm
inistratively down
*Mar 1 00:07:49.487: %HA_EM-6-LOG: Lo0: testing shutdown loopback0 - automatic
no shut sendiri
*Mar 1 00:07:49.487: %HA_EM-6-LOG: Lo0: Lo0 down, automatic lo0 nyala lagi
*Mar 1 00:07:49.963: %HA_EM-6-LOG: Lo0: OK lo0 sudah aktif kembali
*Mar 1 00:07:49.979: %SYS-5-CONFIG_I: Configured from console by vty0
*Mar 1 00:07:51.939: %LINK-3-UPDOWN: Interface Loopback0, changed state to up
R1(config-if)#do sh ip inter bri
% Ambiguous command: "do sh ip inter bri"
R1(config-if)#do sh ip inter bri
Interface IP-Address OK? Method Status Prot
ocol
FastEthernet0/0 unassigned YES unset administratively down down
FastEthernet0/1 unassigned YES unset administratively down down
Loopback0 1.1.1.1 YES manual up up
R1(config-if)#
dari sesi diatas dapat terlihat ketika interface lo0 di shutdown, maka interface lo0 tersebut akan otomatis no shut sendiri karena telah menggunakan applet EEM di Router ini...
sekian posting EEM ini...
Tidak ada komentar:
Posting Komentar