Differences between TCP and FTP

TitanMATRIX

In Runtime
Messages
202
Transmission Control Protocol and File Transfer Protocol...

TCP deals with the communication between the computer and a network. FTP coordinates file transfer communication between the computers...

right? I'm sorry I've been reading the two and they sound very similar. These two and Dynamic Host Configuration Protocol... DHCP...

whats the difference between DCHP, TCP, and FTP... they all seem to set up communication (protocols) between computers and computer networks.

haha I need help setting this straight. Its different reading it from a text document than hearing it from people.
 
There are two types of exchanges: TCP and UDP. TCP basically guarantees that the packets will arrive at their destination. UDP is a best effort exchange with no guarantee of packet delivery.

FTP actually works in two stages using TCP to establish a connection. A control connection is made to port 21 and the data is then transferred out of port 20.

DHCP handles dynamic address allocation.
A DHCP server hands out a leased IP address when it receives a broadcast (UDP) datagram from a client machine on the same network.
 
I'm going to start with the same question as last time - are you familiar with the OSI 7 layer model? I'd really suggest you do some reading up on it, it'll really help you understand how networking in general works and what different protocols do.

Basically, networking is a fairly complicated business so they sensibly decided to split it down into layers - each layer has its own protocols that it can use and deals with a small subset of the whole networking process. The network layer for example is responsible for routing, the data link layer is responsible for some error correction and so on. Just to confuse things a bit, there's two layers in the 7 layer model that aren't really used, so most applications just use the simplified 5 layer model - but the principle is the same. If you're using an application (or a protocol on the application layer) then you're also going to be using protocols on all of the layers below it - they're just hidden to you. You often hear of TCP / IP for this reason, they're on different layers of the model but they're usually used together. It's quite a clever system this way, since you can deal with each layer of the model completely transparently. If you're writing a protocol on the application layer to deal with file handling for example, you can use TCP and not worry about routing, error correction, the medium the individual bits will be transported over and so on. That's all handled by TCP and the layers below.

Now onto your question - you can't compare TCP and FTP because they work on completely different layers of the model! As such they're responsible for doing different things, it's a bit like saying "what's the difference between a postman delivering letters and lorries transferring large amounts of letters between sorting offices?" The two are completely different and you can't really compare them.

TCP and UDP can be compared, as has been correctly done above - both work on the transport layer of the model. TCP is a reliable, connection oriented protocol where packets are guaranteed to arrive in order. It sorts out packets that have arrived out of order, arranges for new ones to be sent out if they've got lost, and as such any application using TCP has a reliable connection pretty much guaranteed. UDP on the other hand is connectionless, and there's no guarantee that packets will arrive in the right order or at all. You might be thinking at this point that TCP is always the better choice, but not so - TCP has an overhead due to setting up a connection, and for some applications this is overkill. Think of windows time synchronisation, this just requires a packet or 2 to be sent off to a time server. It seems rather overkill to set up a connection and send a single packet then tear it all down again - you might as well just send the packet off, hope it gets there, and if you don't hear back within a while send it again. Some applications also choose to use UDP and build in their own error correction because the extensive error correction TCP provides is overkill for their usage and they can get better performance by coding it themselves - it's a less common usage of UDP but still a perfectly valid one.

Now, FTP and DHCP both work on the application layer, they both use protocols on the layers below to do all the connection management stuff and so forth. That said, they're applications are completely different. DHCP is used for assigning IP addresses, subnet masks, gateway addresses etc. to a node on a network so all these settings don't need to be entered manually. FTP however is a protocol specifically designed for the transfer of files over an IP (that's another protocol, that one works at the network layer) network, such as your home network or the internet. I'm not really sure how you became confused between the two, they're not similar in any way apart from working on the application layer!

Again, if there's anything you want clarifying just ask - but I'd really recommend some background reading on the 5 and 7 layer models, it'll really help you in understanding what different protocols do!
 
I guess I wasn't getting them "mixed up" but rather it wasn't clear on what each did. I had a pretty good idea what DHCP was but it was a little vague still. But everything is crystal clear now. :)
 
(DHCP) is a network application protocol used by devices (DHCP clients) to obtain configuration information for operation in an Internet Protocol network. This protocol reduces system administration workload, allowing networks to add devices with little or no manual intervention.
 
(DHCP) is a network application protocol used by devices (DHCP clients) to obtain configuration information for operation in an Internet Protocol network. This protocol reduces system administration workload, allowing networks to add devices with little or no manual intervention.

difference is when you hear it explained in a different way it can click... thats why you use multiple sources like wikipedia, computer forums.org, and this new networking book that I bought :)
 
TCP provides a communication service at an intermediate level between an application program and the Internet Protocol (IP). FTP runs over the Transmission Control Protocol (TCP). Usually FTP servers listen on the well-known port number 21 (IANA-reserved) for incoming connections from clients. A connection to this port from the FTP client forms the control stream on which commands are passed to the FTP server and responses are collected.
 
difference is when you hear it explained in a different way it can click... thats why you use multiple sources like wikipedia, computer forums.org, and this new networking book that I bought
Ah I'm not saying there's anything wrong with it - it's just being from the academic side of things, word to word copying just comes off as a bit suspicious when it's not referenced! :)
 
Ah I'm not saying there's anything wrong with it - it's just being from the academic side of things, word to word copying just comes off as a bit suspicious when it's not referenced! :)

understandable of course. We get many lectures here at the University of Idaho on citing sources. They're so anal about it its ridiculous. Which now I'm majoring in information systems. The more I learn about this stuff the more interesting it gets, I'm finding myself looking up networking info and all that just for fun. Trying to map out how my ISP has its network laid out :)
 
Back
Top Bottom