You are not logged in.

#1 2011-01-25 01:48:27

otterfox
Member
Registered: 2010-08-05
Posts: 21

[solved] KVM networking with external and internal IP addresses.

This is more of a general linux networking question rather than as  specific archlinux question.

I have a number of external IP addresses at my disposal.
I'd like to have my network setup as in the following diagram:
15p0t28.png

I'm using KVM and have tried setting up mulitple bridges only to find out that eth0 can only have on bridge. I'm quite unsure how to do this and my googlefu hasn't turned up and fruitful results that actually work. It has been suggested that I use vlans on eth0 and then attach a bridge to each of them? Does each bridge then get given the external IP that I want to give to the VM?

Last edited by otterfox (2011-01-26 08:21:41)


<insert hardware wankery>

Offline

#2 2011-01-25 03:35:09

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [solved] KVM networking with external and internal IP addresses.

eth0 can only have 1 bridge, but you can join all your VM's to that single bridge.

So you would end up with br0 bridging all your interfaces together: eth0, tap0, tap1, tap2 etc etc

(I can't remember if KVM uses TUN or TAP... Replace tapX with tunX if I've got it wrong tongue)

Last edited by fukawi2 (2011-01-25 03:35:27)

Offline

#3 2011-01-25 03:46:10

otterfox
Member
Registered: 2010-08-05
Posts: 21

Re: [solved] KVM networking with external and internal IP addresses.

So you can have a bridge with multiple IPs? How is that done? At the moment I have a configuration with a bridge on eth0 using DHCP from my router which each guest and the host gets an IP from.

Last edited by otterfox (2011-01-25 04:12:19)


<insert hardware wankery>

Offline

#4 2011-01-25 09:18:57

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,224
Website

Re: [solved] KVM networking with external and internal IP addresses.

A bridge just acts as a virtual switch... Imagine the Bridge is a switch, and each computer has a single cable from the switch, including the Host.

So the *bridge* doesn't have multiple IP addresses; it has a single IP (for the host) and the guests get their own IP, via the "switch" that br0 is pretending to be.

Offline

#5 2011-01-26 08:22:28

otterfox
Member
Registered: 2010-08-05
Posts: 21

Re: [solved] KVM networking with external and internal IP addresses.

Thanks, it works. I think my problem was STP taking 30secs to work itself out and I didn't wait 30secs before testing.


<insert hardware wankery>

Offline

Board footer

Powered by FluxBB