Back
Data Link Layer
Purpose: to transfer data packets between directly connected nodes
via the physical layer (wire, fiber, radio).
Services
- Channel sharing (if more than 2 nodes)
- Framing (clock synchronization)
- Error detection or correction (optional)
- Flow control (optional)
- Reliable delivery (optional)
Examples
- Ethernet
- PPP - Point to Point Protocol
- ATM - Asynchronous Transfer Mode
- X.25 Frame Relay
- FDDI - Fiber Distributed Data Interface
- Token Ring
Channel Sharing
Strategies for sharing a broadcast medium: bus (Ethernet), radio, satellite.
Types of partitions
- FDMA - Frequency Division Multiple Access - telephone, radio
- CDMA - Code Division Multiple Access - military radio, wireless
- TDMA - Time Division Multiple Access - most others
Sharing strategies
- No sharing - PPP
- Fixed sized slots - telephone, radio, TV
- "Permission to talk" token - FDDI, Token Ring
- Random access - Ethernet
Error detection
Error correction
- Forward: 2 dimensional parity, random codes
- Backwards: Detection and retransmission
Shannon limit (1949): bandwidth ´
log(signal to noise ratio)
Ethernet (IEEE 802.3)
- 10base2 - 10 Mbps (megabits per second) coax bus, 185 meters,
30 nodes max
- 10baseT - Hub (concentrator) and star topology, twisted pair, 100 meters
- 100base T (Fast Ethernet) - 100 Mbps, category 5 twisted pair
- Gigabit Ethernet - 1000 Mbps, optical fiber or category 5 UTP cable
Format
- Preamble, 8 bytes = 101010...1011
- Destination adapter address, 6 bytes (first 3 bytes assigned by IEEE,
last 3 by manufacturer)
- Source address, 6 bytes
- Type, 2 bytes (IP or ARP)
- Data, 46-1500 bytes
- CRC, 4 bytes (CRC32 = x104c11da7)
10Mbps = Manchester (1B2B) encoding:
- 0 = -12v for 50 ns, +12v for 50 ns
- 1 = +12v for 50 ns, -12v for 50 ns
100Mbps and Gigabit = 4B5B code.
Asynchronous Random Access
- Packets are broadcast, receiver checks destination address
- Packets are not acknowledged
- Sender detects line idle and sends packet
- If sender detects collision (due to speed of light propagation delay)
- Send 48-byte jam signal and abort packet
- Exponential backoff: On n'th resend (n = 1 to 10), wait 512 bits
´ random (0 to 2n - 1)
ARP - Address Resolution Protocol
- Resolves IP addresses to Ethernet addresses
- If address is not in table, broadcast ARP request on FF-FF-FF-FF-FF-FF
- All recipients send back their IP address
- Table entries discarded after 20 minutes
Ethernet components
- Adapter - Connects host to wire
- Repeater - Amplifies signal over long distances (4 max)
- Hub (concentrator) - Amplifies signal and sends to all other nodes
- Bridge - Routes packets to destination (data link routing)
- Self configuring
- Learns configuration from source addresses
- If address is unknown, broadcast
- Discards from routing table after 20 minutes
- Uses queueing and exponential backoff to avoid collisions
- Switch - Bridge using cut-through routing: begins sending as soon
as destination address is read
- Router (network layer)
- Routes using IP addresses
- Not restricted to a spanning tree topology (can be fault tolerant)
- Not restricted by distance
- Must be configured
PPP - Point to Point Protocol
- Data link protocol for 2 nodes
- Used primarily for modem to ISP communication
Format
- Flag start of frame, 1 byte = 01111110
- Address, control, 0-2 bytes = 11111111 00000011
- Protocol, 1-2 bytes, x21 = IP, IP Control = x8021
- Information, 0-1500 bytes
- Checksum, 2-4 bytes
- Flag end of frame, 1 byte = 01111110
Byte stuffing
- 01111110 becomes 01111101 01011110 (flag = escape, data XOR x20)
- 01111101 becomes 01111101 01011101 (escape = escape, escape XOR x20)
IP address and format are negotiated during setup.
ATM - Asynchronous Transfer Mode
- Usually used for high speed networks over fiber
- Cell switched - 48 byte payload + 5 byte header
- Routers set up virtual circuit during initialization
POTS - Plain Old Telephone Service
- Human hearing = 20 to 20,000 Hz
- Speech bandwidth = 300 to 3300 Hz
- Wide dynamic range: sound level sensitivity is
logarithmic (decibel scale)
- Digitized voice channel = 64 Kbps (8000 Hz x 8 bit samples)
- V.90 modem = 53 Kbps based on 10 bits/byte = 42.4 Kbps download,
28.8 = 23.04 Kbps upload.
- Modems fall back to slower rate if noisy, or line is too long,
or signal is digitized by telephone company.
High speed services
- ISDN = 128 Kbps (not widely used)
- DSL = variable (hundreds of Kbps)
- T1 = 1.544 Mbps (24 voice channels)
- OC-1 = 51.84 Mbps over fiber optics (SONET, Synchronous Optical Network)
- OC-3 = 155.52 Mbps (or T3)
- OC-12 = 622.08 Mbps