Configuring CGN on VSM involves several steps, as described in the "CGv6 on VSM: CGN / NAT44 Deployment Guide". NCCT (NAT Config Check tool) was developed to validate the CGN configuration and report the missing/wrong configs. This document shows two flavours of the same tool: a) EEM/Tcl script that should be installed on the router; b) shell script that can be run from any unix system.
The script logs into the router and checks for the different cgn instances configured on the router. The script then loops through the cgn instances and checks the following :
1) Checks the location under the cgn instance and makes sure if this is for VSM
2) Checks if the cgn ova is installed/activated on that VSM
3) Checks the serviceinfra configuration
4) For each vrf configured for NAT, it then checks if the vrf is defined and the serviceapps defined under the vrf do belong to the same vrf as in the config.
5) Appropriate error messages are displayed whenever the above checks fail.
NCCT EEM SCRIPT
Steps to execute EEM script:
Step 1:Create a directory scripts under harddisk: ------------------------------------------ cd harddisk: mkdir scripts
Copy the script to the asr9k ----------------------------- copy EEM script(EEM_NCCT.tcl) to harddisk:/scripts on the router.
Step2 :EEM user authentication:
Sat Mar 12 19:09:38.727 IST
RP/0/RSP1/CPU0:SRV_PE1(config)#event manager directory user policy harddisk:/scripts
RP/0/RSP1/CPU0: SRV_PE1(config)#aaa authorization eventmanagerdefault local
RP/0/RSP1/CPU0:SRV_PE1(config)#event manager policy EEM_NCCT.tcl username eem_user persist-time 3600 type user
Tue Mar 15 17:40:02.882 IST
RP/0/RSP1/CPU0:Mar 15 17:40:13.064 : eem_policy_dir: %HA-HA_EM-6-FMPD_POLICY_REG_SUCC : fh_reg_unreg_policy: Policy 'EEM_NCCT.tcl' registered successfully, by user eem_user, with persist time 3600 and type 1
RP/0/RSP1/CPU0:Mar 15 17:40:13.180 : config: %MGBL-CONFIG-6-DB_COMMIT : Configuration committed by user 'lab'. Use 'show configuration commit changes 1000000150' to view the changes.
RP/0/RSP1/CPU0:Mar 15 17:40:21.730 : config: %MGBL-SYS-5-CONFIG_I : Configured from console by lab
Step4: Verified script has registered successfully: