# Simulating WLAN-Mesh (802.11s) with Jails



## JakobDunkler (Apr 21, 2017)

Hi,
I want to simulate at least 100 nodes of an 802.11s network, but each of the nodes has to run some java code.
The java code reads from the routing tables. The packages between the nodes as well as the network interfaces should be simulated. 
Is FreeBSD/Jails a reasonable choice? 

Could a noob (like me) set this up in like some weeks?

Thanks in advance!


----------



## Phishfry (Apr 21, 2017)

I like questions like this. Very complex in nature instead of mundane questions without a search first..


JakobDunkler said:


> The packages between the nodes


Do you mean packets here?

I wonder how you would simulate 100 wireless nodes. Virtual Interfaces comes to mind. The interaction with ifconfig would make it tough from a jail I think.


----------



## Phishfry (Apr 21, 2017)

Looks like cloning the loopback adapter is a method with jails.
https://forums.freebsd.org/threads/59851/
https://forums.freebsd.org/threads/15623/


----------



## Phishfry (Apr 21, 2017)

I'm not sure that cloning the loopback adapter does any good for testing the wifi mesh part of your project though.
Connecting 100 clients with what dhcp server and all the components of a mesh network. Is this network authenticated as well?


----------



## JakobDunkler (Apr 21, 2017)

Yes i meant packets.

I have some java code that will distribute some data over a WLAN-Mesh. I tried that with 4 real nodes on linux and it works. I would just love to have like a big simulation (only to see wether my java code works in the bigger picture) . So this network exists only in theory. But the java code heavily depends on reading the routing tables created by 802.11s. ( a buddy told me such a simulation would be suited for freeBsd jails)

I am sorry i asked such a philosophical question, I honestly hoped, that somebody did this already. As such a simulation seems to be nice way to check real code.

Thanks for your 3 suggestions by the way.


----------



## Phishfry (Apr 21, 2017)

There are not many FreeBSD mesh questions asked here. Sounds like an interesting project.
https://wiki.freebsd.org/WifiMesh

I suggest you post in the freebsd-wireless mailing list.
Adrian Chadd is the man who could answer this properly.
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless


----------



## Phishfry (Apr 21, 2017)

The base question for me is does each jail have a separate routing table.

#/ looks like they can with setfib
https://forums.freebsd.org/threads/15139/


----------



## Phishfry (Apr 21, 2017)

Similar question:
https://lists.freebsd.org/pipermail/freebsd-jail/2011-February/001481.html
Back to my first concern. Host ifconfig from a jail


----------



## JakobDunkler (Apr 21, 2017)

I think I found a decent sollution. The university of Zagreb built a framework (Imunes) which seems to do exactly what I need. Built different customizable jails with a full network stack and emulate the links between them.


----------

