Association of a client to an access point

16 views
Skip to first unread message

Marie-Ange Nicolas

unread,
Jun 30, 2024, 1:17:19 PM (4 days ago) Jun 30
to ns-3-users
Hello
I want to be able to associate the clients to an access point.
I'm trying to simulate an evil twin attack using 2 access points with the same SSID, and I want to associate the clients to the access points, observing which access point they would associate with.

Ps: the clients are receiving beacons from the access point (don't know which access point)

This is a part of my script:
// Name of the wifi
    Ssid ssid = Ssid("wifi-default");

    // Configure legitimate AP
    wifiMac.SetType("ns3::ApWifiMac", "Ssid", SsidValue(ssid));
    apDevs.Add(wifi.Install(wifiPhy, wifiMac, ap.Get(0)));

    // Configure rogue AP
    wifiMac.SetType("ns3::ApWifiMac", "Ssid", SsidValue(ssid));
    apDevs.Add(wifi.Install(wifiPhy, wifiMac, ap.Get(1)));

    // setup the stations in the network.
    wifiMac.SetType("ns3::StaWifiMac",
                    "ActiveProbing",
                    BooleanValue(true),
                    "Ssid",
                    SsidValue(ssid));
    staDevs = wifi.Install(wifiPhy, wifiMac, stas);
Reply all
Reply to author
Forward
0 new messages