[j-nsp] EX interface-range and commit scripts

Sebastian Wiesinger juniper-nsp at ml.karotte.org
Tue Mar 20 07:24:23 EDT 2012


* Phil Shafer <phil at juniper.net> [2012-03-15 15:35]:
> Sebastian Wiesinger writes:
> >is there any way for a commit script running on the EX series to get
> >the configuration *after* interface-ranges are applied? Right now the
> >interface-range ist not expanded and the individual interface
> >configuration is not visible for the commit script. I can manually
> >display it with the "| display inheritance" cli option but I found no
> >way to do this in the commit script. I thought that interface ranges
> >are somewhat similar to groups but that doesn't seem to be the case.
> 
> The config that gets passed to a commit script should be post-inheritance,
> so interface ranges should be expanded.  Do you have an example of
> it failing?

Hi,

sorry for the late reply.

Yes I do have an example but as this is our live network I can't post
the full config here.

I did trace the commit script and in the trace log I see that the
config for the interfaces is not expanded and the interface-range
statements are still there. (I assume that the trace log would show
the expanded config?).

Here is an example from the trace file:

...

<interface-range>
<name>CUST-DMZ-PORT</name>
<member-range>
<name>ge-0/0/0</name>
<end-range>ge-0/0/3</end-range>
</member-range>
<description>customer DMZ</description>
<unit>
<name>0</name>
<family>
<ethernet-switching>
<port-mode>access</port-mode>
<vlan>
<members>CUST-DMZ</members>
</vlan>
</ethernet-switching>
</family>
</unit>
</interface-range>

...

<interface>
<name>ge-0/0/0</name>
<unit>
<name>0</name>
<family>
<ethernet-switching>
</ethernet-switching>
</family>
</unit>
</interface>

...



This is with EX4200 VC running 10.4R6.5. The commit script checks if
every active interface has a description and currently it emits a
warning for every interface, even if the description is set in the
interface-range for that interface.

Regards

Sebastian

-- 
GPG Key: 0x93A0B9CE (F4F6 B1A3 866B 26E9 450A  9D82 58A2 D94A 93A0 B9CE)
'Are you Death?' ... IT'S THE SCYTHE, ISN'T IT? PEOPLE ALWAYS NOTICE THE SCYTHE.
            -- Terry Pratchett, The Fifth Elephant


More information about the juniper-nsp mailing list