Switching

last person joined: 3 days ago 

Ask questions and share experiences about EX and QFX portfolios and all switching solutions across your data center, campus, and branch locations.
  • 1.  Finding a device that was just plugged in - interface up/down

    Posted 09-05-2014 13:28

    Sorry - another Cisco tech joining the Juniper party.  Apologies if this isn't in the best place...

     

    I'm trying to find a device that was just plugged into a switch stack so I can update the access VLAN for the device.  If you'd forgive a Cisco reference, there I would just "show log" and look for "Gi1/0/1 up" or some such thing, and then I know what port just came up to support the device and could go from there.

     

    Any suggestions on doing something similar with an EX4200?  Code 12.3



  • 2.  RE: Finding a device that was just plugged in - interface up/down

    Posted 09-06-2014 03:34

    Hi,

     

    It's almost the same with Juniper. Try show log messages | match <search word> (In this case perhaps "ifOperStatus")

    If you're familiar with unix you can also do start shell and go to /var/log and find stuff from logfiles with unix tools like grep and tail etc.

     

    If you are satisfied with the answer, please click "Accepted as Solution". Kudos also welcome!

     

     



  • 3.  RE: Finding a device that was just plugged in - interface up/down
    Best Answer

    Posted 09-06-2014 04:12

    The messages logfile can get pretty big, and depending upon how often it rolls, interface changes might not be there.  You can create your own logs, so here's what we do to create an log file just for interface changes:

     

    set system syslog file interface-changes any any

    set system syslog file interface-changes match SNMP_TRAP_LINK

     

    The last line says to only match log entries that have the string SNMP_TRAP_LINK, which will catch the interface ups and downs. 

     

    Now you can simply do:

     

    show log interface-changes

     

    Rob

     



  • 4.  RE: Finding a device that was just plugged in - interface up/down

    Posted 09-10-2014 16:06

    Why thank you.  Making my own log file sounds pretty neat - when you do such a thing do you need to consider CPU resources and such?  In the past I've been concerned about "protecting the CPU" though I don't understand how Juniper hardware works.