- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2013 06:17 AM
Hello
Scripting is really not my thing but I need a simple script which will effectively sit in the routers flash and do the following:
conf t
Interface range gix/0/x - x
no power inline
Im sure it fairly simple but looking at EEM and TcL makes me think the script is going to need to be pages long to acomplish this little task.
Cheers
Solved! Go to Solution.
- Labels:
-
EEM Scripting
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2013 07:13 AM
Hello,
From the post, I could understand when we need to execute those commands but dont know when to understand. Below EEM will configure the interfaces during the bootup.
event manager applet DISABLE_POWER_INLINE
event timer countdown time 1
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "interface range Gi1/0/1-48"
action 4.0 cli command "no power inline"
action 6.0 cli command "end"
action 7.0 syslog msg "******** POWER INLINE DISABLED ********"
Thanks & Regards,
Karthick Murugan
CCIE#39285
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2013 07:13 AM
Hello,
From the post, I could understand when we need to execute those commands but dont know when to understand. Below EEM will configure the interfaces during the bootup.
event manager applet DISABLE_POWER_INLINE
event timer countdown time 1
action 1.0 cli command "enable"
action 2.0 cli command "conf t"
action 3.0 cli command "interface range Gi1/0/1-48"
action 4.0 cli command "no power inline"
action 6.0 cli command "end"
action 7.0 syslog msg "******** POWER INLINE DISABLED ********"
Thanks & Regards,
Karthick Murugan
CCIE#39285
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2013 08:30 AM
Thanks, that works perfectly.
I used the line 'event none' as I wanted to call the event manually when I needed it
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2013 09:01 AM
I am really glad that the script serverd the purpose.Please rate the post if it really helped!
Thanks & Regards,
Karthick Murugan
CCIE#39285
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-12-2013 01:01 PM
I used the line 'event none' as I wanted to call the event manually when I needed it
You want to disable PoE manually? Then you can use switchport macro (not AUTO switchport macro).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-13-2013 01:40 AM
Hi Leo
Currently we want to call the command manually but once I have had a little read up on EEM or TCL, we will likely want the script to be called by an event being triggered. Ideally they want a TFTP server to copy a file in to the flash, the script checks every 5 minutes for the existance of the file and then executes the script. Programming and scripting is not my forte and im not even sure its possible.
Cheers
