So until now, we have seen How to add a L3VPN , how to modify parameter(s) on an existing L3VPN. On this page, we demonstrate how to decommission a VPN.
The general workflow is as below:
Here we need to alter our AddVRF template to accomodate for an extra variable 'Decommission' which when set to 'Y' will initiate the negation of CLI as shown below
#reload PE_CE_nets interface <Port_type><Slot_id>/<Port_id> |Decommission='Y'|no ip vrf forwarding <Vrf_name> \ no ip address <If_ip_N> <Net_mask> \ no service-policy input police \ shut |Decommission!='Y'|ip vrf forwarding <Vrf_name> \ ip address <If_ip_N> <Net_mask> \ service-policy input police \ no shut
Next we need to create a new Command Job with parameter below
Most of the lines in the Commands are self explanatory.
The Scenario: section now includes a flag Decommission with value 'Y' which informs the AddVRF template to execute the decommission block
The output from Evaluate button reveals following configuration will be pushed to the device
Now we need to clean up the database by removing the record for the Add L3VPN entry created by the Service Type during the Add phase