[ECOS] TAP device not created on running "ping_test"
Mon Jul 27 13:44:00 GMT 2009
> Hi Mandeep
> I would narrow a circle. First, try to bring up and configure any tapN
> device on a host handy (without rawether and eCos app). Test then that
> interface. I found that `tunctl' utility is very useful for that. I'd
> installed it from sources, but, the utility exists in the Ubuntu's
> `uml-utilities' package.
> I want to believe that is host-side issue. It's just command to start
> man tunctl
> Create (tunctl), configure (ifconfig/route) e.g. tap0 device and check
> that works as you could expect (ping). Then go to eCos network tests.
Thanks for pointing out tunctl. But I'm not able to get ping to work...!
I created a device tap0. Assigned it an IP addr: 184.108.40.206/24
Then I setup eth0 with IP 220.127.116.11/24
$ ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:1d:09:54:e6:e3
inet addr:18.104.22.168 Bcast:22.214.171.124 Mask:255.255.255.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
$ ifconfig tap0
tap0 Link encap:Ethernet HWaddr 4e:54:8e:5a:9e:80
inet addr:126.96.36.199 Bcast:188.8.131.52 Mask:255.255.255.0
inet6 addr: fe80::4c54:8eff:fe5a:9e80/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:52 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:17 overruns:0 carrier:0
RX bytes:2184 (2.1 KB) TX bytes:0 (0.0 B)
pinging each of these IP's obviously works as the kernel sees these 2
IP addr's as assigned local interfaces, so I guess the packets never go out
of the interface.
$ ping 184.108.40.206
PING 220.127.116.11 (18.104.22.168) 56(84) bytes of data.
64 bytes from 22.214.171.124: icmp_seq=1 ttl=64 time=0.044 ms
--- 126.96.36.199 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.044/0.044/0.044/0.000 ms
$ ping 188.8.131.52
PING 184.108.40.206 (220.127.116.11) 56(84) bytes of data.
64 bytes from 18.104.22.168: icmp_seq=1 ttl=64 time=0.041 ms
64 bytes from 22.214.171.124: icmp_seq=2 ttl=64 time=0.041 ms
--- 126.96.36.199 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.041/0.041/0.041/0.000 ms
But, if I ping specifying the interface, then it does not work!
$ ping -I tap0 188.8.131.52
PING 184.108.40.206 (220.127.116.11) from 18.104.22.168 tap0: 56(84) bytes of data.
>From 22.214.171.124 icmp_seq=1 Destination Host Unreachable
>From 126.96.36.199 icmp_seq=2 Destination Host Unreachable
>From 188.8.131.52 icmp_seq=3 Destination Host Unreachable
--- 184.108.40.206 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3015ms
, pipe 3
Shouldn't the packet coming out of tap0 be routed to the proper interface by
I also ran the "ping_test" of ecos with the following setup.
ethernet.tdf : eth0 real eth0
ecos IP: 220.127.116.11/24
server IP: 18.104.22.168
I had connected my PC's eth0 to another PCs eth port. On second PC
eth0's IP was 22.214.171.124
Running the ping test shows that ecos is able to send/rcv packets from 126.96.36.199
Now if I change tdf file to use tap0:
eth0 ethertap tap0 00:FE:42:63:84:A5
And setup eth0 locally on my PC with same IP (188.8.131.52), the test
I'm trying to create a TAP device from a userspace program to see if I
get a tap0
device when I open /dev/net/tun with the proper IOCTL. The sample snip
shown here does not work though!
The program is not even compiling! :( Trying to fix that now!
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