Networks Training

  • About
  • My Books
  • SUGGESTED TRAINING
  • HOME
  • Cisco Networking
    • Cisco General
    • Cisco IOS
    • Cisco VPN
    • Cisco Wireless
  • Cisco ASA
    • Cisco ASA General
    • Cisco ASA Firewall Configuration
  • Certifications Training
    • CCNA Training
    • Cisco Certifications
    • I.T Training
  • General
    • General Networking
    • IP Telephony
    • Network Security
    • Product Reviews
    • Software
  • Cisco Routers
  • Cisco Switches
You are here: Home / Cisco ASA Firewall Configuration / Ping TCP Command on Cisco ASA – Great Troubleshooting Tool

Ping TCP Command on Cisco ASA – Great Troubleshooting Tool

Written By Harris Andrea

The “ping” command has been the “de facto” troubleshooting protocol used mainly for testing connectivity and communication between two hosts. As we all know, the ping command sends “ICMP” packets to the other end and waits for ICMP reply packets to come back.

From ASA 8.4(1) and later, Cisco introduced an enhanced version of the ping command. This is the “ping tcp”. It allows the ASA device to send any TCP packet (instead of ICMP) from any source IP to any destination IP on any port (source or destination).

This is great for troubleshooting purposes as we will see in the example below. By sending TCP packets you can also verify if remote services are up and running, in addition to verifying that routing and connectivity is also established.

Let’s see a troubleshooting scenario that you can use the “ping tcp” command. This has to do with a VPN site-to-site network as shown below:

ping tcp

From the diagram above, we have the following (popular) scenario:

The two sites (HQ Site – ASA1 and Remote Site – ASA2) are connected over the Internet with a site-to-site IPSEc VPN tunnel.

MORE READING:  How to Configure Static Routing on Cisco ASA Firewall

The tunnel is established between the two public IP addresses of the firewalls (1.1.1.1 and 2.2.2.2). Also, the only traffic allowed to pass through the VPN tunnel is traffic between the two private LAN subnets (192.168.1.0/24 and 192.168.2.0/24).

You are the firewall administrator located in the main HQ Site and you are trying to troubleshoot if the VPN is working or not between HQ Site and Remote Site.

Also, assume that you don’t have any hosts connected yet on the Remote Site LAN (or maybe you don’t have access to any of the hosts there). However, from the HQ Site you are able to connect (with SSH for example) to ASA2 on the Remote Site.

Requirement:

We want to make sure that VPN tunnel is established, that traffic can flow between 192.168.1.0 and 192.168.2.0 (and vice-versa), and also that hosts in “Remote Site” will be able to access the “RDP Server” (192.168.1.100) located in HQ Site using Remote Desktop Protocol (TCP port 3389).

MORE READING:  ASA Firewall NAT Control Feature

Assume we are connected to ASA2. Let’s use the “ping tcp” command for troubleshooting:

ASA2# ping tcp

Interface: inside
Target IP address: 192.168.1.100   <— This is the RDP Server in HQ Site
Destination port: 3389    <— Specify port of RDP Server
Specify source? [n]: y
Source IP address: 192.168.2.1 <— use a source IP from Remote Site LAN
Source port: [0] 1000 <— any source port you want
Repeat count: [5] Timeout in seconds: [2] Type escape sequence to abort.

Sending 5 TCP SYN requests to 192.168.1.100 port 3389
from 192.168.2.1 starting port 1000, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 50/50/50 ms

With the above we have verified that everything is working fine. Traffic from source IP 192.168.2.1 can reach the RDP Server (192.168.1.100) on port 3389 over the VPN tunnel.

You can use also the commands “show crypto ipsec sa” and “show crypto isakmp sa” to see that VPN packets are encrypted/decrypted etc.

Related Posts

  • Prevent Spoofing Attacks on Cisco ASA using RPF
  • Configuring Connection Limits on Cisco ASA Firewalls – Protect from DoS
  • Configuring AAA Authentication-Authorization-Accounting on Cisco ASA Firewall (TACACS+, RADIUS)
  • Cisco ASA Firewall Management Interface Configuration (with Example)
  • How to Configure Access Control Lists on a Cisco ASA 5500/5500-X Firewall (with Examples)

Filed Under: Cisco ASA Firewall Configuration

Download Free Cisco Commands Cheat Sheets

Enter your Email below to Download our Free Cisco Commands Cheat Sheets for Routers, Switches and ASA Firewalls.

We use Elastic Email as our marketing automation service. By submitting this form, you agree that the information you provide will be transferred to Elastic Email for processing in accordance with their Terms of Use and Privacy Policy. Also, you allow me to send you informational and marketing emails from time-to-time.

About Harris Andrea

Harris Andrea is an Engineer with more than two decades of professional experience in the fields of TCP/IP Networks, Information Security and I.T. Over the years he has acquired several professional certifications such as CCNA, CCNP, CEH, ECSA etc.

He is a self-published author of two books ("Cisco ASA Firewall Fundamentals" and "Cisco VPN Configuration Guide") which are available at Amazon and on this website as well.

Comments

  1. momodu says

    January 21, 2015 at 12:31 pm

    I am very much intrested in networking teaching.

  2. imran shahid says

    January 28, 2015 at 1:34 am

    hi,
    Thanks for sharing knowledge. Is ping tcp similar to the ping command specifying source ip address as we normally do it in routing. eg ping 10.10.10.10 source 1.1.1.1 .

    thanks again

  3. Harris Andrea says

    January 28, 2015 at 5:42 am

    Hi Imran,

    Yes they are similar in the sense that you can specify the source IP as well. However their big difference is that the normal “ping” command sends ICMP packets whereas the “ping tcp” command sends TCP packets on any port you want. So with the “ping tcp” command you can check also if specific services are working (e.g you can check if a web server is actually listening on port 80 for example).

    Harris

  4. li wang says

    June 1, 2015 at 3:12 am

    below is from the Cisco ASA command reference:
    “””For TCP, this is the input interface through which the source sends SYN packets.”””
    so in terms of the your example, the interface should be the inside interface of ASA2, any thoughts?

  5. Harris Andrea says

    June 1, 2015 at 2:19 pm

    Li wang,

    Yes you are right. I made a typo error. It should be “inside” and not “outside”. I have corrected it.Thanks a lot

    Harris

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Search this site

About Networks Training

We Provide Technical Tutorials and Configuration Examples about TCP/IP Networks with focus on Cisco Products and Technologies. This blog entails my own thoughts and ideas, which may not represent the thoughts of Cisco Systems Inc. This blog is NOT affiliated or endorsed by Cisco Systems Inc. All product names, logos and artwork are copyrights/trademarks of their respective owners.

Amazon Disclosure

As an Amazon Associate I earn from qualifying purchases.
Amazon and the Amazon logo are trademarks of Amazon.com, Inc. or its affiliates.

Search

BLOGROLL

Tech21Century
Firewall.cx

Copyright © 2023 | Privacy Policy | Terms and Conditions | Hire Me | Contact | Amazon Disclaimer | Delivery Policy

12 shares