Junos OS

last person joined: 19 hours ago 

Ask questions and share experiences about Junos OS.
  • 1.  See Ports Up/Down on Console

    Posted 01-15-2015 14:38

    Does anyone know if there is a way to see the interface status of a port go up or down on the console as you when you plug or unplug an active connections.

     

    Please let me know.  Any help is greatly appreciated!

     

    Thank You.



  • 2.  RE: See Ports Up/Down on Console
    Best Answer

    Posted 01-15-2015 15:43

    The way I've done it in the past is, you must first set updown messages to go to a specific file on the device.  Example config:

     

    [edit system syslog]

    file interface-logs {
        any any;
        match UpDown;
    }

     

    Then if you want to see these on the CLI console, you type "monitor start interface-logs" and you will start seeing the messages which are in that file as they occur on the console. 

     

    It's similar to debug commands on Cisco so to stop, type: "monitor stop interface-logs" which would turn off the console logging for that file.



  • 3.  RE: See Ports Up/Down on Console

    Posted 01-16-2015 06:18

    cisos,

     

    This did the trick.  This is very useful to see in some situations.  I come from a Cisco world to a much better Juniper world and I knew there had to be a way to do this. 

     

    Thank you!

    Nate



  • 4.  RE: See Ports Up/Down on Console

     
    Posted 01-16-2015 07:50

    If you want all logged in users to see the messages without having to enable log file monitoring, you could do:

     

    user * {
        any any;
        match "Status [up|down]";
    }

     



  • 5.  RE: See Ports Up/Down on Console

    Posted 01-16-2015 08:03

    Hello evt,

     

    I tried the method you suggested and did not see interface status on the console.  Am I missing something?  Thanks!

     

        syslog {
            user * {
                any any;
                match UpDown;
            }
            file messages {
                any notice;
                authorization info;
            }
            file interactive-commands {
                interactive-commands any;
            }
        }
    }

     



  • 6.  RE: See Ports Up/Down on Console

     
    Posted 01-16-2015 08:05

    Are you connecting via the console port or through a telnet/SSH session?  That method (edited for better filtering) will only work for users logged in via SSH/Telnet, not for a user connected via the console port.



  • 7.  RE: See Ports Up/Down on Console

    Posted 01-16-2015 08:08

    That makes sense.  I was conencted via console cable.  Thanks for the help!!