Connecting Ben NanoNote to Internet via bridge on host and using udhcpc
Delbert Franz
ddf at sonic.net
Thu Apr 29 20:36:31 EDT 2010
On Thursday 29 April 2010, marc zonzon wrote:
> On Tue, Apr 27, 2010 at 11:36 PM, Delbert Franz <ddf at sonic.net> wrote:
> > I'm following the instructions that I found in the archive for Friday,
> > March 19, 'New NanoNote user questions", for connecting the Ben to the
> > Internet, posted by Marc Zonzon. My host is running Debian testing
> > and I got it to work but when I reboot, there seems to be a question
> > of changing MAC address on the Ben and even when that is manually
> > changed in /etc/config/network, there also seems to be a issue of the
> > sequence in which the various components are brought up. I have it
> > working again, but I'm not sure what sequence made it work:)
> >
> > One problem is that if a MAC address is hard coded in
> > /etc/config/network, then 'ifconfig usb0' will always show that address.
> > However, a check of the listing produced by 'dmesg' will show a MAC
> > address that changes at every boot of the Ben. If these two addresses
> > differ, I fail to get a connection, and even if they are the same, I
> > sometimes have to reboot the host to get udhcpc on the BEN to ever
> > come back from its message about sending a discover command (or
> > something like that).
> >
> > Anyone else had these problems?
> >
> > Thanks
> > Delbert
> >
>
>
> I use the bridged access to my host from the nanonote, since two
> months, and never noticed your problem. You seem to have
> configured etc/config/network like that
>
> config interface lan
> option ifname usb0
> option proto dhcp
> option macaddr 12:34:56:78:9A:BC #replace by the mac you want
>
> in this case the mac is set by the uci configuration system when
> called by ifup, itself trigerred by hotplug when system activate the
> interface.
> I have not looked to dmesg, but what is important is that the mac
> adress is OK at time of udhcp launching, you seem to say it changes
> since the one you see in dmesg is not the same that you get with
> ifconfig. You can check on your name server what it sees, does this
> value change from boot to boot? It would imply some defect in the
> config file or script.
>
>
> Marc
>
Thanks, Marc, for getting back on this one. No, I have determined
that the MAC is not the problem. I think the problem is on the host
computer, running Debian and using wicd to manage eth0, as well as
wireless, when I am on that. There is some nuance that needs to be
tuned. I have the further complication that my local dns server needs
to get the host name sent with every discover request. Apparently
udhcpc does not do that by default and I have not been able to find
where it is initiated. If it is in a script file, I could add the
request to send the host name.
On the Ben I first execute /etc/init.d/networking restart. However,
it will not find anything. While that process is still searching, I
bring down br0 and eth0 on the host and then bring them up.
Magically, the Ben finds an ip address, etc. However, I can not reach
it using its host name. So I then execute on the Ben,
udhcpc -i usb0 -H nn
where nn is my host name. Then "everybody" is happy!
For the moment that is all I need. When I have more time, I should
try to figure out what to say on the host side so it works more
smoothly.
Delbert
More information about the discussion
mailing list