[j-nsp] Configuration Groups question...

Erdem Sener erdems at gmail.com
Fri Apr 18 16:01:30 EDT 2008


Hi Stefan,

 Your groups configuration will match _all_ the interfaces at this
point already:

groups {
   Management {
       interfaces {
           <*> {

 What you're trying to do is possible via commit scripts, where you
can check for special condition/conditions
and take action (alter configuration) accordingly.

 http://www.juniper.net/techpubs/software/junos/junos90/swconfig-automation/commit-scripts.html#id-10077338

could be a good start to look..

HTH,
Erdem

On Fri, Apr 18, 2008 at 8:17 PM, Stefan Fouant <sfouant at gmail.com> wrote:
> Does anyone know if I can use Regular Expressions to match on a
>  particular field in order to determine if I want to have the
>  apply-group settings apply to a particular object?  For example, if I
>  had several interfaces in my system which had "Transit" in their
>  description, could I do match on this in order to apply my settings?
>
>  The reason I'd like to do this is so I can apply the config-group at
>  the root or interfaces level of the configuration hierarchy and have
>  it apply to those interfaces which match a certain description, as
>  opposed to having to go into each Transit interface and manually set
>  the appropriate apply-group, as in the following:
>
>  groups {
>     Management {
>         interfaces {
>             <*> {
>                 description <.*Transit>;
>                 unit <*> {
>                     family inet {
>                         filter {
>                             output transit-out-filter;
>                         }
>                     }
>                 }
>             }
>         }
>     }
>  }
>  interfaces {
>     apply-groups Management;
>     fe-0/0/0 {
>         description "Type:Transit|Ctype:FE";
>         unit 0 {
>             family inet {
>                 address 11.11.11.1/32;
>             }
>         }
>     }
>  }
>
>  I tried this on a lab router and it crashed the box!  :)  Anyone else
>  have luck doing something along these lines?  Thanks in advance,
>
>  Stefan Fouant
>  _______________________________________________
>  juniper-nsp mailing list juniper-nsp at puck.nether.net
>  https://puck.nether.net/mailman/listinfo/juniper-nsp
>


More information about the juniper-nsp mailing list