Connect two machines running LWIP applications via WLAN

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Connect two machines running LWIP applications via WLAN

shruthi
Hi,

I am running TCP server and client applications on two different Linux machines using LWIP stacks. These two machines are connected with an Ethernet cable. I am able to send TCP IP packets between the two systems by creating a software Bridge between the tap0 and eth0 interfaces (as given in the thread http://lwip.100.n7.nabble.com/Connect-Bridge-two-machines-running-lwip-applications-td11470.html#a21118).

Now I want to remove the Ethernet connection between the two machines and communicate over WLAN. I tried to create a bridge between tap0 and wlan0 interfaces but it doesn't work. I am not able to add wlan0 to the bridge. Could you please tell me how to set up a wireless connection between two linux machines running LWIP applications?

- Shruthi
Reply | Threaded
Open this post in threaded view
|

Re: Connect two machines running LWIP applications via WLAN

Dirk Ziegelmeier-2
Reply | Threaded
Open this post in threaded view
|

Re: Connect two machines running LWIP applications via WLAN

shruthi
Hi Dirk,

Thanks for replying. I followed the steps given in the link you sent, and used them for tap0 interface instead of eth0. I was able to ping from LWIP stack on machine-1 to the wlan0 interface of machine-2, and vice versa (I had to manually add some routes in the routing tables of the two machines to achieve this). However, I couldn't set up a connection between the two LWIP stacks - they still can't ping each other.

I have attached a picture of the setup which shows the IP addresses that I have assigned and the connections that are working.


I have also attached screenshots showing the routing tables of machines 1 and 2.





I am not an expert in networking or LWIP so I might have mis-configured something. Could you please take a look and tell me if I'm doing it wrong?

- Shruthi


Reply | Threaded
Open this post in threaded view
|

Re: Connect two machines running LWIP applications via WLAN

Dirk Ziegelmeier-2
I sent this link because of the first answer:


It is not possible to bridge between wireless (client a.k.a. station mode) and wired interfaces according to this thread on linux-ath5k-devel.
One should set up NAT instead:


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: Connect two machines running LWIP applications via WLAN

Sylvain Rochet
Hi,

On Tue, Apr 04, 2017 at 03:12:09PM +0200, Dirk Ziegelmeier wrote:
> I sent this link because of the first answer:
>
>
> It is not possible to bridge between wireless (client a.k.a. station mode)
> and wired interfaces according to this thread on linux-ath5k-devel
> <http://web.archive.org/web/20110925231256/http://kerneltrap.org/mailarchive/linux-ath5k-devel/2010/3/21/6871733>
> .
> One should set up NAT instead:

The master (access-point) of a wireless network must be aware of all
existing managed nodes, this is why you have to associate (and I hope
authenticate as well :-) ) your client. What you want to achieve with a
bridged wireless network is a wireless mesh network, which isn't
supported with basic equipments, and which is achieved using proprietary
protocols or with WDS for a very basic tree.

Knowing that, it is obvious that it doesn't work. In other words, for
general cases, layer 1 domain and layer 2 domain must be the same for
wireless networks.

Sylvain

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Connect two machines running LWIP applications via WLAN

shruthi
In reply to this post by Dirk Ziegelmeier-2
I actually used NAT. The pictures/results in my previous post are after setting up a NAT. I followed the procedure mentioned in the link but configured it for tap0 instead of eth0. I just want to know if I am doing the configuration right and if it is possible to use NAT for tap interfaces (in the setup that I'm using).

- Shruthi
Reply | Threaded
Open this post in threaded view
|

Re: Connect two machines running LWIP applications via WLAN

Sylvain Rochet
In reply to this post by Sylvain Rochet
Hi,

On Tue, Apr 04, 2017 at 03:30:46PM +0200, Sylvain Rochet wrote:

> Hi,
>
> On Tue, Apr 04, 2017 at 03:12:09PM +0200, Dirk Ziegelmeier wrote:
> > I sent this link because of the first answer:
> >
> >
> > It is not possible to bridge between wireless (client a.k.a. station mode)
> > and wired interfaces according to this thread on linux-ath5k-devel
> > <http://web.archive.org/web/20110925231256/http://kerneltrap.org/mailarchive/linux-ath5k-devel/2010/3/21/6871733>
> > .
> > One should set up NAT instead:
>
> The master (access-point) of a wireless network must be aware of all
> existing managed nodes, this is why you have to associate (and I hope
> authenticate as well :-) ) your client. What you want to achieve with a
> bridged wireless network is a wireless mesh network, which isn't
> supported with basic equipments, and which is achieved using proprietary
> protocols or with WDS for a very basic tree.
>
> Knowing that, it is obvious that it doesn't work. In other words, for
> general cases, layer 1 domain and layer 2 domain must be the same for
> wireless networks.
Erm, I have to add that master can be bridged to a wired network, since
it is the central point, and this is the only way (without mesh, WDS,
blabla.) to bridge a wireless network and therefore extend the layer 2
domain over the wireless layer 1 domain. The bridge limitation only
applies to managed nodes (client).

Sylvain

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

signature.asc (188 bytes) Download Attachment