Best practices for NCM device templates
Review the following best practices before modifying device templates.
-
Review several device templates and familiarize yourself with the command syntax before creating a new template.
-
Write down a list of all the commands you need to include in the new device template, including whether or not you have to press
Enter
after you type the command to ensure the device recognizes the command. -
Telnet to your device to find the pre-commands you need. A pre-command can be used for any device which requires input before prompting for credentials. A pre-command is used before logging in. For example, when you connect to a router and before you are asked for a password, you must press
Enter
to wake up the connection. Add the following line to the template:<Command Name="PreCommand" Value="${CRLF}"/>
-
Create a new device template by modifying an existing device template.
-
Before modifying a device template, make a copy of the original.
-
If you have a device that indicates enable mode with any character other than the
#
character, add the following line to the template:<Command Name="EnableIdentifier" Value="*"/>
, where*
is the character used to indicate the enable privilege level. -
Ensure that you do not have two command templates with the same System OID available for automatic assignment.
-
If the value for the Command Device Template field within the Node Details view is set to Auto Determine, NCM chooses the command template with the System OID value that is closest to the system OID of the device. For example, if the System OID for the device is 1.3.6.1.9.25.5.4, then NCM starts the search for a template that includes 1.3.6.1.9.25.5.4 as the System OID. If no template is found, NCM looks for a template with 1.3.6.1.9.25.5, and then 1.3.6.1.9.25, and so on. To be safe, use the full System OID when building templates.
-
To declare the ready prompt for your device, use the
VirtualPrompt
command to designate the prompt:<Command Name="VirtualPrompt" Value="unc-dsf%"/>
, whereunc-dsf%
is the prompt used by the device to designate it is ready for commands to be sent. You can use the Virtual Prompt to avoid an issue with special characters in banners. For example, to avoid NCM recognizing the#
character as an enable prompt. Ensure you use theMenuBased
command when using theVirtualPrompt
command:<Command Name="MenuBased" Value="false"/>
or<Command Name="MenuBased" Value="true"/>
. -
Device such as VPN concentrators might require a null value for the
Reset
command to function properly. If you receive an Out of Range error, change the value of theReset
command from0
to blank ( ). For example,<Command Name="RESET" Value=""/>
.