Ethernet vs TCP vs IP?

28,952

Solution 1

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.

Solution 2

Anyone of them used in a layer. Ethernet in layer 2, IP in layer 3 and TCP in layer 4 (Layer numbers are based on OSI model).

Every of them has dutty of packet delivery from one thing to another:

Ethernet : From one hop to another (hop means directly connected device)

IP: From one end to another (remote device or connected device)

TCP: From one process to another (process running on the two ends)

Solution 3

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.

Solution 4

Ethernet

The physical communication service. Reads and writes messages on the wire. (simplified)

IP

The forwarding service. It (unreliably) reloads messages from one wire onto another, so nodes can send messages to nodes they are not physically connected with.

TCP

Kind of a wrapper around IP. Utilizes IP's messaging service in order to provide connections between processes running on different nodes, which

  • are reliable (requests retransmissions if messages get lost)
  • avoid congestion on the communication path
  • won't overwhelm receiver

Solution 5

Physical (layer 1): Some sort of physical (electrical, electromagnetic, optical) signaling method and standard. Almost always handled in hardware. Heavily medium and speed dependent.

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.

Share:
28,952

Related videos on Youtube

waka
Author by

waka

Updated on September 17, 2022

Comments

  • waka
    waka over 1 year

    What is the difference between Ethernet, TCP, and IP in simple (simple abstract) terms?

    Please do not copy from Wikipedia...

    • Nick T
      Nick T over 13 years
      If you're interested about networks, learn the OSI "7-layer" model en.wikipedia.org/wiki/OSI_model Relevant for most, if not all, networks, be they cell-phone, Wi-Fi, BlueTooth, remote car unlock...
    • Ian Boyd
      Ian Boyd over 13 years
      Nobody should be forced to learn the OSI model.
  • Belmin Fernandez
    Belmin Fernandez over 13 years
    This answer should be printed in a middle school textbook. No wonder you have over 18K reputation.
  • chiggsy
    chiggsy over 13 years
    Hell yes, this is a great explanation! Thanks!
  • Michael Hampton
    Michael Hampton almost 12 years
    So it really is a series of tubes!
  • wnrph
    wnrph over 11 years
    What about TCP? Adding a metaphor which addresses stream-orientation, multiplexing, connection and reliability would turn this great answer into a perfect one.
  • Ignacio Vazquez-Abrams
    Ignacio Vazquez-Abrams over 11 years
    @artistoex: While that is true, it would also make it much longer, and would require a reworking of the underlying analogy. It's best to address those particular concerns in a parallel analogy rather than to attempt to shoehorn it into this one.
  • Admin
    Admin over 9 years
    As a networks major this has to be one of most simple explanations I've ever heard. Take my upvotes!
  • barrrista
    barrrista almost 9 years
    Awesome way to look at it. To add to it. Ethernet has mac addresses in the header, to specify which nearby machine to send to. IP adds IP address info so packet can be routed across several routes. TCP adds port info, so multiple processes running on the same machine (with an IP address) can be differentiated.
  • hsl
    hsl almost 8 years
    UDP is the same layer as TCP -- calling it layer 3.1 doesn't work. TCP is "protocol 6" and UDP is "protocol 11" in the IPv4 protocol (or IPv6 next header) field. They are both wrapped by IP (UDP doesn't wrap TCP).
  • LawrenceC
    LawrenceC almost 8 years
    Very true. I have learned much since posting this 4 years ago, lol.
  • Q-bertsuit
    Q-bertsuit almost 6 years
    I second @artistoex, I would love to see this explanation taken further! Such a great analogy.
  • arrowd
    arrowd about 3 years
    @barrrista Why can't routing be done on Ethernet level?