The sflow flow-sampling command enables flow sampling in a specified direction on an interface.
The undo sflow flow-sampling command disables flow sampling in a specified direction on an interface.
By default, flow sampling is enabled in both directions on an interface.
Parameter |
Description |
Value |
---|---|---|
inbound |
Enables flow sampling in the inbound direction. |
- |
outbound |
Enables flow sampling in the outbound direction. |
- |
Ethernet interface view, GE interface view, XGE interface view, 25GE interface view, MultiGE interface view, 40GE interface view, port group view
Usage scenario
You can specify the direction in which flow sampling is performed. Flow sampling can be performed in both inbound and outbound directions.
Precautions
The sflow flow-sampling rate command only applies to Layer 2 physical interfaces, but does not apply to Eth-Trunk or Layer 3 interfaces. However, this command takes effect on the Layer 3 interface which is switched from a Layer 2 interface using the undo portswitch command, and can take effect on Eth-Trunk member interfaces. If you run the sflow flow-sampling rate command multiple times, only the latest configuration takes effect.
# Enable flow sampling in the inbound direction.
<HUAWEI> system-view [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] sflow flow-sampling inbound
# Configure a port group pg1 that has member ports GE0/0/2 and GE0/0/3, and enable flow sampling in the inbound direction of the port group pg1.
[HUAWEI] port-group pg1 [HUAWEI-port-group-pg1] group-member gigabitethernet 0/0/2 [HUAWEI-port-group-pg1] group-member gigabitethernet 0/0/3 [HUAWEI-port-group-pg1] sflow flow-sampling inbound