[CentOS-virt] KVM: bridge configuration for static IP address-latest
rewing at howfortune.com
Sat Dec 12 11:36:14 UTC 2009
>To: Discussion about the virtualization on CentOS
><centos-virt at centos.org>
><448255702.63.1260531144350.JavaMail.root at mail.chi.ldsys.net>
>Content-Type: text/plain; charset=utf-8
>----- "rewing" <rewing at howfortune.com> wrote:
>> I need to allocate public IP address to two guest os.
> >I have only 2 network card Interface on server. say eth0 and eth1.
> >I set eth1 a public IP address. so it should in
>> # vi /etc/sysconfig/ifcfg-eth1
> >Question 1: do I have to add GATEWAY=22.214.171.124 to above setting?
>GATEWAY probably belongs in /etc/sysconfig/network...
>> Question 2: do I need to add the rest 2 IP addresses in br0?
>> or I
>> should keep br0 with no IP address and set IP in guest OS directly?
>Yep. However, if you do that, you will need something acting as the gateway. If your host is going to be the gateway, it will need an address set in ifcfg->br0 and packet forwarding turned on. If eth1 and br0 are both in the same [public] network, you should just set the public IP address on br0 and add both eth0 and eth1 to the bridge and turn on STP.
>(I don't see why you need eth0 in this mix at all if you are just using it for guests on the local machine.)
>Christopher G. Stach II
Thanks, But still I'm a little confused.
Actually I don't need host to be a gateway. There're should be gate way's on that IDC center. So the gate way should be add to /etc/sysconfig/network, right?
And still, I have 2 ehtnet interface on my mainboard. So I should allocate eth1 an IP address for host, and only make eth0 as br0, and set guest OS IP address in guest OS network configuration, right?
Please help to check if this is the correct setting as bellow
will this work so host os and 2 guest oses all got their IP address? or I should modify something?
I just try the above setting and it wont work!!
It seems that I only need Ethernet interface and set br0 as host IP address ,and guest OS have their own IP address.
But I have 2 Ethnet Interface, it seems deappreciate netbroadband if I couldn't use one for host and the other for guest?
or I have to add more IP address for eth1?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the CentOS-virt