[CentOS-virt] KVM: bridge configuration for static IP address

Fri Dec 11 09:23:49 UTC 2009
rewing <rewing at howfortune.com>

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

DEVICE=eth1
BOOTPROTO=static
HWADDR=00:1a:4d:83:ad:00  
BROADCAST=202.127.29.0
IPADDR=202.127.29.5
NETMASK=255.255.255.0
NETWORK=202.127.29.0
ONBOOT=yes
TYPE=Ethernet

Question 1: do I have to add GATEWAY=202.127.29.1 to above setting?
 
now continue to set eth0,seems I would use it as bridge ,so ifcfg-eth0 would be:
# vi ifcfg-eth0
DEVICE=eth0
HWADDR=00:1a:4d:83:ad:50  
ONBOOT=yes
BRIDGE=br0

There's no IP address in this ifcfg-eth0. so 
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?
Could anybody tell me how to set br0 to let host os and 2 guest os all have their own dedicated IP address?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.centos.org/pipermail/centos-virt/attachments/20091211/e49876e7/attachment-0005.html>