Create two wtap device "wtap0, wtap1" via wtap tool in tools/tools/wtap/wtap, and then create two vaps "wlan0, wlan1" by ifconfig which respectively have their wlandev wtap0 and wtap1, and in IBSS mode with the same SSID. Then, create two jails with vnet, with the parameter allow.raw_sockets and vnet.interface=<vap>. Enter the two jails, bring up and assign IP address to the two vaps, then one can start to ping each other via ping(8).