This section provides a sample of configuring real-time traffic statistics using the rpc method.
Operation |
XPATH |
---|---|
rpc |
|
Item | Data | Description |
---|---|---|
Destination IPv4 address of packets | 10.10.10.2 | Perform real-time traffic statistics on the packets that meet the preceding conditions. |
Transport-layer destination port number of packets | 4 | |
Destination MAC address of packets | 12:34:12:34:12:34 | |
Source IPv4 address of packets | 10.10.10.1 | |
Transport-layer source port number of packets | 5 | |
Source MAC address of packets | 12:34:22:34:ff:ee | |
Protocol number of packets | 6 | |
Timeout interval for real-time traffic statistics | 30 |
<?xml version="1.0" encoding="UTF-8"?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <huawei-capture:trace-pkt xmlns:huawei-capture="urn:huawei:params:xml:ns:yang:huawei-capture"> <huawei-capture:destination-ip-address>10.10.10.2</huawei-capture:destination-ip-address> <huawei-capture:destination-port>4</huawei-capture:destination-port> <huawei-capture:destination-mac>12:34:12:34:12:34</huawei-capture:destination-mac> <huawei-capture:source-ip-address>10.10.10.1</huawei-capture:source-ip-address> <huawei-capture:source-port>5</huawei-capture:source-port> <huawei-capture:source-mac>12:34:22:34:ff:ee</huawei-capture:source-mac> <huawei-capture:protocol>6</huawei-capture:protocol> <huawei-capture:timeout>30</huawei-capture:timeout> </huawei-capture:trace-pkt> </rpc>
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <data> <result>respond</result> </data> </rpc-reply>
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <data> <result>processing</result> </data> </rpc-reply>
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-path>/huawei-capture:trace-pkt/timeout</error-path> <error-message>Value "301" does not satisfy the constraint "1..300" (range, length, or pattern).</error-message> </rpc-error> </rpc-reply>