How do you test connectivity, check open ports, and trace routes in a network troubleshooting scenario?