<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
<FONT face="Courier New">Hi,</FONT><BR>
<FONT face="Courier New">Thanks&nbsp;these informations.</FONT><BR>
<FONT face="Courier New">I realized&nbsp;my misunderstanding of&nbsp;the "man vstart" content about&nbsp;tap&nbsp;interface. I thought the network interface&nbsp;to use in the&nbsp;host PC has to be a real and existing one.&nbsp;That's why&nbsp;I choose the all the IP&nbsp;in the same subnet :(</FONT><BR>
<FONT face="Courier New">Using&nbsp;a complete different subnet solves the&nbsp;issue. Thanks again.</FONT><BR>
<FONT face="Courier New"></FONT>&nbsp;<BR>
<FONT face="Courier New">Now, as I need to build a lab related to IPv6, I need to setup a v4/v6 tunnel between eth0 inside r1 (so I will put a v6 IP) and the remote&nbsp;real PC:</FONT><BR>
<FONT face="Courier New">&nbsp;</FONT><BR>
<FONT face="Courier New">&nbsp; --------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -------------</FONT><BR>
<FONT face="Courier New">&nbsp; |&nbsp; r1&nbsp; |eth0&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; -----------------&nbsp;&nbsp;&nbsp;------------------&nbsp;&nbsp; real ethernet cable&nbsp;&nbsp; eth0 |&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</FONT><BR>
<FONT face="Courier New">&nbsp; | (vm) |------------------|nk_tap_root dev|---| eth0 of host PC|------------------------------| remote PC |&nbsp; </FONT><BR><FONT face="Courier New">
<FONT face="Courier New">&nbsp; --------&nbsp;v6 IP&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -----------------&nbsp;&nbsp;&nbsp;------------------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; v6 IP&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |</FONT><BR></FONT><FONT face="Courier New">
<FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(------------------------------------------------------------------------------------) -------------<BR></FONT></FONT><FONT face="Courier New"><FONT face="Courier New">
</FONT>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IPv4/v6 tunnel&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )<BR>
<FONT face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(------------------------------------------------------------------------------------)<BR>
</FONT>&nbsp;<BR>
I hope it's possible. If it's seems interesting for the mailing list users, I will give feedback about my work.<BR>
&nbsp;<BR>
Rgds,<BR>Cyrille<BR>
<BR>&nbsp;</FONT><BR><FONT face="Courier New">
<HR id=stopSpelling>
Date: Thu, 9 Jul 2009 15:18:54 +0200<BR>From: rimondin@dia.uniroma3.it<BR>To: netkit.users@list.dia.uniroma3.it<BR>Subject: Re: [Netkit.users] TAP interface &amp; masquerade<BR><BR></FONT><TT>Dear Cyrille,<BR><BR></TT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">vstart r1 --con0=this --eth0=tap,10.0.0.2,10.0.0.3 =&gt; OK, r1 boot successfully.<BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">Ok, fine.<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">So, inside r1: eth0=10.0.0.3/24<BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">Wrong. When using tap interfaces, the default classful addressing is assumed. Therefore, eth0 is configured with 10.0.0.3/8.<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">The host PC has a real network-interface eth0=10.0.0.2/24<BR>To reach internet, the next-hop is the 10.0.0.1/24 in another PC.<BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">This is likely the problem: since the same subnet (or better, in your case two overlapping subnets) is used for the tap interface and for connecting the host to the Internet, traffic directed to that subnet may be unpredictably routed to eth0 on your host or to the tap interface. Because of the subnetting plan (10.0.0.0/8 assigned to Netkit, 10.0.0.0/24 assigned to your host), it is likely that echo request packets correctly flow out of the virtual machine, while echo reply packets are incorrectly routed to your host (because of the best prefix match rule).<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">&nbsp;<BR>In the host PC, ping 10.0.0.1 is OK. ping 10.0.0.3 is OK.<BR>Inside r1 vm: ping 10.0.0.2 is OK. but ping 10.0.0.1 is NOK :(<BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">If my conjecture is correct, your ping should report a timeout.<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">&nbsp; <BR>In the host PC, I check: <BR>- /proc/sys/net/ip4/ip_forward is 1 : OK<BR>-&nbsp;iptables -L does not display the masquerading in postrouting chain(result of '<FONT size=3><FONT size=2>iptables -t nat -A POSTROUTING -j MASQUERADE') but its seems OK.</FONT></FONT><BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">It does not show the entry because masquerading rules lie in a different table. The entry would show up if you used "iptables -t nat -L".<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">&nbsp;<BR><FONT size=3><FONT size=2>Any idea why ping from VM to external gw is NOK ?</FONT></FONT><BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">At this point, I suggest using a different subnet for the tap interface. Note that any subnet is fine because it will be hidden by masquerading.<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New">&nbsp;<BR><FONT size=3><FONT size=2>Thanks,</FONT></FONT><BR><FONT size=3><FONT size=2>Best regards to all,</FONT></FONT><BR><FONT size=3><FONT size=2>Cyrille</FONT></FONT><BR></FONT></BLOCKQUOTE><BR><FONT face="Courier New">Regards,<BR>Massimo.<BR><BR></FONT>
<BLOCKQUOTE cite=mid:SNT102-W2167489B77677FF14D0FCEC4260@phx.gbl><FONT face="Courier New"><FONT size=3><FONT size=2>&nbsp;<BR></FONT></FONT>&nbsp;<BR>&nbsp;<BR>&nbsp;<BR><BR>
<HR>
Souhaitez vous &nbsp;«&nbsp;ętre au bureau sans y ętre&nbsp;»&nbsp;? </FONT><A href="http://www.microsoft.com/france/windows/bts/default.mspx"><FONT face="Courier New">Oui je le veux !</FONT></A><FONT face="Courier New"> </FONT><PRE><HR width="90%" SIZE=4>
_______________________________________________
Netkit.users mailing list
<A class=EC_moz-txt-link-abbreviated href="mailto:Netkit.users@list.dia.uniroma3.it">Netkit.users@list.dia.uniroma3.it</A>
<A class=EC_moz-txt-link-freetext href="http://list.dia.uniroma3.it/mailman/listinfo/netkit.users">http://list.dia.uniroma3.it/mailman/listinfo/netkit.users</A>
  </PRE></BLOCKQUOTE><br /><hr />Souhaitez vous  « ętre au bureau sans y ętre » ? <a href='http://www.microsoft.com/france/windows/bts/default.mspx' target='_new'>Oui je le veux !</a></body>
</html>