Network analysis and control