Wireless infrastructure and ad hoc network integration

A system and method for integrating infrastructure and ad hoc wireless networks. In one example embodiment, a plurality of nodes and access points exchange beacons and route replies which are forwarded by intervening nodes. Nodes determine whether to switch access points based on cost values contained in the received beacons. Intervening nodes store routes with weights to the source node, such that the access points maintain weights to every node in their zones.