Data Link Layer (Ethernet)
Data Link Layer (Ethernet)
Data Link Layer (Ethernet)
LINK
LAYER (Ethernet)
The parameter a
The number of packets sent by a source
Mean delay amount of time a station has to wait before it successfully transmits a packet
depends on the load and the characteristics of the medium
Performance metrics
Stability with heavy load, is all the time spent on resolving contentions? => unstable with a stable algorithm, throughput does not decrease with offered load if infinite number of uncontrolled stations share a link, then instability is guaranteed but if sources reduce load when overload is detected, can achieve stability Fairness no single definition no-starvation: source eventually gets a chance to send
Performance metrics
Stability with heavy load, is all the time spent on resolving contentions? => unstable with a stable algorithm, throughput does not decrease with offered load if infinite number of uncontrolled stations share a link, then instability is guaranteed but if sources reduce load when overload is detected, can achieve stability Fairness no single definition no-starvation: source eventually gets a chance to send
use a distributed scheme for packet mode (too many collisions) Instead master coordinates access to link using reservations Some time slots devoted to reservation messages
link Packet collisions are only for minislots, so overhead on contention is reduced
Link Layer
5.1 Introduction and
services 5.2 Error detection and correction 5.3Multiple access protocols 5.4 Link-Layer Addressing 5.5 Ethernet
5.7 PPP
5.8 Link Virtualization:
ATM
link
(bridges and switches too) communication channels that connect adjacent nodes along communication path are links
datagram
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
10
transportation analogy
e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link
trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne
different services
e.g., may or may not provide reliable data transfer over link
communication link transportation mode = link layer protocol travel agent = routing algorithm
11
channel access if shared medium physical addresses used in frame headers to identify source, dest different from IP address!
Reliable delivery seldom used on low bit error link (fiber, some twisted pair) wireless links: high error rates
12
pacing between adjacent sending and receiving nodes. Similar to transport-layer flow control? when do we need it?
errors caused by signal attenuation, noise. receiver detects presence of errors: signals sender for retransmission or drops frame
Error Detection:
Error Correction:
receiver identifies and corrects bit error(s) without resorting to retransmission with half duplex, both ends of link can transmit, but not at same time
13
Adaptors Communicating
datagram sending node
receiving node
frame
adapter
link layer implemented in receiving side adaptor (a.k.a. NIC) looks for errors, reliable transfer, flow control, etc Ethernet card, PCMCI extracts datagram, passes card, 802.11 card to receiving node sending side: adapter is semi encapsulates datagram in autonomous a frame adds error checking bits, link & physical layers reliable data transfer, flow control, etc.
14
LAN Addresses
32-bit IP address:
network-layer address
another physically-connected interface (same network) 48 bit MAC address (for most LANs) burned in the adapter ROM
15
transportation analogy
e.g., Ethernet on first link, frame relay on intermediate links, 802.11 on last link
trip from Princeton to Lausanne limo: Princeton to JFK plane: JFK to Geneva train: Geneva to Lausanne
different services
e.g., may or may not provide reliable data transfer over link
communication link transportation mode = link layer protocol travel agent = routing algorithm
16
LAN Addresses
Each adapter on LAN has unique LAN address
17
IEEE manufacturer buys portion of MAC address space (to assure uniqueness) MAC flat address => portability
address
18
Ethernet is a local area technology, with networks traditionally operating within a single building, connecting devices in close proximity. At most, Ethernet devices could have only a few hundred meters of cable between them, making it impractical to connect geographically dispersed locations.
Modern advancements have increased these distances considerably, allowing Ethernet networks to span tens of kilometers.
19
20
Ethernet Terminology
Medium - Ethernet devices attach to a common
medium that provides a path along which the electronic signals will travel. Historically, this medium has been coaxial copper cable, but today it is more commonly a twisted pair or fiber optic cabling. Segment - We refer to a single shared medium as an Ethernet segment. Node - Devices that attach to that segment are stations or nodes. Frame - The nodes communicate in short messages called frames, which are variably sized chunks of information.
21
Preamble: 7 bytes with pattern 10101010 followed by one byte with pattern 10101011 used to synchronize receiver, sender clock rates
22
adapters on a LAN and dropped if address does not match Type: indicates the higher layer protocol, mostly IP but others may be supported such as Novell IPX and AppleTalk) CRC: checked at receiver, if error is detected, the frame is simply dropped
23
25
Ethernet
The most widely used LAN
that all stations are aware of collision and can increment timeout range a small =>time wasted in collision is around 50 microseconds Ethernet requires packet to be long enough that a collision is detected before packet transmission completes (a <= 1)
26
Evaluating Ethernet
Pros easy to setup requires no configuration
Problems at heavy loads, users see large delays because of backoff nondeterministic service doesnt support priorities
But, very successful because problems only at high load can segment LANs to reduce load
27
and receiving adapter. Unreliable: receiving adapter doesnt send ACKs or NACKs to sending adapter
28
link share the channel, that is, multiple access no slots adapter doesnt transmit if it senses that some other adapter is transmitting, that is, carrier sensing transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection
Before attempting a
29
Similarity between this exponential backoff and TCPs congestion control mechanisms (rate-halving and backoff when consecutive timeout)
30
A fairness problem
New node has initial m=0, but the other
32
efficiency
1 5t prop / ttrans
?
33
34
Star topology
Bus topology popular through mid 90s Now star topology prevails Connection choices: hub or switch (more later)
hub or switch
35
nodes hub
Hubs are essentially physical-layer repeaters:
bits coming in one link go out all other links no frame buffering no CSMA/CD at hub: adapters detect collisions
36
Gigabit Ethernet
Star topology with a hub or switch at its center
shared broadcast channels (using hubs) in shared mode, CSMA/CD is used; short distances between nodes to be efficient
37