Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Bridging different networks under one br device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
GODLiKE
n00b
n00b


Joined: 11 Jan 2007
Posts: 62

PostPosted: Tue May 29, 2012 11:21 pm    Post subject: [SOLVED] Bridging different networks under one br device Reply with quote

Hi all, I've searched virtually everywhere I could think of for this (google, mailing lists, gentoo-related pages, kvm-related pages), so i'm hoping for a guru out here to give me a hand :)

I recently hired a dedicated server with 5 IP addresses:
1. 94.x.x.x
2-5. 5.x.x.x

It originally came like this in /etc/conf.d/net:
Code:

#config_eth0=(
#  "94.23.x.y netmask 255.255.255.0"
#  "noop"
#  "5.39.x.y netmask 255.255.255.255 broadcast 5.39.x.y"
#  "5.39.x.y netmask 255.255.255.255 broadcast 5.39.x.y"
#  "5.39.x.y netmask 255.255.255.0 broadcast 5.39.x.255"
#  "5.39.x.y netmask 255.255.255.0 broadcast 5.39.x.255"
#)


I know it's baselayout-1 (I already took care of upgrading its rotten-old 2008 base system to a proper 2012, baselayout-2-newer-udev-compliant system and everything works :)

I ordered 4 additional IP addresses (the 5.x ones) so I could setup several VMs and use the server as a KVM hypervisor. Of course I have br0 instead of eth0 as the active interface.

br0 always has the 94.x IP configured on it. If I configure an additional 5.x IP (from the assigned pool I have), it works. I can reach it, even the SSH port, so the cabling or anything related to the guys in the data center is not the issue here.

When I bring up a KVM VM, with its NIC bridged to br0, there's no way to have the NIC properly up. I can see the vnet0 interface on the hypervisor side, but it's not attached at all to the eth0 interface inside the VM (if I configure an IP address on vnet0 from the hypervisor side, the VM does not see it reflected on its eth0, and viceversa).

I have tried/searched for everything I could think of. I would be pretty sure that doing this (bridging different network segments under one br device) is possible. Besides, I have bridging set up like this at home (using dhcp and all-interfaces-in-one-network though). Any ideas as to how get this working?[/code]
_________________
GERÓNIMOOOOOOOOOOOOOOOOOOOO!!!


Last edited by GODLiKE on Thu May 31, 2012 6:14 pm; edited 1 time in total
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15995

PostPosted: Wed May 30, 2012 3:30 am    Post subject: Reply with quote

Configuring an address on the hypervisor side tap device is not supposed to configure the guest, nor vice versa. If you want to use bridging, then configure a management address on br0 (done), bridge the hypervisor side tap device into br0, name this device in the ifname= argument to KVM, configure an IP address+route on the guest eth0, and that should be enough. The hypervisor side tap device does not need an address.
Back to top
View user's profile Send private message
GODLiKE
n00b
n00b


Joined: 11 Jan 2007
Posts: 62

PostPosted: Wed May 30, 2012 3:30 pm    Post subject: Reply with quote

I know it's not supposed to, but I was guided by how KVM bridging works at home: I have one eth0 physical device, slave to a br0. br0 receives IP from my dhcp server. Each KVM guest is configured to bridge to br0, and each VM receives IP from the same DHCP server. And when it does, I see it assigned on vnetX too. I never touched any tap device on KVM side (i'm using libvirt/virt-manager here).
_________________
GERÓNIMOOOOOOOOOOOOOOOOOOOO!!!
Back to top
View user's profile Send private message
GODLiKE
n00b
n00b


Joined: 11 Jan 2007
Posts: 62

PostPosted: Thu May 31, 2012 6:14 pm    Post subject: Reply with quote

Fixed. Datacenter guys had to generate a virtual MAC for each additional IP, so their switches wouldn't complain when seeing another MAC coming from the same ethernet port.

After that it all worked flawlessly. I bridged the VM ifaces to br0 and I configured IP/netmask/MAC manually.
_________________
GERÓNIMOOOOOOOOOOOOOOOOOOOO!!!
Back to top
View user's profile Send private message
AgBr
Apprentice
Apprentice


Joined: 06 Nov 2010
Posts: 195

PostPosted: Sun Jun 03, 2012 2:36 pm    Post subject: Reply with quote

GODLiKE wrote:
Fixed. Datacenter guys had to generate a virtual MAC for each additional IP, so their switches wouldn't complain when seeing another MAC coming from the same ethernet port.

After that it all worked flawlessly. I bridged the VM ifaces to br0 and I configured IP/netmask/MAC manually.

As it seems, I have the same problem. See https://forums.gentoo.org/viewtopic-t-925466-highlight-.html
May I ask you details as to how these additional MAC-Addresses have been generated? I have individual MAC-Addresses ( 00:00:00:00:00:00:01, ...:02, ...:03, ...) assigned to the tap-interfaces though. It still does not work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum