Configuring MoD
MoD supports two modes: Ware-flow mode and unware-flow mode. The configuration steps are different.
Ware-flow Mode
To configure MoD of the ware-flow mode, take the following steps:
Step 1 (Optional) Configure the MoD as ware-flow mode. By default, it is unware-flow mode.
set telemetry mod mode ware-flow
NOTE:
The Trident4-X9 platform supports both ware-flow mode and unware-flow mode. The platforms of Tomahawk4 and Tomahawk5 support only unware-flow mode.
Step 2 Configure the quintuple to match the flow. You can configure one or multiple quintuple parameters.
set telemetry mod flow <flow-name> [source-ipv4 <source-ipv4-address> | destination-ipv4 <destination-ipv4-address> | source-port <source-port> | destination-port <destination-port> | protocol <protocol>]
NOTEs:
If the configured protocol is not TCP or UDP, the configured source port and destination port are invalid.
If you configure different flows with partially identical quintuple configurations, the flow with finer granularity quintuples has the higher priority. For example, if the source IP addresses of two flows are the same, the flow with other quintuple configurations has the higher priority.
Step 3 (Optional) Configure the user-defined group with one or multiple predefined reasons. By default, the predefined groups are provided. For details of predefined groups and reasons, see Predefined Drop Groups and Reasons.
set telemetry mod drop-group user-defined <group-name> drop-reason {ingress-l2-src-static-move-drop | ingress-l2-dst-lookup-miss | ingress-l2-dst-discard | ingress-l3-dst-lookup-miss | ingress-l3-dst-discard | ingress-l3-header-err | ingress-l3-ttl-err}
NOTEs:
The platforms of Tomahawk4 and Tomahawk5 don’t support the ingress-l2-dst-lookup-miss reason.
Currently, reasons of ingress-l2-src-static-move-drop, ingress-l2-src-discard, ingress-l2-dst-lookup-miss, ingress-l2-dst-discard, and ingress-l3-dst-discard are only available for the technical support personnel.
Step 4 Bind the flow with the packet drop group. You can specify multiple predefined groups and user-defined groups.
set telemetry mod flow <flow-name> drop-group <group-name>
Step 5 To report the collected information to the remote collector, configure the destination routing or enable the gRPC.
To mirror the packets with collected information to the collector through the destination routing, configure the destination address.
set telemetry mod export destination-ipv4 <destination-ipv4 address> {source-ipv4 <source-ipv4-address> | source-port <source-port> | destination-port <destination-port>}
NOTEs:
Only one destination address can be configured. When you configure multiple addresses, the error prompts appear.
For the management interface eth0 cannot mirror packets, you cannot configure its IP address as the source IP address to communicate with the remote collector (destination address). Besides, you cannot configure the IP address of a LAG interface as the source IP address.
The source IP address and source port must be configured. The destination port is optional, and the default value is 4739.
To report the collection information to the collector through gRPC, enable the gRPC agent function.
set protocols grpc enable true
Step 6 (Optional) When configuring the destination address, you can configure the global sampling frequency for dropped packets as needed. By default, all dropped packets are mirrored to the remote collector with the specified destination address.
set telemetry mod export destination-ipv4 <destination-ipv4 address> sample random rate n-power <value>
NOTEs:
Only one destination address can be configured. When you configure multiple addresses, the error prompts appear.
Only when MoD is in the ware-flow mode, the sampling frequency can be configured.
Step 7 Commit the configuration.
commit
Step 8 (Optional) View the predefined drop reason lists with the default drop group.
run show telemetry mod drop-reason-list
Step 9 (Optional) View all drop group lists with the corresponding reasons.
run show telemetry mod drop-group-list
Step 10 (Optional) View the detailed information of flow lists, including the flow name, quintuples, drop groups, and drop reasons.
run show telemetry mod flow-list
Step 11 (Optional) View the detailed information of export lists, including the source IPv4 address, source port, destination IPv4 address, and destination port.
run show telemetry mod export-list
Step 12 (Optional) View detailed information of all MoD configuration, including the mode, drop group lists, reasons, flow lists and export lists.
run show telemetry mod detail
Step 13 (Optional) View the dropped packets statistics of specified flows or all flows.
run show telemetry mod flow <flow-name> drop-packets-statistics
run show telemetry mod all-flow drop-packets-statistics
Unware-flow mode
To configure MoD of the unware-flow mode, take the following steps:
Step 1 (Optional) Configure the MoD as unware-flow mode. By default, it is unware-flow mode.
set telemetry mod mode unware-flow
NOTE:
The Trident4-X9 platform supports both ware-flow mode and unware-flow mode. The platforms of Tomahawk4 and Tomahawk5 support only unware-flow mode.
Step 2 (Optional) Configure the user-defined group with one or multiple predefined reasons. By default, the predefined groups are provided. For details of predefined groups and reasons, see Predefined Drop Groups and Reasons.
set telemetry mod drop-group user-defined <group-name> drop-reason {ingress-l2-src-static-move-drop | ingress-l2-dst-lookup-miss | ingress-l2-dst-discard | ingress-l3-dst-lookup-miss | ingress-l3-dst-discard | ingress-l3-header-err | ingress-l3-ttl-err}
NOTEs:
The platforms of Tomahawk4 and Tomahawk5 don’t support the ingress-l2-dst-lookup-miss reason.
Currently, reasons of ingress-l2-src-static-move-drop, ingress-l2-src-discard, ingress-l2-dst-lookup-miss, ingress-l2-dst-discard, and ingress-l3-dst-discard are only available for the technical support personnel.
Step 3 Configure the packet drop group. Multiple groups can be configured. The packets that match any drop group are dropped.
set telemetry mod unware-flow drop-group <group-name>
Step 4 To report the collected information to the remote collector, configure the destination routing or enable the gRPC.
To mirror the packets with collected information to the collector through the destination routing, configure the destination address.
set telemetry mod export destination-ipv4 <destination-ipv4 address> {source-ipv4 <source-ipv4-address> | source-port <source-port> | destination-port <destination-port>}
NOTEs:
Only one destination address can be configured. When you configure multiple addresses, the error prompts appear.
For the management interface eth0 cannot mirror packets, you cannot configure its IP address as the source IP address to communicate with the remote collector (destination address). Besides, you cannot configure the IP address of a LAG interface as the source IP address.
The source IP address and source port must be configured. The destination port is optional, and the default value is 4739.
To report the collection information to the collector through the gRPC, enable the gRPC agent function.
set protocols grpc enable true
Step 5 Commit the configuration.
commit
Step 6 (Optional) View the predefined drop reason lists with the default drop group.
run show telemetry mod drop-reason-list
Step 7 (Optional) View all drop group lists with the corresponding reasons.
run show telemetry mod drop-group-list
Step 8 (Optional) View detailed information of all MoD configurations, including mode, drop group lists, reasons, flow lists, and export lists.
run show telemetry mod detail
Step 9 View the configured drop groups when the MoD is configured as the unware-flow mode.
run show telemetry mod unware-flow info
Step 10 View the dropped packets statistics that match the corresponding reasons when the MoD is configured as the unware-flow mode.
run show telemetry mod unware-flow drop-statistics