§6.4.2Switched LANs · Ethernet

Link layer Kurose & Ross pp. 485–491 · ~15 min read

  • ethernet
  • maximum transmission unit
  • connectionless service
  • unreliable service

Where you are

  • Application layer
  • Transport layer
  • Network layer
  • Link layer you are here
  • Physical layer

Ethernet has held the local network for fifty years by keeping one frame format and changing everything underneath it.

Words you will meet

  • Ethernet — by far the most prevalent wired LAN (Local Area Network) technology.

  • Maximum transmission unit — the largest payload a link will carry; 1,500 bytes for Ethernet.

  • Stuffing — padding a payload shorter than 46 bytes out to the minimum.

  • Connectionless — send without handshaking first.

  • Unreliable — a damaged frame is discarded and nobody is told.

  • Baseband — the medium carries Ethernet traffic and nothing else. The BASE in every standard’s name.

Why this matters

Two numbers on this page have already been used elsewhere on this site, and only now get explained.

1,500 bytes is Ethernet’s data field maximum. That is why section 4.3.2’s MTU (maximum transmission unit) is 1,500, and why an IP (Internet Protocol) datagram larger than that has to be fragmented.

4 bytes of CRC (Cyclic Redundancy Check) is why section 6.2 taught a 33-bit generator. And 46 bytes minimum is why the ARP (Address Resolution Protocol) frames in section 6.4.1’s capture were padded with zeros.

Ethernet is also where the chapter’s story turns. Section 6.3.2-csma built up CSMA/CD (Carrier Sense Multiple Access with Collision Detection) carefully — and this section ends by pointing out that a modern Ethernet does not need it at all.

The frame

Figure 6.20 — the Ethernet frame

Click any box to read what that part of the message is for.

