cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
852
Views
0
Helpful
3
Replies

optional variables in sdwan cli template

TechnStuff
Level 1
Level 1

Is it possible to mark a variable as optional in sd-wan cli template?

Can we use variables in a local data policy? I want to apply an ACL to internet facing interface that only permits traffic to the internet facing IP only. Policy will be applied to the different sites with different IP at each site. I suppose one is to create a CLI template and define the ACL there with a variable and then bind it to the interface in interface template?

3 Replies 3

Padmanaban
Level 1
Level 1

 

I just followed this workaround: when you use CLI policy, have a complete line of a command as a variable. So, when you configure the device, use the exclamation mark (!) so that it is ignored in the config.

CLI Template:

interface {{IF Name}}
description {{Interface description}}
ip address {{IP-Addr}} {{Mask}}
{{ip mtu}}
{{ip tcp adjust-mss}}

Device Config:

GigabitEthernet0/0/2
Test
10.10.10.1
255.255.255.0
! Ignore MTU
ip tcp adjust-mss 1360

rmfalconer
Level 1
Level 1

In the CLI feature template, there's an option to create a variable. Capture.JPG Search option just above the CLI box. We use variables for several things in our CLI templates.

Johnson Li
Cisco Employee
Cisco Employee

Unfortunately, variables cannot be directly used within local data policies in Cisco SD-WAN. Local data policies require fixed values for configuration parameters at the time of creation.

But, it is possible to mark a variable as optional in an SD-WAN CLI template.

To do this, at the time you create a CLI temlate

1. you need to enclose the variable name with double curly braces or 2. you can choose the command and hit the [Create Variable] button on the right side.

 

If you find my reply solved your question or issue, kindly click the 'Accept as Solution' button and vote it as helpful.

You can also learn more about Cisco SD-WAN through our live Ask the Experts (ATXs) session. Check out the ATXs Resources [https://community.cisco.com/t5/networking-knowledge-base/cisco-dna-center-ask-the-experts-resources/ta-p/4394489] to view the latest schedule for upcoming sessions, as well as the useful references, e.g. online guides, FAQs.

Review Cisco Networking for a $25 gift card