lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Connection problem within VM


From: Sergio R. Caprile
Subject: Re: [lwip-users] Connection problem within VM
Date: Wed, 27 Jan 2016 09:33:18 -0300
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

What you have is a routing problem.
You have to properly configure your machines (including the virtual one)
to route (or bridge) to the lwIP interface.
Also, lwIP needs to know how to "return" to the other end, you have to
properly configure a default route (or the same subnet) in it.
My setup is something like:
  IP4_ADDR(&gw, 192,168,0,1);
  IP4_ADDR(&ipaddr, 192,168,0,2);
  IP4_ADDR(&netmask, 255,255,255,0);
  netif_add(&netif, &ipaddr, &netmask, &gw, NULL, mintapif_init,
ethernet_input);
  netif_set_default(&netif);

Here, 192.168.0.1 is the address of the 'router' formed by the tun/tap
interface Linux provides for that purposes. As you see, it belongs to
lwIP's subnet and not to the host subnet (my host here is 192.168.69.1)
Your port seems to be working since you say you can access it somehow.
Your virtual machine 'networking adapter' must support routing (or
bridging) too.
I guess you can either route (example) or bridge (all machines and lwIP
on the same subnet), but that depends on your host and virtual machine
capabilities.



reply via email to

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