<div dir="ltr">Andrew,<br><br>I&#39;ll make the netmask changes you suggest.<br><br>Further to my comments above re: the USB networking page @ openmoko. My issue could have been avoided if the networking page made clear that the Freerunner--Desktop connection is on a different network than the LAN the desktop uses to access the Internet. Likewise a troubleshooting note when one cannot ping past the desktop machine. The document, as it is now written, focuses on just the Freerunner--Desktop connection and makes an assumption that the LAN is not 192.168.0.X Your description placing the task of setting up USB networking in the context of the whole LAN makes clear how the FR--Desktop network is situated. It probably seems obvious for most of the users here.<br>
<br>Perhaps someone with editing rights to the networking page can add a couple of lines to make clear the need for distinct networks in specifying the setup. Also, it would help to extend the worked example to show (at each stage) what output one should see from &quot;route -n &quot; on each machine. This is also a point to check in troubleshooting cases where one can ping the desktop but no other machines on the LAN.<br>
<br>Once again I appreciate the time everyone has taken to help.<br><br>Thanks,<br><br>Michael<br><br><div class="gmail_quote">On Fri, Aug 8, 2008 at 8:40 AM, Andrew C. Dingman <span dir="ltr">&lt;<a href="mailto:andrew%2Bopenmoko@dingman.org">andrew+openmoko@dingman.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Fri, 2008-08-08 at 06:32 -0400, michael cole wrote:<br>
&gt; First thanks to all for replying.<br>
&gt;<br>
&gt; These changes worked.<br>
<br>
</div>Glad it helped. I hope the IP routing mini-lecture made clear *why* :)<br>
<div class="Ih2E3d"><br>
&gt; So on my Freerunner /etc/network/interfaces includes:<br>
&gt;<br>
&gt; # Ethernet/RNDIS gadget (g_ether)<br>
&gt; # ... or on host side, usbnet and random hwaddr<br>
&gt; auto usb0<br>
&gt; iface usb0 inet static<br>
&gt; &nbsp; &nbsp; &nbsp; address <a href="http://192.168.2.202" target="_blank">192.168.2.202</a><br>
&gt; &nbsp; &nbsp; &nbsp; netmask <a href="http://255.255.255.0" target="_blank">255.255.255.0</a><br>
&gt; &nbsp; &nbsp; &nbsp; network <a href="http://192.168.2.0" target="_blank">192.168.2.0</a><br>
&gt; &nbsp; &nbsp; &nbsp; gateway <a href="http://192.168.2.200" target="_blank">192.168.2.200</a><br>
&gt; # orig:<br>
&gt; # &nbsp; &nbsp; up echo nameserver <a href="http://192.168.0.200" target="_blank">192.168.0.200</a> &gt;/etc/resolv.conf<br>
&gt; # using home (<a href="http://nimiq.net" target="_blank">nimiq.net</a>)<br>
&gt; &nbsp; &nbsp; &nbsp; up echo nameserver <a href="http://207.235.125.4" target="_blank">207.235.125.4</a> &gt;/etc/resolv.conf<br>
&gt;<br>
&gt; on the desktop &nbsp;/etc/network/interfaces includes:<br>
&gt; allow-hotplug usb0<br>
&gt; iface usb0 inet static<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; address <a href="http://192.168.2.200" target="_blank">192.168.2.200</a><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; netmask <a href="http://255.255.255.192" target="_blank">255.255.255.192</a><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s <a href="http://192.168.2.192/26" target="_blank">192.168.2.192/26</a><br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; post-up echo 1 &gt; /proc/sys/net/ipv4/ip_forward<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; post-up iptables -P FORWARD ACCEPT<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s<br>
&gt; <a href="http://192.168.2.192/26" target="_blank">192.168.2.192/26</a><br>
<br>
</div>Almost right, and in fact this configuration won&#39;t break in practice<br>
because you can&#39;t plug additional devices into your USB network.<br>
However, the FreeRunner and the desktop really *should* agree about the<br>
netmask. You have the FreeRunner thinking its local network includes 256<br>
addresses (192.168.2.0-255), and the desktop thinking that the network<br>
it and the FreeRunner live in includes only 64 (192.168.2.192-255). If<br>
you choose to fix this on the desktop by using the <a href="http://255.255.255.0" target="_blank">255.255.255.0</a><br>
netmask, you&#39;ll also want to fix the masquerade rule to specify<br>
<a href="http://192.168.2.192/24" target="_blank">192.168.2.192/24</a>, as the /n part indicates a netmask with binary 1 in<br>
the n most significant bits. (<a href="http://255.255.255.0" target="_blank">255.255.255.0</a> == binary IP 11111111<br>
11111111 11111111 00000000. <a href="http://255.255.255.192" target="_blank">255.255.255.192</a> == binary 11111111 11111111<br>
11111111 11000000)<br>
<br>
If you want to play with this stuff a bit more, you might be interested<br>
in a tool called &#39;gip&#39; that you can install on your desktop with<br>
&#39;apt-get install gip&#39;. It lets you enter IPs and netmasks in any of the<br>
normal forms and shows you the resulting network sizes and binary,<br>
hexadecimal, and decimal representations of the results.<br>
<font color="#888888">--<br>
</font><div><div></div><div class="Wj3C7c"><br>
<br>
_______________________________________________<br>
support mailing list<br>
<a href="mailto:support@lists.openmoko.org">support@lists.openmoko.org</a><br>
<a href="https://lists.openmoko.org/mailman/listinfo/support" target="_blank">https://lists.openmoko.org/mailman/listinfo/support</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Michael Cole<br><a href="mailto:mjcole137@gmail.com">mjcole137@gmail.com</a><br>
</div>