Junos Space Developer
Reply
Contributor
satish.mane@techmahindra.com
Posts: 54
Registered: ‎07-26-2011
0

commit script changes failed error

Hi,

I am trying to configure simple full-mesh L3 VPN. For this, I am writing XSLT to upload the configuration. Here I am facing problem to add routing-instance and community through XSLT. I am able to do other configurations such as adding protocols, policies etc. I need to generate below configuration for PE router

 

[edit]

routing-instance {

VPN-A-Paris-Munich {

vrf-import VPN-A-import;

vrf-export VPN-A-export;

}

VPN-B-Madrid {

vrf-import VPN-B-import;

vrf-export VPN-B-export;

}

}

 

policy-statement VPN-A-export {

term a {

from protocol static;

then {

community add VPN-A;

accept;

}

}

term b {

then reject;

}

}

 

I am attaching the XSLT for above configuration. Please check and let me know why I am getting "commit script changes failed error" while trying to add routing-instance and community.

Super Contributor
vimala.srinivasa
Posts: 209
Registered: ‎10-07-2010
0

Re: commit script changes failed error

Hi Satish,

 

      We are on some discussion internally on this regarding the design of application assigned to TechM. I will update you on this ASAP.  

 

 

 

Thanks,

 

Vimala.

Super Contributor
vimala.srinivasa
Posts: 209
Registered: ‎10-07-2010
0

Re: commit script changes failed error

Hi Satish,

 

    You havent configured the AS target id's.  Please go through the below link which provides a sample configuration to configure full mesh L3VPN the PE.

 

 

http://www.juniper.net/techpubs/software/junos/junos93/swconfig-vpns/configuring-vpn-policy-on-the-p... 

 

 

Regards,

 

Vimala.

Contributor
satish.mane@techmahindra.com
Posts: 54
Registered: ‎07-26-2011
0

Re: commit script changes failed error

Hi Vimala,

 

Yes the target ids are there in our main script. I had copied only the settings in previous post that do not work. Please find attached full script.  In this script, last two configuration are having problem that are below. We are testing these configuration on Juniper router having  JunosOS 10.0R3.10 version. Is there any problem with JunosOS version.?

 

community>
                                <add>
                                    <xsl:variable name="comName" select="'VPN-A'"/>
                                    <xsl:value-of select="$comName"/>
                                </add>
                            </community>

 

<routing-instances>
                    <xsl:variable name="vpnName" select="'VPN-A-Paris'"/>
                    <xsl:value-of select="$vpnName"/>
                    <vrf-import>
                        <xsl:variable name="impName" select="'VPN-A-import'"/>
                        <xsl:value-of select="$impName"/>
                    </vrf-import>
            </routing-instances>

Super Contributor
vimala.srinivasa
Posts: 209
Registered: ‎10-07-2010
0

Re: commit script changes failed error

Hi Satish,

 

    Below are the detailed steps.

 

1)      Create a XLST script and save *.xls script

2)      Do a SFTP to the router and copy the file the /var/db/scripts/commit

3)      And go enable prompt of router #set system scripts file <filename.slax>

4)      Load merge terminal

5)      Copy, paste your configuration of XLST, press enter and then ctrl+d

6)      It will load the configuration and will throws errors if you have any configuration errors.  

 

   Before doing this I recommend you understand the below

 

Commit scripts Simplify and enforce business rules to avert human errors and optimize network availability. They are not operated manually.

They are executed automatically when any configuration is committed on the device (that is when commit command is executed on the device)

        Commit Scripts are:

  • Run at commit time
  • Inspect the incoming configuration
  • Perform actions including
    • Failing the commit (self-defense)
    • Modifying the configuration (self-correcting)

 

They may be used to change the configuration but it is not a necessity. You can just emit a syslog on config change or just report an error etc. It depends on the use case.

 

Op scripts are used to Customize and streamline manual tasks . JUNOS op scripts automate network and router management and troubleshooting.. These are executed manually.

Op scripts are generally not used to make configuration changes.(  You can make the config changes if use case demands). All XML RPCs can be used in op script , so it doesn’t restrict anything.

 

Event scripts are for Automate reactive and proactive actions in response to network events. Event scripts initiate operational commands when triggered by an event policy. When an event policy is triggered, this policy forwards event details to the event script.

 

 

You may want to look at http://www.juniper.net/us/en/community/junos/script-automation/  (It has use cases , real examples , white papers , sample scripts as well) . 

Copyright© 1999-2013 Juniper Networks, Inc. All rights reserved.