Skip to contentSkip to conversation

mac80211_hwsim: Problem setting up communication

DISCUSSION Reiner Herrmann 2 participants 3 messages May 28, 2009

lore
Share & tools
lore
#0 lore raw

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.
Quoted 1 line

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.
Quoted 1 line

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

#1 lore raw
Quoted 12 lines · Reiner Herrmann

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.
Quoted 1 line

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)

Signature · 1 line
Jouni Malinen                                            PGP id EFC895FA
#2 lore raw
Quoted 9 lines · Jouni Malinen

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

Quoted 3 lines

(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. :)