09-Network Management Configuration Guide

HomeSupportReference GuidesCommand ReferencesH3C Access Controllers Command References(E3703P61 R2509P61 R3709P61 R2609P61 R3509P61)-6W10209-Network Management Configuration Guide
10-Flow Log Commands
Title Size Download
10-Flow Log Commands 49.53 KB

Flow log configuration commands

display userlog export

Use display userlog export to display flow log configuration and statistics.

Syntax

display userlog export [ | { begin | exclude | include } regular-expression ]

Views

Any view

Default command level

1: Monitor level

Parameters

|: Filters command output by specifying a regular expression. For more information about regular expressions, see Fundamentals Configuration Guide.

begin: Displays the first line that matches the specified regular expression and all lines that follow.

exclude: Displays all lines that do not match the specified regular expression.

include: Displays all lines that match the specified regular expression.

regular-expression: Specifies a regular expression, which is a case sensitive string of 1 to 256 characters.

Usage guidelines

If no log servers are specified as the destination for flow log export, this command displays "No userlog export is enabled."

To specify a log server, use the userlog flow export host command.

Examples

# Display flow log configuration and statistics.

<Sysname> display userlog export

 nat:

   No userlog export is enabled

 

 flow:

   Export Version 1 logs to log server : enabled

   Source address of exported logs   : 1.1.1.1

   Address of log server               : 2.2.3.3 (port: 2000)

   VPN-instance                          : -NA-

   Total logs/UDP packets exported   : 0/0

   Address of log server               : 2.2.4.3 (port: 2000)

   Total logs/UDP packets exported   : 0/0

   Logs in buffer                        : 0

Table 1 Command output

Field

Description

nat

NAT log configuration and statistics.

No userlog export is enabled

No NAT log entries are sent to log servers. Possible reasons:

·     No log servers are specified as the destination for flow log export.

·     The userlog flow syslog command is configured and NAT log entries are sent to the information center.

flow

Flow log configuration and statistics.

No userlog export is enabled

No flow log entries are sent to log servers. Possible reasons:

·     No log servers are specified as the destination for flow log export.

·     The userlog flow syslog command is configured and flow log entries are sent to the information center.

Export Version 1 logs to log server

Export flow log packets of version 1.0 to log servers.

Source address of exported logs

Source IP address of the packets that contained the flow log entries (this field is not displayed if the source IP address is not configured).

Address of log server

IP address and port number of the log server.

Total logs/UDP packets exported

Total number of exported flow log entries and total number of UDP packets used to export the flow log entries.

A UDP packet can contain multiple flow log entries.

Logs in buffer

Total number of flow logs in the buffer.

 

reset userlog flow export

Use reset userlog flow export to clear flow log statistics.

Syntax

reset userlog flow export

Views

User view

Default command level

2: System level

Examples

# Clear flow log statistics.

<Sysname> reset userlog flow export

reset userlog flow logbuffer

Use reset userlog flow logbuffer to clear flow logs in the buffer.

Syntax

reset userlog flow logbuffer

Views

User view

Default command level

2: System level

Usage guidelines

Flow log entries are saved in the buffer before being exported to the information center or log server.

Examples

# Clear flow log entries in the buffer.

<Sysname> reset userlog flow logbuffer

userlog flow export host

Use userlog flow export host to specify an IPv4 log server to receive flow log entries.

Use undo userlog flow export host to remove an IPv4 log server.

Syntax

userlog flow export host ipv4-address udp-port

undo userlog flow export host ipv4-address

Default

No IPv4 log servers are specified.

Views

System view

Default command level

2: System level

Parameters

ipv4-address: Specifies the IPv4 address of the log server.

udp-port: Specifies the UDP port number of the log server, in the range of 0 to 65535. To avoid collision with well-known UDP port numbers, H3C recommends that you use UDP port numbers in the range 1025 to 65535.

Usage guidelines

The device supports a maximum of two log servers (IPv4 or IPv6) as the destinations for flow log export. When the limit is reached, remove an existing log server and then specify a new one. If you specify a log server that has the same IP address but a different port number than an existing server, the new configuration overwrites the previous one.

Examples

# Export flow log entries to UDP port 2000 on the log server at 1.2.3.6.

<Sysname> system-view

[Sysname] userlog flow export host 1.2.3.6 2000

Related commands

userlog flow export host ipv6

userlog flow export host ipv6

Use userlog flow export host to specify an IPv6 log server to receive flow log entries.

Use undo userlog flow export host to remove an IPv6 log server.

Syntax

userlog flow export host ipv6 ipv6-address udp-port

undo userlog flow export host ipv6 ipv6-address

Default

No IPv6 log servers are specified.

Views

System view

Default command level

2: System level

Parameters

ipv6-address: Specifies the IPv6 address of the log server.

udp-port: Specifies the UDP port number of the log server, in the range of 0 to 65535. To avoid collision with well-known UDP port numbers, H3C recommends that you use UDP port numbers in the range 1025 to 65535.

Usage guidelines

The device supports a maximum of two log servers (IPv4 or IPv6) as the destinations for flow log export. When the limit is reached, remove an existing log server and then specify a new one. If you specify a log server that has the same IP address but a different port number than an existing server, the new configuration overwrites the previous one.

Examples

# Export flow log entries to UDP port 2000 on the log server at the IPv6 address 1::1.

<Sysname> system-view

[Sysname] userlog flow export host ipv6 1::1 2000

Related commands

userlog flow export host

userlog flow export source-ip

Use userlog flow export source-ip to specify a source IP address for flow log packets.

Use undo userlog flow export source-ip to restore the default.

Syntax

userlog flow export source-ip ip-address

undo userlog flow export source-ip

Default

The source IP address of flow log packets is the IP address of their outgoing interface.

Views

System view

Default command level

2: System level

Parameters

ip-address: Specifies an IP address.

Examples

# Specify 1.2.1.2 as the source IP address for flow log packets.

<Sysname> system-view

[Sysname] userlog flow export source-ip 1.2.1.2

Related commands

userlog flow export host

userlog flow export version

Use userlog flow export version to set the flow log version.

Use undo userlog flow export version to restore the default.

Syntax

userlog flow export version version-number

undo userlog flow export version

Default

The flow log version is 1.0.

Views

System view

Default command level

2: System level

Parameters

version-number: Specifies a flow log version. Available options are 1 and 3.

Usage guidelines

If you set the flow log version multiple times, the most recent setting takes effect.

Examples

# Set the flow log version to 3.0.

<Sysname> system-view

[Sysname] userlog flow export version 3

userlog flow syslog

Use userlog flow syslog to specify the information center as the destination for flow log export.

Use undo userlog flow syslog to restore the default.

Syntax

userlog flow syslog

undo userlog flow syslog

Default

Flow log entries are not exported to the information center.

Views

System view

Default command level

2: System level

Usage guidelines

You can export flow log entries to log servers or the information center, but not both. If both methods are configured, the system exports flow log entries to the information center.

Flow log entries are storage intensive. To export flow log entries to the information center, make sure the storage space is sufficient.

Examples

# Specify the information center as the destination for flow log export.

<Sysname> system-view

[Sysname] userlog flow syslog

 

 

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