Every field, as text

    Six fields. Click any one of them. Widths are drawn roughly to scale for the header; the data field would be up to 375 times wider than the CRC if it were drawn honestly.

    In plain words

    The type field is the one worth pausing on. It is a demultiplexing key, and you have met two others exactly like it: the protocol field in an IP datagram, and the port numbers in a transport segment.

    Each of them glues a protocol at one layer to a protocol at the layer above. The type field is how an arriving frame gets handed to IP rather than to ARP. And 0x0806 is the value that sends it to ARP, which is why the ARP frames in the previous section carried it.

    The 46-byte minimum is the odd one. A datagram shorter than 46 bytes must be stuffed out to fill the field. The stuffing is then handed up to the network layer along with the datagram. The network layer uses the length field in the IP header to work out where the real data stopped.

    What Ethernet promises, and what it does not

    What Ethernet promises the network layer
    Ethernetlink layerIPnetwork layerUDPtransport layerTCPtransport layer
    Handshake before sending?
    Recovers from loss?
    Acknowledges anything?
    Can the receiver see gaps?

    Cells marked ⓘ have a reason behind them — click to read it.

    Two answers, both negative, and both deliberate. Click a cell for what follows from it.

    Ethernet is connectionless and unreliable, and both were chosen on purpose. A frame that fails its CRC check is discarded in silence — no acknowledgement, no negative acknowledgement, nothing sent back. The sender never learns it happened.

    In plain words

    So the stream of datagrams arriving at the network layer really can have gaps.

    Whether the application sees those gaps depends on what it chose in chapter 3. A UDP (User Datagram Protocol) application sees the hole. A TCP (Transmission Control Protocol) application does not, because TCP on Host B never acknowledges the missing data, so TCP on Host A retransmits it.

    And here is the pleasing part. That retransmitted data eventually reaches the very Ethernet adapter that discarded it in the first place. Ethernet does retransmit — it simply has no idea that it is doing so, or that these bytes have been past before.

    The family of names

    Reading an Ethernet name
    StandardSpeedPhysical mediumReach

    Cells marked ⓘ have an explanation — click to read it.

    The names look bewildering and are not. Three parts: speed, then BASE, then the medium. Click a row.

    IEEE (Institute of Electrical and Electronics Engineers) names decode in three parts. The speed comes first — 10, 100, 1000, 10G or 40G. BASE means baseband: the medium carries Ethernet traffic and nothing else, which is true of almost every 802.3 standard. And the last part is the medium, where a T generally means twisted-pair copper.

    Figure 6.21 — one link layer, many physical layers
    The frame format never changedstep 1 of 3
    MAC protocol and frame formatone specification, unchanged since the 1970s

    Every standard in the table above shares one MAC protocol and one frame format — the six fields at the top of this page. That is what "backward compatible" means here, and it is why 40-gigabit equipment and 10-megabit equipment understand the same frames.

    Read all steps as text
    1. The frame format never changedEvery standard in the table above shares one MAC protocol and one frame format — the six fields at the top of this page. That is what "backward compatible" means here, and it is why 40-gigabit equipment and 10-megabit equipment understand the same frames.
    2. Six physical layers under it, at 100 Mbps aloneThe book draws six for 100 Mbps Ethernet. Copper and fibre, several kinds of each — and the layer above cannot tell which one it is running over.
    3. Which is exactly what layering is forThe five-layer stack of section 1.5, doing its job. Everything above the link layer is untouched by the choice of cable, and that is the whole reason Ethernet survived four orders of magnitude of speed increase.

    Ethernet began as a segment of coaxial cable, genuinely broadcast, with every interface hearing every frame. Runs longer than 500 metres needed a repeater , a physical-layer device that receives a signal on one side and regenerates it on the other. Today almost every node sits on a point-to-point segment to a switch.

    Three slips in this section

    All three were checked against the printed pages.

    1 · Two protocol families merged into one name (page 489). CDMA (Code Division Multiple Access) is section 6.3.1’s third channel-partitioning protocol. CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is section 6.3.2-csma’s random access protocol.

    The book writes “Ethernet’s CDMA/CD protocol”, which merges them. It should read CSMA/CD. Running the two names together one page after teaching both is unlucky.

    2 · A list that does not line up (page 489).

    The first part of the acronym refers to the speed of the standard: 10, 100, 1000, or 10G, for 10 Megabit (per second), 100 Megabit, Gigabit, 10 Gigabit and 40 Gigibit Ethernet, respectively.

    That is four prefixes against five names, so “respectively” cannot work. 40G is missing from the list, and “Gigibit” is a typo.

    3 · Gigabit Ethernet described with 40-gigabit numbers (page 490).

    Gigabit Ethernet is an extension to the highly successful 10 Mbps and 100 Mbps Ethernet standards. Offering a raw data rate of 40,000 Mbps, 40 Gigabit Ethernet maintains full compatibility with the huge installed base of Ethernet equipment. The standard for Gigabit Ethernet, referred to as IEEE 802.3z, does the following…

    The paragraph is about Gigabit Ethernet, which runs at 1,000 Mbps. IEEE 802.3z is the 1 Gbps standard. Yet the rate given is 40,000 Mbps, and the bullet list below it promises “full-duplex operation at 40 Gbps”. This reads like an edition update that changed some numbers and not the sentences around them.

    Does Ethernet still need a MAC (Media Access Control) protocol?

    The book ends the section by asking a question it says may already have been troubling you.

    CSMA/CD (Carrier Sense Multiple Access with Collision Detection) exists because a bus or hub-based Ethernet was a genuine broadcast link, where frames collided. But today’s Ethernet is a switch-based star using store-and-forward packet switching.

    A switch coordinates its own transmissions and never forwards more than one frame onto an interface at a time. Modern switches are full-duplex, so a switch and a node can send to each other simultaneously without interfering.

    In a switch-based Ethernet LAN there are no collisions and, therefore, there is no need for a MAC protocol!

    Where this came from

    Bob Metcalfe worked on the ARPAnet at MIT while a PhD student at Harvard in the early 1970s. He came across Abramson’s work on ALOHA, and before starting at Xerox PARC (Palo Alto Research Center) he spent three months in Hawaii looking at ALOHAnet first hand.

    At PARC he met the Alto, a forerunner of the personal computer, and saw the need to network such machines cheaply. Armed with the ARPAnet, ALOHAnet and random access protocols, he and David Boggs invented Ethernet.

    Their original ran at 2.94 Mbps and linked up to 256 hosts across a mile. Metcalfe then built an alliance between Xerox, Digital and Intel to standardise 10 Mbps Ethernet at the IEEE. Xerox showed little interest in selling it, so in 1979 he founded 3Com, which sold Ethernet cards for the IBM PC in the early 1980s.

    Worth noticing. Speeds have since risen by more than three orders of magnitude. The medium has changed several times, switching has replaced the shared cable, and the MAC protocol is now often unnecessary. Is it still Ethernet? The book’s answer is “yes, by definition” — and the frame format is what has stayed the same.

    Check yourself

    Check yourself

    0 of 7 answered
    1. 1.An IP datagram of 20 bytes is handed to an Ethernet adapter. What goes in the data field?

    2. 2.What is the type field for, and what other fields does it resemble?

    3. 3.predictAn Ethernet frame arrives with a corrupted bit and fails the CRC check. What does the receiving adapter send back?

    4. 4.predictA frame is discarded by a CRC failure. The application on Host B is using TCP. Does it see a gap?

    5. 5.What does 100BASE-FX tell you?

    6. 6.Why did Ethernet survive four orders of magnitude of speed increase and several changes of physical medium?

    7. 7.The book ends the section by asking whether Ethernet still needs a MAC protocol. What is its answer?

    What to remember

    • Six fields: preamble 8, destination 6, source 6, type 2, data 46–1,500, CRC 4. 1,500 bytes is the MTU that forces IP fragmentation; 46 bytes is the minimum that forces stuffing.
    • Ethernet is connectionless and unreliable. A failed CRC means silent discard, with no acknowledgement of any kind — so gaps reach a UDP application, and TCP hides them by retransmitting. Ethernet retransmits without knowing it.
    • One frame format has survived every change of speed and medium, which is why old and new equipment still interoperate. In a switched, full-duplex Ethernet there are no collisions, so the MAC protocol is no longer needed.