Robert Smith, a 19-year-old in a gray T-shirt and camouflage pants, climbed the stairwell of the Joseph Miccio Community Center in Red Hook, scaled a ladder at the top floor and jumped onto the roof. He soon found what he was looking for: bright, white plastic boxes, each about the size of a brick, some with little antennas sticking out. Mr. Smith pulled a laptop from his backpack and got to work, tending to the nodes of the Red Hook mesh, an ambitious plan to link up a local wireless digital network across the neighborhood.

With the Brooklyn-Queens Expressway just ahead and the Lower Manhattan skyline in the distance, Mr. Smith worked on keeping the digital conversation going. He was examining two devices on the roof while wirelessly conversing with a minicomputer a few hundred feet away on the roof of a school that had a high-speed Internet connection.

Though these white boxes, spread across various rooftops in Red Hook, may appear haphazard, or guerrilla even, the Red Hook mesh is actually in the vanguard of wireless networking. Unlike the Internet available at work or at home, which typically arrives through a wire and follows a carefully plotted path from Internet provider to user, a mesh network is improvised — and remarkably resilient.

Because the devices speak to one another, they are more than a series of “hot spots” with Internet access; the mesh remains a network whether or not it is connected to the Internet. And that independence is its main attraction — in Berlin, where a tech collective shares Internet access to save money; in rural Spain, where one of the largest mesh networks covers areas ignored by telecoms; in Tunisia, where the State Department has spent millions establishing a mesh network to experiment with a local network impervious to government censorship.