Preserving Topology of Network Systems: Metric, Analysis, and Optimal Design