H3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)

HomeSupportSwitchesH3C S7500 Switch SeriesReference GuidesCommand ReferencesH3C S7500 Series Command Manual(Release 3100 Series)-(V1.04)
20-Traffic Accounting Commands
Title Size Download
20-Traffic Accounting Commands 56 KB

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 accounting 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

System View: return to User View with Ctrl+Z.

[H3C] traffic-accounting accounting-slot 3

[H3C-accounting-slot-3] accounting enable

# Disable the traffic accounting function.

[H3C-accounting-slot-3] 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 set the accounting mode to traffic accounting.

Use the undo accounting-mode traffic command to restore the default accounting mode.

By default, the system adopts the time-based accounting mode.

Examples

# Set the accounting mode to traffic accounting.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] domain cams

[H3C-isp-cams] accounting-mode traffic

# Restore the default accounting mode.

[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 turn on debugging for traffic accounting.

Use the undo debugging traffic-accounting event command to turn off debugging for traffic accounting.

By default, debugging is turned off for traffic accounting.

Examples

# Turn on 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: Traffic accounting slot.

Description

Use the display traffic-accounting-slot command to display the configuration information of the traffic accounting slots.

If you specify the slot-num argument, the command is executed to display the configuration information of the specified traffic accounting slot. Otherwise, the command is executed to display the configuration information of all traffic accounting slots.

 

&  Note:

At present, the system supports only one traffic accounting slot. Therefore the same configuration information is displayed regardless of whether you specify the traffic accounting slot.

 

Examples

# Display the configuration information of traffic accounting slot 3.

<H3C> display traffic-accounting accounting-slot 3

Accounting slot number : 2

 traffic-slot 3

 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 accounting statistics of one or all online users.

If you specify the ip-address argument, the command is executed to display the traffic accounting statistics of the specified online IP address. Otherwise, this command is executed to display the traffic accounting statistics of all the online IP addresses.

Examples

# Display the traffic accounting statistics of all online users.

<H3C> display traffic-accounting statistics

User IP: 10.0.0.1

  group name :somegroup

    output octets low-32: 1920           output octets high-32: 0

    input octets low-32 : 480           input octets high-32 : 0

 

User IP: 10.0.0.2

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 one or all traffic groups.

If you specify the group-name argument, this command is executed to display the configuration information of the specified traffic group. Otherwise, it is executed to display the configuration information of all traffic groups.

Examples

# Display the configuration information of the traffic group named somegroup.

<H3C> display traffic-accounting traffic-group somegroup

Traffic group : somegroup

      1.1.1.0/255.255.255.0

      not used    

# 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

      not used

Traffic group : somegroup

      1.1.1.0/255.255.255.0

      used

1.1.7  network

Syntax

network ip-address { mask | mask-len }

undo network ip-address { mask | mask-len }

View

Traffic group view

Parameters

ip-address: IP address.

mask: Subnet mask.

Mask-len: Mask length.

Description

Use the network command to configure a network address for the traffic group, so as to add a destination network segment to the traffic group.

Use the undo network command to remove a network address from the traffic group, so as to remove a destination network segment from the traffic group.

 

&  Note:

The address range of the network segment to be set for a traffic group can neither overlap the existing address range of this traffic group nor be identical with the address range of any other traffic group.

 

Examples

# Add a network segment to the traffic group named somegroup.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] traffic-accounting traffic-group somegroup

[H3C-traffic-group-somegroup] network 10.0.0.0 16

# Remove the network segment from the traffic group.

[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 as a traffic accounting slot.

Related commands: display traffic-accounting accounting-slot.

Examples

# Specify slot 2 as the traffic accounting slot.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] traffic-accounting accounting-slot 2

# Remove the specified traffic accounting slot 2.

[H3C] undo traffic-accounting accounting-slot 2

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, a string of up to 32 characters.

Description

Use the traffic-accounting traffic-group command to create a traffic group or enter the view of an existing traffic group.

Use the undo traffic-accounting traffic-group command to delete an existing traffic group.

The system allows you to configure up to 15 traffic groups. In addition, there is a default traffic group that you are 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

System View: return to User View with Ctrl+Z.

[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 id-num

View

Domain view

Parameters

group-name: Name of a traffic group.

id-num: Charging rate ID, in the range 1 to 255, used to identify different charging rates. This argument is ignored in the current command, and it is reserved for future use.

Description

Use the traffic-group command to configure the domain to use a traffic group.

Use the undo traffic-group command to cancel the configuration.

If a domain is configured to use a traffic group, the generated traffic is measured when a user belonging to the domain accesses an address in the traffic group and the user is charged for the traffic.

By default, no traffic group is used by a domain.

Related commands: display traffic-accounting traffic-group.

Examples

# Configure the domain CAMS to use the traffic group test-group, with the charge rate of 1.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] domain cams

[H3C-isp-cams] traffic-group test-group rate 1

1.1.11  traffic-slot

Syntax

traffic-slot slot-num

undo traffic-slot slot-num

View

Traffic accounting view

Parameters

slot-num: Slot number.

Description

Use the traffic-slot command to specify a traffic collection card.

Use the undo traffic-slot command to cancel the specified traffic collection card.

By default, no traffic collection card is specified.

Related commands: traffic-accounting accounting-slot.

Examples

# Specify slot 2 as the traffic accounting slot and slot 3 as the traffic collection slot.

<H3C> system-view

System View: return to User View with Ctrl+Z.

[H3C] traffic-accounting accounting-slot 2

[H3C-accounting-slot-2] traffic-slot 3

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
All Support
  • Become a Partner
  • Partner Resources
  • Partner Business Management
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网