391
Parameters
bytes-value
: Byte count threshold for session logging, in the range of 1 to 1000 megabytes.
Examples
# Set the byte count threshold for session logging to 10 megabytes.
<Sysname> system-view
[Sysname] session log byte-active 10
session log enable
Use
session log enable
to enable the session logging function.
Use
undo session log enable
to disable the session logging function.
Syntax
session log enable
[
acl
acl-number
] {
inbound
|
outbound
}
undo session log enable
[
acl
acl-number
] {
inbound
|
outbound
}
Default
The session logging function is disabled.
Views
Interface view
Default command level
2: System level
Parameters
acl
acl-number
: Specifies the ACL to be used to match sessions for logging. The value range for the
acl-number
argument is 2000 to 3999.
Inbound
: Specifies session logs in the inbound direction.
outbound
: Specifies session logs in the outbound direction.
Usage guidelines
If you do not specify the
acl
acl-number
option, the command enables session logging for all
sessions on the interface.
You can enable session logging on an interface in a single direction or both directions. In each
direction, you can configure only one ACL. If you configure multiple ACLs in one direction, only the
latest one takes effect.
Examples
# Enable session logging on interface GigabitEthernet 3/0/1 for all sessions in the inbound direction.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/1
[Sysname-GigabitEthernet3/0/1] session log enable inbound
# Enable session logging on interface GigabitEthernet 3/0/2 for sessions matching ACL 2050 in the
outbound direction.
<Sysname> system-view
[Sysname] interface gigabitethernet 3/0/2
[Sysname-GigabitEthernet3/0/2] session log enable acl 2050 outbound