Junos OS

last person joined: 6 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  Change MX to regard all non-configured interfaces as Admin-down.

    Posted 06-03-2009 13:57

    I'm running a network of MX480's with 9.2R3.5.

     

    The MX is reporting all interfaces that are not configured as being down as they are Admin up by default. This is showing up on an SNMP get and can be seen in show interface terse.

     

    Is there a way to change this so that by default any non-configured interface is Admin-down ? 

     

    The "get-around" now is to create all interfaces and disable them however this is time consuming and add's all interfaces to config.

     

    I've tried using groups but this only applies the disable command to configured interfaces and secondly I can't see a way to "enable" selective interfaces with this group appiled globally.

     

    I'm sure I'm not the first to have this problem, however I searched here for similar threads to no avil.

     

    Thanks

    Ribo./

    Message Edited by Ribo on 06-03-2009 01:58 PM
    Message Edited by Ribo on 06-03-2009 02:01 PM

    #admin
    #mx
    #default
    #interface


  • 2.  RE: Change MX to regard all non-configured interfaces as Admin-down.

    Posted 06-03-2009 20:06
      |   view attached

    You can accomplish this through JUNOS scripts.  I wrote a commit script (it is attached) which will transiently disable all your unconfigured ge and xe interfaces.  The transient nature of the changes ensures that it doesn't clutter your configuration and will disappear once you actually configure the interface.  To see the changes you can append "| display commit-scripts" when showing the interfaces configuration.

     

    To enable the script do this:

    1. remove the .txt from the filename (I couldn't attach a .slax file)

    2. copy it into /var/db/scripts/commit (on both REs)

    3. set system scripts commit file cs-admin-down.slax

    4. set system scripts commit allow-transients

     

    Note that there is one caveat that a newly added interface/dpc will not be admin down until after a commit is performed.  This can be remedied automatically if you create an event script which performs a commit following an added dpc, or you can manually perform a commit after installing dpcs.

     

    I hope this is helpful.

     

     

    Attachment(s)

    txt
    cs-admin-down.slax.txt   1 KB 1 version


  • 3.  RE: Change MX to regard all non-configured interfaces as Admin-down.

    Posted 06-04-2009 08:42

    Thanks, much appreciated ! I'll let you know how it works 🙂

     ---

    I would like to see that added in the future to standard code though, perhaps simply a command under chassis to change the default behaviour.

     

    R./



  • 4.  RE: Change MX to regard all non-configured interfaces as Admin-down.
    Best Answer

    Posted 06-16-2009 13:30
    Thanks again. The script works very well.