[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-users] [Minios-devel] Problems connecting to the daytime application provided with Mini-OS
Alright, here it is, hope we can sort this out: 1. I'm simply compiling Mini-OS from xen/extras/mini-os directory with LWIP support as stated in the README:    Âexport LWIPDIR=/home/mihai/lwip-1.3.2 and make.  It creates this binary: http://pastebin.com/xyyg6P03  I'm not using any stubdom, so I guess the default one is used If I have informed myself good about this. 2. Guest CFG file is : Âhttp://pastebin.com/VbkVq6vV and that's it. 3. This is the guest console log:Âhttp://pastebin.com/m1AYtJB8 4. This is log from creation of the guest: http://pastebin.com/a8kfu5Fw 5. Here's brctl and ifconfig from dom0:Âhttp://pastebin.com/vAvupgLz 6. Alright, here's all the things I've tried so far: 6a) Firstly I though that since eth0 and vifX.0 are bridged, you should be able to netcat to the VM. The pings works fine:  This is the mini-so provided daytime which I'm running. The only difference is that I set the IP to 10.0.2.10/24: http://pastebin.com/UURCj36d   Here's where I try to ping (works) and netcat (hangs): http://pastebin.com/zHtS01Tg  Here's ltrace and strace of netcat, to see what happens: Âhttp://pastebin.com/K9vXF5dX  It's pretty verbose, but if you look at the last lines, you can see that connect returns EINPROGRESS. 6b) Going further, I created another VM which basically connects to 10.0.2.10/24. This is the code: http://pastebin.com/w9LCmguH Similary to above, here's the verbose creation output: http://pastebin.com/KUKmisRs Here's the console of "Client-OS": http://pastebin.com/bQQS9K9p We can see that IT WORKS, it connects to the IP just fine. So what's happening here? Here's ifconfig and brctl: http://pastebin.com/VwfXCeUu We can see that the interfaces vif5.0 and vif7.0 are bridged together, which makes sense. I get the daytime output from "Server-OS" to "Client-OS", then the "client" thread exits just fine. It works good. 6c) Obviously, I tried to make the same "experiment" using a lwip client, thinking that I need to connect using LWIP API to a LWIP server (which is wrong, I proved this later, I can connect just find using linux sockets to a LWIP server). What I have done at this step is using the netconn ÂAPI to create a Linux client that connects to 10.0.2.10 and outputs the received daytime value.I have looked up and found out about lwip unix ports and that there is a shared library which I can link with my linux application. Here's the application code:Âhttp://pastebin.com/EnfYnzEC Makefile:Âhttp://pastebin.com/i5y4cnMd Here's the ifconfig/brctl:Âhttp://pastebin.com/QJakkJj6 Tap0 is bridged in xenbr0. How I did this (it's not provided by defualt):Âhttps://groups.google.com/forum/#!topic/osdeve_mirror_tcpip_lwip/yQcb1YmeP54 See third answer. Basically I editedÂÂcontrib/ports/unix/netif/tapif.c which is used in compiling the liblwip.so library so firstly it adds the tap0 linux interface to xenbr0 before tries to connect to 10.0.2.10/24. Here's the ltrace when running the application (SUPER VERBOSE, probably becuase I have to use root permissions to run this due to the creation of the linux interface which requires special permissions):Âhttp://pastebin.com/4vG4QMfi It hangs like netcat. 6d) Moving on, I tried to build the daytime application as a linux application (testing purposes, my target is to create a VM that accepts TCP connections from Linux/win32/whatever platform clients). I have used the same liblwip.so library, and I have compiled an application on my Linux PC. For simplicity, I have added my code to the already provided "simhost" application (which is a ping/telnet/http server application for lwip on linux). I compile that and it works just fine, I can even connect with netcat 10.0.0.2 13 (the default IP the application binds on) and it prints the daytime output. Thus I have concluded that you can connect with regular socket application to a LWIP server if it's configured properly. PS: This application comes in the "contrib-1.3.2" archive from LWIP site at ports/unix/proj/lib (for the shared library) and ports/unix/proj/simhost (for the http server/telnet/ping answerer).  Sorry for the extremly long mail, but I wanted to show you all the things I've done so maybe you understand where I've gone wrong and what I should've done better. Tell me if you need additional info. Mihai On Wed, Jul 29, 2015 at 11:46 AM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote: On Tue, 2015-07-28 at 21:02 +0200, Manfred Haertel, DB3HM wrote: _______________________________________________ Xen-users mailing list Xen-users@xxxxxxxxxxxxx http://lists.xen.org/xen-users
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |