title: capture network traffic on two different ports simultaneously
body: <p>I wish to capture tcpdump traffic on two different ports simultaneouly .</p>
  
  <p>I tried this ..</p>
  
  <pre><code>  $ tcpdump port 21 ; tcpdump port 22
  </code></pre>
  
  <p>Althoug it worked but problem is first it will wait for traffic on port 21 and when interrupted then it will wait for port 22.</p>
  
  <p>Also another problem is it will not capture the traffic on port 22 untill traffic on port 21 will be captured.</p>
  
  <p>I want an order free solution means in whatever order packet arrives if they are for port 21 or 22 they should be captured .</p>
  
  <p>Please help me on this !!!</p>
  
  <p><strong>EDIT :</strong></p>
  
  <p>Sorry I did not specified it before the actual command I am trying to run is this ..</p>
  
  <pre><code>  $ tcpdump -X -s0 protochain 50
  </code></pre>
  
  <p>and</p>
  
  <pre><code>  $ tcpdump -X -s0 protochain 51
  </code></pre>
  
  <p>Now I need to use 50 and 51 both simultaneously ..</p>