cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
642
Views
0
Helpful
6
Replies

deploy a template to update domain name of all hostnames

Hi

Is it possible to deploy a template to update all domain hostnames of all Cisco devices?

i.e. current are 

hostname.domain.net

need to change to: hostname.domain.intranet

thanks!

2 Accepted Solutions

Accepted Solutions

Preston Chilcote
Cisco Employee
Cisco Employee

@josephbdelossantos This is a good excuse to use the builtin system variables (see the System Variables assistant in the template editor).  If you are using VTL, it might be something like:

 

#if ($__device.platformId.contains("N7"))
Do nexus stuff

#else

Do IOS stuff

#end

Keep in mind that Cat Center supports a limited number of Nexus platforms though.

 

View solution in original post

Preston Chilcote
Cisco Employee
Cisco Employee

That's a good point.  I didn't think that far ahead.  Why not just set the domain in Design->Network Settings.  Then you don't need a template at all.  Cat Center will know the necessary command for IOS vs NXOS.

 

View solution in original post

6 Replies 6

This video goes through the CLI Template Compliance feature that was introduced in Cisco DNA Center 2.3.3. This feature allows customers to standardize their network configuration using CLI templates, and track deviation/out-of-band changes to remain compliant.

yeah, I guess its just template hub with ip domain command.. works now! is there a way to expand the template to deploy

"ip domain name WORD" command to IOS devices and "IP DOMAIN-NAME  word" for nexus switches on the same template?

i.e. if DNA sees what platform it is it deploys the correct ip domain name syntax?

 

thanks!

 I believe so but it is necessary to check the NX-OS version. 

Preston Chilcote
Cisco Employee
Cisco Employee

@josephbdelossantos This is a good excuse to use the builtin system variables (see the System Variables assistant in the template editor).  If you are using VTL, it might be something like:

 

#if ($__device.platformId.contains("N7"))
Do nexus stuff

#else

Do IOS stuff

#end

Keep in mind that Cat Center supports a limited number of Nexus platforms though.

 

you are required to choose a software type and I don't see you can choose both IOS and NX-OS , how will this builtin system variables work? currently this is what I made using system variables assistant

#if ($__device.series.contains("Data Center Switches"))
ip domain-name XXXXXX

#else

ip domain name YYYYY

#end

Preston Chilcote
Cisco Employee
Cisco Employee

That's a good point.  I didn't think that far ahead.  Why not just set the domain in Design->Network Settings.  Then you don't need a template at all.  Cat Center will know the necessary command for IOS vs NXOS.