- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
09-Traffic Accounting Commands | 40.3 KB |
Chapter 1 Traffic Accounting Configuration Commands
1.1 Traffic Accounting Configuration Commands
1.1.3 debugging traffic-accounting event
1.1.4 display traffic-accounting accounting-slot
1.1.5 display traffic-accounting statistics
1.1.6 display traffic-accounting traffic-group
1.1.8 traffic-accounting accounting-slot
1.1.9 traffic-accounting traffic-group
Chapter 1 Traffic Accounting Configuration Commands
1.1 Traffic Accounting Configuration Commands
1.1.1 accounting enable
Syntax
accounting enable
undo accounting enable
View
Traffic statistics view
Parameters
None
Description
Use the accounting enable command to enable the traffic accounting function on the traffic accounting card.
Use the undo accounting enable command to disable the traffic accounting function on the traffic accounting card.
The traffic accounting card starts traffic accounting immediately after the traffic accounting function is enabled.
By default, the traffic accounting function is disabled on the traffic accounting card.
Examples
# Enable the traffic accounting function.
<H3C> system-view
[H3C] traffic-accounting accounting-slot 5
[H3C-accounting-slot-5] accounting enable
# Disable the traffic accounting function.
[H3C-accounting-slot-5] undo accounting enable
1.1.2 accounting-mode traffic
Syntax
accounting-mode traffic
View
ISP domain view
Parameters
None
Description
Use the accounting-mode traffic command to specify the accounting mode as traffic accounting.
Use the undo accounting-mode traffic command to restore the default accounting mode of the system.
By default, the system adopts the time accounting mode.
Examples
# Specify the accounting mode as traffic accounting.
<H3C> system-view
[H3C] domain cams
[H3C-isp-cams] accounting-mode traffic
# Restore the default accounting mode of the system.
[H3C-isp-cams] undo accounting-mode traffic
1.1.3 debugging traffic-accounting event
Syntax
debugging traffic-accounting event
View
User view
Parameters
None
Description
Use the debugging traffic-accounting event command to enable debugging for traffic accounting.
Use the undo debugging traffic-accounting event command to disable debugging for traffic accounting.
By default, the debugging for traffic accounting disabled.
Examples
Enable debugging for traffic accounting.
<H3C> debugging traffic-accounting event
1.1.4 display traffic-accounting accounting-slot
Syntax
display traffic-accounting accounting-slot [ slot-num ]
View
Any view
Parameters
slot-num: Slots for traffic accounting.
Description
Use the display traffic-accounting-slot command to display the configuration information of the traffic accounting slots. If you specify the slot-num parameter, the command displays the configuration information of the specified traffic accounting slot. Otherwise, the command displays the configuration information of all traffic accounting slots.
& Note:
At present, the system supports only one traffic accounting slot. Therefore the configuration information of a specified traffic accounting slot is the same with the configuration information of all traffic accounting slots when you execute the command.
Examples
# Display the configuration information of the traffic accounting slot 4.
<H3C> display traffic-accounting accounting-slot 4
Accounting slot number : 4
traffic accounting is enabled
1.1.5 display traffic-accounting statistics
Syntax
display traffic-accounting statistics [ ip-address ]
View
Any view
Parameters
ip-address: IP address.
Description
Use the display traffic-accounting statistics command to display the traffic statistics information of the current online users. If you specify the ip-address parameter, the command displays the traffic information of a specified IP address. Otherwise, this command displays the traffic information of all the online IP addresses.
Examples
# Display the traffic statistics information of the current online users.
<H3C> display traffic-accounting statistics
User IP: 10.0.0.1
group name :somegroup
output octets low-32: 0 output octets high-32: 0
input octets low-32 : 0 input octets high-32 : 0
1.1.6 display traffic-accounting traffic-group
Syntax
display traffic-accounting traffic-group [ group-name ]
View
Any view
Parameters
group-name: Name of a traffic group.
Description
Use the display traffic-accounting traffic-group command to display the configuration information of the traffic groups.
If you specify the group-name parameter, the configuration information of the specified traffic group is displayed. Otherwise, the configuration information of all traffic groups is displayed.
Examples
# Display the configuration information of the traffic group somegroup.
<H3C> display traffic-accounting traffic-group somegroup
Traffic group : somegroup
1.1.1.0/255.255.255.0
Total 1 networks. Not referenced
# Display the configuration information of all traffic groups.
<H3C> display traffic-accounting traffic-group
Traffic group : default-group
0.0.0.0/0.0.0.0
Total 1 networks. Not referenced
Traffic group : somegroup
1.1.1.0/255.255.255.0
Total 1 networks. Not referenced
1.1.7 network
Syntax
network ip-address { mask | masklen }
undo network ip-address { mask | masklen }
View
Traffic group view
Parameters
ip-address: IP address.
mask: Subnet mask.
masklen: Mask length.
Description
Use the network command to add network segment.
Use the undo network command to delete network segment.
& Note:
Each traffic group is allowed to configure up to 512 traffic group addresses.
The network segment to be added in a traffic group shall not overlap the existed network segment in this traffic group, or be identical with the network segment in other traffic groups.
Examples
# Add a network segment.
<H3C> system-view
[H3C] traffic-accounting traffic-group somegroup
[H3C-traffic-group-somegroup] network 10.0.0.0 16
# Delete a network segment.
[H3C-traffic-group-somegroup] undo network 10.0.0.0 16
1.1.8 traffic-accounting accounting-slot
Syntax
traffic-accounting accounting-slot slot-num
undo traffic-accounting accounting-slot slot-num
View
System view
Parameters
slot-num: Slot number.
Description
Use the traffic-accounting accounting-slot command to specify a traffic accounting slot.
Use the undo traffic-accounting accounting-slot command to remove the specified traffic accounting slot.
By default, no slot is specified for traffic accounting.
Related commands: display traffic-accounting accounting-slot.
Examples
# Specify slot 6 for traffic accounting.
<H3C> system-view
[H3C] traffic-accounting accounting-slot 6
# Remove the specified traffic accounting slot 6.
[H3C] undo traffic-accounting accounting-slot 6
1.1.9 traffic-accounting traffic-group
Syntax
traffic-accounting traffic-group group-name
undo traffic-accounting traffic-group group-name
View
System view
Parameters
group-name: Name of a traffic group. The length of the name is up to 32 characters.
Description
Use the traffic-accounting traffic-group command to create a traffic group or enter an existed traffic group.
Use the undo traffic-accounting traffic-group command to delete the created traffic group.
The system is allowed to configure up to 7 traffic groups. And there is still a default traffic group which is not allowed to configure.
By default, there is a default traffic group.
Related commands: display traffic-accounting traffic-group.
Examples
# Create a traffic group test-group.
<H3C> system-view
[H3C] traffic-accounting traffic-group test-group
# Delete the created traffic group test-group.
[H3C] undo traffic-accounting traffic-group test-group
1.1.10 traffic-group
Syntax
traffic-group group-name rate idnum
View
Domain view
Parameters
group-name: Name of a traffic group
idnum: ID of the charging rate, in the range of 1 to 255, identifies different charging rate. Ignore the configuration for current implementation; leave it for extension.
Description
Use the traffic-group command to set a domain-applied traffic group.
Use the undo traffic-group command to cancel a domain-applied traffic group.
If a traffic group is applied to a domain, when a user who belongs to the domain accesses the traffic group, the generated traffic is accounted and the user is charged based on the generated traffic.
By default, no traffic group is applied to a domain.
Related commands: display traffic-accounting traffic-group.
Examples
# Configure to apply the traffic group “test-group” to domain “CAMS”. The rate is 1.
<H3C> system-view
[H3C] domain cams
[H3C-isp-cams] traffic-group test-group rate 1