Ethernet Switching
Ethernet Switching

Capture packet in or out of interfaces

‎09-15-2011 07:46 PM

Hi all, 

 

Does oneany know the way to capture packet in and out of a switch interface ? 

 

Thanks so much for your help.

3 REPLIES 3
Ethernet Switching

Re: Capture packet in or out of interfaces

‎09-16-2011 04:32 AM

Hello,

This depends on platform and nature of traffic.

You can capture locally-generated and locally-terminated packets on Juniper router or switch or SRX box using this command:

 

user@node> monitor traffic interface <iface-name> no-resolve size 9999 write-file /var/tmp/<filename>

 "write-file" is a hidden option, you have to type it in full. File format is PCAP, you can directly open it in Wireshark after downloading. You may also notice that locally-generated packets may or may not be captured depending on PIC used.

With transit traffic, you have 2 options:

1/ port-mirroring into a different port with connected laptop/analyzer/PC with Wireshark. Port-mirroring also captures locally-originated and locally-terminated traffic.

2/ _only_ on Jseries or branch SRX: "packet-capture" feature

http://kb.juniper.net/InfoCenter/index?page=content&id=KB11709

HTH

Rgds

Alex

 

 

 

 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !
Ethernet Switching

Re: Capture packet in or out of interfaces

‎09-20-2011 01:14 AM

Hi Aarseniv,

 

 

Just want to ask the command that u write can be use in MX also right? Thanks and appreciate your feedback.

Ethernet Switching

Re: Capture packet in or out of interfaces

‎09-20-2011 01:41 PM

Correct, "monitor traffic interface" can be used on MX router to capture locally-generated and/or locally-originated traffic.

Rgds

Alex 

_____________________________________________________________________

Please ask Your Juniper account team about Juniper Professional Services offerings.
Juniper PS can design, test & build the network/part of the network as per Your requirements

+++++++++++++++++++++++++++++++++++++++++++++

Accept as Solution = cool !
Accept as Solution+Kudo = You are a Star !