LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices

Reply
 
LinkBack Search this Thread
Old 07-09-2012, 06:15 AM   #1
thisismyname
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Rep: Reputation: Disabled
tcpdump in a kvm virtualised vm / bridge not promiscuously forwarding


Hi There,

that's what i want to do: Run tcpdump in a virtualized machine for capturing the packets coming in on a physical interface.
Some Server Data:
- Fujisu Server
- Ubuntu Server 12.04
- KVM for Virtualization
- much ram, many cpus
(i tried the macvtap driver for direct connection, but had serious problems with them)

So here's my network config on the host (/etc/network/interfaces):
Code:
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet manual
        bridge_ports eth0
        bridge_fd 0
        bridge_maxwait 0
        bridge_stp off
        bridge_agingtime 0
i also did a
Code:
/sbin/ifconfig eth0 promisc
/sbin/ifconfig br0 promisc
.
After that i was ableto watch the traffic counters climb on both interfaces. Now my virtual machine config, generated by virsh dumpxml <host> (snippet of the interface config):
Code:
    <interface type='bridge'>
      <mac address='52:54:00:65:b7:41'/>
      <source bridge='br0'/>
      <target dev='vnet2'/>
      <alias name='net2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </interface>
For that you probably want to know the brctl show output:
Code:
bridge name	bridge id		STP enabled	interfaces
br0		8000.001999c93109	no		eth0
							vnet2
I also did a /sbin/ifconfig eth0 promisc in the VM.
Doing a tcpdump -i eth0 -n -s0 -e actually does show me traffic from the interface. But only Layer2 Broadcast Traffic:
Code:
root@looky:~# tcpdump -i eth0 -n -s0 -e
tcpdump: WARNING: eth2: no IPv4 address assigned
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth2, link-type EN10MB (Ethernet), capture size 65535 bytes
13:08:06.618810 c4:64:13:xx:xx:xx > 01:00:0c:cc:cc:cc, 802.3, length 424: LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Cisco (0x00000c), pid CDP (0x2000): CDPv2, ttl: 180s, Device-ID 'CS1.router.com', length 402
13:09:01.367012 c4:64:13:xx:xx:xx > 01:00:0c:cc:cc:cc, 802.3, length 424: LLC, dsap SNAP (0xaa) Individual, ssap SNAP (0xaa) Command, ctrl 0x03: oui Cisco (0x00000c), pid CDP (0x2000): CDPv2, ttl: 180s, Device-ID 'CS1.router.com', length 402

So, how can i get the interface into forwarding every single packet?? (I'm not running any iptables or any other firewall)

thx 4 your help & greeetz myname
 
Old 07-09-2012, 08:27 AM   #2
thisismyname
LQ Newbie
 
Registered: Jul 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Figured it out

I solved the problem by manually typing: brctl setagingtime br0 0

There was no error generated. But the option bridge_agingtime 0 has been set in the /etc/network/interfaces.

How can I figure out where there's the error in my /etc/network/interfaces configuration? Is there a way to debug the /etc/network/interfaces??
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
KVM bridge and iptables zefir_psv Linux - Security 3 04-17-2012 06:54 AM
debian kvm - how to bridge? raindog308 Linux - Virtualization and Cloud 3 11-14-2011 11:07 AM
[SOLVED] Using KVM public bridge manually sfxpt Linux - Virtualization and Cloud 21 08-18-2010 09:31 AM
kvm bridge on cent os question riegersteve Linux - Virtualization and Cloud 1 07-14-2010 01:43 PM
Kvm using wireless bridge, how michaelux Linux - Virtualization and Cloud 1 06-07-2010 08:48 AM


All times are GMT -5. The time now is 01:21 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration