5 Answers
5

Imagine one of those pneumatic tube message systems. Ethernet is the tube used to send the message, IP is an envelope in the tube, and TCP/UDP is a letter in the envelope.

Someone (an application) writes a letter and stuffs it in an envelope. Another person (a NIC) looks at the address on the envelope, puts it in a tube, caps it off, stuffs it in the right door to bring it closer to its destination, then pushes the button.

The tube gets carried to another door, where someone (a router) opens the tube, reads the address, puts it back in the tube, and sends it through another door.

Eventually it arrives at its destination, where the NIC on the other side picks it up and gives it to the application.

This is, of course, a vast oversimplification of what actually happens, but it is a fairly decent base on which to start.

Greatly simplified and potentially inaccurate. ;) tcp (Transmission Control Protocol) and ip (Internet Protocol) are software protocols. They work at different layers of the networking stack. Ethernet is the medium that it transmits over versus thing likes token ring, fiber, etc. describing the physical layer of the stack.

Ethernet (layer 2): Uses MAC addresses to identify nodes - "Protocol data units" are called frames. This layer has no concept of a internetwork. It sends a frame to a destination, assuming that it can throw out through the medium and that it will get there.

IP (layer 3): Uses IP addresses to identify nodes - "Protocol data units" are called packets. This layer allows an IP addressing scheme to be used. The concept of an internetwork begins to come into play at this layer. Now we have a basic mechanism that lets us say "This set of IP addresses is reachable if we throw the packet directly out through the medium" and "This other set of IP addresses is only indirectly reachable - we must send it to a gateway."

UDP (layer 3.1ish): Basically, an IP packet extended to have the concept of a "port" bolted on it. Ports let you address different listeners on the same host - so more than one program on a host can use all this great stuff and the medium can be utilized more effectively.

TCP (layer 4): Uses ports to allow multiple senders/listeners in addition to IP addresses to identify nodes - "Protocol data units" are called segments. This layer implements "connection oriented services" and makes all the guarantees that IP does not. IP packets may arrive out of order or not arrive at all. TCP keeps track of packets using a windowing scheme and tries to make sure through acknowledgements that the destination did get all of its data.