C## create two wtapparent wlan device "s wtap0, wtap1" via wtap tool in
goto tools/tools/wtap/wtap, and then create two vaps "follow the commands below (may need the priority of super user) :
```
./wtap c 0
./wtap c 1
```
## create two child wlan devices (vap) wlan0, wlan1" by ifconfig which respectively have their wlandev wtap0 and wtap1 in IBSS mode (with the same SSID)
Follow the commands below (may need the priority of super user) :
```
ifconfig wlan0 create wlandev wtap0 wlanmode adhoc ssid test
ifconfig wlan1 create wlandev wtap1 wlanmode adhoc ssid test
```
## use visibility tool to enable communications between wlan0 and wlan1
goto tools/tools/wtap/vis_map, and in IBSS mode with the same SSID.follow the commands below (may need the priority of super user) :
```
./vis_map o
./vis_map a 0 1
./vis_map a 1 0
```
## create two jails with vnet
create jail0 with interface wlan0, Then,and create jail1 with interface wlan1. create two jails with vnetAllow raw sockets and vnet by pass the parameters as following:
```
jail -c name=jail0 persist vnet vnet.interface=wlan0 allow.raw_sockets
jail -c name=jail1 persist vnet vnet.interface=wlan1 allow.raw_sockets
```
## bring up interfaces and assign IP addresses
Assign wlan0 IP address with 10.0.0.1, with the parameter allow.raw_sockets and vnet.interface=<vap>.wlan1 with 10.0.0.2, Enter the two jails, bring up and assign IP address to the two vapsand bring them up.
```
jexec jail0 ifconfig wlan0 inet 10.0.0.1/24 up
jexec jail1 ifconfig wlan1 inet 10.0.0.2/24 up
```
## ping test
Now ping test are available, then one can start to ping each otheryou can do ping test on either jail0 or jail1 via ping(8).