- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
04-MOD commands | 67.05 KB |
MOD commands
MDC is supported only when the device operates in standalone mode. For more information about standalone mode, see IRF configuration in Virtual Technologies Configuration Guide. For more information about MDC and device models that support MDC, see MDC configuration in Virtual Technologies Configuration Guide.
collector
Use collector to configure the encapsulation information for packets sent to the collector by MOD.
Use undo collector to restore the default.
Syntax
collector source-ip source-address destination-ip destination-address source-port source-port destination-port destination-port [ vlan vlan-id ]
undo collector
Defaults
The encapsulation information for packets sent to the collector by MOD is not configured.
Views
MOD view
Predefined user roles
network-admin
mdc-admin
Parameters
source-ip source-address: Specifies the source IP address for packets sent to the collector by MOD.
destination-ip destination-address: Specifies the destination IP address for packets sent to the collector by MOD.
source-port source-port: Specifies the source port number for packets sent to the collector by MOD.
destination-port destination-port: Specifies the destination port number for packets sent to the collector by MOD.
vlan vlan-id: Specifies the VLAN for packets sent to the collector by MOD.
Usage guidelines
The packets are encapsulated with the information specified by using this command and then routed to the remote collector.
Examples
# Encapsulate the packets sent to the collector by MOD with the following information: source IP address 10.10.10.10, destination IP address 20.20.20.20, source port number 10, and destination port number 20.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod] collector source-ip 10.10.10.10 destination-ip 20.20.20.20 source-port 10 destination-port 20
Related commands
telemetry mod
device-id
Use device-id to configure the device ID for MOD.
Use undo device-id to restore the default.
Syntax
device-id address
undo device-id
Defaults
No device ID is configured for MOD.
Views
MOD view
Predefined user roles
network-admin
mdc-admin
Parameters
address: Specifies the device ID for MOD. This argument can be any IPv4 address except 0.0.0.0. The device ID will be padded in the packets sent to the collector, so that the collector can identify the source of packets.
Examples
# Configure the device ID for MOD as 10.10.10.10.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod] device-id 10.10.10.10
Related commands
telemetry mod
display telemetry mod
Use display telemetry mod to display MOD configuration information.
Syntax
In standalone mode:
display telemetry mod [ slot slot-number ]
In IRF mode:
display telemetry mod [ chassis chassis-number slot slot-number ]
Views
Any view
Predefined user roles
network-admin
network-operator
mdc-admin
mdc-operator
Parameters
slot slot-number: Specifies a card by its slot number. If you do not specify a card, this command displays entries on the active MPU. (In standalone mode.)
chassis chassis-number slot slot-number: Specifies a card on an IRF member device. The chassis-number argument represents the member ID of the IRF member device. The slot-number argument represents the slot number of the card. If you do not specify this option, the command displays entries on the global active MPU. (In IRF mode.)
Examples
# Display MOD configuration information.
[Sysname] display telemetry mod
Status : Successful
Drop reason list :
invalid-tpid
unknown-vlan
Sampler : test1
Device ID : 192.168.56.2
Transport protocol : UDP
Collector
Source IP : 1.1.1.1
Destination IP : 1.1.1.2
Source port : 80
Destination port : 90
VLAN ID : 20
Table 1 Command output
Field |
Description |
Drop reason list |
Packet drop reasons: · None—No packet drop reason is configured. · acl-deny—The packet matched a deny ACL rule. · car-exceeded—Packet rate exceeded CAR. · higig-header-error—HiGig header error. · invalid-tpid—Invalid TPID. · ip-multicast-error—IP multicast packet error. · ipv4-dip-miss—The destination IPv4 address of a packet does not match a route or matches the default route. · ipv4-l3-header-error—IPv4 header error. · ipv6-dip-miss—The destination IPv6 address of a packet does not match a route or matches the default route. · parity-error—Parity error. · tunnel-header-error—Tunnel packet header error. · unknown-vlan—Unknown VLAN. |
Status |
Status of the MOD configuration: · Successful—The MOD configuration is configured successfully. · Failed—The flow group fails to take effect. · Inactive—No MOD configuration is configured. |
Transport protocol |
Transport protocol that MOD uses to send packets to the collector: · gRPC. · UDP. |
Collector |
Encapsulation information for packets sent to the collector by MOD. · Source IP. · Destination IP. · Source port. · Destination port. · VLAN ID. |
reason-list
Use reason-list to configure a list of packet drop reasons monitored by MOD.
Use undo reason-list to remove a list of packet drop reasons monitored by MOD.
Syntax
reason-list { reason-list | all }
undo reason-list { reason-list | all }
Defaults
No packet drop reasons monitored by MOD are configured. The device does not monitor packet drops.
Views
MOD view
Predefined user roles
network-admin
mdc-admin
Parameters
reason-list: Specifies a list of packet drop reasons. You can specify a space-separated list of up to eight reasons one time. Table 2 shows the possible packet drop reasons.
Value |
Description |
car-exceeded |
Packet rate exceeded CAR. |
acl-deny |
The packet matched a deny ACL rule. |
higig-header-error |
HiGig header error. |
invalid-tpid |
Invalid TPID. |
ip-multicast-error |
IP multicast packet error. |
ipv4-dip-miss |
The destination IPv4 address of a packet does not match a route or matches the default route. |
ipv4-l3-header-error |
IPv4 header error. |
ipv6-dip-miss |
The destination IPv6 address of a packet does not match a route or matches the default route. |
parity-error |
Parity error. |
tunnel-header-error |
Tunnel packet header error. |
unknown-vlan |
Unknown VLAN. |
all: Specifies all packet drop reasons.
Usage guidelines
If you execute the reason-list reason-list command multiple times, the added packet drop reasons accumulate.
If you execute the undo reason-list reason-list command multiple times, the deleted packet drop reasons accumulated.
Examples
# Configure MOD to monitor all packet drop reasons.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod] reason-list all
# Add packet drop reasons unknown-vlan to the list of packet drop reasons monitored by MOD.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod] reason-list unknown-vlan
Related commands
telemetry mod
sampler
Use sampler to enable sampling for MOD.
Use undo sampler to disable sampling for MOD.
Syntax
sampler sampler-name
undo sampler
Defaults
Sampling is disabled for MOD.
Views
MOD view
Predefined user roles
network-admin
mdc-admin
Parameters
sampler-name: Specifies a sampler by its name, a case-sensitive string of 1 to 31 characters.
Examples
# Enable sampling for MOD, and use the sampler named sampler1.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod] sampler sampler1
Related commands
sampler (Network Management and Monitoring Command Reference)
telemetry mod
telemetry mod
Use telemetry mod to enter MOD view.
Syntax
telemetry mod
Views
System view
Predefined user roles
network-admin
mdc-admin
Examples
# Enter MOD view.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod]
transport-protocol
Use transport-protocol to specify a protocol that MOD uses to send packets to the collector.
Use undo transport-protocol to restore the default.
Syntax
transport-protocol { grpc | udp }
undo transport-protocol
Default
MOD uses UDP to send packets to the collector.
Views
MOD view
Predefined user roles
network-admin
mdc-admin
Parameters
grpc: Uses gRPC to send packets to the collector.
udp: Uses UDP to send packets to the collector.
Usage guidelines
If you use UDP to send packets to the collector, you must configure the encapsulation information by using the collector command.
Examples
# Specify UDP for MOD to use to send packets to the collector.
<Sysname> system-view
[Sysname] telemetry mod
[Sysname-telemetry-mod] transport-protocol udp
Related commands
collector
telemetry mod