2023-04-17 12:40 PM 2023-04-17 04:16 PM 更新
(2023/04/17 初版)
---> 100Gbps (unicast)
[TG1]---[ASR9k](Te0/2/0/0)---[TG2]
<--- 100Gbps (unicast)
*TG(Traffic Generator)
* Frame size: 200 bytes
ifHCInUcastPkts OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of packets, delivered by this sub-layer to
a higher (sub-)layer, which were not addressed to a
multicast or broadcast address at this sub-layer.
This object is a 64-bit version of ifInUcastPkts.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
ifCounterDiscontinuityTime."
ifHCOutUcastPkts OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of packets that higher-level
protocols requested be transmitted, and which were not
addressed to a multicast or broadcast address at this
sub-layer, including those that were discarded or not
sent. This object is a 64-bit version of
ifOutUcastPkts.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
ifCounterDiscontinuityTime."
1. ifDescr の取得
IF-MIB::ifDescr.2 = STRING: Null0
IF-MIB::ifDescr.4 = STRING: PTP0/RSP0/CPU0/0
IF-MIB::ifDescr.5 = STRING: MgmtEth0/RSP0/CPU0/0
IF-MIB::ifDescr.6 = STRING: MgmtEth0/RSP0/CPU0/1
IF-MIB::ifDescr.15 = STRING: dwdm0/2/0/0
IF-MIB::ifDescr.16 = STRING: dwdm0/2/0/1
IF-MIB::ifDescr.17 = STRING: dwdm0/2/0/2
IF-MIB::ifDescr.18 = STRING: dwdm0/2/0/3
IF-MIB::ifDescr.19 = STRING: dwdm0/2/0/4
IF-MIB::ifDescr.20 = STRING: dwdm0/2/0/5
IF-MIB::ifDescr.21 = STRING: dwdm0/2/0/6
IF-MIB::ifDescr.22 = STRING: dwdm0/2/0/7
IF-MIB::ifDescr.23 = STRING: TenGigE0/2/0/0
IF-MIB::ifDescr.24 = STRING: TenGigE0/2/0/1
---snip---
2. Te0/2/0/0 の ifHCInUcastPkts を取得
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916038274
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916067539
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916067539
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916087393
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916087393
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914402292
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914422435
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914439633
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914439633
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914455632
ipv4 access-list test
10 deny ipv4 any any
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916173749
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916192678
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916192678
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23
IF-MIB::ifHCInUcastPkts.23 = Counter64: 916209114
ifHCInUcastPkts は ACL 適用前のパケットが対象となるため、この ACL を設定していても増加します。
5. ACL 設定時の Te0/2/0/0 の ifHCOutUcastPkts を取得
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914517826
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914517826
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914517826
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23
IF-MIB::ifHCOutUcastPkts.23 = Counter64: 914517826
!!! Egress 側!!!
policy-map egr_child
class c1
bandwidth percent 40
!
class c2
bandwidth percent 30
!
class class-default
bandwidth percent 10
!
end-policy-map
!
policy-map egr_parent
class class-default
service-policy egr_child
shape average 500000000 bps
!
end-policy-map
!
!!! Ingress 側 !!!
policy-map test1
class class-default
police rate 500000000 bps
!
!
end-policy-map
!
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:05 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31273954216
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:06 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31273954216
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:14 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31273954216
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:15 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31366269456
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:17 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31366269456
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:30 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31366269456
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:32 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31459516782
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:34 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31459516782
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:47 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31459516782
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCInUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:44:48 IF-MIB::ifHCInUcastPkts.23 = Counter64: 31553147930
7. Service-policy 適用時の ifHCOutUcastPkts を取得
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:21 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14459522184
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:24 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14459522184
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:37 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14459522184
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:38 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14464802318
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:39 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14464802318
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:51 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14464802318
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:54 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14469832048
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:53:55 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14469832048
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:54:09 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14469832048
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifHCOutUcastPkts.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:54:11 IF-MIB::ifHCOutUcastPkts.23 = Counter64: 14475307218
ifHCInOctets OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of octets received on the interface,
including framing characters. This object is a 64-bit
version of ifInOctets.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
ifCounterDiscontinuityTime."
ifHCOutOctets OBJECT-TYPE
SYNTAX Counter64
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of octets transmitted out of the
interface, including framing characters. This object
is a 64-bit version of ifOutOctets.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
ifCounterDiscontinuityTime."
ifInDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of inbound packets which were chosen to be
discarded even though no errors had been detected to
prevent their being deliverable to a higher-layer
protocol. One possible reason for discarding such a
packet could be to free up buffer space.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
ifCounterDiscontinuityTime."
ifOutDiscards OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The number of outbound packets which were chosen to
be discarded even though no errors had been detected
to prevent their being transmitted. One possible
reason for discarding such a packet could be to free
up buffer space.
Discontinuities in the value of this counter can occur
at re-initialization of the management system, and at
other times as indicated by the value of
ifCounterDiscontinuityTime."
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23
IF-MIB::ifInDiscards.23 = Counter32: 11971
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23
IF-MIB::ifInDiscards.23 = Counter32: 11971
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23
IF-MIB::ifInDiscards.23 = Counter32: 11971
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23
IF-MIB::ifInDiscards.23 = Counter32: 11971
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23
IF-MIB::ifInDiscards.23 = Counter32: 11971
ACL でパケットはドロップされますが ifInDiscards の値は増加しません。
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:23 IF-MIB::ifInDiscards.23 = Counter32: 819038865
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:28 IF-MIB::ifInDiscards.23 = Counter32: 819038865
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:37 IF-MIB::ifInDiscards.23 = Counter32: 819038865
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:38 IF-MIB::ifInDiscards.23 = Counter32: 939363680
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:40 IF-MIB::ifInDiscards.23 = Counter32: 939363680
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:53 IF-MIB::ifInDiscards.23 = Counter32: 939363680
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:54 IF-MIB::ifInDiscards.23 = Counter32: 1019580251
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:37:56 IF-MIB::ifInDiscards.23 = Counter32: 1019580251
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:38:10 IF-MIB::ifInDiscards.23 = Counter32: 1019580251
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifInDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:38:11 IF-MIB::ifInDiscards.23 = Counter32: 1099796788
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23
IF-MIB::ifOutDiscards.23 = Counter32: 0
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23
IF-MIB::ifOutDiscards.23 = Counter32: 0
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23
IF-MIB::ifOutDiscards.23 = Counter32: 0
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23
IF-MIB::ifOutDiscards.23 = Counter32: 0
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:28 IF-MIB::ifOutDiscards.23 = Counter32: 1520987939
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:32 IF-MIB::ifOutDiscards.23 = Counter32: 1520987939
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:41 IF-MIB::ifOutDiscards.23 = Counter32: 1520987939
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:44 IF-MIB::ifOutDiscards.23 = Counter32: 1641166749
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:45 IF-MIB::ifOutDiscards.23 = Counter32: 1641166749
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:58 IF-MIB::ifOutDiscards.23 = Counter32: 1641166749
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:49:59 IF-MIB::ifOutDiscards.23 = Counter32: 1681226241
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:50:01 IF-MIB::ifOutDiscards.23 = Counter32: 1681226241
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:50:15 IF-MIB::ifOutDiscards.23 = Counter32: 1681226241
% snmpwalk -v 2c -c cisco 10.x.x.x IF-MIB::ifOutDiscards.23 | gawk '{print strftime("%F %T ") $0}'
2023-04-12 21:50:16 IF-MIB::ifOutDiscards.23 = Counter32: 1801404967
検索バーにキーワード、フレーズ、または質問を入力し、お探しのものを見つけましょう
シスコ コミュニティをいち早く使いこなしていただけるよう役立つリンクをまとめました。みなさんのジャーニーがより良いものとなるようお手伝いします