Lesson 4: The Ethernet

Ann K. Hoang
The Cabin Coder
Published in
5 min readMar 14, 2015

ethernet — the standard for a family of network technology with the same bus topology, frame type, and network access method.

In the early days of networking, Xeror partner up with Digital Equipment Corporation (DEC) and Intel to publish the Digital-IntelX–Xenox (DIX) standard with coaxial cables at 10 Mbps transfer rate.

Later, they transfer the control to the IEEE, which create the 802.3 committee to control standards today for networking.

Engineers need to solve three issues for networking:

  1. How to send data across the wire.
  2. How to identify the sending and receiving computers.
  3. How to know which computer should use the shared cable at a time.

Dataframes with MAC addresses solve the second issue and CSMA/CD process solve the third issue.

I. Topology

  • Early ethernet in the 90s uses hybrid start bus topology with hubs.
  • Data breaks into “frames” and prevents any single machine hogging the shared bus and making retransmitting lost data omre efficient.

A. The Ethernet Frame

Unlike the genetic frame, the ethernet frame has 7 pieces of information:

e-frame
  1. Preamble:
  • allows the receiving NIC time to realize a frame is coming and to know where the frame starts
  • 64-bit series of alt. 0, 1 that ends with 11
  1. Recipient MAC address (ie the destination addr):
  • 48-bit binary addr or also called 6-byte binary addr
  1. Sender MAC address (ie the source addr)
  2. Type:
  • tells the receiving computer the frame contents, like if it is an IPv4 or IPv6
  • the type DOES NOT higher level data such as what kind of data it is: email msg or web page
  1. Pad:
  • min ethernet frame is 64 bytes in size. If the frame contains data less than 64 bytes, the NIC will add extra padding to bring frame to the required 64 amount.
  1. Frame Check Sequence (FCS):
  • cyclic redundancy check enables Ethernet nodes to check on the quality of the frame (see if it is damaged or not)

II. CSMA/CD

  • maps to the 802.3 also
  • stands for carrier sense multiple access/collision detection
  • “carrier sense” — each node using the network examines the cable before sending the data frame
  • if the node detects traffic, it waits a few milli sec and rechecks again when the cable is “free”
  • “multiple access” — all machines have equal access to the wire
collision

Q: What happens if two machines simultaneously send a frame?

  1. collision occurs, both transmission are lost
  2. NIC notices this b/c of overlapping signals
  3. both nodes stop transmission
  4. each node generate a random number
  5. whichever node has the lowest number get to transmit first
  6. the losing node sense tranfic again and tries retransmission
  • a normal Ethernet has about a collision rate up to 10%
  • collision rate higher than 10% often mean a damaged NIC or software issue
  • collision domain — a group iof nodes that has the capability of sending frames at the same time

III. Early Ethernet Networks

10BaseT

  • speed: 10 Mbps
  • signal type: baseband
  • distance: 100 meters
  • node limit: upto 1024 per hub
  • topology: star-bus, physical star, logical bus
  • cable: CAT 3 and up, UTP, RJ-45
  • can have 4–48 ports per hub
  • requires two-pair of UTP cable, but installation comes with 4 pair
  • RJ-45 connectors has 8-pins, but 10BaseT only uses 4 of the pins:
  • pin 1 & 2 — sends data
  • pin 3 & 6 — receives data

10BaseFL

  • speed: 10 Mbps
  • signal type: baseband
  • distance: 2000 meters
  • node limit: upto 1024 per hub
  • topology: star-bus, physical star, logical bus
  • cable: MMF with ST or SC connectors

NOTE :

  • the “10” stands for the speed
  • “Base” means baseband cable that carries only one type of signal (unlike broadband for cable tv)
  • “T” stands for twisted pair
  • “F” stands for fiber optic cable
  • for older cables such as the 10Base5 or 10Base2, the “5” and “2” refers to the length of the cable, 500 m and 200 m respectively
  • Half-duplex mode — NICs that can communicate in only one-direction
  • RJ-45 is also called a “crimp”
  • TIA/EIA standard for correct crimping 4 pair UTP for 10BaseT is the TIA/EIA 568A and 586B

IV. Extending and Enhancing the Ethernet Network

Ways to expend and enhance networks:
+ install multi hubs
+ network bridge to connect two segments
+ replace hubs with better device

A. Connecting Ethernet Segments:

  • using uplink port
  • using crossover cable (or segments with a bridge)
  1. Uplink Port:
  • to connect two hubs using a straight-through cable
  • daisy chain hubs
  • uplink port is also called a MDIX port (media dependent interface crossover)
  • regular port is called a MDI port (media dependent interface)
  • you cannot daisy chain more than 4 hubs together

You cannot daisy chain with a regular cable b/c it sends data on the second pair of wires 3 & 6 and listen to 1 & 2 wires:
* a crossover cable is needed to connect two hubs by reversing the sending
* you can also use a crossover to connect a two regular ports from two computer with 10BaseT (no hub)
* NEVER connects two hubs by uplink ports with a straight through cable, nothing will break but it just won’t work

  1. BRIDGES
  • bridges are like a hub, connects two ethernet segments but it can also filter forwarding traffice based on the MAC addr (this makes it a Layer 2 device)
  • Source Address Table (SAT) is the MAC addr table
  • SWITCHES :
  • switch is a newer, more advanced bridge (still is a bridge)
  • a switch is a bridge when it forward frames, it copies the source MAC and create a table
  • can buffer incoming frames, so two nodes can send data at once and there is no collision
  • “half duplex switches” — possible for collisons, but only between switch + node not node + node
  • “full duplex switches” — send and receive data at once, CSMA/CD disabled, no collisions at all, IGNORE DAISY_CHAINING FOR HUBS rule
  • switches are called a “broadcast domain” vs. a hub-based network “collision domain”
  • brige loops — or “switching loops” can connect switches together in any fashion
  • Spaning Tree Protocol (STP) — eliminate the problem of accidental bridge loops:
  • STP detect loops, communicate with other switches, set looped port’s state to blocking mode
  • STP-enabled switches use a frame called a Bride Protocol Data Unit (BPDU) to comminicate and find distances between them

--

--

Ann K. Hoang
The Cabin Coder

Senior Software Engineer. Born in Saigon. Raised in the Silicon Valley. Currently in Seattle, WA.