Telnet and Test-NetConnection (TNC) commands

 

Telnet and Test-NetConnection (TNC) commands are used for network connectivity testing, but they have some key differences in how they work and what they can be used for:

 

Telnet Command:

The Telnet command is an older, text-based protocol that allows you to establish a connection to a remote host or server over the network. It is often used to test the connectivity of a specific port on a remote server or device. Telnet can be used to check whether a specific port is open, to test network connectivity, or to establish a remote session on a server that supports Telnet. However, Telnet is not a secure protocol and should not be used for sensitive data transmission.

 

Test-NetConnection (TNC) Command:

The Test-NetConnection command is a modern command-line tool that is included in Windows operating systems starting from Windows 8. It allows you to test network connectivity to a remote server or device and provides more detailed output than Telnet. It can be used to test the connectivity of a specific port, to perform a ping test, to resolve DNS names, and to check firewall rules. Test-NetConnection also supports IPv6 and is a more secure protocol than Telnet.

 

In general, Test-NetConnection is the preferred command to use for network connectivity testing in modern Windows environments. It provides more detailed output and is more secure than Telnet. However, Telnet can still be useful in certain situations where you need to establish a remote session on a server that supports Telnet, or when you need to test connectivity to a specific port that is not supported by Test-NetConnection.

 

Telnet Command:

telnet <hostname> <port>

Example:

telnet SQLNODE1 2572

This command will open a Telnet session to the server at SQLNODE1 on port 2572.


Test-NetConnection (TNC) Command:

tnc -computername<computername> -Port <port>

Example:

tnc  -computername SQLNODE1 -Port 1433

This command will test the network connection to the SQL Server instance running on the computer named SQLNODE1 on port 1433, which is the default port used for SQL Server database traffic. If the connection is successful, it will display a "Ping Succeeded" message along with other connection details. If the connection fails, it will display an error message.

Comments

Popular posts from this blog

Database Administrator Designations

Interview questions for Junior SQL server DBA.

Interview Questions on AOAG