Repository navigation
TH4. Telnet vs Ping
DevWithNehaCloud edited this page May 27, 2026
·
2 revisions
In OCI Networking troubleshooting, both Ping and Telnet are important tools, but both have different purposes.
| Feature | Ping | Telnet |
|---|---|---|
| Purpose | Checks network connectivity | Checks specific port/service connectivity |
| Protocol Used | ICMP | TCP |
| Checks | Whether the server is reachable | Whether a specific service port is open |
| Port Required | No | Yes |
| Common Usage | Basic network testing | Service/port testing |
| OCI Requirement | ICMP must be allowed | TCP port must be allowed |
The ping command is used to check whether the destination server or IP address is reachable over the network.
It sends ICMP Echo Request packets and waits for a response.
Suppose:
- Instance A IP:
10.0.0.10 - Instance B IP:
10.0.1.20
From Instance A:
ping 10.0.1.20PING 10.0.1.20 (10.0.1.20) 56(84) bytes of data.
64 bytes from 10.0.1.20: icmp_seq=1 ttl=64 time=1.23 ms
64 bytes from 10.0.1.20: icmp_seq=2 ttl=64 time=1.10 ms- Network connectivity exists
- Routing is correct
- ICMP traffic is allowed
Destination Host UnreachableOR
Request timed out- Security List blocks ICMP
- Route Table issue
- Instance is down
- Wrong subnet configuration
- Firewall blocks ICMP
ICMP must be allowed in:
- Security List
- NSG (Network Security Group)
- OS Firewall
| Source | Protocol | Type |
|---|---|---|
| 0.0.0.0/0 | ICMP | Echo Request |
The telnet command is used to check connectivity to a specific TCP port.
It verifies whether a particular service is reachable.
Suppose:
- Web Server IP:
10.0.1.20 - SSH Port:
22
Command:
telnet 10.0.1.20 22Trying 10.0.1.20...
Connected to 10.0.1.20.
Escape character is '^]'.
SSH-2.0-OpenSSH_8.0- Server is reachable
- TCP Port 22 is open
- SSH service is running
Connection refusedOR
Unable to connect to remote host- Port blocked in Security List/NSG
- Service is not running
- OS firewall blocks the port
- Wrong routing configuration
TCP Port must be allowed in:
- Security List
- NSG
- OS Firewall
| Source | Protocol | Port |
|---|---|---|
| 0.0.0.0/0 | TCP | 22 |
You are unable to SSH into an OCI instance.
ping 10.0.1.20Possible Issues:
- Network issue
- Route Table issue
- ICMP blocked
Meaning:
- Network path is working correctly
telnet 10.0.1.20 22Possible Issues:
- SSH Port blocked
- SSH Service stopped
- Firewall issue
Meaning:
- Port is accessible
- SSH service is reachable
| Ping | Telnet |
|---|---|
| Checks server reachability | Checks service/port reachability |
| Uses ICMP | Uses TCP |
| No port required | Port required |
| Can work even if service is down | Requires service to be running |
| Used for network troubleshooting | Used for application/service troubleshooting |
| Tool | Analogy |
|---|---|
| Ping | Checking whether the house exists |
| Telnet | Checking whether a specific room door is open |
In OCI:
- Ping is used to verify basic network connectivity.
- Telnet is used to verify specific service port accessibility.
Both tools are very useful for troubleshooting:
- Security Lists
- NSGs
- Route Tables
- Gateways
- Firewalls
- Service Availability