LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-16-2011, 07:40 AM   #1
MarkRaats
LQ Newbie
 
Registered: Dec 2010
Posts: 12

Rep: Reputation: 0
Wireshark monitor options


Hello,

Ive a server with 2 nics. I can monitor them both so thats not the problem.
What do I want?

If I ping or visit a website at 10.0.0.11 (is the ip address of nic1) I saw it in wireshark
if I ping or visit a website at 192.1.1.101 (is the ip address of nic2) I saw it in wireshark

But
If i ping or visit a website at 10.0.0.12 or at 192.1.1.100 wireshark dont monitor that... how can I monitor the whole IP range like 10.0.0.10 to 10.0.0.15 and 192.1.1.100 to 192.1.1.200 or something like that?

Greets Mark
 
Old 06-16-2011, 07:46 AM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
Wireshark doesn't care about the network range, just the interface to watch for traffic on. If you want to see the communication between your machine and a website on the 10.0.0.x network for example, then you'll need wireshark to listen on the interface that the traffic will be sent out - nic1 in this case.
 
Old 06-16-2011, 07:54 AM   #3
ambrop7
Member
 
Registered: May 2011
Distribution: Gentoo
Posts: 98

Rep: Reputation: 16
You won't see much of other traffic of you use a switch. That's because the switch forwards frames only towards the destination if it know where the destination is. There are multiple ways to achieve what you want:

1. You can monitor the traffic going through a specific cable by running it through two bridged NICs.

For example, if you have a cable between A and B, you can do the following to monitor traffic through that cable:

- Connect two NICs to some system. These NICs should be used for this purpose only.
- Bridge the two NICs:

Code:
brctl addbr br0
brctl addif br0 eth4
brctl addif br0 eth5
ifconfig br0 up
ifconfig eth4 up
ifconfig eth5 up
- Remove the cable between A and B. Instead, connect A to eth4, and B to eth5.
- Run Wireshark on either eth4 or eth5.

2. Similarly, you can get rid of the switch and instead use some computer as a switch - using one network card for one port, and bridge them all as above. Then capture on br0.

3. Do ARP poisoning to make everything go through some host (try ettercap). Doesn't require extra hardware.

4. Use a hub instead of a switch. A hub broadcasts all traffic to all ports, allowing every system connected to the hub to see all frames.

Last edited by ambrop7; 06-16-2011 at 08:05 AM.
 
Old 06-16-2011, 08:27 AM   #4
MarkRaats
LQ Newbie
 
Registered: Dec 2010
Posts: 12

Original Poster
Rep: Reputation: 0
Thank you for responding. Ive 2 networks
- 10.0.0.x
- 192.1.1.x

Ive one 'master' Server with a NIC in the 10.0.0.x range (10.0.0.11) and a NIC in the 192.1.1.x range (192.1.1.101)
But its a virtual Server and the 2 networks are also virtual LANs. (using VMware)

So the 'master' server is for monitor the both network environments. So there are no physical network cable's or switches.
 
Old 06-16-2011, 08:55 AM   #5
ambrop7
Member
 
Registered: May 2011
Distribution: Gentoo
Posts: 98

Rep: Reputation: 16
If I'm getting this right, you have a network (10.0.0.0/24), where 10.0.0.11 is the address on the host's interface, and there are two or more VMs in that network; and you want to see the packets between the two VMs.

I think the problem is that is, when one VM sends a frame to the other, the software-based switch in VMWare forwards it directly to to other VM, and the host never sees it. I've searched if it is possible to make the switch forward all frames to the host, but found nothing.

This can be worked around by bridging manually. This means, instead of having VMWare manage this whole subnet (through a single host NIC, and maybe by running its integrated DHCP and DNS servers), you would use one virtual host NIC per virtual machine, and tell VMWare to not manage those interfaces; that is, not configure IP address and not run DHCP and DNS servers. This will give your host one virtual NIC per VM, without any IP addresses assigned. Then simply bridge all those in the host the usual Linux way (brctl), assign an IP address to the bridge interface, and possibly run a DHCP or DNS server on the bridge interface (e.g. dnsmasq).

Now if one VM sends a frame directly to the other, it will always go through the bridge, and will be caught by running Wireshark on the bridge interface.

Last edited by ambrop7; 06-16-2011 at 08:56 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ZD1211B in monitor mode 3.5h only captures Beacon and Probes with Wireshark 99.5 HLP Lopes_sma Linux - Networking 1 07-07-2007 01:40 PM
How to configure a ZD1211B wireless stick to monitor mode on Wireshark using Fedora 7 Lopes_sma Linux - Software 8 07-03-2007 09:59 AM
Help with KNOPPIX 5.1.1/wireshark/monitor mode? liko Linux - Software 1 03-12-2007 07:16 AM
Remote Monitor Options? EwanG Linux - Hardware 2 10-31-2004 08:17 PM
New Monitor? Need to change Resolution Options marct1974 Linux - Hardware 1 04-03-2004 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration