Skip to content

Commit 6a700c5

Browse files
committed
Modify README
Add descriptions of WPA configuration in IBSS mode.
1 parent 2917062 commit 6a700c5

File tree

1 file changed

+42
-2
lines changed

1 file changed

+42
-2
lines changed

README.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,9 @@ Now, assign an IP address to both interfaces using the following commands:
430430
$ sudo ip netns exec ns3 ip addr add 10.0.0.4/24 dev vw3
431431
$ sudo ip netns exec ns4 ip addr add 10.0.0.5/24 dev vw4
432432
```
433-
#### Switch to IBSS mode
433+
There are two methods to configure an IBSS network: manual configuration or using WPA.
434+
#### Option1 : Manual configuration
435+
##### Switch to IBSS mode
434436
Switch device to IBSS mode using the following command :
435437

436438
***iw dev [interface] set type ibss***
@@ -454,7 +456,7 @@ Interface vw3
454456
wiphy 4
455457
txpower 0.00 dBm
456458
```
457-
#### Join IBSS network
459+
##### Join IBSS network
458460
```shell
459461
$ sudo ip netns exec ns3 ip link set vw3 up
460462
$ sudo ip netns exec ns4 ip link set vw4 up
@@ -485,6 +487,44 @@ Interface vw3
485487
wiphy 4
486488
txpower 0.00 dBm
487489
```
490+
#### Option2 : Using WPA
491+
```shell
492+
$ sudo ip netns exec ns3 ip link set vw3 up
493+
$ sudo ip netns exec ns4 ip link set vw4 up
494+
```
495+
Prepare the following script `wpa_supplicant_ibss.conf` (you can modify the script based on your needs):
496+
```shell
497+
network={
498+
ssid="ibss1"
499+
mode=1
500+
frequency=2412
501+
key_mgmt=WPA-PSK
502+
proto=RSN
503+
pairwise=CCMP
504+
group=CCMP
505+
psk="12345678"
506+
}
507+
```
508+
Using the command **wpa_supplicant**, configure `vw3` and `vw4` to join `ibss1`.
509+
```shell
510+
$ sudo ip netns exec ns3 wpa_supplicant -i vw3 -B -c scripts/wpa_supplicant_ibss.conf
511+
$ sudo ip netns exec ns4 wpa_supplicant -i vw4 -B -c scripts/wpa_supplicant_ibss.conf
512+
```
513+
Check the information of `vw3`.
514+
```shell
515+
$ sudo ip netns exec ns3 iw dev vw3 info
516+
```
517+
You should see output similar to the following:
518+
```
519+
Interface vw3
520+
ifindex 6
521+
wdev 0x400000001
522+
addr 00:76:77:33:00:00
523+
ssid ibss1
524+
type IBSS
525+
wiphy 4
526+
txpower 0.00 dBm
527+
```
488528
#### Transmission/Receivement test
489529
To perform a ping test between two IBSS devices (`vw3` and `vw4`) in the same ibss cell (`ibss1`), use the following command:
490530
```shell

0 commit comments

Comments
 (0)