Content-Type: text/html
TCP/IP is not in fact a protocol, but a protocol suite. It contains many protocols, such as IP?, TCP?, UDP?, ICMP?, IGMP? and so on.
The TCP/IP suite (like it conterpart, the [OSI model]?) uses the principal of a "stack". Here, you have a protocol that solves some set of problems, and has a "payload" area. The "payload" (data) contains data in another higher-level protocol, which solves a different set of problems. And so on and so on.
The TCP/IP model has been built from the perspective of "this works". The [OSI Model]? was built by committee. Therefore, the [OSI Model]? is easier to understand the theory of, but the TCP/IP model is more practical. It is helpful to have an understanding of the [OSI Model]? before learning TCP/IP, as the same principles apply, but are easier to understand in the [OSI Model]?.
So go read about the [OSI Model]? now.
The TCP/IP Stack
Where you draw the distinction is a bit variable - there is no one correct answer. But roughly:
+- - - - - - -+ 5| Application | i.e. HTTP, SMTP, FTP, TELNET? + - - - - - - + 4| Transport | i.e. TCP?, UDP? +- - - - - - -+ 3| Network | i.e. IP? + - - - - - - + 2| Data Link | i.e. Ethernet, PPP +- - - - - - -+ 1| Physical | i.e. Electricity, Radio Waves + - - - - - - +
The Physical Layer
This describes the physical characteristics of the communication. Things like "binary 1 is +5V, binary 0 is -5V". Although, the are generally a lot more complicated than that.
The Data-Link Layer
This specifies how packets are transported across a single wire. Ethernet for example, has details about specifying which machine on the network a packet is for. Some examples are Ethernet, PPP, [Wireless Ethernet]?, SLIP? and [Token Ring]?. (Anyone care to add some more to that list?)
The Network Layer
The Network Layer solves the problem of getting from the source network? to the destination network?. In the case of TCP/IP, this means routing the packet across the Internet.
In TCP/IP, this protocol is IP?.
[Caveat: IP? doesn't tell the routers HOW to get to a destination, only what the destination is].
It contains information like an address for the source and destination ([IP Address]?es, in our case). It also solves other problems that come from communication across distinct networks.
See IP?.
The Transport Layer
This Layer solves problems like "Did my packet actually get to the other end?" and ensures that packets arrive in order. It is also at this protocol where it is decided which application to connect to.
TCP? is a very "sturdy" transport mechanism, which makes sure packets arrive in order, are re-transmitted if lost, and duplicates are handled, as well as handling "emergency" content which must be handled out of order (out-of-band?).
UDP? is less sturdy. It just sort-of hopes the packets get there. There is no garantee of order in any way. If the Application requires these things, it must provide them itself. (Or use TCP?). This is typically used for things like streaming media (audio and video, etc) because a single lost packet is not the end of the world.
ICMP?: Some people would say that this belongs at the Network Layer, not the Transport Layer. To this people I say: So what? It can be classified as either, but doesn't really belong to either. So call it layer 3 1/2. ICMP? deals with the network itself. It is used to communicate facts such as "this link is congested; slow down" or "Sorry. Not available. Go away". The much-maligned Ping? is a pair of ICMP? packets.
IGMP? Is used for broadcasting packets to a large number of destinations (Multicasting?)
The Application Layer
This is where the magic is. Finally, we are starting to actually manipulate real data.
Protocols such as HTTP (The World Wide Web), FTP (File Transport), SMTP (Email), TELNET? (Remote Login), DNS? (Name<-->IP Lookups) and many, many others belong in here.
Feel free to add to this list: Echo?, QOTD?, SSH?, NTP?, DHCP? (Kind-of), Finger?, IMAP, SNMP, IRC, POP, IMAPS?, HTTPS, POPS?
-- Jarrod Lowe, 26/7/01.