Network Change & Configuration Management

Reply
Accepted Solution

Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

hoppem
Techie
Posts: 12
7531     1

Hello,

i can not run "Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @".

 

Example:

conf t
macro name ConfFreePort
default int $int
int $int
shut
power inline never
desc FREE
no snmp trap link-status
no lldp transmit
no lldp receive
no cdp enable
end
sh run interf $int
@
end

I get this error:

*** Timeout waiting for device ***
 DERON1014-1#conf t 
 Enter configuration commands, one per line.  End with CNTL/Z. 
 DERON1014-1(config)#macro name ConfFreePort 
 Enter macro commands one per line. End with the character '@'. 
 exit 

 

who can help me ?

 

Martin

 

 

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

Expert
Posts: 50
7531     1

Hello Martin,

 

please try to escape the "@" Sign

 

.
.
sh run interf $int \@ end

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

hoppem
Techie
Posts: 12
7531     1

Sorry MPL,

 

your tip with "\@" is not working.

 

I get the same error message:

*** Timeout waiting for device ***
 DERON1014-1#conf t 
 Enter configuration commands, one per line.  End with CNTL/Z. 
 DERON1014-1(config)#macro name ConfFreePort 
 Enter macro commands one per line. End with the character '@'. 
 exit 

 

 

Consider when i execute in the conf t mode

macro name ConfFreePort 

The problem is not the "@" rather the Timeout.

I get a line with "Enter macro commands one per line. End with the character '@'."

 

And then i think netmri is waiting and is going in a Timeout.

This is the sam as going in the configg mode "conf t"

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

Adviser
Posts: 357
7531     1
For things that don’t use a standard prompt that NetMRI will recognize and/or don’t put a newline before the prompt, you can ”pre-emptively” send a newline with \r. So, when you run the command you know is going to ask this question, try putting a \r after it.

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

hoppem
Techie
Posts: 12
7531     1
Hi,

the tip doesn’t solve the problem.

“conf t
macro name ConfFreePort
\r
default int $int
int $int
shut
power inline never
desc FREE
no snmp trap link-status
no lldp transmit
no lldp receive
no cdp enable
end
sh run interf $int
\@
End”

--
Martin Hoppe

Networkadmin
Network&Security


KATHREIN-Werke KG
Anton-Kathrein-Str. 1-3
83022 Rosenheim, Germany

Phone: +49 8031 184-7370

E-Mail: martin.hoppe@kathrein.de
Internet: http://www.kathrein.com

--
Registergericht / Register Court: Amtsgericht Traunstein, HRA 460 / Local Court Traunstein, registered under HRA 460
vertreten durch / authorized representative: Anton Kathrein

This e-mail is confidential and may contain privileged information. If you have received this communication in error, please notify us immediately by responding to this email and then delete it from your system. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. We believe but do not warrant that this e-mail and any attachments are virus free. You must therefore take full responsibility for virus checking.

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

Adviser
Posts: 407
7531     1

try this:

conf t
macro name ConfFreePort\r
default int $int
int $int
shut
power inline never
desc FREE
no snmp trap link-status
no lldp transmit
no lldp receive
no cdp enable
end
sh run interf $int
\@
end\r

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

hoppem
Techie
Posts: 12
7531     1

Hello SBaksh,

 

your tip did not help.

 

Every i get this Process Log entry:

*** Timeout waiting for device ***
 DERON2001-1#conf t 
 Enter configuration commands, one per line.  End with CNTL/Z. 
 DERON2001-1(config)#macro name ConfFreeTest 
 Enter macro commands one per line. End with the character '@'. 
 exit 
Highlighted

Re: Run Ad Hoc Command Job on CISCO IOS-XE - command macro with @

Adviser
Posts: 62
7531     1

Worth a try

 

conf t
macro name ConfFreePort\rdefault int $int\rint $int\rshut\rpower inline never\rdesc FREE\rno snmp trap link-status\rno lldp transmit\rno lldp receive\rno cdp enable\rend\rsh run interf $int\r@\rend

 

 

In short, queue the commands in a single string using \r


Showing results for 
Search instead for 
Do you mean 

Recommended for You