<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"><style>body { line-height: 1.5; }blockquote { margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em; }body { font-size: 10.5pt; font-family: 微软雅黑; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>thanks for your reply!</div><div>I have plugged the tap0 to the bridge.</div><div>when I create the tap0:</div><div><br></div><div>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US">tunctl -t tap0 -u root</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US">brctl addif br0 tap0</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US">ifconfig tap0 up</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US">chmod a+rw /dev/net/tun</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US">echo 1 > /proc/sys/net/ipv4/ip_forward</span></p>
<p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US">iptables -t nat -A POSTROUTING -j
MASQUERADE</span></p><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify; font-size: 10.5pt; font-family: Calibri, sans-serif;"><span lang="EN-US"><br></span></p><p class="MsoNormal" style="margin: 0cm 0cm 0.0001pt; text-align: justify;"><span lang="EN-US">so I think this is not the reason.</span></p>
<!--EndFragment--></div>
<div><br></div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>wh.h@foxmail.com</div></div></span></div>
<blockquote style="margin-top: 0px; margin-bottom: 0px; margin-left: 0.5em;"><div> </div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm"><div style="PADDING-RIGHT: 8px; PADDING-LEFT: 8px; FONT-SIZE: 12px;FONT-FAMILY:tahoma;COLOR:#000000; BACKGROUND: #efefef; PADDING-BOTTOM: 8px; PADDING-TOP: 8px"><div><b>From:</b> <a href="mailto:mprivozn@redhat.com">Michal Privoznik</a></div><div><b>Date:</b> 2015-04-20 18:09</div><div><b>To:</b> <a href="mailto:wh.h@foxmail.com">wh.h@foxmail.com</a>; <a href="mailto:libvirt-users@redhat.com">libvirt-users</a></div><div><b>Subject:</b> Re: [libvirt-users] inquiry about differences between the tap and the vnet in the virt-manager</div></div></div><div><div>On 19.04.2015 04:02, wh.h@foxmail.com wrote:</div>
<div>> inquiry about differences between the tap and the vnet in the virt-manager</div>
<div>> </div>
<div> </div>
<div>> when I establish the network by the first method: create a bridge with the help of Linux commad: brctl, tap0 device is created in the host and assigned to the guest OS. tap0 device gets a name “eth0” in the guest OS.</div>
<div>> I use “ping ” command to test network state . I get the following result :</div>
<div>> concept explanation : </div>
<div>> local host: the OS where the guest OS is running </div>
<div>> remote host: another server which is connected to the local host using ethernet network .</div>
<div>> and this is my results:</div>
<div>> ping local host from guest OS is OK, I get reply from local host;</div>
<div>> ping remote host from local host is OK, I get reply from remote host;</div>
<div>> ping remote host from guest OS is not OK, I don’t get any reply from remote host; and this is my question.</div>
<div> </div>
<div>Do you plug the tap0 into the bridge? This could be the missing piece.</div>
<div> </div>
<div>Michal</div>
</div></blockquote>
</body></html>