[j-nsp] apply-path and interface addresses

Erdem Sener erdems at gmail.com
Sat Sep 8 09:28:47 EDT 2007


Hey Pekka,

 The apply-path feature will only act as a regular expression and will
never alter your configuration, only expand itself dynamically based
on your current configuration  and the filtering you've configured.

 If you want to 'correct' your configuration based on certain
additional (custom) rulesets you have, commit scripts are what you're
after.

 The following might be a good start, if you're not already using it:

http://www.juniper.net/techpubs/software/junos/junos83/swconfig83-automation/html/commit-scripts-config.html

Cheers,
Erdem

On 9/8/07, Pekka Savola <pekkas at netcore.fi> wrote:
> Hi,
>
> I wonder what was wrong with my tests the first time (on 8.2R1)
> because none of these worked (didn't return anything), but now they
> do.  I could have sworn that I tested those exactly as written.
>
> These don't seem to allow doing 2.b) that I mentioned earlier but
> maybe it isn't the most important feature there.
>
> On Fri, 7 Sep 2007, Lei Zhang wrote:
> > Pekka Savola wrote:
> >> Apply-path is a nice feature, but for some reason it doesn't seem to
> >> work for interface addresses, e.g.:
> >>
> >> apply-path "interfaces lo0 unit 0 family inet address <*>";
> >>
> >>
> > This works for me. Use config mode command "show | display inheritance"
> > to see the result.
> >
> >> or:
> >> apply-path "interfaces <*> unit <*> family inet address <*>";
> >>
> >>
> > This works for me.
> >
> >> or:
> >> apply-path "interfaces <*> unit <*> family inet address <*>/32";
> >>
> >>
> > Try "interfaces <*> unit <*> family inet address <*/32>"
> > i.e. the pattern needs to be inside the angle brackets.
> >
> > Cheers,
> > Lei
> > _______________________________________________
> > juniper-nsp mailing list juniper-nsp at puck.nether.net
> > https://puck.nether.net/mailman/listinfo/juniper-nsp
> >
>
> --
> Pekka Savola                 "You each name yourselves king, yet the
> Netcore Oy                    kingdom bleeds."
> Systems. Networks. Security. -- George R.R. Martin: A Clash of Kings
> _______________________________________________
> 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