<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<STYLE type=text/css>@import url( C:\Documents and Settings\robin\Local Settings\Temporary Internet Files\scrollbar.css );
</STYLE>

<META http-equiv=Content-Type content="text/html; charset=GB2312">
<META content="MSHTML 6.00.6000.16809" name=GENERATOR>
<STYLE>@font-face {
        font-family: ËÎÌå;
}
@font-face {
        font-family: Verdana;
}
@font-face {
        font-family: @ËÎÌå;
}
@page Section1 {size: 595.3pt 841.9pt; margin: 72.0pt 90.0pt 72.0pt 90.0pt; layout-grid: 15.6pt; }
P.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
LI.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
DIV.MsoNormal {
        TEXT-JUSTIFY: inter-ideograph; FONT-SIZE: 10.5pt; MARGIN: 0cm 0cm 0pt; FONT-FAMILY: "Times New Roman"; TEXT-ALIGN: justify
}
A:link {
        COLOR: blue; TEXT-DECORATION: underline
}
SPAN.MsoHyperlink {
        COLOR: blue; TEXT-DECORATION: underline
}
A:visited {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.MsoHyperlinkFollowed {
        COLOR: purple; TEXT-DECORATION: underline
}
SPAN.EmailStyle17 {
        FONT-WEIGHT: normal; COLOR: windowtext; FONT-STYLE: normal; FONT-FAMILY: Verdana; TEXT-DECORATION: none; mso-style-type: personal-compose
}
DIV.Section1 {
        page: Section1
}
UNKNOWN {
        FONT-SIZE: 10pt
}
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
</STYLE>
</HEAD>
<BODY style="FONT-SIZE: 10pt; MARGIN: 10px; FONT-FAMILY: verdana">
<DIV><FONT face=Verdana 
size=2>>To: Discussion about the virtualization on CentOS</DIV>
<DIV>
<DIV>><centos-virt@centos.org></DIV>
<DIV>Message-ID:</DIV>
<DIV>><448255702.63.1260531144350.JavaMail.root@mail.chi.ldsys.net></DIV>
<DIV>>Content-Type: text/plain; charset=utf-8</DIV>
<DIV></DIV>
<DIV>>----- "rewing" <rewing@howfortune.com> wrote:</DIV>
<DIV></DIV>
<DIV>>> I need to allocate public IP address to two guest os.</DIV>
<DIV>>> </DIV>
<DIV>> >I have only 2 network card Interface on server. say eth0 and eth1.</DIV>
<DIV>> ></DIV>
<DIV>> >I set eth1 a public IP address. so it should in</DIV>
<DIV>>> </DIV>
<DIV>>> # vi /etc/sysconfig/ifcfg-eth1</DIV>
<DIV>> ></DIV>
<DIV>> >DEVICE=eth1</DIV>
<DIV>> >BOOTPROTO=static</DIV>
<DIV>> >HWADDR=00:1a:4d:83:ad:00</DIV>
<DIV>> >BROADCAST=202.127.29.0</DIV>
<DIV>> >IPADDR=202.127.29.5</DIV>
<DIV>> >NETMASK=255.255.255.0</DIV>
<DIV>> >NETWORK=202.127.29.0</DIV>
<DIV>> >ONBOOT=yes</DIV>
<DIV>> >TYPE=Ethernet</DIV>
<DIV>> ></DIV>
<DIV>> >Question 1: do I have to add GATEWAY=202.127.29.1 to above setting?</DIV>
<DIV></DIV>
<DIV><FONT color=#800000></FONT> </DIV>
<DIV><FONT 
color=#800000>></FONT>GATEWAY probably belongs in /etc/sysconfig/network...</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>>> Question 2: do I need to add the rest 2 IP addresses in br0?</DIV>
<DIV></DIV>
<DIV><FONT color=#800000></FONT> </DIV>
<DIV><FONT color=#800000>></FONT>Nope.</DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV>>> or I</DIV>
<DIV>>> should keep br0 with no IP address and set IP in guest OS directly?</DIV>
<DIV></DIV>
<DIV> </DIV>
<DIV><FONT 
color=#800000>></FONT>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<FONT 
color=#800000>-></FONT>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.</DIV>
<DIV></DIV>
<DIV><FONT 
color=#800000>></FONT>(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.)</DIV>
<DIV></DIV>
<DIV>>-- </DIV>
<DIV>>Christopher G. Stach II</DIV>
<DIV>>http://ldsys.net/~cgs/</DIV>
<DIV> </DIV>
<DIV>Hi,Christopher,</DIV>
<DIV> </DIV>
<DIV>Thanks, But still I'm a little confused.</DIV>
<DIV> </DIV>
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>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?</DIV>
<DIV> </DIV>
<DIV>Please help to check if this is the correct setting as bellow</DIV>
<DIV> </DIV>
<DIV>/etc/sysconfig/ifcfg-eth1</DIV>
<DIV>DEVICE=eth1</DIV>
<DIV>
<DIV>BOOTPROTO=static</DIV>
<DIV>HWADDR=00:1a:4d:83:ad:00</DIV>
<DIV>BROADCAST=202.127.29.0</DIV>
<DIV>IPADDR=202.127.29.5</DIV>
<DIV>NETMASK=255.255.255.0</DIV>
<DIV>NETWORK=202.127.29.0</DIV>
<DIV>ONBOOT=yes</DIV>
<DIV>TYPE=Ethernet</DIV>
<DIV> </DIV>
<DIV>/etc/sysconfig/ifcfg-eth0</DIV>
<DIV>
<DIV>DEVICE=eth0</DIV>
<DIV>HWADDR=00:1a:4d:83:ad:50  </DIV>
<DIV>ONBOOT=yes</DIV>
<DIV>BRIDGE=br0</DIV></DIV></DIV>
<DIV> </DIV>
<DIV>/etc/sysconfig/ifcfg-br0</DIV>
<DIV>
<DIV>DEVICE=br0</DIV>
<DIV>TYPE=Bridge</DIV>
<DIV>BOOTPROTO=none</DIV>
<DIV>ONBOOT=yes</DIV>
<DIV>DELAY=0</DIV>
<DIV> </DIV>
<DIV>will this work so host os and 2 guest oses all got their IP address? or I 
should modify something?</DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV></DIV>
<DIV></DIV></FONT></DIV></BODY></HTML>