LinuxQuestions.org
Visit Jeremy's Blog.
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 12-18-2013, 12:23 PM   #1
midorikawa
LQ Newbie
 
Registered: Oct 2012
Posts: 19

Rep: Reputation: Disabled
Networking using bridged interfaces to KVM guests


I'm sure I'm missing something obvious here, but here goes:

I've got a KVM guest running, connected via bridge interface to eth0 - br0. br0 also has 2 VLANs, br0.1 and br0.2. These correlate to eth0.1 and eth0.2 in the guest. From the guest, I can ping br0.1's address, but I can't ping any other address on that VLAN. From the host, I can ping both KVM guest, and anything else on that VLAN. Here's what this segment of my network looks like:

Code:
VLAN1 -- eth0 --- br0.1
                      |
                      |
               Guest eth0.1

routing table on my guest:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
EXT_NW          0.0.0.0         255.255.255.248 U     0      0        0 eth1
10.0.5.0        0.0.0.0         255.255.255.0   U     0      0        0 eth2
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0.1
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 eth0.2
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0        0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U     1018   0        0 eth0.1
169.254.0.0     0.0.0.0         255.255.0.0     U     1019   0        0 eth0.2
0.0.0.0         EXT_GW          0.0.0.0         UG    0      0        0 eth1
Routing table on my host:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
EXT_NW          0.0.0.0         255.255.255.248 U     0      0        0 br1
10.0.0.0        0.0.0.0         255.255.255.0   U     0      0        0 br0
10.0.1.0        0.0.0.0         255.255.255.0   U     0      0        0 br0.1
10.0.2.0        0.0.0.0         255.255.255.0   U     0      0        0 br0.2
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0
169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0        0 br0
169.254.0.0     0.0.0.0         255.255.0.0     U     1005   0        0 br1
169.254.0.0     0.0.0.0         255.255.0.0     U     1008   0        0 br2
169.254.0.0     0.0.0.0         255.255.0.0     U     1028   0        0 br0.1
169.254.0.0     0.0.0.0         255.255.0.0     U     1029   0        0 br0.2
10.0.0.0        10.0.0.1        255.0.0.0       UG    0      0        0 br0
0.0.0.0         EXT_GW          0.0.0.0         UG    0      0        0 br1
brctl show:
Code:
bridge name     bridge id               STP enabled     interfaces
br0             8000.d43d7e93e1ca       no              eth0
                                                        vnet0
                                                        vnet2
br1             8000.00e07db5aba9       no              eth1
                                                        vnet3
br2             8000.fe30678d1bc6       no              vnet1
                                                        vnet4
virbr0          8000.52540015196c       yes             virbr0-nic
Guest ifconfig output:
Code:
eth0      Link encap:Ethernet  HWaddr B2:29:7A:B9:2A:C3  
          inet addr:10.0.0.27  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:39479630 errors:0 dropped:0 overruns:0 frame:0
          TX packets:147802 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:53800889056 (50.1 GiB)  TX bytes:44102101 (42.0 MiB)

eth0.1    Link encap:Ethernet  HWaddr B2:29:7A:B9:2A:C3  
          inet addr:10.0.1.27  Bcast:10.0.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:17002 errors:0 dropped:0 overruns:0 frame:0
          TX packets:47 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:23192000 (22.1 MiB)  TX bytes:2666 (2.6 KiB)

eth0.2    Link encap:Ethernet  HWaddr B2:29:7A:B9:2A:C3  
          inet addr:10.0.2.27  Bcast:10.0.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:23 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:1277 (1.2 KiB)  TX bytes:552 (552.0 b)

Host ifconfig output:
Code:
br0       Link encap:Ethernet  HWaddr D4:3D:7E:93:E1:CA  
          inet addr:10.0.0.1  Bcast:10.0.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8289149 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49247989 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2344435712 (2.1 GiB)  TX bytes:62679995685 (58.3 GiB)

br0.1     Link encap:Ethernet  HWaddr D4:3D:7E:93:E1:CA  
          inet addr:10.0.1.1  Bcast:10.0.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:131829 errors:0 dropped:0 overruns:0 frame:0
          TX packets:179843 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:17065080 (16.2 MiB)  TX bytes:211164921 (201.3 MiB)

br0.2     Link encap:Ethernet  HWaddr D4:3D:7E:93:E1:CA  
          inet addr:10.0.2.1  Bcast:10.0.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3822122 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5134979 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:212625432 (202.7 MiB)  TX bytes:7278604245 (6.7 GiB)

eth0      Link encap:Ethernet  HWaddr D4:3D:7E:93:E1:CA  
          UP BROADCAST RUNNING PROMISC MULTICAST  MTU:1500  Metric:1
          RX packets:36703812 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49323420 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6248256656 (5.8 GiB)  TX bytes:62708327340 (58.4 GiB)

vnet0     Link encap:Ethernet  HWaddr FE:54:00:FF:A2:91
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39329211 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:300 (300.0 b)  TX bytes:53776226894 (50.0 GiB)

vnet2     Link encap:Ethernet  HWaddr FE:29:7A:B9:2A:C3
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:147699 errors:0 dropped:0 overruns:0 frame:0
          TX packets:39475770 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500
          RX bytes:44078632 (42.0 MiB)  TX bytes:53798696194 (50.1 GiB)
(Removed non-necessary interfaces, like br1, br2, etc.)

Flushing iptables on both doesn't fix.

TCPDump on the host shows icmp traffic when pinging 10.0.1.1, but not 10.0.1.26, for instance.

Edit, also tried, setting promisc on all devices in br0, setenforce 0. Nothing has worked. Thanks in advance!

Last edited by midorikawa; 12-18-2013 at 12:26 PM. Reason: Added additional info.
 
Old 12-19-2013, 05:17 PM   #2
midorikawa
LQ Newbie
 
Registered: Oct 2012
Posts: 19

Original Poster
Rep: Reputation: Disabled
Figured out the problem

The issue was that I was using a bridge, instead of a macvtap device bridged to each individual VLAN. Way more complex than it should be, but that fixed the problem.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Centos 6 and KVM - how to setup bridged networking in KVM in a -Class B- environment? rylan76 Linux - Virtualization and Cloud 7 11-07-2012 06:46 AM
QEMU KVM bridged networking? iwanttolickazunyan Linux - Virtualization and Cloud 8 05-04-2012 11:21 AM
LXer: How To Install KVM And libvirt On CentOS 6.2 With Bridged Networking LXer Syndicated Linux News 0 03-02-2012 02:20 PM
very slow downloads from VM guests when using bridged networking mrtwice Linux - Networking 4 12-21-2009 11:17 AM
Linux KVM/VMWare bridged interfaces and the Cisco 5505 fantasygoat Linux - Networking 1 12-04-2009 01:21 PM

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

All times are GMT -5. The time now is 12:23 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