Hi,
I want to use mac80211_hwsim (from kernel 2.6.30-rc6) for some testing,
but I can't get the two interfaces to communicate with each other.
I've done the following:
# hostapd -B hostapd.conf
Configuration file: hostapd.conf
Using interface wlan0 with hwaddr 02:00:00:00:00:00 and ssid 'mac80211 test'
# iwconfig wlan1 essid "mac80211 test"
# ifconfig wlan0 10.0.0.1 up
# ifconfig wlan1 10.0.0.2 up
wlan1 can successfully associate, but I can't reach any interface via
the other:
# ping -I wlan0 10.0.0.2
PING 10.0.0.2 (10.0.0.2) from 10.0.0.1 wlan0: 56(84) bytes of data.
>From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
# ping -I wlan1 10.0.0.1
PING 10.0.0.1 (10.0.0.1) from 10.0.0.2 wlan1: 56(84) bytes of data.
>From 10.0.0.2 icmp_seq=1 Destination Host Unreachable
With tcpdump I can see ARP requests on both interfaces:
09:43:28.687273 ARP, Request who-has 10.0.0.2 tell 10.0.0.1, length 28
But there is no answer or other traffic.
Did I forget soemthing in the setup?
Thanks for your help.
Regards,
Reiner
Jouni Malinen wrote:
>
> Linux IP/networking stack does not really seem to like connections
> between local interfaces unless this goes through lo.. Or well, at least
> I haven't figured out how to configure this without some kernel code
> changes. It would be kind of nice to get this working, but anyway, I
> made a small program for checking both unicast and broadcast
> communications for this type of use: hwsim_test from
> http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tools
>
> (it uses packet sockets bound to the interface and does not rely on the
> kernel IP stack)
>
Thank you, it's working fine. Now I can also test with data frames. :)
On Thu, May 28, 2009 at 10:00:14AM +0200, Reiner Herrmann wrote:
> I want to use mac80211_hwsim (from kernel 2.6.30-rc6) for some testing,
> but I can't get the two interfaces to communicate with each other.
> # ifconfig wlan0 10.0.0.1 up
> # ifconfig wlan1 10.0.0.2 up
>
> wlan1 can successfully associate, but I can't reach any interface via
> the other:
>
> # ping -I wlan0 10.0.0.2
> PING 10.0.0.2 (10.0.0.2) from 10.0.0.1 wlan0: 56(84) bytes of data.
> >From 10.0.0.1 icmp_seq=1 Destination Host Unreachable
Linux IP/networking stack does not really seem to like connections
between local interfaces unless this goes through lo.. Or well, at least
I haven't figured out how to configure this without some kernel code
changes. It would be kind of nice to get this working, but anyway, I
made a small program for checking both unicast and broadcast
communications for this type of use: hwsim_test from
http://w1.fi/gitweb/gitweb.cgi?p=hostap.git;a=tree;f=mac80211_hwsim/tools
(it uses packet sockets bound to the interface and does not rely on the
kernel IP stack)
--
Jouni Malinen PGP id EFC895FA