Cross-layer STP-based Networks: Analysis and Design