lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwIP tun/tap


From: Sergio R. Caprile
Subject: Re: [lwip-users] lwIP tun/tap
Date: Wed, 13 Jun 2018 09:26:21 -0300
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

When you use the tun/tap interface in Linux, you have a tun/tap
interface in Linux. Nothing from lwIPland, just Linuxland.
As per my (sort of) expertise, you get what looks like another Ethernet
card attached to a network. There is your plain trusty old linux machine
on one side, there is your brand new process on the other side. Unless
you set it in bridging mode, thing I don't know how to do (but you can
ask your good friend Google), if your port process wants to connect with
"the rest of the machine", you have to route; that means properly
configuring routing on both ends. (I'm talking networking, not IPC)
Your lwip port will have to be setup with a default gateway equal to the
tun/tap address (which belongs to Linux), and be assigned a different
address on the very same subnet.
If you want to serve DHCP on that tun/tap, you have to configure the
DHCP server to listen to that interface (and probably start it after the
tun/tap goes up when you start the lwIP port).
If you have a web server on lwIP and want to access it from Firefox on a
Windows PC on your local network, you have to have a route to your
tun/tap (or a default to your Linux) in your Windows.
Your Linux machine is a router with several interfaces and one of them
happens to be connected to a device that is the lwIP port process.

So I guess the answer to your question is that the Linux stack will send
ARP requests on that network and your lwIP port will listen to them.
Just the opposite will happen when your lwIP port wants to know the MAC
address of the Linux side of the connection.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]