[ECOS] TAP device not created on running "ping_test"

Mandeep Sandhu mandeepsandhu.chd@gmail.com
Tue Jul 28 10:15:00 GMT 2009


On Tue, Jul 28, 2009 at 2:42 PM, Sergei
Gavrikov<sergei.gavrikov@gmail.com> wrote:
> On Tue, Jul 28, 2009 at 02:32:35PM +0530, Mandeep Sandhu wrote:
>
> [snip]
>
>> But that did not help. How were you able to get dhcp server running on
>> an interface which did not have an IP for itself? Won't we have to assign
>> a static IP addr for the interface on which the dhcp server is listening?
>> (I assume you were running your server on tap0 i/f?)
>
> I decribed the steps (re-read that post)
>
> 1st) bring up tap0 with static IP address (I did mention how to adopt
> /etc/network/interfaces to control tap0 interface)
>
> sudo ifup tap0
> ifconfig tap0
> ...
>
> You must see a static IP for tap0.
>
> and only then 2nd) you have to bring up dhcpd on tap0 again as was
> decribed there.

Ok, so it worked with the ecos ping_test! :)

I recompiled ecos with DHCP support and ran the test...

$ ./lwip_tcpip_install/tests/net/common/v3_0/tests/ping_test -nw -io
-t ~/my.tdf
[cyg_net_init] Init: mbinit(0x00000000)
[cyg_net_init] Init: cyg_net_init_devs(0x00000000)
Init device 'synth_eth0'
[cyg_net_init] Init: loopattach(0x00000000)
[cyg_net_init] Init: ifinit(0x00000000)
[cyg_net_init] Init: domaininit(0x00000000)
[cyg_net_init] Init: cyg_net_add_domain(0x02001700)
New domain internet at 0x00000000
[cyg_net_init] Init: cyg_net_add_domain(0x02001140)
New domain route at 0x00000000
[cyg_net_init] Init: call_route_init(0x00000000)
[cyg_net_init] Done
Start PING test
BOOTP[eth0] op: REQUEST
       htype: Ethernet
        hlen: 6
        hops: 0
         xid: 0xe9545202
        secs: 0
       flags: 0x80
       hw_addr: 00:ff:99:c9:52:02
     client IP: 0.0.0.0
         my IP: 10.1.1.20
     server IP: 10.1.1.1
    gateway IP: 0.0.0.0
  options:
        DHCP message: 3 REQUEST
        DHCP server id: 10.1.1.1
        DHCP time 51: 864000
        DHCP option: 37/55.9: 54 51 58 59 1 3 6 15 28
        DHCP option: 39/57.2: 576
        DHCP requested ip: 10.1.1.20
PING server 10.1.1.1
64 bytes from 10.1.1.1: icmp_seq=0, time=0ms
310 bytes from 10.1.1.1: icmp_seq=1, time=0ms
556 bytes from 10.1.1.1: icmp_seq=2, time=0ms
802 bytes from 10.1.1.1: icmp_seq=3, time=10ms
1048 bytes from 10.1.1.1: icmp_seq=4, time=0ms
1294 bytes from 10.1.1.1: icmp_seq=5, time=0ms
1540 bytes from 10.1.1.1: icmp_seq=6, time=0ms
1786 bytes from 10.1.1.1: icmp_seq=7, time=0ms
2032 bytes from 10.1.1.1: icmp_seq=8, time=0ms
2278 bytes from 10.1.1.1: icmp_seq=9, time=0ms
2524 bytes from 10.1.1.1: icmp_seq=10, time=0ms
2770 bytes from 10.1.1.1: icmp_seq=11, time=0ms
3016 bytes from 10.1.1.1: icmp_seq=12, time=0ms
3262 bytes from 10.1.1.1: icmp_seq=13, time=0ms
3508 bytes from 10.1.1.1: icmp_seq=14, time=10ms
3754 bytes from 10.1.1.1: icmp_seq=15, time=0ms
Sent 16 packets, received 16 OK, 0 bad
PING server 10.1.1.33
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out
recvfrom: Operation timed out

Whats this other address that the test uses??? 10.1.1.33?

One more thing...can you verify my understanding of this works
with ecos (i.e the dhcp/ping test)

* The ecos app sends packets via ecos-hal
* ecos hal in-turn uses the ecossynth/rawether process to send the
  packet out.
* The rawether process essentially opens /dev/tap0 (or maybe /dev/net/tun
  with the correct ioctl) and writes the ether frame to it.
* The Linux kernel rx's the frame over tap0 interface
* The Linux nw stack responds to the packet (DHCP/ICMP) and sends out
  the response over tap0.
* When the Linux kernel writes the packet to tap0, the same data becomes
  available on /dev/tap0 (or /dev/net/tun), which is picked up by rawether and
  passed to the ecos process.

Does this summarize the process correctly?

Thanks,
-mandeep

>
>
> Sergei
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss



More information about the Ecos-discuss mailing list