Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Ethernet protocol vs TCP/IP protocol

  1. Jan 23, 2016 #1
    Hello Forum,

    If a certain information content (for ex. a word document) is sent by a computer in a home network (small LAN) ,over the internet, to another computer in a different geographical location, I believe the TCP/IP protocol suite takes care of the document transmission over the internet, i.e. it breaks the document down into packets and attaches to each packet all the needed information (sender, receiver, error correction, etc.)

    Where does the ethernet protocol fit in this scenario? Is ethernet a different layer protocol used only for small LANS? In a small home network, the connected machines still get assigned IP addresses (which sounds like TCP/IP being used). I know ethernet is also based on packets. Does the IP protocol overlap the ethernet packets once the packets leave the LAN to move through the Internet?

    IP packets can be of different size up to a maximum size. If a document gets broken down into IP packets for transmission over the Internet, will those packets have all the same size equal to the maximum size? What if the document is first subdivided into ethernet packets? Do those packets get converted into IP packets later?

    thanks,
    fog37
     
  2. jcsd
  3. Jan 23, 2016 #2

    rbelli1

    User Avatar
    Gold Member

  4. Jan 23, 2016 #3

    meBigGuy

    User Avatar
    Gold Member

  5. Jan 24, 2016 #4
    You can run other protocols over ethernet. Netbeui ( an old microsoft protocol) can run with tcip/ip. THe problem with earlier protocols is that routers weren't invented, so routing is an issue eg DECNET.
     
  6. Jan 24, 2016 #5

    meBigGuy

    User Avatar
    Gold Member

  7. Jan 24, 2016 #6
    thanks everyone.
    My quick take is that protocols, just like the protocols in TCP/IP, overlap each other. so the same happens with IP and ethernet
     
  8. Jan 24, 2016 #7

    rbelli1

    User Avatar
    Gold Member

    The better term is that they encapsulate each other. The benefit of this is that for example the network card knows Ethernet and need not worry itself about IP. The IP data is passed as an opaque blob of data. IP also needs not know anything about TCP. and TCP knows nothing about HTTP, and HTTP need know nothing about the various web formats.

    This makes it easy to build and test each layer as a unit and swap out components of each layer as necessary. Look up VPN, PPPOE, IPOAC and other tunneling protocols to see how versatile this is.

    BoB
     
  9. Jan 24, 2016 #8

    Fredrik

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    I'm a bit bored today, so I might as well explain this in some detail...

    The original ethernet protocol was designed for communication over coaxial cables. A coaxial cable is a conducting wire inside a conducting cylinder, with the wire separated from the cylinder by an insulator. You would create a network by connecting several computers to the same coaxial cable, so that they could "listen" by measuring the voltage between the wire and the cylinder, and "talk" by changing that voltage. Ethernet is the protocol (=set of rules) that specifies the voltages, the timing, the addressing and e.g. what a "talking" computer should do if it determines that someone else is trying to talk at the same time. The addresses that are defined by the ethernet protocol are 48-digit binary numbers. They're called MAC addresses. The protocol says that messages are to be sent in pieces of 1500 bytes. These pieces are called "frames". Each frame starts with a "header" that contains the source MAC address, the destination MAC address, and some additional data.

    Computers today use unshielded twisted pair (UTP) cables instead of coaxial cables. A UTP cable consists of eight insulated wires. A computer uses two of them to "listen" (by measuring the voltage between them) and two of them two "talk" (by changing that voltage). The other four aren't used. I remember that wires 1,2,3 and 6 are used. I don't remember which two are used to listen and which two are used to talk. Let's say that a computer uses wires 1 and 2 to talk, and wires 3 and 6 to listen. It might be the other way round though.

    The simplest way to create a network using UTP cables is to use a hub. You connect each computer to the hub. Everything that a hub "hears" on wires 1 and 2 (where the computer is talking) from any of the cables connected to it, it "speaks" on wires 3 and 6 on all the other cables connected to it. This way, every computer can hear everything that every other computer connected to the hub is saying.

    This is very inefficient. For that reason, hubs got obsolete very quickly. They were replaced by switches, which are what people use today. A switch is essentially a hub that remembers all the MAC addresses it has seen, so that when it hears a computer trying to talk to a certain MAC address, it can repeat what it has heard only on the cable that's connected to the computer with that specific MAC address.

    The ethernet protocol has been changed a few times, so that it can deal with higher bandwidths. Ethernet (10 Mb/s), Fast Ethernet (100 Mb/s) and Gigabit Ethernet (1000 Mb/s) are technically different protocols, but they're very similar. In particular, they all use MAC addresses. It's common to refer to any of them simply as "ethernet".

    IP is a protocol that's used to connect several ethernet networks together. It involves another addressing scheme. An IP address is a 32-digit binary number. IP messages are sent in pieces called "packets". Each packet starts with a header that contains the source IP address, the destination IP address, and some other data. Suppose that a computer A wants to send data to a computer B on the same ethernet network. It goes roughly like this: Computer A looks at the destination IP address and sees that it's an address in the range that's used for the directly connected ethernet network. It then broadcasts a question on the network (using the address resolution protocol, ARP): "Who has this IP address?". Computer B hears the request and says "I do...and this is my MAC address". Computer A then encapsulates the IP packet in an ethernet frame with B's MAC address as the destination MAC address and sends it out on the network. B receives it, removes the ethernet header, looks at the IP packet inside, and realizes "hey, this is for me" (because the destination IP address is B's IP address).

    To enable IP communication between two different ethernet networks, you need a router. A router is a device that's physically connected to two different ethernet networks. Each device that can use the IP protocol has a table called a "routing table". Suppose that a computer A wants to send data to a computer B on a different ethernet network. Then the IP packet must be encapsulated in an ethernet frame that can be sent to a router on the same ethernet network. So the routing table tells you, for each possible destination IP address, the IP address of a router on the directly connected network that is connected to another network that's closer to the destination. So when A is ready to send the packet, and sees that the destination IP isn't in the range that's used for the directly connected ethernet network, then it looks up this "next hop" IP address in the routing table, and then proceeds as in the previous paragraph. The packet will eventually reach computer B, but it may have passed through 15 routers on the way.
     
    Last edited: Jan 25, 2016
  10. Jan 24, 2016 #9

    Svein

    User Avatar
    Science Advisor

    Some additional information to Fredrik's:
    • The original Ethernet was invented (and named) at the Xerox Palo Alto Research Center. Xerox then got together with DEC and Intel and created the first formal specification of Ethernet.
    • IEEE saw the Ethernet and liked it, but they wanted to make it a part of a collection of slightly different data networks. They set up a committee and after a year or two, they came up with a collection of standards, collectively named IEEE 802. A slightly modified version of Ethernet was included as IEEE 802.3. It also included IEEE 802.4 "token bus" and IEEE 802.5 "token ring". The latter two are no longer active.
    • The IEEE 802 standard set has more or less become synonymous with data networks, so new networks standards are usually made part of that set. The most important in addition to IEEE 802.3 is IEEE 802.11 which is the standard for wireless networking.
    • IP (stands for Internet Protocol) is actually slightly older than Ethernet, and in effect does not care what kind of physical network it runs on top of. It turned out to be fairly easy to run IP on top of Ethernet and one of the very early Internet standards describe how to do just that.
    • The Internet protocol standards are much less formal than the IEEE standards, and they are usually fairly readable. They all have the prefix RFC (Request For Comment) and there are a lot of them. For a list of the most important, see https://en.wikipedia.org/wiki/List_of_RFCs.
     
  11. Jan 25, 2016 #10
    Thanks for the detailed explanation Fredrik.

    My understanding: a protocol is a set of rules that governs the communication between computers on a network (made of two or more computers).
    OSI is an abstract model that defines the various networking protocols. Ethernet protocol covers two layers: data layer and physical layer. In fact, we can have ethernet over a copper wire, a coaxial cable or even fiber optics, correct? The TCP/IP set of protocols covers the transport, network and data layer protocols.

    In a small home network (formed by 3 computers) that runs ethernet we still use IP address to identify the various host computers. I know that routers are used to connected different networks but a router can also have extra functionalities and also be a hub/switch to connect computers on the same network. @rbelli1 said that when an ethernet packet is created it is later encapsulated with IP information. Ethernet carries the physical address (MAC address printed on the network card). IP addresses are logical addresses instead. We could run our home network only using ethernet and no IP address correct? But if our small network needs to connect to the Internet the TCP/IP suite is then needed?

    What about ethernet or IP packets size? Is their size calculated before the packets are actually formed so the message file is broken down into an exact integer number (or so) of packets of the same size?

    thanks,
    fog37
     
  12. Jan 25, 2016 #11

    rbelli1

    User Avatar
    Gold Member

    Ethernet encapsulates IP. Think of it as a wrapper for the data which happens to be an IP packet.

    Yes and no. Yes it would be possible to run a network over Ethernet without using IP. No it is not possible to run any modern computer network without IP because all recent computers use IP for all of their networking. In the past other protocols were used. Google NETBIOS and read all about it.

    The maximum sizes of the underlying protocols are determined by various fixed hardware as well as manual and automatic means.
    https://en.wikipedia.org/wiki/Ethernet_frame
    https://en.wikipedia.org/wiki/Maximum_transmission_unit
    https://en.wikipedia.org/wiki/Path_MTU_Discovery

    BoB
     
  13. Jan 25, 2016 #12

    Svein

    User Avatar
    Science Advisor

    • An Ethernet payload (the data part of a packet) must be greater than 64bytes and not greater than 1500 bytes. It is possible to use bigger payloads (so-called jumbo packets) in certain contexts, but that is very dependent on the network infrastructure.
    • In addition to the payload, an Ethernet packet contains a header of 14bytes (may be extended to 18bytes in certain situations) and a checksum of 4bytes.
    • An IP data transfer unit has a maximum size of 65 536bytes. The IP packet handler divides that transfer unit into data packets, the size of which are determined by the maximum payload size of the data link.
    • There is a requirement from IP that the data link can handle a payload of at least 536bytes (24bytes IP header plus 512bytes IP payload).
    ethernet-network-packet-holding-an-ip-packet.gif
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook