Here is a snippet from an old script I had to get the snmp stats and current
RSVP reservation.
This first OID .1.3.6.1.4.1.2636.3.2.3.1.1 you walk and it returns the names
and dynamic OIDs of the ingress LSPs. The $1 awk returns is the specific OID
associated with an LSP.
snmpbulkwalk -v2c -Oan -c $comm $router .1.3.6.1.4.1.2636.3.2.3.1.1 | awk
'{sub(/^.1.3.6.1.4.1.2636.3.2.3.1.1/, "");print $1}'
my $lsp_bytes_oid = ".1.3.6.1.4.1.2636.3.2.3.1.3";
my $lsp_bw_oid = "1.3.6.1.4.1.2636.3.2.3.1.21";
Those are the two OIDs where the second one is for the RSVP reservation. In
order to get the value you'll have to concatenate the OIDs from the first one
onto the second one. As an example if I have an LSP from the first one with a
returned value of:
.78.69.80.54.68.83.82.74.48.50.45.78.69.80.54.66.80.82.74.48.49.45.49.45.66.69.0.0.0.0.0.0
You can get the current RSVP reservation with the full OID
1.3.6.1.4.1.2636.3.2.3.1.21.78.69.80.54.68.83.82.74.48.50.45.78.69.80.54.66.80.82.74.48.49.45.49.45.66.69.0.0.0.0.0.0
snmpget -v2c -Oan -c mycommunity 10.4.6.26
.1.3.6.1.4.1.2636.3.2.3.1.21.78.69.80.54.68.83.82.74.48.50.45.78.69.80.54.66.80.82.74.48.49.45.49.45.66.69.0.0.0.0.0.0
.1.3.6.1.4.1.2636.3.2.3.1.21.78.69.80.54.68.83.82.74.48.50.45.78.69.80.54.66.80.82.74.48.49.45.49.45.66.69.0.0.0.0.0.0
= INTEGER: 1000
The value returned is in Kbps.
The first OID grabs the current byte stats from the LSP but it's not reliable,
there are points where the value will reset to 0 and you don't really know when
it's going to be. Another way to get the data is via Junosscript. You can use
this call:
$jnx->get_mpls_lsp_information(ingress => "1", detail => "1", statistics =>
"1"); It will return all the information you need, you just have to scrape
the data from the returned output.
Phil
-----Original Message-----
From: Vijesh Chandran
Date: Monday, March 16, 2015 at 00:19
To: "[email protected]"
Subject: [j-nsp] SNMP OID for last signalled LSP bandwidth
>
>Is my following assumptions correct?
>Below red colored one is the last signaled/reserved bandwidth for a given LSP
>(this one). What would be the SNMP OID to get this value if yes.
>LSP is configured as autobandwidth.
>
>
>User@router>show mpls lsp name FROM-USNYC3-BBISP-GW2-TO-USSJC2-BB-PE1-VRF-1
>detail
>Ingress LSP: 376 sessions
>
>17.0.129.1
> From: 17.0.146.2, State: Up, ActiveRoute: 0, LSPname:
> FROM-USNYC3-BBISP-GW2-TO-USSJC2-BB-PE1-VRF-1
> ActivePath: FROM-USNYC3-BBISP-GW2-TO-USSJC2-BB-PE1-VRF-10 (primary)
> Node/Link protection desired
> LSPtype: Static Configured, Penultimate hop popping
> LoadBalance: Least-fill
> Autobandwidth
> ^^^^^^^^^^^^^
> MaxBW: 20Gbps
> AdjustTimer: 43200 secs AdjustThreshold: 10%
> Max AvgBW util: 42.739Mbps, Bandwidth Adjustment in 4046 second(s).
> Overflow limit: 3, Overflow sample count: 0
> Underflow limit: 0, Underflow sample count: 130, Underflow Max AvgBW:
> 42.739Mbps
> Encoding type: Packet, Switching type: Packet, GPID: IPv4
>*Primary FROM-USNYC3-BBISP-GW2-TO-USSJC2-BB-PE1-VRF-10 State: Up
> Priorities: 7 7
> Bandwidth: 47.5412Mbps # Presumably, this is the last signaled/reserved
> bandwidth for this LSP correct? If yes, what is the SNMP OID for this? Is
> this "mplsPathInfoBandwidth"?
> ^^^^^^^^^^^^^^^^^^^^^^
> OptimizeTimer: 1800
> SmartOptimizeTimer: 180
> Include Any: AMR POP BB-JNPR Exclude: DONOTINCLUDE
> Reoptimization in 824 second(s).
> Computed ERO (S [L] denotes strict [loose] hops): (CSPF metric: 730)
>17.0.148.80 S 17.0.148.75 S 17.0.136.103 S 17.0.156.81 S
> Received RRO (ProtectionFlag 1=Available 2=InUse 4=B/W 8=Node
> 10=SoftPreempt 20=Node-ID):
> 17.0.148.2(flag=0x29) 17.0.148.80(flag=9 Label=646346)
> 17.0.136.2(flag=0x29 Label=16324) 17.0.148.75(flag=9 Label=16324)
> 17.0.156.1(flag=0x21 Label=22971) 17.0.136.103(flag=1 Label=22971)
> 17.0.129.1(flag=0x20 Label=3) 17.0.156.81(Label=3)
> Secondary FROM-USNYC3-BBISP-GW2-TO-USSJC2-BB-PE1-VRF-20 State: Dn
> Priorities: 7 7
> OptimizeTimer: 1800
> SmartOptimizeTimer: 180
> Include Any: BB BB-JNPR Exclude: DONOTINCLUDE
> No computed ERO.
> 1028 Feb 6 21:54:00.328 Clear Call
>Total 1 displayed, Up 1, Down 0
>---snip-
>
>
>Regards,
>Vijesh
>Mob:669.777.8502
>_______________________________________________
>juniper-nsp mailing list [email protected]
>https://puck.nether.net/mailman/listinfo/juniper-nsp
_______________________________________________
juniper-nsp mailing list [email protected]
https://puck.nether.net/mailman/listinfo/juniper-nsp