这里提到了 snmpm:sync_get_bulk2 中的参数Nonrepeaterand Max-Repetitions,愣是没看懂 比如:
http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.2.1.15.3.1.9#oidContent
要得到所有peer的as号。
Nonrepeater=?and Max-Repetitions= ? my %oids = (
"SysUptime" => "1.3.6.1.2.1.1.3.0",
"bgpVersion" => "1.3.6.1.2.1.15.1.0",
"bgpLocalAs" => "1.3.6.1.2.1.15.2.0",
# "bgpPeerTable" => "1.3.6.1.2.1.15.3",
"bgpPeerEntry" => "1.3.6.1.2.1.15.3.1",
"bgpPeerIdentifier" => "1.3.6.1.2.1.15.3.1.1",
"bgpPeerState" => "1.3.6.1.2.1.15.3.1.2",
"bgpPeerAdminStatus" => "1.3.6.1.2.1.15.3.1.3",
"bgpPeerNegotiatedVersion" => "1.3.6.1.2.1.15.3.1.4",
"bgpPeerLocalAddr" => "1.3.6.1.2.1.15.3.1.5",
"bgpPeerLocalPort" => "1.3.6.1.2.1.15.3.1.6",
"bgpPeerRemoteAddr" => "1.3.6.1.2.1.15.3.1.7",
"bgpPeerRemotePort" => "1.3.6.1.2.1.15.3.1.8",
"bgpPeerRemoteAs" => "1.3.6.1.2.1.15.3.1.9",
"bgpPeerInUpdates" => "1.3.6.1.2.1.15.3.1.10",
"bgpPeerOutUpdates" => "1.3.6.1.2.1.15.3.1.11",
"bgpPeerInTotalMessages" => "1.3.6.1.2.1.15.3.1.12",
"bgpPeerOutTotalMessages" => "1.3.6.1.2.1.15.3.1.13",
"bgpPeerLastError" => "1.3.6.1.2.1.15.3.1.14",
"bgpPeerFsmEstablishedTransitions" => "1.3.6.1.2.1.15.3.1.15",
"bgpPeerFsmEstablishedTime" => "1.3.6.1.2.1.15.3.1.16",
"bgpPeerConnectRetryInterval" => "1.3.6.1.2.1.15.3.1.17",
"bgpPeerHoldTime" => "1.3.6.1.2.1.15.3.1.18",
"bgpPeerKeepAlive" => "1.3.6.1.2.1.15.3.1.19",
"bgpPeerHoldTimeConfigured" => "1.3.6.1.2.1.15.3.1.20",
"bgpPeerKeepAliveConfigured" => "1.3.6.1.2.1.15.3.1.21",
"bgpPeerMinASOriginationInterval" => "1.3.6.1.2.1.15.3.1.22",
"bgpPeerMinRouteAdvertisementInterval" => "1.3.6.1.2.1.15.3.1.23",
"bgpPeerInUpdateElapsedTime" => "1.3.6.1.2.1.15.3.1.24",
"bgpIdentifier" => "1.3.6.1.2.1.15.4",
"bgpRcvdPathAttrTable" => "1.3.6.1.2.1.15.5",
"bgp4PathAttrTable" => "1.3.6.1.2.1.15.6",
"bgpPathAttrEntry" => "1.3.6.1.2.1.15.5.1",
"bgpPathAttrPeer" => "1.3.6.1.2.1.15.5.1.1",
"bgpPathAttrDestNetwork" => "1.3.6.1.2.1.15.5.1.2",
"bgpPathAttrOrigin" => "1.3.6.1.2.1.15.5.1.3",
"bgpPathAttrASPath" => "1.3.6.1.2.1.15.5.1.4",
"bgpPathAttrNextHop" => "1.3.6.1.2.1.15.5.1.5",
"bgpPathAttrInterASMetric" => "1.3.6.1.2.1.15.5.1.6",
"bgp4PathAttrEntry" => "1.3.6.1.2.1.15.6.1",
"bgp4PathAttrPeer" => "1.3.6.1.2.1.15.6.1.1",
"bgp4PathAttrIpAddrPrefixLen" => "1.3.6.1.2.1.15.6.1.2",
"bgp4PathAttrIpAddrPrefix" => "1.3.6.1.2.1.15.6.1.3",
"bgp4PathAttrOrigin" => "1.3.6.1.2.1.15.6.1.4",
"bgp4PathAttrASPathSegment" => "1.3.6.1.2.1.15.6.1.5",
"bgp4PathAttrNextHop" => "1.3.6.1.2.1.15.6.1.6",
"bgp4PathAttrMultiExitDisc" => "1.3.6.1.2.1.15.6.1.7",
"bgp4PathAttrLocalPref" => "1.3.6.1.2.1.15.6.1.8",
"bgp4PathAttrAtomicAggregate" => "1.3.6.1.2.1.15.6.1.9",
"bgp4PathAttrAggregatorAS" => "1.3.6.1.2.1.15.6.1.10",
"bgp4PathAttrAggregatorAddr" => "1.3.6.1.2.1.15.6.1.11",
"bgp4PathAttrCalcLocalPref" => "1.3.6.1.2.1.15.6.1.12",
"bgp4PathAttrBest" => "1.3.6.1.2.1.15.6.1.13",
"bgp4PathAttrUnknown" => "1.3.6.1.2.1.15.6.1.14",
);
页:
1
[2]