Log in to ask questions, share your expertise, or stay connected to content you value. Don’t have a login? Learn how to become a member.
See matching posts in thread - I want to change the Interface ...
See matching posts in thread - Change MX to regard all non-con...
See matching posts in thread - I have looked at "show interface terse" ...
The range script lets you issue select attributes on a range of interfaces on EX and MX...If the vlan specified to be placed on the interfaces does not exist in "vlans", the vlan will be created and the "vlan-id" will be added
Using configuration groups (such as 'interface-details' and 'cos-details' for example) with commit scripts can keep the details of any configuration expansions in the configuration database, where they can be more easily changed. See the document params #commitscript #interface #Slax #How-To
Description This script displays the logical-interface name, status, VLAN members, speed and duplex of the Ethernet switching-interfaces on the system. It is meant to provide similar output to the Cisco IOS command "show interface status"
2 Comments - I was able to execute this script on the older EX models running Legacy and it works perfectly
See matching posts in thread - Filter Based Forwarding to Specific Outgoing Int...
See matching posts in thread - Limit any traffic 10GB interface on...
Limit the Number of Channelized e1 Interfaces For SLAX version 1.0 and higher, you can use this script to limit the number of channelized e1 interfaces on a cstm1 interface to avoid contention issues with per-unit-schedulers
You can use configuration groups (such as ' interface-details ' and ' cos-details ' in this example) with commit scripts to retain the details of any configuration expansions in the configuration database, where you can change them more easily. Source Code and GitHub Links The source code below is also available from the following GitHub locations: params in Junoscriptorium on GitHub Example Configuration Example Output SLAX Script Contents XML Script Contents Example Configuration 01 system ( 02 scripts ( 03 commit ( 04 allow-transients; 05 file params.xsl; 06 ) 07 ) 08 ) 09 interfaces ( 10 so-1/2/3 ( 11 apply-macro params ( 12 clocking internal; 13 description "Link to Hoverville"; 14 encapsulation ppp; 15 inet-address 10.1.2.3/28; 16 isis-level-1 enable; 17 isis-level-1-metric 50; 18 isis-level-2-metric 85; 19 ) 20 ) 21 ) Example Output 01 system ( 02 scripts ( 03 commit ( 04 allow-transients; 05 file params.xsl; 06 ) 07 ) 08 ## Warning: missing mandatory statement(s): 'root-authentication' 09 ) 10 interfaces ( 11 so-1/2/3 ( 12 apply-groups interface-details; ## 'interface-details' is not defined 13 apply-macro params ( 14 clocking internal; 15 description "Link to Hoverville"; 16 encapsulation ppp; 17 inet-address 10.1.2.3/28; 18 isis-level-1 enable; 19 isis-level-1-metric 50; 20 isis-level-2-metric 85; 21 ) 22 description "Link to Hoverville"; 23 encapsulation ppp; 24 unit 0 ( 25 family inet ( 26 address 10.1.2.3/28; 27 ) 28 ) 29 ) 30 ) 31 protocols ( 32 rsvp ( 33 interface so-1/2/3.0; 34 ) 35 isis ( 36 interface so-1/2/3.0 ( 37 level 1 ( 38 enable; 39 metric 50; 40 ) 41 level 2 metric 85; 42 ) 43 ) 44 ldp ( 45 interface so-1/2/3.0; 46 ) 47 ) 48 class-of-service ( 49 interfaces ( 50 so-1/2/3 ( 51 apply-groups cos-details; ## 'cos-details' is not defined 52 ) 53 ) 54 ) SLAX Script Contents 001 /* Machine Crafted with Care (tm) by slaxWriter */ 002 version 1.0; 003 004 005 /* 006 - $Id: params.slax,v 1.1 2007/10/17 18:37:03 phil Exp $ 007 - 008 - Copyright (c) 2004-2005, Juniper Networks, Inc. 009 - All rights reserved. 010 - 011 */ 012 ns junos = "http://xml.juniper.net/junos/*/junos"; 013 ns xnm = "http://xml.juniper.net/xnm/1.1/xnm"; 014 ns jcs = "http://xml.juniper.net/junos/commit-scripts/1.0"; 015 016 import "../import/junos.xsl"; 017 018 /* 019 - This example uses an apply-macro to turn simplified interface 020 - configuration into a diverse set of configuration statements. 021 - 022 - Using configuration groups (such as 'interface-details' and 023 - 'cos-details' in this example) with commit scripts can keep the 024 - details of any configuration expansions in the configuration 025 - database, where they can be more easily changed. 026 */ 027 match configuration ( 028 var $top = .; 029 030 for-each (interfaces/interface/apply-macro[name == "params"]) ( 031 var $description = data[name == "description"]/value; 032 var $inet-address = data[name == "inet-address"]/value; 033 var $encapsulation = data[name == "encapsulation"]/value; 034 var $clocking = data[name == "clocking"]/value; 035 var $isis-level-1 = data[name == "isis-level-1"]/value; 036 var $isis-level-1-metric = data[name == "isis-level-1-metric"]/value; 037 var $isis-level-2 = data[name == "isis-level-2"]/value; 038 var $isis-level-2-metric = data[name == "isis-level-2-metric"]/value; 039 var $ifname = ../name ".0"; 040 <transient-change> ( 041 <interfaces> ( 042 <interface> ( 043 <name>