In OSI, there are layers for routing, encapsulating and transmitting the data. Then why do we need FTP? I read the following definition of FTP in books:

FTP is used for transferring files on networks. It isn't just a protocol; its also a program. Operating as a protocol, FTP is used by applications. As a program, it is employed by users to perform file tasks by hand.

I read that the function of data link and physical layer is to transmit data through the network, then what is the use of FTP? What different thing the FTP is doing?

I will be glad if someone can clear things up.

  • 1
    The OSI model is just a model, and there is nothing in the real world that actually follows it. For example, layers 5 to 7 have never been implemented by OSes as separate layers. They are all lumped together in the application layer, and FTP is an application that must implement them.
    – Ron Maupin
    Mar 17, 2018 at 14:30
  • 7
    Why do we need seats in cars when there are roads to transport people?
    – MikeP
    Mar 17, 2018 at 22:10
  • 4
    Why do we need lorries to transport goods - in boxes! - when there are perfectly good roads? Mar 17, 2018 at 23:00
  • Whatever features OSI may have been intended to have, they will not be found in the real world, any more than OSI itself. And surely you can tell the difference between a network layer and a program?
    – user207421
    Mar 18, 2018 at 7:30
  • @RonMaupin Full OSI stack products did exist x.400 mail for example and I suspect that some systems may still be in use as legacy systems I have seen jobs advertised relatively recently asking for x.400 - MI5 in the Uk for example. I used to be third line support for the UK's ADMD Mar 18, 2018 at 17:55

6 Answers 6


The network layers provide a framework to structure the complex functions for sending data over a network - as byte stream, in dialogue, telegram style datagrams, ...

On the very top, the application uses a lower layer (very often the transport layer) to do its job. It doesn't have to worry about routing, network interfaces, MAC addresses, line codes etc - that's all been taken care of by the 'stack' located in the operating system.

In a somewhat poor comparison, the network provides the road system but you need a car as application to use it.

That said, FTP is an application layer protocol that a client can use to remotely browse directories, transfer files in both directions, delete files etc on an FTP server. The network layers provide the means to transfer commands and data across a network. The application layer makes practical use of the network.

Note that there's a strong tendency to hide complexity from end users - if you e.g. integrate an FTP client into the user's front end, he's not likely to notice that there's anything behind accessing and using remote files on a server.

  • 1
    you said "the network provides the road system but you need a car as application to use it." Yes we need a car, but isn't those cars are packets, frames, bits ? Mar 17, 2018 at 8:47
  • Sorry for the trouble, I am not able to understand the function of FTP? Mar 17, 2018 at 8:47
  • I've expanded the answer somewhat, hope that helps. Note that application protocols are off-topic here.
    – Zac67
    Mar 17, 2018 at 9:02

The OSI Model is seven layer model of how you can build a networking system. The TCP/IP networks that we all use does not follow this model and roughly ends at the transport layer with higher-level concerns left to individual applications. So - there is no in-built standard encryption, character-set translation etc.

For FTP you need some way of:

  • authenticating a user
  • specifying the filename to send/receive
  • list files in a directory
  • set permissions on a file
  • a command/response format to handle all the above

Clearly none of these are covered by the transport layer. In the OSI model these are described in higher-level specifications (read up on FTAM).

There are quite a few OSI specifications handling various services, and I studied some of them at university and encountered a few implementations shortly after. The fact of the matter is though that 99% of networking is done over TCP/IP nowadays, and a substantial chunk of that over HTTP/HTTPS so the OSI model is more useful as a way of thinking than a blueprint for applications.


Here's a simple answer. Consider a file of 5 bytes abcde. You can send that data over the network, sure. But how would you tell the other side hey, I've done sending my file in order to send next one? Or where does metadata (e.g. filename) fit in? And how to distinguish it from the file content? You do that by introducing a protocol. For example you send 5abcde and the other side (when it reads it) interprets the first byte as the size of the following content. Now the receiver side at least knows where the content ends! Both have to agree on some convention (protocol) otherwise communication will obviously fail.

That's what FTP (and other protocols like HTTP) is all about. It interprets a stream of bytes following some convention. Of course more complicated but I hope you see the problem with simple data steaming and the need for another layer.

So I would compare network to mailing system. And FTP to a language. You can send arbitrary data in a post card over the system. But what is it good for if the other side doesn't understand it?


I read that the function of data link and physical layer is to transmit data through the network....

Actually, all layers have the function of transmitting data. But they also have another important function that makes it more clear why they're separated: interpreting the data and taking the correct actions based on that.

The following overview concentrates on brevity and simplicity; don't rely on it for exact details.

The layers below the transport layer (layer 4 in OSI, TCP in the TCP/IP suite) handle sending data without reliable or in-order delivery. They generally vary between each other in how they handle addresses, e.g. IPv4 will have the actual end host as its destination address but Ethernet will have an intermediate router as its destination address.

The transport layer is probably what you're talking about when you talk about "transmit[ting] data"; that's the layer, when you give it some bytes, will get them to the other end in the order you sent them without losing any of them. But once the bytes arrive at the other end, the receiver needs to know what to do with them. Save them to a file? Forward them as an email? Return a web page?

That's where the application-level protocols come in: they determine how you format information between the two ends to get the job done that you want done. As Richard Huxton mentioned above, there will be various sequences of bytes that indicate a user wants to log in with a given name and password, that a directory listing is requested, that the following data should be written to a file with a given name, and so on.


OSI is just a model. It only exists on paper. You still need specific, actual protocols and applications that work within those layers. An OSI layer is like a job description; the job description doesn't get any work done. An actual person needs to be selected to do the job. And a variety of real, actual protocols or software could actually fill "job description" of the OSI model.

File Transfer Protocol is just one possible application that meets the job descrption of the OSI "application layer." But there are many others such as HTTP, SSH, or SMTP.

The data link and physical layers don't exist in any real sense. They are abstractions. You need an actual, physical medium to transmit signals in the phsical layer. What medium that is can vary. It can be twisted pair wiring, coaxial cable, or fiber optics. The data link layer represents the need to transmit data between major nodes in a Local Area Network. But any protocol—even one that hasn't been invented yet—could server that "job description."

Others have commented that the OSI model is an idealism, and that any real application or protocol may not stay strictly within one layer. While that's true, it doesn't seem to confront the difference between a specification and and an actual implementation that seems to be the fundamental issue of this question.


OSI model is not something which can be used to send/receive data. It is a model which can be used to build on a further higher level application.

With FTP, you get a user level abstraction so that, you can use it to send and receive data.

Further, FTP needs to be secured. And thus, we integrate the SSH into FTP to get SFTP in order to have more secure data transmission. The SFTP uses Port 22.

Not the answer you're looking for? Browse other questions tagged or ask your own question.