lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] lwip on linux(ubuntu 8.04)


From: Jeff Barber
Subject: Re: [lwip-users] lwip on linux(ubuntu 8.04)
Date: Mon, 4 May 2009 10:32:42 -0400

Sounds like you're pinging the tap0 (gateway) address, not the lwip
node address.  Pinging any local address on linux gets short-circuited
through the loopback device.  However, there should be no way to ping
the lwip host without incrementing send and receive byte counts on the
tap0 interface.

Keep in mind that the tap0 interface -- once it's setup -- is
completely under the control of the linux kernel, not lwip.  You have
to actually send packets to the lwip node address in order to activate
the lwip functions.

Jeff

On Mon, May 4, 2009 at 9:59 AM, Deepak Gopalakrishnan
<address@hidden> wrote:
>
> thanks a lot for the reply.
> Now im able to run the simhost application and ping it from another terminal
> window. But my curiosity has put  me into doubt again. I opened another
> window and did a ifconfig to view the stats and to my suprise saw that the
> bytes received is 0 for the tap0 device. But it keeps on increasing for the
> loopback address. Is this a normal response or is it indicating another
> problem(Im not that strong with networking concept)
>
> Regards,
> Deepak Gopalakrishnan
>
>
>
>
> Jeff Barber <address@hidden>
>
> 05/04/2009 06:47 PM
>
> To
> Mailing list for lwIP users <address@hidden>,
> address@hidden
> cc
> Subject
> Re: [lwip-users] lwip on linux(ubuntu 8.04)
>
>
>
>
> The MAC address you're seeing is being created by the kernel tap
> interface each time you bring simhost up.  If this is your machine
> before you run simhost (use a fixed width font for best results):
>
>  ------------------
>  | Linux host     |
>  |                |
>  |          eth0 [|--------- (Your existing network interface)
>  |                |
>  |                |
>  ------------------
>
> This is what it looks like afterward (logically that is; in reality
> the simulated lwip host is actually a process running inside your
> linux machine):
>
>  ------------------
>  | Linux host     |
>  |                |
>  |          eth0 [|--------- (Your existing network interface)
>  |                |
>  |                |        ---------------
>  |          tap0 [|--------| (simulated) |
>  |                |        |  lwip host  |
>  ------------------        |             |
>                            ---------------
>
> tap0 has the "gateway" address you specified on the simhost command
> line (192.168.0.1 by default), the primary IP address specified is the
> address of the simulated lwip host (192.168.0.2 by default).
>
> If you use the "-p xx.xx.xx.xx" option, you're pinging out from within
> the lwip host.  So the only thing you can really ping is the tap0
> "gateway" address (although due to linux idiosyncrasies, it also lets
> you ping local interface addresses like the one attached to eth0).
>
> Several things you can try:
> Bring up the simhost program (as root).  (For example, "sudo ./simhost")
> Then from another shell window, you can ping the lwip simulation with
> "ping 192.168.0.2".
> You can also telnet to it with "telnet 192.168.0.2" (note that you do
> not get a bash shell, you get a limited shell implemented entirely
> within the 'fake' lwip host).
> Finally, if you have a web browser, you can connect to
> http://192.168.0.2 which connects you to the web server implemented
> inside the lwip host.
>
>
> Jeff
>
> On Mon, May 4, 2009 at 7:52 AM, Deepak Gopalakrishnan
> <address@hidden> wrote:
>>
>> yes as you have mentioned there is a entry file for the examples provided
>> for
>> unix port.
>> contrib/ports/unix/proj/unixsim/simhost.c
>>
>> but im not sure how to use this application.
>> i tried the ping option provided but this is the response i got..
>> Using <some addr1> to ping
>> Host at <some addr2> mask <some addr3> gateway <some addr4>
>> System initialized
>> TCP/IP initializes
>> sending ping
>> Applications started
>>
>> How can i find out if this is working?
>> yes im breaking my head to find out where the MAC address is being set
>> cause
>> im getting a new MAC address each time i run this application...did you
>> find
>> a solution to get around this problem..?
>>
>> --
>> View this message in context:
>> http://www.nabble.com/lwip-on-linux%28ubuntu-8.04%29-tp23363680p23366704.html
>> Sent from the lwip-users mailing list archive at Nabble.com.
>>
>>
>>
>> _______________________________________________
>> lwip-users mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/lwip-users
>>
>
>




reply via email to

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