Unit - 4
Remote Login: TELNET and File Transfer FTP,TFTP
Q1) Explain NVT?
A1)
NVT
There is a complex method for accessing a remote computer. This is because a special combination of characters is recognised by every machine and its operating system as tokens. The end-of-file token on a machine running the DOS operating system, for instance, is Ctrl+z, while Ctrl+d is remembered by the UNIX operating system.
There are heterogeneous structures we are concerned with. If we want to access any remote device in the world, we need to know first what kind of computer we're going to be connected to, and we need to instal the unique terminal emulator that that computer uses as well. By defining a common interface called the network virtual terminal (NVT) character set, TELNET solves this problem.
The TELNET client converts characters (data or commands) coming from the local terminal into NVT form through this interface and delivers them to the network. On the other hand, the TELNET server converts data and commands from the NVT form into a form that the remote device accepts.
NVT Character Set Two character sets are used by NVT, one for data and the other for power. They're both 8-bit bytes. For data, NVT is an 8-bit character set in which ASCII is the same as the 7 lowest-order bits and O is the highest-order bit. NVT uses an 8-bit character set, in which the highest-order bit is set to l, to send control characters between computers (from client to server or vice versa).
Some control characters of NVT
Character | Code | Meaning |
EOF | 236 | End of file |
EOR | 239 | End of record |
SE | 240 | Suboption end |
NOP | 241 | No operation |
DM | 242 | Data mark |
BRK | 243 | Break |
IP | 244 | Interrupt process |
AO | 245 | Abort output |
Q2) Describe TFTP?
A2)
TFTP
The Trivial File Transfer Protocol has a very simple concept, and it also has a very simple nature because of its simple concept. Even though it has fewer features as opposed to File Transfer Protocol because of its basic nature. In general, no authentication is enforced by the Trivial File Transfer Protocol prior to file contact.
No authentication mechanisms apply to the Trivial File Transfer Protocol when filing communications. Since no authentication mechanism or security mechanism is enforced by the Trivial File Transfer Protocol, it could also not be used for file communication over the internet.
It is also a protocol for file transfer without sophisticated FTP functionality.
● For simple file transfers, such as during boot time, it is fine.
● It uses UDP protocols as the transport layer. The TFTP server must manage transmission errors (lost packets, checksum errors).
● It only uses one connection via port 69, which is well documented.
● Using a simple lock-step protocol, TFTP (each data packet needs to be acknowledged). The production is therefore small,
Types of TFTP
TFTP is of four types , they are-
● Read request
● Write request
● Data Packets
● Acknowledgment request
Advantages
● Uses UDP protocol
● Is easier to implement
● Requires less coding
● Less memory usage
Q3) Write mode of operation?
A3)
Mode of operation
The majority of TELNET deployments work in one of three modes: default, character, or line mode.
Default mode
When no other modes are invoked through option negotiation, the default mode is used. The echoing is done by the client in this mode. A character is typed by the user, and the client echoes the character on the screen (or printer) but does not send it until the completion of an entire line.
Character mode
In character mode, each character entered is sent to the server by the client. Normally, the server echoes the character back to be shown on the client screen. The character echo can be delayed in this mode if the transmission time is long (such as in a satellite connection). It also generates overhead (traffic) for the network because, for each data character, three TCP segments must be sent.
Line mode
To compensate for the deficiencies of the default mode and the character mode, a new mode has been proposed. In this mode, called the line mode, the client performs line editing (echoing, character erasing, line erasing, and so on). The client then sends the server the entire line.
Q4) Describe out of band signaling?
A4)
Out of band signaling
● Telnet uses OUT OF BAND SIGNALING to make control characters effective in special scenarios.
● Control characters in OUT OF BAND SIGNALING are followed by IAC and are sent to the remote process.
● Imagine a scenario in which an infinite loop has been reached by the application programme running on the server site and does not allow any input data.
● The user needs to interrupt the application programme, but no data from the buffer is read by the application programme.
● TCP has noticed that the buffer is complete at the server site, and it sends a section stating that the size of the client window should be zero.
● In other words, TCP announces on the server site that no further normal traffic is approved.
● An urgent TCP section must be sent from client to server to address such a situation.
● The urgent section overrides the framework for normal flow control.
● While standard segments are not accepted by TCP, it must accept urgent segments.
● If a telnet process (client or server) wants to send characters to another process (client or server) out of the band sequence, it embeds the sequence in the data stream and inserts a special character called DM (i.e.Data Mark).
● It creates a TCP section in which urgent bit set and Urgent Pointer pointing to DM character, however, to notify the other party.
● It reads the data and discards any information that precedes the control characters when the receiving process recei
● The remaining data is treated normally until it enters the DM character.
● In other words, the DM character is used as a synchronisation character that moves from urgent mode to usual mode and resynchronizes both ends of the receiving method.
In this way, control characters (i.e. IP) are transmitted to the Operating System out of the band, using the Required feature to interrupt the running application programme.
Q5) What do you mean by FTP connection?
A5)
FTP Connection
The standard mechanism provided by TCP/IP for copying a file from one host to another is the File Transfer Protocol (FTP). Although it seems simple and straightforward to transfer files from one system to another, some issues must be dealt with first. For example, different file name conventions may be used by two systems. There can be different ways for two systems to represent text and data.
FTP differs from other client/server applications in that two connections between the hosts are established. One connection is used for the transfer of data, the other for information control (commands and responses). Command separation and transfer of data makes FTP more efficient.
Control connection
● The connection to control uses very simple communication rules. Wc must transmit only a command line or a response line at a time.
● Two well-known TCP ports are used by FTP: port 21 is used for the control connection.
Data connection
● Due to the variety of data types transferred, the data connection , on the other hand, needs more complex rules. The complexity difference, however, is at the level of FTP, not TCP. Both connections are treated the same for TCP.
● TCP ports are used by FTP : port 20 is used for the data connection.
During the entire interactive FTP session, the control connection stays connected. For every file transferred, the data connection is opened and then closed. Every time commands involving file transfer are used, it opens and closes when the file is transferred.
In other words, the control connection opens when a user starts an FTP session. Whilst the control connection is open, if several files are transferred, the data connection can be opened and closed multiple times.
The client has three components: the user interface, the process of client control, and the process of transferring client data. The server has two components: the process of server control and the process of data transfer from the server. Between the control processes, the control connection is made. Between the data transfer processes, the data connection is made.
Q6) Define user interface in FTP?
A6)
User interface
The FTP protocol command set provides a rich, complete set of instructions for implementing the File Transfer Protocol. A human user could employ those commands to perform file transfer functions directly with an FTP server. But to do this requires that the user have an intimate knowledge of how FTP works. The user must know exactly which commands to send at which time, and in what order.
User interface benefits
Memorizing internal FTP commands might be a reasonable assignment for an internetworking expert, but not for a typical TCP/IP application user. For this reason, the FTP protocol defines an additional protocol component as part of the User-FTP Process: the FTP user interface.
It provides three main benefits to the FTP user:
● User friendliness : The FTP user interface presents FTP to the human user in a way that is easier and simpler to use than issuing protocol commands. Instead of requiring the knowledge of all those four-letter codes, the user interface can allow functions to be performed with more intuitive human-language commands. For example, we can say “get” a file instead of knowing to use the command RETR.
● Customization : The command used to perform a particular function can be customised based on common parlance in the networking industry, without requiring changes to be made to the FTP protocol itself.
For example, the “image” transfer mode is now also commonly called “binary” mode, so a user command called “binary” has been created to set this mode.
● Detail Abstraction and Command Sequence Simplification : A single user command can be made to issue multiple FTP protocol commands, hiding internal FTP details and making the protocol easier to use. In particular, commands that are related to the maintenance of the connection and other “overhead” issues that users don't want to deal with can be automated.
For example, an FTP client normally issues a PASV or PORT command prior to each data transfer. The user interface can take care of issuing this command automatically prior to a RETR or STOR command when a user tells FTP to get or send a file.
Q7) Describe the communication in FTP?
A7)
Communication
For data transformation, both the client and the server that operates on two distinct systems must be communicated. It uses two approaches to communication, i.e. communication over control links and communication over a data link, for communication.
Communication over control connection
For communicating through the control connection, FTP uses the same method as SMTP. It uses the ASCII 7-bit character set. Commands and responses accomplish communication. As we send one command (or response) at a time, this simple method is adequate for the control link. There is only one short line for each command or response, so we don't need to think about the file format or file structure. Each line is terminated with an end-of-line token of two characters
(carriage return and line feed).
control connection
Communication over data connection
The function of the data connection is different from that of the control connection. File transfer takes place through the data connection under the control of the commands sent through the control connection. We want to transfer files through the data connection.
The client must specify the type of file to be transmitted, the data structure, and the mode of transmission. We plan for transmission through the control link before sending the file through the data connection. The heterogeneity problem is solved by specifying three communication attributes: type of file, data structure, and mode of transmission.
data connection
File type : FTP can transfer one of the following types of files over a data link: an ASCII file, an EBCDIC file, or a picture file. The ASCII file is the default text file transfer format. Using 7-bit ASCII, each character is encoded. The sender converts the file to ASCII characters from its own representation, and the recipient translates the ASCII characters to its own representation.
Data structure : By using one of the following interpretations of the structure of the data, FTP can transfer a file across the data connection: file structure, record structure, and page structure. The file is a continuous stream of bytes in the file structure format. The file is split into records inside the document structure.
Transmission mode : By using one of the following three transmission modes: stream mode, block mode, and compressed mode, FTP will transfer a file across the data link. The default mode is the Stream Mode. Data is transmitted as a continuous stream of bytes from FTP to TCP. TCP is responsible for the chopping of data into appropriate size segments.
Q8) Write short notes on option and sub-option negotiation?
A8)
Option Negotiation
It first involves option negotiation between the client and the server to use any of the options listed in the previous section. For this reason, four control characters are used.
NVT character set for option negotiation
Character | Decimal | Binary | Meaning |
WILL | 251 | 11111011 | ● Offering to enable ● Accepting a request to enable |
WONT | 252 | 11111100 | ● Rejecting a request to enable ● Offering to disable ● Accepting a request to disable |
DO | 253 | 11111101 | ● Approving an offer to enable ● Requesting to enable |
DONT | 254 | 11111110 | ● Disapproving an offer to enable ● Approving an offer to disable ● Requesting to disable |
Sub-option Negotiation
Some possibilities need additional data. For example, to define a terminal's type or velocity, the negotiating method requires a string or number to define the type or velocity. In either case, for sub option negotiation, the two sub option characters indicated are necessary.
NVT set for sub-option negotiation
Character | Decimal | Binary | Meaning |
SE | 240 | 11110000 | Suboption end |
SB | 250 | 11111010 | Suboption begin |
Q9) What is anonymous FTP?
A9)
Anonymous FTP
On some sites whose files are available for public access, Anonymous FTP is enabled. Without having any username or password, a user can access these files. Instead, the username is set to anonymous by default and the guest's password. Here, there is very limited user access. The user may be allowed to copy files, for instance, but not to navigate through directories.
A user needs an account (user name) and a password on the remote server in order to use FfP. To enable anonymous FTP, some sites have a set of files available for public access. A user doesn't need to have an account or password to access these files. The user can use anonymous as the user name, instead, and guest as the password.
There is very limited user access to the system. Some sites permit only a subset of commands for anonymous users. Most sites, for instance, allow the user to copy some files, but do not allow the directories to be navigated.
Q.10) Define TELNET?
A10)
TELNET
TELNET stands for TErminaL NETwork. It is a type of protocol that allows the connection of a single computer to a local computer. It is a virtual terminal service that is supported by ISO as a standard TCP/IP protocol. The computer that begins communicating is known as a local computer. Device that is connected to the remote computer, i.e. that recognises the connection.
When the link between the local and remote computer is created. Local computers can show whatever is performing on the remote computer during telnet service. Telnet works on the concept of a client/server. Local machines use the Telnet client programme, and remote machines use the Telnet server programme.
Advantages
Below the some advantages, are as :
● It can be used for sending/receiving information.
● It assists in the management of elements of the network.
● User authentication accepts it.
● A virtual network terminal is introduced by all the Telnet clients and servers (NVT).
● Automation research facilities are used on a shared basis by remote computers. By banning expensive research equipment/facilities at selected locations for all users worldwide, this saves costs.
Disadvantages
Below the some disadvantages, are as :
● User ID and password are transmitted without encryption. This leads to security risk in the Telnet protocol as intruders or hackers can more easily enforce eavesdropping and snooping.
● As it is a character-based communication method, it is not possible to run Interface-based tools over a Telnet network. Cursor gestures and other GUI information can not be transmitted.
● The protocol is rather inefficient.
● Until it reaches the other end, several context switches are needed for each keystroke.
● Due to slow typing rates, it is costly.