Performance analysis and simulation in wireless mesh networks