We consider a set of multiple networked controllers with their control loops closed over a shared wireless network. The design objective is to optimize the control performance, which is a complex function of the controller design and the network parameters. We first discuss controller design with randomly dropped and delayed packets, show the optimality of separate state estimation and feedback control under certain network assumptions, and obtain the optimal Kalman state estimator when some or all of the observations are lost. This analytical framework also provides the throughput requirements on the network needed to guarantee the Kalman filter stability. With the optimal controller in hand, we next focus on optimizing the wireless network design for this controller. The tradeoffs between network throughput, time delay, and packet loss probability are intricate and implicit in the control performance index, which complicates network optimization. We show that this optimization requires a cross-layer design framework, and propose such a framework for a broad class of networked control applications. We then illustrate this framework by a cross-layer optimization of the link layer, multiple access layer, and sample period selection in a double inverted pendulum system. We will also provide experimental results for the controller optimized for packet delay and loss operating over an 802.11b wireless LAN.