Bridging ether-usb to a wireless NIC

Delbert Franz ddf at sonic.net
Fri Nov 25 14:11:49 EST 2011


A short update on connecting the Ben to the Internet.

To get access to the Ben from the other computers in my LAN, I just 
add the following script to each computer: 

#!/bin/sh
#Delete old route-ip address may have changed
route del -net 192.168.254.0/24
#Add a route to ac to access nn
route add -net 192.168.254.0 netmask 255.255.255.0 gw ac eth0

I use dhcp for IP addresses on my LAN.  Most of the time the addresses 
stay the same.  However, if I switch from a wired connection to a 
wireless connection, there is a change in the IP address of the 
computer hosting the Ben, that is, the computer to which the Ben is 
connected.  The host computer, named "ac" in this case, becomes the 
gateway for the network used to connect the Ben.  

With this change I can reach any computer connected to the LAN or the 
Internet from the Ben and can reach the Ben from any computer in my 
LAN.  It does not matter how the host computer is connected because 
the script given by Xiangfu, which I run on the host computer each 
time I connect it to the Ben, is connection agnostic.  Just what I 
wanted so that I can use wireless to connect the host when I'm away 
from my desk!  

             Delbert




On Friday 18 November 2011, Delbert Franz wrote:
> Thanks, Xiangfu, I got that working with a few modifications on the 
> Ben.  I used the script you gave, exactly as given, on my host, an 
> Acer Asprie One.  On the Ben I modified the "lan" entry in 
> /etc/config/network to be: 
> 
> config interface lan
> 	option ifname	usb0
> 	option proto	static
> 	option ipaddr	192.168.254.101
> 	option netmask	255.255.255.0
> 	option gateway  192.168.254.100
> 	option dns      "192.168.1.1 208.67.222.222"
> 
> 
> I added the dns entry for my LAN ahead of the Internet dns entry 
> already there.  Without the local dns IP, I could not reach any of the 
> other machines on my local network.  
> 
> I did check, this gets to the Internet from 
> 1. My wireless AP on my LAN 
> 2. A cable connection for eth0
> 3. Via Google wireless provided in Mountain View
>    for free. 
> 
> Thus this approach to connecting the Ben does make it possible to 
> "piggy back" onto whatever connection the host, the Acer Asprie One in 
> this case, has to the Internet.  
> 
> Two possible problems:
> 
> 1.  When I run the script given below, I get a message: 
> SCIOADDRT: No such device 
> 
> Did not find much on the web to explain it other than it might be a 
> message from the kernel because no device name was given where one 
> normally would be expected.  However, despite the message, I have a 
> workable connection.  
> 
> 2.  The other machines on my LAN cannot reach the Ben.  The Ben can, 
> however, reach all the other machines on my LAN.  I suspect I have to 
> give them knowledge of the gateway on the Acer Aspire One.  I can 
> either do scp from the Ben or do a two-step scp from a machine in my 
> LAN to the Acer Aspire one, and then from the Acer to the Ben.  
> 
> Thanks for the information--it gets me what I wanted with only some 
> small "rough edges"!  
> 
>            Delbert
> 
> 
> 
> 
> 
> 
> 
> On Thursday 17 November 2011, Xiangfu Liu wrote:
> > Hi Delbert
> > 
> > never try bridge. I just use:
> >    ifconfig  usb0 192.168.254.100
> >    iptables -A POSTROUTING -t nat -j MASQUERADE -s 192.168.254.0/24
> >    sysctl -w net.ipv4.ip_forward=1
> >    route add -host 192.168.254.101 usb0
> > 
> > xiangfu
> > 
> > On 11/18/2011 12:31 PM, Delbert Franz wrote:
> > > I spent some hours this afternoon attempting to connect the Ben to the
> > > Internet via a bridge to a wireless NIC.  There seemed to be rather
> > > complete instructions for Debian, what I have running on my netbook.
> > > However, something was not correct and I could not get things to work.
> > >
> > > Has anyone on the list been successful in doing that?  Clearly it is
> > > quite a bit more complex than using a bridge to a standard NIC for a
> > > cable connection.
> > >
> > > I'm interested in getting this working because I want to replace my
> > > seven-year old laptop with a newer version, perhaps an ultrabook.
> > > Several of the recent models announced do not have an ethernet port.
> > > Of course, I can plug in a usb ethernet atdapter, I already do that
> > > with the XO from OLPC project.  However, it would be nice to be able
> > > to dispense with that.
> > >
> > > Thanks for any pointers or experiences.
> > >
> > >                        Delbert
> > 
> > 
> 
> 
> _______________________________________________
> Qi Hardware Discussion List
> Mail to list (members only): discussion at lists.en.qi-hardware.com
> Subscribe or Unsubscribe: http://lists.en.qi-hardware.com/mailman/listinfo/discussion
> 
> 





More information about the discussion mailing list


interactive