



















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




















encapsulate datagram into frame, adding header, trailer
channel access if shared medium
“MAC” addresses used in frame headers to identify source,
errors caused by signal attenuation, noise.
receiver detects presence of errors:
Medium Access Control
(MAC) Protocols
MAC Protocols: a taxonomy
Three broad classes:
Channel Partitioning
divide channel into smaller “pieces” (time slots,
allocate piece to node for exclusive use
Random Access
channel not divided, allow collisions
“recover” from collisions
“Taking turns”
Nodes take turns, but nodes with more to send
Random Access Protocols
transmit at full channel data rate R.
no a priori coordination among nodes
how to detect collisions
how to recover from collisions (e.g., via delayed retransmissions)
slotted ALOHA
ALOHA
CSMA, CSMA/CD, CSMA/CA
Ethernet uses CSMA/CD
No slots
adapter doesn’t transmit if it senses that some other adapter is transmitting, that is, carrier sense
transmitting adapter aborts when it senses that another adapter is transmitting, that is, collision detection
Before attempting a
retransmission, adapter waits a random time, that is, random access
Ethernet CSMA/CD algorithm
IEEE 802.11 Wireless LAN
802.11b
2.4-5 GHz unlicensed
up to 11 Mbps
direct sequence
widely deployed, using
802.11a
5-6 GHz range
up to 54 Mbps
802.11g
2.4-5 GHz range
up to 54 Mbps
All use CSMA/CA for multiple access
All have base- station and ad-hoc
network versions
IEEE 802.11: multiple access
don’t collide with ongoing transmission by other node
difficult to receive (sense collisions) when transmitting due to
can’t sense all collisions in any case: hidden terminal, fading
goal: avoid collisions: CSMA/C(ollision)A(voidance)
A’s signal strength
space
C’s signal strength
IEEE 802.11 MAC Protocol: CSMA/CA
sender (^) receiver
DIFS
data
SIFS
ACK
Avoiding collisions (more)
RTSs may still collide with each other (but they’re short)
sender transmits data frame
other stations defer transmissions
Collision Avoidance: RTS-CTS exchange
time
reservation collision
defer
frame control duration
address 1
address 2
address 4
address 3 payload^ CRC
seq control
Protocolversion Type Subtype ToAP FromAP Morefrag Retry Powermgt Moredata WEP Rsvd
duration of reserved transmission time (RTS/CTS)
frame seq # (for reliable ARQ)
frame type (RTS, CTS, ACK, data)
MAC Addresses and ARP
32-bit IP address:
network-layer address
used to get datagram to destination IP subnet
MAC (or LAN or physical or Ethernet)
address:
used to get datagram from one interface to another physically-connected interface (same
network)
48 bit MAC address (for most LANs) burned in the adapter ROM
LAN Addresses and ARP
Broadcast address = FF-FF-FF-FF-FF-FF
= adapter
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B
0C-C4-11-6F-E3-
71-65-F7-2B-08-
(wired or wireless)
ARP protocol: Same LAN (network)
Dest MAC address = FF-
all machines on LAN
frame sent to A’s MAC address (unicast)
soft state: information that
nodes create their ARP
Routing to another LAN
walkthrough: send datagram from A to B via R assume A know’s B IP address
Two ARP tables in router R, one for each IP network (LAN)
A creates datagram with source A, destination B
A uses ARP to get R’s MAC address for 111.111.111.
A creates link-layer frame with R's MAC address as dest, frame contains A-to-B IP datagram
A’s adapter sends frame
R’s adapter receives frame
R removes IP datagram from Ethernet frame, sees its destined to B
R uses ARP to get B’s MAC address
R creates frame containing A-to-B IP datagram sends to B
Ethernet Frame Structure
Sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame
Preamble:
7 bytes with pattern 10101010 followed by
one byte with pattern 10101011
used to synchronize receiver, sender clock rates
Self learning
A switch has a switch table
entry in switch table:
(MAC Address, Interface, Time Stamp)
stale entries in table dropped (TTL can be 60 min)
switch learns which hosts can be reached through
which interfaces
when frame received, switch “learns” location of sender: incoming LAN segment
records sender/location pair in switch table
Filtering/Forwarding
When switch receives a frame:
index switch table using MAC dest address
if entry found for destination then{
if dest on segment from which frame arrived then drop the frame
else forward the frame on interface
indicated
}
else flood
forward on all but the interface on which the frame arrived
Switch example
Suppose C sends frame to D
Switch receives frame from C
notes in bridge table that C is on interface 1
because D is not in table, switch forwards frame
frame received by D
hub hub^ hub
switch
address (^) interface A B E G
Switch example
Suppose D replies back with frame to C.
Switch receives frame from from D
notes in bridge table that D is on interface 2
because C is in table, switch forwards frame only
frame received by C
hub hub^ hub
switch
address interface A B E G C
Local Area Networks
Bus LAN Ring LAN
MAC and LLC
Logical Link Control Medium Access Data Link Control
Layer
to Physical Layer
to Network Layer
IEEE 802 Standards
Ethernet
Speed: 10Mbps -10 Gbps
Standard: 802.3, Ethernet II (DIX)
Most popular physical layers for Ethernet:
10Base5 Thick Ethernet: 10 Mbps coax cable 10Base2 Thin Ethernet: 10 Mbps coax cable 10Base-T 10 Mbps Twisted Pair 100Base-TX 100 Mbps over Category 5 twisted pair 100Base-FX 100 Mbps over Fiber Optics 1000Base-FX 1Gbps over Fiber Optics 10000Base-FX 1Gbps over Fiber Optics (for wide area links)