The Elektor Forum will close. See also this link. From Friday March 1st it is no longer possible to log in to the forum. However, the content of the forum will remain visible until the end of March. As of April 1st the forum will definitely go off the air.

Connecting Linux board to the web via LAN-WLAN

The topic on number crunching

Postby uzoyabuzo » Sun Mar 24, 2013 12:00 am

Hi all,

I'd like to connect my Elektor linux board to the internet, but the board is connected to my PC which in turn is connected to the web via wifi (see attached picture). I've not much experience in this field, could anyone help me or led me to some site explaining this ?

Currently my board is configured with IP address 10.42.0.75 obtained via dhcp (using command udhcpc). The PC on the wifi network is IP 192.168.0.101, but on the LAN it is IP 10.42.0.1...

Thanks.
Regards.
Attachments
lan-wlan.pdf
(14.25 KiB) Downloaded 47 times
uzoyabuzo
 
Posts: 13
Joined: Thu Jan 02, 2014 10:42 am

Postby ag » Tue Mar 26, 2013 12:00 am

Hi u...,

I am not very strong here, but since no others have answered, I`ll try to help.

Looking at your pdf and because I do not see an ethernet switch, I assume you have connected the ElektorLinuxBoard to your PC using an ethernet crossover cable + USB lan adapter, and the connection works (you can ping 10.42.0.75 and get positive responses).

I also assume that your gateway ip address and domain name server address both begin with 192.168.0. You can log on to your wifi router to verify that.

If all of the above assumptions are true, then I think you have two active networks which need to be "bridged" in order to allow your ElektorLinuxBoard (10.42.0. network) to gain access to your internet network (192.168.0.). I have not yet done that on linux, but you might check out this site for information regarding how to do it on ubuntu: https://help.ubuntu.com/community/BridgingNetworkInterfaces

Elektor community: if I am wrong on this, please correct me - and offer u... some better advice.

Regards,
Ag
Ag
ag
 
Posts: 533
Joined: Thu Jan 02, 2014 10:37 am

Postby uzoyabuzo » Wed Mar 27, 2013 12:00 am

Hi Ag,

Thanks for the reply. I thought it was a little more straightforward to implement a bridge. Actually it seems a tricky issue... I've tried something using the link you posted but didn't get any good results for the moment...

Regards.
uzoyabuzo
 
Posts: 13
Joined: Thu Jan 02, 2014 10:42 am

Postby ag » Wed Mar 27, 2013 12:00 am

Hi uzoyabuzo,

Instead of bridging, you could do as I have and set up your ElektorLinuxBoard on the same network which has access to internet (I connected the USB lan adadpter plugged into my ElektorLinuxBoard to my router via ethernet switch and patch cable). In my case, I have assigned the board a static IP address within my network. I did this by editing the /etc/network/interfaces file. In your case, I think it would need an entry which looks something like this:

auto eth0
#allow-hotplug eth0
iface eth0 inet static
address 192.168.0.123
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.??? (your current gateway ip address)
dns-nameservers 192.168.0.??? (your current nameserver ip address)

If I find the time during the upcoming Easter holiday, I will try to setup my ElektorLinuxBoard bridged as per your initial outlined setup. If I succeed, I will let you know, and exactly how.

Regards,
Ag
Ag
ag
 
Posts: 533
Joined: Thu Jan 02, 2014 10:37 am

Postby ag » Fri Mar 29, 2013 12:00 am

Hi uzoyabuzo,

Well, bad news. I installed a fresh Ubuntu 12.04 on a laptop using wlan connection to my gateway router (fritzbox 7270) and setup the laptops's wired ethernet connection as "share to other computers" (IP 10.42.0.1). I was then able to connect to another laptop runnig Windows 7 which I setup with IP 10.42.0.45 (gateway 10.42.0.1) using a crossover cable. So far so good.

I next set up my ElektorLinuxBoard with IP 10.42.0.144 analogous to my Win7 laptop and connected the crossover cable from the Ubuntu laptop to the Davicom DM9601 USB LAN adapter connected to my ElektorLinuxBoard. No connection (and no lights flashing)

I then tried using an ethernet hub between the Ubuntu laptop and the ElektorLinuxBoard, also to no avail (no connection, no lights flashing). I checked and re-checked ip, network, broadcast, gateway, and dns for eth0. Rebooted gnublin. Found no errors, but also no connection.

Thinking I may have broken something, I connected the LinuxElektorBoard back to my gateway router via patch cable as before, and everything worked again as before.

So it now looks to me like my current gnublin kernel (zImage) is missing some kind of service or sevices needed for this way of bridging. I therefore went to my Elektor VB toolchain and ran make menuconfig, looking for the appropriate service. Unfortunately, I found a number of candidates under Networking options-->Networking support which are not activated, the most prominent amoung others being "802.1d Ethernet Bridging". But I have too much that I want to do during my Easter holiday and therefore do not want to spend too much time on this, so I did not try experimenting to find out which service(s) might be needed. If you like, you might try that out yourself

My recommendation for you remains as before: if possible, connect your ElektorLinuxBoard directly to your wifi router using its subnet (see my previous post).

Again, other community members welcome to enlighten.

Regards,
Ag'
Ag
ag
 
Posts: 533
Joined: Thu Jan 02, 2014 10:37 am

Postby uzoyabuzo » Sun Mar 31, 2013 12:00 am

Hi Ag,

Thanks for your last post.

In my case, connection between my Ubuntu PC and ElektorLinuxBoard works fine. I've used a DUB-E100 USB-LAN adapter, and configured the board to load the ASIX module at startup. But before that, I had to recompile the ASIX module...

Actually, the ASIX module coming with the ElektorLinuxBoard did not function correctly (no connection). So I replaced the module with a new one that I recompiled using the sources coming with the DUB's CD.

On the Ubuntu PC I set (as you did) the ethernet connection to "Shared with other computers". This works good.

Now, I still have to deal with the bridging... I'll check that "802.1d Ethernet Bridging" option, that you talked about on your post. In case I get something running I'll give you some news.

Regards.
uzoyabuzo
 
Posts: 13
Joined: Thu Jan 02, 2014 10:42 am


Return to Microcontrollers & Embedded

Who is online

Users browsing this forum: No registered users and 1 guest