Ethernet
- History
- Encoding and Framing
- Headers and Trailers
- CSMA/CD
- Exponential backoff
- Packet Sizes
- Performance
- Variations
History
- Aloha Net
- Cable instead of radio
- Carrier Sense
- Collision Detection
- 48-bit addresses encoded in hardware:
- 48-bit addresses encoded in hardware:
- 24-bit part assigned to vendor
- 24-bit part chosen by vendor
- All-1s broadcast address
Encoding and Framing
- Manchester encoding:
- (-1,1) represents 0
- (1,-1) represents 1
- 20 MHz transmission for 10Mb/s ethernet (0.5 b/Hz)
- Framing:
- Frame begins with preamble (64 bits of 10101010101...)
- Frame ends with 32-bit CRC of everything except preamble
- After end of frame, voltage returns to zero
Headers and Trailers
- Ethernet Header:
- 48-bit destination address
- 48-bit source address
- 16-bit protocol type field (IP = 0x800)
- standard (big-endian) byte order for protocol type field
- Padding:
- Minimum packet length 60 bytes
- Pad if needed to achieve minimum packet length
- Higher-Level protocol must recover actual data length
- IEEE 802.3 uses a length field instead of the protocol
type field.
CSMA/CD
- Carrier Sense Multiple Access with Collision Detection
- To transmit:
- Wait for line to be free
- Transmit and listen
- If collision:
- jam the wire
- do exponential backoff
- try again
- minimum packet size and maximum ethernet diameter guarantee
that, if there is a collision, all transmitters see it.
Exponential Backoff
- if this packet already collided n times,
- choose a random number w \in 0 ... 2^n
- given time T = transmission time for minimum sized packet (a constant)
- wait for w * T before trying to send again
Packet Sizes
- minimum packet size 60 bytes = 480 bits
- (some people claim 64 bytes = 512 bits)
- at 10Mb/s, 480 bits = 48u s
- at 0.6 c = 1.8 * 10^8 m/s, 48u s = 8640 m
- ethernet radius suitably below that\footnote{preamble and
destination address might be same, source address should be different}
should correctly detect collision.
- maximum packet size 1500 bytes = 12000 bits
- maximum time to wait for a packet to clear the ethernet is
- 12,000 b / 10,000,000 Mb/s = 1.2 ms
Performance
- 100% of bandwidth when a single host is sending
- Full-duplex mode: a wire in each direction, only one sender on
each wire
- theoretically, 30%-60% of bandwidth when many hosts are sending
- in practice, an ethernet loaded more than 30% becomes very slow
- Throughput efficiency:
- 1500 data bytes, 14-byte header, 8-byte
preamble, 4-byte CRC, user data is 1500/1526 = 98% efficient
- 1 data byte, 59-byte padding,
14-byte header, 8-byte preamble, 4-byte CRC, user data is 1/86 = 1%
efficient.
Switched Ethernet
- use switches instead of hubs to connect hosts (or hubs) to each other
- switches forward packets only on link to destination (once route has
been learned)
- ==> reduces collisions, allows more traffic
Fast Ethernet
- 100 Mb/s Ethernet
- Ethernet protocol (packet format, backoff)
- Maximum ethernet diameter?
- 100Base-T:
- three pairs of wires
- ternary encoding (3 voltage values)
- 3^3 = 27 symbols, of which 16 used for transmission
- 25 MHz transmission
- additional pair of wires transmits collision signal
Fast Ethernet
- 100Base-TX:
- two pairs of wires
- full duplex (I think): one pair of wires in each direction (no collision)
- 4B/5B at 125 MHz
- 100Base-FX:
- two fibers
- full duplex: one fiber in each direction (no collision)
- up to 2000m. long