This article provides information about the SNMP remote operation on Junos for traceroute.
RFC 2925 defines the MIBs for performing remote ping, traceroute, and lookup operations on a remote host. Currently, Junos supports two SNMP remote operations: ping and traceroute.
To use the SNMP remote operation, an SNMP community should be configured with authentication read-write on Junos.
lab@MX240-ENT-RE0# show snmp view remote-view { oid 1.3.6.1.2.1.81 include; oid 1.3.6.1.2.1.80 include; oid 1.3.6.1.4.1.2636.3.7 include; oid 1.3.6.1.4.1.2636.3.8 include; } community private1 { view remote-view; authorization read-write; }
To enable remote trace route on the SNMP manager, perform this procedure:
#set ctrladminstatus to disable (2) snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.21.4.116.101.115.116.4.116.101.115.116 i 2 Reflects the desired state that an traceRouteCtlEntry should be in: enabled(1) - Attempt to activate the test as defined by this traceRouteCtlEntry. disabled(2) - Deactivate the test as defined by this traceRouteCtlEntry. #destroy a probe snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.27.4.116.101.115.116.4.116.101.115.116 i 6 #create a probe snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.27.4.116.101.115.116.4.116.101.115.116 i 5 #set targetAddressType to ipv4 snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.3.4.116.101.115.116.4.116.101.115.116 i 1 known values: 1 --- ipv4 2 --- ipv6 16--- dns #set targetAddress snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.4.4.116.101.115.116.4.116.101.115.116 a "172.27.141.2" or <—if you have DNS server and set it do as DNS before snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.4.4.116.101.115.116.4.116.101.115.116 s "www.juniper.net" #set source address type to ipv4(1) snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.12.4.116.101.115.116.4.116.101.115.116 i 1 #set source address snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.13.4.116.101.115.116.4.116.101.115.116 a "192.168.193.5" #set ctlRowStatus to active snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.27.4.116.101.115.116.4.116.101.115.116 i 1 #set ctrladminstatus to enable (1) snmpset -c private1 -v 2c -d 172.27.20.254 .1.3.6.1.2.1.81.1.2.1.21.4.116.101.115.116.4.116.101.115.116 i 1
The above operation is similar to the following actions:
lab@MX240-ENT-RE0# run traceroute 172.27.141.2 traceroute to 172.27.141.2 (172.27.141.2), 30 hops max, 40 byte packets 1 192.168.192.1 (192.168.192.1) 0.799 ms 0.675 ms 0.663 ms 2 172.27.20.1 (172.27.20.1) 1.357 ms 1.290 ms 1.354 ms 3 172.27.253.9 (172.27.253.9) 162.853 ms 135.817 ms 151.901 ms 4 172.27.141.2 (172.27.141.2) 160.582 ms 172.893 ms 132.817 ms
Remote ping test result:
lab@MX240-ENT-RE0# run show snmp mib walk 1.3.6.1.2.1.81 traceRouteMaxConcurrentRequests.0 = 10 traceRouteCtlTargetAddressType.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteCtlTargetAddress.4.116.101.115.116.4.116.101.115.116 = ac 1b 8d 02 <--172.27.141.2 traceRouteCtlByPassRouteTable.4.116.101.115.116.4.116.101.115.116 = 2 traceRouteCtlDataSize.4.116.101.115.116.4.116.101.115.116 = 0 traceRouteCtlTimeOut.4.116.101.115.116.4.116.101.115.116 = 3 traceRouteCtlProbesPerHop.4.116.101.115.116.4.116.101.115.116 = 3 traceRouteCtlPort.4.116.101.115.116.4.116.101.115.116 = 33434 traceRouteCtlMaxTtl.4.116.101.115.116.4.116.101.115.116 = 30 traceRouteCtlDSField.4.116.101.115.116.4.116.101.115.116 = 0 traceRouteCtlSourceAddressType.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteCtlSourceAddress.4.116.101.115.116.4.116.101.115.116 = c0 a8 c1 05 <--192.16.193.5 traceRouteCtlIfIndex.4.116.101.115.116.4.116.101.115.116 = 0 traceRouteCtlMiscOptions.4.116.101.115.116.4.116.101.115.116 traceRouteCtlMaxFailures.4.116.101.115.116.4.116.101.115.116 = 5 traceRouteCtlDontFragment.4.116.101.115.116.4.116.101.115.116 = 2 traceRouteCtlInitialTtl.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteCtlFrequency.4.116.101.115.116.4.116.101.115.116 = 0 traceRouteCtlStorageType.4.116.101.115.116.4.116.101.115.116 = 2 traceRouteCtlAdminStatus.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteCtlDescr.4.116.101.115.116.4.116.101.115.116 = 00 traceRouteCtlMaxRows.4.116.101.115.116.4.116.101.115.116 = 50 traceRouteCtlTrapGeneration.4.116.101.115.116.4.116.101.115.116 = 00 traceRouteCtlCreateHopsEntries.4.116.101.115.116.4.116.101.115.116 = 2 traceRouteCtlType.4.116.101.115.116.4.116.101.115.116 = traceRouteUsingUdpProbes.0 traceRouteCtlRowStatus.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteResultsOperStatus.4.116.101.115.116.4.116.101.115.116 = 2 traceRouteResultsCurHopCount.4.116.101.115.116.4.116.101.115.116 = 4 traceRouteResultsCurProbeCount.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteResultsIpTgtAddrType.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteResultsIpTgtAddr.4.116.101.115.116.4.116.101.115.116 = ac 1b 8d 02 traceRouteResultsTestAttempts.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteResultsTestSuccesses.4.116.101.115.116.4.116.101.115.116 = 1 traceRouteResultsLastGoodPath.4.116.101.115.116.4.116.101.115.116 = 07 dd 0a 1c 03 10 35 00 2b 00 00 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.1.1.1 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.2.1.2 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.3.1.3 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.4.2.1 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.5.2.2 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.6.2.3 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.7.3.1 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.8.3.2 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.9.3.3 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.10.4.1 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.11.4.2 = 1 traceRouteProbeHistoryHAddrType.4.116.101.115.116.4.116.101.115.116.12.4.3 = 1 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.1.1.1 = c0 a8 c0 01 <--192.168.192.1 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.2.1.2 = c0 a8 c0 01 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.3.1.3 = c0 a8 c0 01 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.4.2.1 = ac 1b 14 01 <--172.27.20.1 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.5.2.2 = ac 1b 14 01 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.6.2.3 = ac 1b 14 01 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.7.3.1 = ac 1b fd 09 <--172.27.253.9 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.8.3.2 = ac 1b fd 09 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.9.3.3 = ac 1b fd 09 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.10.4.1 = ac 1b 8d 02 <--172.27.141.2 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.11.4.2 = ac 1b 8d 02 traceRouteProbeHistoryHAddr.4.116.101.115.116.4.116.101.115.116.12.4.3 = ac 1b 8d 02 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.1.1.1 = 1 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.2.1.2 = 1 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.3.1.3 = 1 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.4.2.1 = 1 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.5.2.2 = 1 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.6.2.3 = 1 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.7.3.1 = 172 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.8.3.2 = 135 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.9.3.3 = 148 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.10.4.1 = 136 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.11.4.2 = 146 traceRouteProbeHistoryResponse.4.116.101.115.116.4.116.101.115.116.12.4.3 = 164 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.1.1.1 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.2.1.2 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.3.1.3 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.4.2.1 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.5.2.2 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.6.2.3 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.7.3.1 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.8.3.2 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.9.3.3 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.10.4.1 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.11.4.2 = 1 traceRouteProbeHistoryStatus.4.116.101.115.116.4.116.101.115.116.12.4.3 = 1 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.1.1.1 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.2.1.2 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.3.1.3 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.4.2.1 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.5.2.2 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.6.2.3 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.7.3.1 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.8.3.2 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.9.3.3 = 0 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.10.4.1 = 3 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.11.4.2 = 3 traceRouteProbeHistoryLastRC.4.116.101.115.116.4.116.101.115.116.12.4.3 = 3 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.1.1.1 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.2.1.2 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.3.1.3 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.4.2.1 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.5.2.2 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.6.2.3 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.7.3.1 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.8.3.2 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.9.3.3 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.10.4.1 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.11.4.2 = 07 dd 0a 1c 03 10 34 00 2b 00 00 traceRouteProbeHistoryTime.4.116.101.115.116.4.116.101.115.116.12.4.3 = 07 dd 0a 1c 03 10 35 00 2b 00 00