michael cole wrote: > Andrew, > > I'll make the netmask changes you suggest. > > 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. > > 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 "route -n " 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. > > Once again I appreciate the time everyone has taken to help. > > Thanks, > > Michael > > On Fri, Aug 8, 2008 at 8:40 AM, Andrew C. Dingman > <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> > wrote: > > On Fri, 2008-08-08 at 06:32 -0400, michael cole wrote: > > First thanks to all for replying. > > > > These changes worked. > > Glad it helped. I hope the IP routing mini-lecture made clear *why* :) > > > So on my Freerunner /etc/network/interfaces includes: > > > > # Ethernet/RNDIS gadget (g_ether) > > # ... or on host side, usbnet and random hwaddr > > auto usb0 > > iface usb0 inet static > > address 192.168.2.202 <http://192.168.2.202> > > netmask 255.255.255.0 <http://255.255.255.0> > > network 192.168.2.0 <http://192.168.2.0> > > gateway 192.168.2.200 <http://192.168.2.200> > > # orig: > > # up echo nameserver 192.168.0.200 <http://192.168.0.200> > >/etc/resolv.conf > > # using home (nimiq.net <http://nimiq.net>) > > up echo nameserver 207.235.125.4 <http://207.235.125.4> > >/etc/resolv.conf > > > > on the desktop /etc/network/interfaces includes: > > allow-hotplug usb0 > > iface usb0 inet static > > address 192.168.2.200 <http://192.168.2.200> > > netmask 255.255.255.192 <http://255.255.255.192> > > post-up iptables -A POSTROUTING -t nat -j MASQUERADE -s > 192.168.2.192/26 <http://192.168.2.192/26> > > post-up echo 1 > /proc/sys/net/ipv4/ip_forward > > post-up iptables -P FORWARD ACCEPT > > pre-down iptables -D POSTROUTING -t nat -j MASQUERADE -s > > 192.168.2.192/26 <http://192.168.2.192/26> > > Almost right, and in fact this configuration won't break in practice > because you can't plug additional devices into your USB network. > However, the FreeRunner and the desktop really *should* agree > about the > netmask. You have the FreeRunner thinking its local network > includes 256 > addresses (192.168.2.0-255), and the desktop thinking that the network > it and the FreeRunner live in includes only 64 (192.168.2.192-255). If > you choose to fix this on the desktop by using the 255.255.255.0 > <http://255.255.255.0> > netmask, you'll also want to fix the masquerade rule to specify > 192.168.2.192/24 <http://192.168.2.192/24>, as the /n part > indicates a netmask with binary 1 in > the n most significant bits. (255.255.255.0 <http://255.255.255.0> > == binary IP 11111111 > 11111111 11111111 00000000. 255.255.255.192 > <http://255.255.255.192> == binary 11111111 11111111 > 11111111 11000000) > > If you want to play with this stuff a bit more, you might be > interested > in a tool called 'gip' that you can install on your desktop with > 'apt-get install gip'. It lets you enter IPs and netmasks in any > of the > normal forms and shows you the resulting network sizes and binary, > hexadecimal, and decimal representations of the results. > -- > > > _______________________________________________ > support mailing list > support@lists.openmoko.org <mailto:support@lists.openmoko.org> > https://lists.openmoko.org/mailman/listinfo/support > > > > > -- > Michael Cole > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > ------------------------------------------------------------------------ > > _______________________________________________ > support mailing list > support@lists.openmoko.org > https://lists.openmoko.org/mailman/listinfo/support > I put a line in yesterday pointing out that the networks need to be distinctly different, but it seems to have gone again :-)
_______________________________________________ support mailing list support@lists.openmoko.org https://lists.openmoko.org/mailman/listinfo/support