Different versions may have different commands for capturing packets. Taking the MA5616V800R307C01 as an example, the following configures port mirroring to capture packets.
- Configure the remote packet capture.
huawei(diagnose)%%remote-capture parameters record-switch enable server-ip 10.71.94.221 source-ip 192.168.1.168 start-record-num 1 stop-record-num 2 udp-port 5000 vlan-tag 100
//10.71.94.221 is the IP address of the PC for packet capture and 192.168.1.168 is the media address of the ONU.
huawei(diagnose)%%
remote-capture trace frame/slot/port 0/3/1 auto-stop-time 400 0 base-trace enable extend-trace enable
//frame/slot/port 0/3/1 is the corresponding PSTN port.
- After packets are captured, run the following commands to disable the packet capture on the board and the packet capture by port mirroring.
huawei(diagnose)%%undo remote-capture trace frame/slot/port 0/3/1
NOTE:
Up to two ports can be configured for packet capture.