Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

is telnet an application protocol or a connection protocol?  RSS feed

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This puts me in doubt. Because one can, using the "telnet application" "connect" to a remote host at Port Number 23. But beneath is used of course the TCP Protocol.
At the same time, one can connect to a remote host (this remote host is also some sort of a server) at other ports. what is happening here then???
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First, before I launch into an explanation, let me recommend the definitive book on this topic, W.Richard Stevens'TCP/IP Illustrated, volume I. Everybody interested in this stuff should have a copy of this, and his "UNIX Network Programming" as well.
Now: telnet is interesting. The protocol allows for option negotiation, so that it can do all sorts of neat stuff (window size changes!) but is designed in such a way that a very dumb implementation and a very smart implementation can talk to eachother just fine; furthermore, a very dumb implementation looks just like a plain, ordinary socket with no logic behind it.
Therefore, a real telnet server accepts connections from real telnet clients, does some negotiation to see who will echo characters, what terminal type will be used, etc, etc, and then executes a shell and connects the client to it.
But you can also use a telnet client to talk to a "dumb" server -- basically, any server that just opens a socket and waits for text commands.
The trick is that the telnet server, not the client, initiates the negotiations. If the client doesn't hear any negotiation commands coming from the server, then it just passes keystrokes through, more or less untouched.
 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The TCP/IP model consists of four layers, termed Application, Transport, Network, and Link.
I'm not sure what 'connection protocol' means for you. Connection type (tcp, udp, raw sockets)? In any event, telnet is an Application level tool.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Let me tell with an example what I have understood:
when one does
telnet host-ip port-number
does the "telnet application" first connect over a socket to the host at "telnet service port(23)" ? and then be connected by the "telnet server service" to the specified port(i.e. service)
or
first to the service port identified by port-number, that listens already there?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The second case. If you telnet to a specific port, then the telnet server isn't involved. The client contacts whatever is listening at that port directly.
 
Idly Vada
Ranch Hand
Posts: 135
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by R�stem e Zal:
This puts me in doubt. Because one can, using the "telnet application" "connect" to a remote host at Port Number 23. But beneath is used of course the TCP Protocol.
At the same time, one can connect to a remote host (this remote host is also some sort of a server) at other ports. what is happening here then???

Hi R�stem e Zal!
one should remember that telnet is an application layer protocol.And TCP is a transport layer protocol. Application layer protocols use transport layer protocols. Another exaple is that HTTP uses TCP/IP.
Apart from telnet port, there are a no. of other ports thru which the machine can talk.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Murthy,
i know there exists rlogin I remember having used.
I was just confused that the name "telnet" both refers to
1-telnet service protocol standard
2-the name of the application that connects to the telnet service(its name could have been maybe txeofdi23_my_application)
3-bypassing the telnet service, one can using the telnet application, connect to another service at the host, which allows some text based communication...(or even binary based, i mean over a concole I can attach files to send to an SMTP server...)
But thx to everybody, now it is crystal clear in my mind...
By the way, W. Richard Stevens - TCP-IP Illustrated - Vol 1.pdf is great. thx to edonkey
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!