Network Requirement
- Use the FLOW-statistics entity on Device1 and detect the flow of the interface vlan2.
Network Topology
![Networking of configuring the FLOW-statistics entity](/storage/images/Document/Maipu/monitoring/config-flow-statistic-entity.jpg)
Figure 3-6 Networking of configuring the FLOW-statistics entity
Configuration Steps
Step 1: Configure the IP address of the interface. (omitted)
Step 2: On Device1, configure the FLOW-statistics entity, and add the attribute parameters.
#Configure Device1.
Device1#config terminal
Device1(config)#rtr enable
Device1(config)#rtr 1 flow-statistics
Device1(config-rtr-flowsta)#flow-statistics interface vlan 2 interval 60
Device1(config-rtr-flowsta)#number-of-history-kept 255
Device1(config-rtr-flowsta)#exit
|
#View the entity parameters.
Device1#show rtr entity 1
------------------------------------------------------------------
ID:1 name:flow-statistics1 Created:TRUE
**********************type:FLOWSTATISTICS*************************
CreatedTime:THU OCT 25 09:57:43 2012
LatestModifiedTime:THU OCT 25 09:58:03 2012
Times-of-schedule:0
Alarm-type:none
Threshold-of-inputPkt:200000000 direction:be
Threshold-of-inputFlow:200000000 direction:be
Threshold-of-outputPkt:200000000 direction:be
Threshold-of-outputFlow:200000000 direction:be
Interface: vlan2
Statistics-interval:60(s)
Number-of-history-kept:255
Periods:1
Status:DEFAULT
------------------------------------------------------------------
The result shows that the entity parameter is consistent with the configuration. Status:DEFAULT indicates that the entity status is DEFAULT.
Step 3: Schedule the defined flow statistics entity, and define the attribute parameters of the scheduling.
#Configure Device1.
Device1(config)#rtr schedule 1 entity 1 start now ageout 100 life 600 repeat 10
|
Step 4: Check the result.
- When there is the data flow received on interface vlan2:
#View the entity status.
Device1#show rtr entity 1
-----------------------------------------------------------------
ID:1 name:flow-statistics1 Created:TRUE
**********************type:FLOWSTATISTICS************************
CreatedTime:THU OCT 25 09:57:43 2012
LatestModifiedTime:THU OCT 25 09:58:03 2012
Times-of-schedule:2
Time-of-last-schedule:THU OCT 25 10:02:11 2012
Alarm-type:none
Threshold-of-inputPkt:200000000 direction:be
Threshold-of-inputFlow:200000000 direction:be
Threshold-of-outputPkt:200000000 direction:be
Threshold-of-outputFlow:200000000 direction:be
Interface: vlan 2
Statistics-interval:60(s)
Number-of-history-kept:255
Periods:1
Status:REACHABLE
---------------------------------------------------------------
Status:REACHABLE indicates that the entity status is reachable, that is, there are packets entering/leaving interface vlan2.
- When there is no flow entering/leaving interface vlan2:
#View the entity status.
Device1#show rtr entity 1
-----------------------------------------------------------------
ID:1 name:flow-statistics1 Created:TRUE
**********************type:FLOWSTATISTICS************************
CreatedTime:THU OCT 25 09:57:43 2012
LatestModifiedTime:THU OCT 25 09:58:03 2012
Times-of-schedule:5
Time-of-last-schedule:THU OCT 25 10:05:11 2012
Alarm-type:none
Threshold-of-inputPkt:200000000 direction:be
Threshold-of-inputFlow:200000000 direction:be
Threshold-of-outputPkt:200000000 direction:be
Threshold-of-outputFlow:200000000 direction:be
Interface: vlan 2
Statistics-interval:60(s)
Number-of-history-kept:255
Periods:1
Status:UNREACHABLE
-------------------------------------------------------------
Status:UNREACHABLE indicates that no flow enters/leaves interface vlan2, and the entity status is unreachable.
#View the history record content.
Device1#show rtr history 1
-----------------------------------------------------------
ID:1 Name:flow-statistics1 CurHistorySize:5 MaxHistorysize:255
History recorded as following:
THU OCT 25 10:05:11 2012
Input pkt:0 (packets/s),Input flow:0 (bits/s),
Output pkt:0 (packets/s),Output flow:0 (bits/s)
THU OCT 25 10:04:11 2012
Input pkt:209 (packets/s),Input flow:214000 (bits/s),
Output pkt:0 (packets/s),Output flow:0 (bits/s)
THU OCT 25 10:03:11 2012
Input pkt:8460 (packets/s),Input flow:8663000 (bits/s),
Output pkt:0 (packets/s),Output flow:0 (bits/s)
THU OCT 25 10:02:11 2012
Input pkt:8460 (packets/s),Input flow:8663000 (bits/s),
Output pkt:0 (packets/s),Output flow:0 (bits/s)
THU OCT 25 10:01:12 2012
Input pkt:6456 (packets/s),Input flow:6610000 (bits/s),
Output pkt:0 (packets/s),Output flow:0 (bits/s)
------------------------------------------------------------------------
The rate (quantity-based and bit-based) of entering/leaving interface vlan2 during each scheduling is recorded in details in the history records.
![note](/storage/images/Document/Maipu/note-icon.jpg)
-
The accessibility of the FLOW-statistics entity is defined as: when the entity is in scheduling, as long as there is traffic in or out direction of the interface, the entity status is reachable, and if there is no traffic, it is unreachable.