Junos OS

 View Only
last person joined: 3 days ago 

Ask questions and share experiences about Junos OS.
  • 1.  event-options and events snmp_trap_link_down

    Posted 06-12-2014 10:21

    This is not working.

     

    We are using version 11. Version 12 is not an option since we use J6350

     

    I would like to enable ge-4/0/2 if ge-4/0/3 is down.

    Am I missing something?

     

     

    root@j01-pco# show event-options
    policy update-on-snmp-trap-link-down {
        events snmp_trap_link_down;
        attributes-match {
            snmp_trap_link_down.interface-name matches ge-4/0/3;
        }
        then {
            execute-commands {
                commands {
                    "delete interfaces ge-4/0/2 disable";
                    commit;
                }
            }
        }
    }

     

    Jun 12 17:03:17  j01-pco mib2d[1234]: SNMP_TRAP_LINK_DOWN: ifIndex 538, ifAdminStatus up(1), ifOperStatus down(2), ifName ge-4/0/3
    Jun 12 17:03:17  j01-pco fwdd[1128]: UPDN msg to kernel for ifd:ge-4/0/3, flag:2, speed: 0, duplex:0
    Jun 12 17:05:35  j01-pco rpd[1218]: EVENT <UpDown> ge-4/0/3.32767 index 98 <Up Broadcast Multicast> address #0 0.10.db.ff.10.4
    Jun 12 17:05:35  j01-pco rpd[1218]: EVENT <UpDown> ge-4/0/3.0 index 99 <Up Broadcast Multicast> address #0 0.10.db.ff.10.4
    Jun 12 17:05:35  j01-pco fwdd[1128]: UPDN msg to kernel for ifd:ge-4/0/3, flag:1, speed: 0, duplex:0
    Jun 12 17:05:35  j01-pco mib2d[1234]: SNMP_TRAP_LINK_UP: ifIndex 538, ifAdminStatus up(1), ifOperStatus up(1), ifName ge-4/0/3
    Jun 12 17:05:35  j01-pco mib2d[1234]: SNMP_TRAP_LINK_UP: ifIndex 574, ifAdminStatus up(1), ifOperStatus up(1), ifName ge-4/0/3.0
    Jun 12 17:05:35  j01-pco mib2d[1234]: SNMP_TRAP_LINK_UP: ifIndex 587, ifAdminStatus up(1), ifOperStatus up(1), ifName ge-4/0/3.32767
    Jun 12 17:08:05  j01-pco rpd[1218]: EVENT <UpDown> ge-4/0/3.32767 index 98 <Broadcast Multicast> address #0 0.10.db.ff.10.4
    Jun 12 17:08:05  j01-pco rpd[1218]: EVENT <UpDown> ge-4/0/3.0 index 99 <Broadcast Multicast> address #0 0.10.db.ff.10.4
    Jun 12 17:08:05  j01-pco fwdd[1128]: UPDN msg to kernel for ifd:ge-4/0/3, flag:2, speed: 0, duplex:0
    Jun 12 17:08:06  j01-pco mib2d[1234]: SNMP_TRAP_LINK_DOWN: ifIndex 538, ifAdminStatus up(1), ifOperStatus down(2), ifName ge-4/0/3
    Jun 12 17:09:39  j01-pco rpd[1218]: EVENT <UpDown> ge-4/0/3.32767 index 98 <Up Broadcast Multicast> address #0 0.10.db.ff.10.4
    Jun 12 17:09:39  j01-pco rpd[1218]: EVENT <UpDown> ge-4/0/3.0 index 99 <Up Broadcast Multicast> address #0 0.10.db.ff.10.4
    Jun 12 17:09:39  j01-pco fwdd[1128]: UPDN msg to kernel for ifd:ge-4/0/3, flag:1, speed: 0, duplex:0
    Jun 12 17:09:39  j01-pco mib2d[1234]: SNMP_TRAP_LINK_UP: ifIndex 538, ifAdminStatus up(1), ifOperStatus up(1), ifName ge-4/0/3
    Jun 12 17:09:39  j01-pco mib2d[1234]: SNMP_TRAP_LINK_UP: ifIndex 574, ifAdminStatus up(1), ifOperStatus up(1), ifName ge-4/0/3.0
    Jun 12 17:09:39  j01-pco mib2d[1234]: SNMP_TRAP_LINK_UP: ifIndex 587, ifAdminStatus up(1), ifOperStatus up(1), ifName ge-4/0/3.32767

     

     

     


    #event-optionssnmp_trap_link_down


  • 2.  RE: event-options and events snmp_trap_link_down
    Best Answer

     
    Posted 06-13-2014 00:02

    I modified your configuration and it's working for me. But as far as I know, you need to run at least 12.1 release.

     

    {master:1}[edit]
    root@EX4200# show event-options
    policy update-on-snmp-trap-link-down {
        events snmp_trap_link_down;
        attributes-match {
            snmp_trap_link_down.interface-name matches ge-0/0/10;
        }
        then {
            change-configuration {
                commands {
                    "delete interfaces ge-0/0/17 disable";
                }
            }
        }
    }

    {master:1}[edit]
    root@EX4200#

     

    These are the outputs:

     

     

    {master:1}[edit]
    root@EX4200# show interfaces ge-0/0/17
    disable;

    {master:1}[edit]
    root@EX4200#

    {master:1}[edit]
    root@EX4200#
    *** messages ***
    Jun 13 08:56:14  EX4200 mib2d[27004]: %DAEMON-4-SNMP_TRAP_LINK_DOWN: ifIndex 526, ifAdminStatus up(1), ifOperStatus down(2), ifName ge-0/0/10
    Jun 13 08:56:16  EX4200 file[28590]: %INTERACT-5-UI_COMMIT: User 'root' requested 'commit' operation (comment: none)
    Jun 13 08:56:18  EX4200 dcd[28619]: %DAEMON-4: ae0 : Warning: aggregated-ether-options link-speed no kernel value! default to  0
     

    {master:1}[edit]
    root@EX4200# Jun 13 08:56:27  EX4200 xntpd[26982]: %NTP-5: ntpd 4.2.0-a Wed Dec 18 00:33:24 UTC 2013 (1)
    Jun 13 08:56:27  EX4200 xntpd[26982]: %NTP-3: mlockall(): Resource temporarily unavailable
    Jun 13 08:56:27  EX4200 dcd[94222]: %DAEMON-4: ae0 : aggregated-ether-options link-speed set to kernel value of  1000000000
    Jun 13 08:56:30  EX4200 eventd: %USER-3-EVENTD_CONFIG_CHANGE_SUCCESS: Configuration change successful: while executing policy update-on-snmp-trap-link-down with user root privileges
    Jun 13 08:56:36  EX4200 xntpd[26982]: %NTP-5: kernel time sync disabled 2041
     

    {master:1}[edit]
    root@EX4200# show interfaces ge-0/0/17     

    {master:1}[edit]
    root@EX4200#

     

     

     

    =====

    If this worked for you please flag my post as an "Accepted Solution" so others can benefit. A kudo would be cool if you think I earned it.