NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Emeyer's avatar
Emeyer
Aspirant
Jun 20, 2019
Solved

Telnet - Unsolicited Port Status Mesages

Hello There.   I am actively monitoring my switch via a telnet/ssh connection. I would like for the switch to report to me, via an unsolicited message to the telnet console, whenever a port link st...
  • msi's avatar
    msi
    Jun 21, 2019

    Hi


    I'm more on the side of schumaku, I'd be interested in what automation system that is, sounds much like it attempts reinventing the wheel.

     


    [...] For that, I need the console to tell me when a port state has changed.

    SNMP traps should do exactly that. Netgear switches of that line support both traps and SNMP get/set/walk request.

     

    Netgear hasn't jumped on the bandwagon of integrating APIs into their switches yet. In the meantime SNMP, while old and rather ugly, is present and working (try finding someone who actually likes SNMP...).

     

    Concerning the MAC Address table: I have tried reading the MAC Address table walking BRIDGE-MIB::dot1dTpFdbAddress but it returned not results when, walking, maybe not implemented by Netgear on M4300? Neither NETGEAR-SWITCHING MIB or Q-BRIDGE-MIB which is what I tried as well. You'd have to find out a manner how to obtain the MAC address table globally.

    And also if you want to apply configuration, so long as it is only VLANs, that is something that can be done with a RADIUS server that sends the VLAN and the switch assigns it dynamically. Of course that won't automate the rest of the port configuration.

     


    That said, simply turning on debug console, did not send me the port status messages. Do you know off hand which flags need to be set in order for this to show up with debug console turned on? I do not need persistence as I will configure the console each time my system establishes the console connection.

    I do have CLI logging enabled which is sent to a syslog mostly for post-mortem. Other than that I only issued "logging console 7" in configure mode then "debug console" in privileged exec mode. Working on a console session that has both debug logging enabled is was definitely not pleasant. See how it spits out outputs in between me entering commands, have fun parsing that correctly while modifying configuration through a remote console programmatically ;-)

     

     

     

    (sw-<removed>) (Interface 1/0/1)#shutdown
    (sw-<removed>) (Interface 1/0/1)#
    <13>1 <timedate-removed>:51.862Z sw-<removed>-1 CMDLOGGER emWeb - : cmd_logger_api.c(83) 564865 %% CLI:<ip-removed>:<user-removed>:shutdown
    <15>1 <timedate-removed>:52.109Z sw-<removed>-1 DRIVER bcmLINK.1 - : broad_link.c(83) 564866 %% HAPI LS callback, u 1. p 2
    <13>1 <timedate-removed>:52.120Z sw-<removed>-1 TRAPMGR trapTask - : traputil.c(753) 564867 %% Link Down: 1/0/1
    [...]
    no shutdown
    
    (sw-<removed>) (Interface 1/0/1)#
    <13>1 <timedate-removed>:54.918Z sw-<removed>-1 CMDLOGGER emWeb - : cmd_logger_api.c(83) 564869 %% CLI:<ip-removed>:<user-removed>:no shutdown
    <13>1 <timedate-removed>:56.145Z sw-<removed>-1 TRAPMGR PoE Req - : traputil.c(795) 564870 %% PoE: 1/0/1     power downn
    [2 other messages]
    
    (sw-<removed>) (Config)#
    <13>1 <timedate-removed>:58.990Z sw-<removed>-1 CMDLOGGER emWeb - : cmd_logger_api.c(83) 564873 %% CLI:<ip-removed>:<user-removed>:exit
    exit
    
    (sw-<removed>) #
    <13>1 <timedate-removed>:00.952Z sw-<removed>-1 CMDLOGGER emWeb - : cmd_logger_api.c(83) 564874 %% CLI:<ip-removed>:<user-removed>:exit
    <15>1 <timedate-removed>:01.277Z sw-<removed>-1 DRIVER bcmLINK.1 - : broad_link.c(83) 564875 %% HAPI LS callback, u 1. p 2
    <13>1 <timedate-removed>:01.284Z sw-<removed>-1 TRAPMGR trapTask - : traputil.c(753) 564876 %% Link Up: 1/0/1
    <13>1 <timedate-removed>:01.365Z sw-<removed>-1 TRAPMGR PoE Req - : traputil.c(795) 564877 %% PoE: 1/0/1     power up

     

     

     

     

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More