When troubleshooting network connectivity, ICMP (ping) only tells you half the story. Ping verifies Layer 3 routing, but it cannot tell you if a specific TCP port is open, closed, or being actively blocked by a stateful firewall.
Instead of relying on external tools or workstations, you can use a Cisco router’s native Telnet client as a quick and highly effective TCP port scanner. Here is a straightforward guide on how to prepare your router, perform port checks, and manipulate your source interfaces to isolate network drops.
Before you can even attempt a port check, you must ensure your router’s Virtual Teletype (VTY) lines are permitted to process Telnet traffic. Modern security standards often disable Telnet entirely, which will stop your troubleshooting before it even begins.
Allowing Outbound Tests (transport output) If you try to run a Telnet port check and the router immediately rejects your command, your local VTY line likely has outbound Telnet disabled. You must temporarily allow the router to initiate outbound Telnet sessions:
Router(config)# line vty 0 4
Router(config-line)# transport output ssh telnet
Router(config-line)# end
Not needed for most examples however if you are testing port connectivity from one Cisco router to another Cisco router (e.g., checking telnet port 23), the test will fail if the destination router is not configured to accept incoming Telnet connections. On the receiving router, allow the inbound traffic:
Destination-Router(config)# line vty 0 4
Destination-Router(config-line)# transport input ssh telnet
Destination-Router(config-line)# end
(Note: Once your network testing is complete, it is highly recommended to revert these lines to transport input ssh and transport output ssh to maintain security best practices).
Once your VTY lines allow the traffic, you can use the standard Telnet syntax to specify a destination port after the IP address. This forces the router to attempt a standard TCP 3-way handshake on that specific port instead of the default port 23.
The Command:
Router# telnet 192.168.1.50 80
How to Read the Results:
By default, a Cisco router sources its outgoing traffic from the physical interface closest to the destination. However, if you are testing connectivity for a specific service bound to a Loopback interface, or testing a specific VPN tunnel/VRF, you need to force the router to use a different source IP.
You can do this by appending the /source-interface parameter to your command.
The Command:
Router# telnet 192.168.1.50 443 /source-interface Loopback0
This commands the router to build the TCP connection to port 443 on 192.168.1.50, but ensures the source IP address matches Loopback0. If this succeeds, you have definitively proven that the firewalls and routing tables along the path are correctly configured to pass traffic for that specific Loopback IP.
The Cisco Telnet client is an incredibly powerful, built-in tool for validating Layer 4 connectivity. By preparing your VTY lines and combining targeted port numbers with specific source interfaces, you can rapidly isolate firewall drops and routing issues without ever leaving the CLI.