FAQ - How to sniff incoming packets on an interface via CLI

Latest reply: Dec 28, 2013 20:44:23 4066 3 0 0

device AR 3200 V200R002C02

it's easy to capture the packets on inbound interface GE0/0/0; the packets match ACL 2013. Store the packets in the file capture.cap on the FLASH and display packet information on your terminal. Set the packet rate to 128 pps, timeout time to 100 seconds, number of packets to be captured to 50, and length of a packet to be stored to 60 bytes.

 

Example:

 

<Huawei> system-view

[Huawei] acl 2013 match-order auto

[Huawei-acl-basic-2013] rule permit

[Huawei-acl-basic-2013] quit

[Huawei] capture-packet interface gigabitethernet 1/0/0 acl 2013 destination file capture.cap terminal car cir 128 time-out 100 packet-num 50 packet-len 60  

Info: Captured packets will be showed on terminal and stored on flash:/capture.cap .

[Huawei]

  Packet: 1                                                                    

  -------------------------------------------------------                      

  ff ff ff ff ff ff 00 e0 fc 01 00 08 08 06 00 01                              

  08 00 06 04 00 01 00 e0 fc 01 00 08 02 01 01 03                              

  00 00 00 00 00 00 0b 01 01 01 00 00 00 00 00 00                              

  00 00 00 00 00 00 00 00 00 00 00 00                                          

  -------------------------------------------------------                      

                                                                               

  Packet: 2                                                                     

  -------------------------------------------------------                      

  ff ff ff ff ff ff 00 e0 fc 01 00 08 08 06 00 01                              

  08 00 06 04 00 01 00 e0 fc 01 00 08 02 01 01 03                              

  00 00 00 00 00 00 0b 01 01 01 00 00 00 00 00 00                              

  00 00 00 00 00 00 00 00 00 00 00 00                                          

  -------------------------------------------------------                       

                                                                               

  Packet: 3                                                                    

  -------------------------------------------------------                       

  ff ff ff ff ff ff 00 e0 fc 01 00 08 08 06 00 01                              

  08 00 06 04 00 01 00 e0 fc 01 00 08 02 01 01 03                              

  00 00 00 00 00 00 0a 01 01 01 00 00 00 00 00 00                              

  00 00 00 00 00 00 00 00 00 00 00 00                                          

  -------------------------------------------------------                      

.....................

command format

capture-packet interface interface-type interface-number [ acl acl-number ] destination { file file-name | terminal } * [ car cir cir-value | time-out time-out-value | packet-num packet-number | packet-len { packet-length | total-packet } ] *

  • x
  • convention:

kiroxan
Created Jun 25, 2013 15:55:01 Helpful(0) Helpful(0)

thanks
  • x
  • convention:

dab
Created Dec 24, 2013 23:11:15 Helpful(0) Helpful(0)

Hi, capture-packet is not available on VRP 5.20


[TEST]disp ver
Huawei Versatile Routing Platform Software
VRP Software, Version 5.20, Release 2105P04
Copyright (c) 1998-2010 Huawei Tech. Co., Ltd. All rights reserved.
Quidway AR19-13 uptime is 1 week, 0 day, 9 hours, 23 minutes
Last reboot 2007/01/01 00:00:23
System returned to ROM By Power-up.
*snip*

[TEST]c?
   call-watch
   card-mode
   ccc
   clock
   cluster
   command-alias
   command-privilege
   configuration
   configure-user
   connection-limit
   controller
   copyright-info
   cryptoengine
   cut
   cwmp

Any other ideas on how to remotely sniff the traffic?

  • x
  • convention:

StarOfWest
Created Dec 28, 2013 20:44:23 Helpful(0) Helpful(0)

For AR G2 i recommend to use local mirroring, and capture packets on wireshark host.
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login