Nope, that's not how libpcap nor tcpdump work - at least in current versions
- when you open the device, you get all packets:

# ifconfig 
eth0      Link encap:Ethernet  HWaddr 00:60:08:93:2D:39  
          inet addr:192.168.142.103  Bcast:192.168.142.255
Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5028232 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2721074 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2527557706 (2410.4 Mb)  TX bytes:317644674 (302.9 Mb)
          Interrupt:14 Base address:0x9800 

eth0:1    Link encap:Ethernet  HWaddr 00:60:08:93:2D:39  
          inet addr:192.168.143.1  Bcast:192.168.143.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6514249 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:481582243 (459.2 Mb)  TX bytes:0 (0.0 b)
          Interrupt:14 Base address:0x9800 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:458 errors:0 dropped:0 overruns:0 frame:0
          TX packets:458 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:387836 (378.7 Kb)  TX bytes:387836 (378.7 Kb)

19:58:11 tigger [Linux] **root*** pwd=~ # tcpdump -i eth0:1 -c5 -n
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0:1, link-type EN10MB (Ethernet), capture size 96 bytes
19:58:13.890260 IP 192.168.142.100.1350 > 192.168.142.103.ssh: . ack
2162439966 win 64435
19:58:13.890537 IP 192.168.142.103.ssh > 192.168.142.100.1350: P 1:225(224)
ack 0 win 10720
19:58:14.091420 IP 192.168.142.100.1350 > 192.168.142.103.ssh: . ack 225 win
64211
19:58:14.091598 IP 192.168.142.103.ssh > 192.168.142.100.1350: P
225:449(224) ack 0 win 10720
19:58:14.092330 IP 192.168.142.100.1350 > 192.168.142.103.ssh: . ack 449 win
65535
5 packets captured
6 packets received by filter
0 packets dropped by kernel

Note that while I'm listening to eth0:1, I'm actually getting the eth0
packets.

-----Burton 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of
Antonio Pennino
Sent: Thursday, March 03, 2005 11:45 AM
To: [email protected]
Subject: RE: [Ntop] NTOP v.2.0.0 (WOODY) and virtual interfaces

Organization:           Centro di Servizi per la rete di Ateneo - Pisa -
Italy
From:                   "Burton Strauss" <[EMAIL PROTECTED]>
To:                     <[email protected]>
Subject:                RE: [Ntop] NTOP v.2.0.0 (WOODY) and virtual
interfaces
Date sent:              Thu, 3 Mar 2005 11:03:18 -0600
Copies to:              Send reply to:          [email protected]
        <mailto:[EMAIL PROTECTED]>
        <mailto:[EMAIL PROTECTED]>

> libpcap doesn't differentiate between the virtual and physical

with tcpdump i may... tcpdump src nnn -i eth1:1 and it work.

Why is not possible with ntop?

My goal is separate count of traffic for the IP on the eth1:*


============================================
Antonio Pennino
Nocera Informatica s.r.l.

telefono: 035/4219033
telefax : 035/4219050

e-mail  : [EMAIL PROTECTED]
============================================

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

_______________________________________________
Ntop mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop

Reply via email to