1

I have a Linux machine that creates a Wifi hotspot. I need to simulate a few clients connecting to that hotspot and then using that connectiong to talk to a service, through the wlan interface. The service is running in it's own process and the clients would be connecting from another process. Is there a way to achieve this? Something like create another interface on the same subnet as the wlan? Thanks

  • Tell us why you want to simulate them. – Rui F Ribeiro Mar 15 '18 at 8:19
  • @RuiFRibeiro We want to test that some thrift clients connecting through Wifi to the machine would work accordingly. Basically to test that tls/ssl is connecting ok... – user3808318 Mar 15 '18 at 9:31
  • We are getting somewhere. Testing FreeRadius? – Rui F Ribeiro Mar 15 '18 at 11:04
1

Have a look at the mac80211_hwsim kernel module. This module simulates a number of virtual "radios" (wifi cards, or phys) that communicate with each other. E.g.,

modprobe mac80211_hwsim radios=3

will give you 3 of those. Use iw dev to view them and see their MAC address. Then you can use iw and ip to configure them, and simulate an access point and as many clients as you want. You'll also get a hwsim0 interface of ieee802.11/radiotap type, and you can run wireshark on it to see the messages that go through the "virtual" air.

If the software you are using on the wireless network interfaces can't bind to specific interfaces, consider putting it into a network namespace for each client.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.