Chapter 1: PowerPoint slides - ECE

advertisement
Computer Networks:
Introduction
Ivan Marsic
Rutgers University
Chapter 1 – Introduction
Topic:
Introduction to Data
Networking
 Goals
 Communication Media
 Protocols
 Reliable Transmission
User Goals and Tunable Knobs
Visible network properties:
Delivery
Correctness
Fault tolerance
Timeliness
Cost
Communication
protocols
Network
architecture
Components
Physical
medium
Customer
Tunable network parameters:
Network
topology
Network
Engineer
Topology vs. Robustness
Paul Baran, 1964
Node
Link
Centralized
Decentralized
Distributed
(a)
(b)
(c)
Internet Map: Major ISPs
Fully Interconnected Network
New York City, 1888
Early Telephone Switching Offices
1924: First Mobile Telephone
The first version of a mobile radio telephone being used in 1924.
Exploiting Locality
Saul Steinberg,
“A View of the World
from Ninth Avenue,”
cover of
The New Yorker
March 29, 1976
Distortion of Signals
Voltage at transmitting end
Idealized voltage at receiving end
Line noise
Voltage at receiving end
threshold "0"/"1"
Packet Error Rate Approximation
PER  1  (1  BER)n  1  en BER
PER = packet error rate
BER = bit error rate
n = packet length [in bits]
Packet Transmission (1)
Example: Sender sends a 6-bit packet “101101” to the receiver
Communication link
Physical setup:
Timeline diagram:
Sender
Receiver
Start of transmission
transmission
delay
propag
ation
propagation
delay
101101
101101
Time
Electro
magne
tic wav
e
End of reception
Fluid flow analogy:
First drop of the fluid
enters the pipe
Fluid packet in transit
Last drop of the fluid
exits the pipe
Transmission Link Capacity
1
Link 1:
1 Mbps
0
1
1
0
0
1
1s
1 0 1 1 001
Link 2:
10 Mbps
Time
100ns
Effect of link speed:
 Link 2 can transmit 10 times more bits per unit of time
 or, Link 2 can transmit the same message in a 10 times shorter period
Wireless Communication
Point source
Interfering sources
Interference
pattern
Radio Signal Propagation
Ray tracing
simulation in a
closed office
environment.
Signal intensity
map for a room
with a doorway
and a metal desk
desk
door
Transmission / Interference Range
C
Interference
range
D
Transmission
range
B
A
Interfering
source
Receiver
Sender
Transmitted
signal power
E
Threshold
Distance from sender
Interfering
source
Interfering
source
Threshold
0
0
Distance from receiver
Received signal
power from an
interfering source
Protocols
Layer i
send()
handle()
Layer i  1
User-to-user interactions
obey social norms

Letter
(Message)
Person A

Letter in
envelope
(Packet)
Customer interaction obeys
mail acceptance and delivery
procedures (Postal Service’s
Mail Manual)
Postal-vehicle
service-transportation
routes obey carrierroute maps and
delivery timetables
Physical transport obeys
transportation and traffic rules


Person B

Statistical Multiplexing
City A
City B
(a)
City C
City D
3-Layer Protocol Stack
Protocol at layer i depends only on the protocols at i1 (not at i1!)
Layered architecture
Layer function
Examples
Application specific connections
• Transmission Control
Protocol (TCP)
• Real-time Transport
Protocol (RTP)
3: End-to-End
Service interface between L2 & L3
Source-to-destination routing
2: Network
• Internet Protocol (IP)
Service interface between L1 & L2
Packet exchange
1: Link
• IEEE 802.11 WiFi
• IEEE 802.3 Ethernet
• PPP (modems, T1)
Layer 1 / 3-Layer Protocol Stack
Link Layer:
Protocol modules at layer 1 (bottom layer) exchange packets over the link
Layer 2 / 3-Layer Protocol Stack
Network Layer:
Protocol modules at layer 2 (middle layer) route packets from source
to destination (possibly over many links)
Layer 3 / 3-Layer Protocol Stack
Applications:
 Network games
 Internet telephony
 Email
End-to-End Layer:
Protocol modules at layer 3 (top layer) create illusion of different link types
(tailored to application-specific needs)
Protocol Layers at Hosts/Switches
Physical setup:
Intermediate
node (router)
End host A
End host B
Communication link
Communication link
Protocol stack:
Application
Application
3:
End-to-End
End-to-End
:3
2:
Network
2:
Network
Network
:2
1:
Link
1:
Link
Link
:1
Physical communication
Physical communication
Bit Stuffing for Transparency
ISO OSI Protocol Stack
Visit http://en.wikipedia.org/wiki/OSI_model for more details on the OSI Reference Architecture
7: Application
6: Presentation
5: Session
4: Transport
3: Network
2: Data Link MAC
1: Physical
• Application
services (SIP, FTP,
HTTP, Telnet, …)
• Data translation (MIME)
• Encryption (SSL)
• Compression
• Dialog control
• Synchronization
• Reliable (TCP)
• Real-time (RTP)
• Source-to-destination (IP)
• Routing
• Address resolution
• Wireless link (WiFi)
• Wired link (Ethernet)
• Radio spectrum
• Infrared
• Fiber
• Copper
Packet Nesting Across Layers
Sender’s
protocol stack
Layer-3
header
Layer-2
header
Layer-1
header
Receiver’s
protocol stack
Application data
Application data
Layer-3
header
Layer-3 payload
Layer-2
header
Layer-2
Application
payload
data
Layer-1
header
Layer-1
Application
payloaddata
Layer-3 payload
Layer-2
Application
payload
data
Layer-1
Application
payloaddata
Physical
communication
010010110110001011100100101100000101101
010010110110001011100100101100000101101
How Headers Guide Packets
Sender Endpoint
Receiver Endpoint
2
Application
At router, each layer examines only
its own header:
1. Router’s Link layer protocol checks
that this packet is for this node
2. Router’s Network layer protocol decides
the outgoing link based on destin. addr.
3
Layer 3: End-to-End
Application
At router, each layer protocol
creates its own header type.
Layer 3: End-to-End
Router
Layer 2: Network
Layer 2: Network
Layer 2: Network
Layer 1: Link
Layer 1: Link
Layer 1: Link
Packet:
Link
Network End-end
layer hdr layer hdr layer hdr
1
Application data
At sender, each layer protocol creates its own header type.
Headers are nested; application data is nested deepest
Link
Network End-end
layer hdr layer hdr layer hdr
4
Application data
At receiver, each layer examines
only its own header type:
1. Receiver’s Link protocol checks Link-layer
header that this packet is for this node
2. Network protocol demultiplexes for
End-to-end protocol based on
the Network-layer header
3. Receiver’s End-to-end protocol
demultiplexes for receiver application
Error Detection and Correction
12 13 14 15 16 17 18 19 20 21 22 23 24
48 49 50 51 52 53 54 55 56 57 58 59 60
24 25 26 27 28 29 30 31 32 33 34 35 36
20
13 17
10
2
0
9
4
3
1
12
7
6
5
19
16
25
21
18
15
23
27 29
24
22
14
26
35
33
31
11
8
32
30
28
34
36
60
57
59
56
58
38
50
55
54
52
53 51
49
46
48
43
40 39
42 41
45
44
47
37
Interleaving
“All science is either physics or stamp collecting.”
Forward
interleaving:
“theme illicts scenic graphics since poorest Ally.”
A ll s c ie n c e
i s e ith e r
p h y s ic s o r s ta m p c o ll e c ti n g
detail
t h
e
m e
i
l
l i c t s
s c
e ni c g r a p h ic s
s i nc e
p o o r es t
“theme illicts scenic strictly since poorest Ally.”
Inverse
interleaving:
“All sctence is eitcer ihysicy ot strmp lollectins.”
All y
Packet Transmission (2)
Time
Sender
transmission
delay
Receiver
Data
propagation
delay
ACK
processing
delay
processing
delay
Data
Transmission and Propagation
Delays
Transmission delay:
packet length L (bits)
tx 

bandwidth
R (bits per second)
Propagation delay:
tp 
distance d (m)

velocity v (m/s)
Fluid Flow Analogy
Layer 2
sender
Layer 2
receiver
Layer 1
sender
Queued
buckets
Layer 1
receiver
What Contributes to RTT
Sender
Receiver
Transport layer
Send
data
Receive
ACK
Network layer
Send
packet
Send
ACK
Processing delay within network layers
Receive
packet
Link+Phys layer
Transport layer
Processing delay within transport layers
Receive
data
Network layer
Send
packet
Processing and transmission delays
within link/physical layers
Propagation delay (receiver  sender)
Propagation delay (sender  receiver)
Receive
packet
Link+Phys layer
Topic:
Reliable Transmission via
Retransmission
 Stop-and-Wait
 Go-Back-N
 Selective Repeat
Automatic Repeat reQuest (ARQ)
•
Stop-and-wait ARQ
–
–
–
–
•
Go-back-N ARQ
–
–
–
–
–
–
•
Transmit a frame and wait for acknowledgement (ACK)
If positive ACK from receiver, send next frame
If ACK does not arrive after a certain period of time (Timeout), retransmits the frame
Simple, low efficiency
Transmit frames continuously, no waiting
The receiver only ACKs the highest-numbered frames received in sequence
ACK comes back after a round-trip delay
If timeout, the sender retransmits the frames that are not ACKed and N–1 succeeding frames that
were transmitted during the round-trip delay (N frames transmitted during a round-trip delay)
Need buffer at sender, does not have to buffer the frames at the receiver,
Moderate efficiency and complexity. Less efficient when the round-trip delay is large and data
transmission rate is high
Selective-repeat ARQ
–
–
–
–
Transmit continuously, no waiting
The receiver ACKs all successfully received frames
The sender only retransmits (repeats) the unACKed frames when their timers expire
Most efficient, but most complex, buffer needed at both sender & receiver, needs per-frame timer
Stop-and-Wait with Errors
Receiver
2nd attempt
1st attempt
Packet i
Send data
Set timer
transmission
time
(error)
timeout
time
Timer expires
Resend data
Set new timer
Packet i (retransmission)
(error)
Packet i (retransmission)
(error)
k-th attempt
k+1st attempt
Time
Sender
Timer expires
Resend data
Set new timer
Packet i (retransmission)
transmission
time
RTT
Receive ACK
Reset timer
ACK
Received
error-free
Stop & Wait Sender Utilization
Stop & Wait sender utilization, under error-free transmission:
S &W
U sender

tx
tx  2  t p
Probability of successful transmission, with error rate pe:


psucc  1  peDATA  1  peACK

Expected sender utilization for Stop & Wait, under errors:
E

S &W
U sender

t x  E{N }
tx


total
E{T } psucc  tsucc  pfail  tfail
Sliding Window – Keeping the Pipe
Full
Goal: Sender should be busy sending packets
(as long as it has packets ready to send)
• Sender utilization as a metric of protocol performance
• “Keeping the pipe full”
Sliding Window ARQ
Sender
window N = 4
Sender
Receiver
0 1 2 3 4 5 6 7 8
Receiver
window W = 4
0 1 2 3 4 5 6 7 8 9
PktPkt-0
PktPkt-1
0 1 2 3 4 5 6 7 8 9
PktPkt-2
PktPkt-3
0 1 2 3 4 5 6 7 8 9
AckAck-0
AckAck-1
AckAck-2
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
AckAck-3
PktPkt-4
PktPkt-5
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
PktPkt-6
PktPkt-7
AckAck-4
AckAck-5
AckAck-6
0 1 2 3 4 5 6 7 8 9 10
Key:
Already ACK’d
0 1 2 3 4 5 6 7 8 9 10 11
AckAck-7
PktPkt-8
PktPkt-9
Key:
Received in-order & ACK’d
Sent, not yet ACK’d
Expected, not yet received
Allowed to send
Acceptable to receive
NOT allowed to send
NOT acceptable
Go-back-N ARQ
Window N = 3
0 1 2 3 4 5 6 7 8 9 10 11
Sender
Receiver
Pkt-0
0 1 2 3 4 5 6 7 8 9 10
Next expected
seq.num.
Pkt-1
0 1 2 3 4 5 6 7 8 9 10 11
0 1 2 3 4 5 6 7 8 9 10 11
Pkt-2
(loss)
Ack-0
0 1 2 3 4 5 6 7 8 9 10
Ack-0
discard Pkt-2
Ack-0
discard Pkt-3
0 1 2 3 4 5 6 7 8 9 10
Pkt-3
1 2 3 4 5 6 7 8 9 10 11
Timeout for Pkt-1
1 2 3 4 5 6 7 8 9 10 11
Pkt-1
s
ion
s
is
sm
n
tra
Pkt-2
1 2 3 4 5 6 7 8 9 10 11
Pkt-3
)
(re
2 3 4 5 6 7 8 9 10 11
4 5 6 7 8 9 10 11
4 5 6 7 8 9 10 11
(loss)
Ack-1
1 2 3 4 5 6 7 8 9 10
Ack-2
2 3 4 5 6 7 8 9 10
Ack-3
3 4 5 6 7 8 9 10
Pkt-4
Pkt-5
Ack-4
Pkt-6
4 5 6 7 8 9 10
Selective Repeat ARQ
Sender window N = 3
0 1 2 3 4 5 6 7 8 9 10 11
Sender
Receiver
window W = 3
0 1 2 3 4 5 6 7 8 9 10
Pkt-0
Pkt-1
0 1 2 3 4 5 6 7 8 9 10 11
Pkt-2
(loss)
Ack-0
Ack-2
0 1 2 3 4 5 6 7 8 9 10 11
Pkt-3
0 1 2 3 4 5 6 7 8 9 10
buffer Pkt-2
1 2 3 4 5 6 7 8 9 10 11
Ack-3
Timeout for Pkt-1
1 2 3 4 5 6 7 8 9 10 11
0 1 2 3 4 5 6 7 8 9 10
0 1 2 3 4 5 6 7 8 9 10
buffer Pkt-3
Pkt-1 (re
trans
mission)
Ack-1
4 5 6 7 8 9 10 11
Pkt-4
4 5 6 7 8 9 10 11
Pkt-5
4 5 6 7 8 9 10 11
Pkt-6
0 1 2 3 4 5 6 7 8 9 10
Ack-4
0 1 2 3 4 5 6 7 8 9 10
Ack-5
0 1 2 3 4 5 6 7 8 9 10
Acknowledgements: GBN vs. SR
Sender
01234567
Receiver
Pkt-0
Sender
01234567
01234567
Pkt-1
01234567
(loss)
Pkt-3
34567
Pkt-4
34567
Pkt-5
Pkt-0
01234567
Pkt-1
Pkt-2
1234567
Receiver
Ack-0
1234567
Ack-1
234567
Ack-2
34567
01234567
Ack-0
4567
01234567
Ack-1
(loss)
1234567
Ack-3
Pkt-2
Ack-2
01234567
Pkt-3
Timeout for Pkt-1
Ack-3
01234567
1234567
Pkt-1
Pkt-6
1234567
Ack-1
01234567
discard
duplicate Pkt-1
(a) Go-back-N
(b) Selective Repeat
Topic:
Broadcast and Wireless Links
 ALOHA
 Hidden and Exposed Stations
 Carrier Sensing Multiple Access
 CSMA/CD, CSMA/CD
Omnidirectional
transmission
in 3D
TRANSMISSION
Sender
Receiver
Sender
Distance
Simplified
representation
in 2D
PROPAGATION
(a)
RECEPTION
RECEPTION
Receiver
Distance from sender
Time
(b)
TRANSMISSION
Time
Transmission Cone
Transmission Cone, Collision
& Vulnerable Period
Collision occurs if two
(or more) transmission
cones overlap.
B
Distance from the Receiver
Receiver
A
B
(b)
C
R
A
C
(a)
Time
A
B
C
Receiver
A
B
C
Receiver
A
B
C
Receiver
Distance
B’s
transmission
B’s
transmission
sion
colli
A’s
transmission
A’s
transmission
A’s
transmission
sion
colli
Time
(c)
C’s
transmission
(d)
Time
(e)
C’s
transmission
Parameter 
Ratio of propagation delay vs. packet transmission time:

t p max
tx
d max  R

vL
Parameter 
Ratio of propagation delay vs. packet transmission time
Sender
Receiver
Sender
Packet transmission
Receiver
Packet transmission
(a)
Time
transmission
delay = 8.192 ms
propagation
delay = 333 ns
transmission
delay = 8.192 ms
(b)
propagation constant   0.00004
propagation constant   14.6
Local area network, diameter = 100m
Geosynchronous satellite
propagation
delay =
119.3 ms
ALOHA and Slotted ALOHA
Sender’s State Diagram
START
HERE:
New packet
ready
ALOHA Packet Transmission
Sender A
Receiver
propagation
delay from A
Data
Time
transmission
delay
ACK
Data
Sender B

receiver’s
vulnerable
period
propagation
delay from B
(for receiving data from A)
vulnerable period 
for pure ALOHA = 2  packet-time
When transmission cones of
ALOHA stations overlap?
A collides with an earlier transmission from B
Sender A
Receiver
Sender B
tstart(B)
tstart(A)
A transmission from B will collide with A if
B started no earlier than tx – 1x relative to A
tstart(B) = tstart(A) – tx + 1x
A collides with a later transmission from B
Sender A
Receiver
Sender B
tstart(A)
tstart(B)
tstart(A) – tx + 1x = tstart(B) = tstart(A) + tx – 1x
A transmission from B will collide with A if
B started no later than tx – 1x relative to A
tstart(B) = tstart(A) + tx – 1x
ALOHA Scenario
System Output = S
Key:
“Fresh” station
System
Receiver
Receiver
“Backlogged” station
Transmission Attempts = G
/m
User
1
/m
User m
/m
User
2
/m

System Input = m  = 
m
Backlogged Stations
• “Fresh” stations transmit new packets
• “Backlogged” stations re-transmit
collided packets
Receiver
Receiver
“Fresh” station
“Backlogged” station
/m
Fresh Station
/m
Backlogged Station
Analysis of Slotted ALOHA (1)
ASSUMPTIONS FOR ANALYSIS:
• All packets require 1 slot for x-mit
• Poisson arrivals, arrival rate 
• Collision or perfect reception (no errors)
• Immediate feedback (0, 1, e)
• Retransmission of collisions (backlogged
stations)
• No buffering or infinite set of stations
Time Slots
(m = )
i1
i
i1
i2
ALOHA Model
GP0
G

Channel
Fresh
packets
Combined, fresh and
retransmitted packets
G(1  P0)
Collided packets
(to be retransmitted)
S
Successfully
transmitted packets
Analysis of Slotted ALOHA (2)
• 0 <  < 1, since at most 1 packet / slot
• Equilibrium: departure rate = arrival rate
• Backlogged stations transmit randomly
• Retransmissions + new transmissions:
Poisson process with parameter G > 
PA(t   )  A(t )  n  e

( ) n
,
n!
n  0,1,...
Analysis of Slotted ALOHA (2)
• Throughput =
arrival rate  probability of no collision
• Slotted ALOHA throughput:
S  G  P0  G  PA(t  1)  A(t )  0  G  e
G
• Pure ALOHA throughput:
S  G  P0  G  PA(t   )  A(t )  0  G  e 2G
S (throughput per packet time)
Efficiency of ALOHA’s
Equilibrium
0.4
Slotted ALOHA: S = Ge–G
Arrival rate 
0.3
0.2
Pure ALOHA: S = Ge–2G
0.1
0
0.5
1.0
1.5
2.0
G (transmission attempts per packet time)
3.0
S-ALOHA: In equilibrium, arrival rate = departure rate:
 = GeG
Max departure rate (throughput) = 1/e  0.368 @ G = 1
Unslotted (Pure) ALOHA
• Assume: all packets same size, but no fixed
slots
• The packet suffers no collision if no other
packet is sent within 2 packets long:
S=GP0=Ge2G
• Max throughput 1/2e  0.184 @ G = 0.5
• Less efficient than S-ALOHA, but simpler,
no global time synchronization
i
Hidden Stations
Range of A’s
transmissions
A
B
C
A
B
C
Range of C’s
transmissions
 A is transmitting to B.
 C wants to transmit and listens before talk but cannot hear A
because A is too far away
(A’s radio signal is too weak for C to hear,
so A and C are “hidden stations” to each other).
 C concludes that the medium is idle and transmits,
thus interfering with B’s reception.
Exposed Stations
A
B
C
D
A
B
C
D
 B is transmitting to A.
 C wants to transmit to D, it listens before talk and hears B
so it refrains from transmitting although its transmission
would not interfere with A’s reception.
 Therefore, C is an “exposed station” to B.
Note that for C to be allowed to transmit, C must know that A is not located in its transmission range
and that D is not in B’s transmission range.
 Hidden station problem is much simpler to solve!
Exponential Backoff
Key idea:
increasing number of choices reduces the probability of repeated collisions
Coin
two choices
{0, 1}
Dice
six choices
{1, 2, 3, 4, 5, 6}
Roulette
38 choices (American)
{0, 00, 1, 2, 3, …, 36}
Wired Broadcast Media & CSMA
CSMA / CD Sender’s State Diag’m
Analysis of CSMA/CD
Probability of a successful transmission:
psucc
 m
m 1
    (one transmits, others don' t )  m  q  1  q 
1
Channel efficiency for CSMA/CD:
 CSMA/CD
tx
L/R
1



t x  w L / R  2   / p succ 1  2    e  R / L
CSMA/CD Collision Detection
STA 1
t1
Time
STA 2
Both stations are listening
STA1 begins transmission
t2
STA2 begins
transmission
t3
t4
STA1 detects
collision before
ending transmission
t5
STA2 detects
collision and
transmits
jam signal
CSMA/CD Backoff Example
Previous
frame
STA 1
CW STA1 = 2 CW STA1 = 4
1 0
A
CW ST
STA 2
2
=2
CW STA1 = 8
1 0
3 2 1 0
=4
=0
TA2
TA2
S
S
W
W
C
C
0
1 0
CW STA3 = 2 CW STA3 = 4
STA 3
CW STA2 = 2
STA2, 1st frame
0
0
Key:
Collision (abort
transmission)
Jam signal
Backoff slot
CW STA2 = 0
STA2
2nd frame
CW STA3 = 8
2 1 0
3 2 1 0
Time
CW STA1 = 16
STA1, 1st frame
6 5 4 3 2 1 0
STA2, 2nd frame
CW STA3 = 16
CW STA3 = 0
STA3, 1st frame
2 1 0
CSMA / CA Sender’s State Diag’m
(a)
Throughput per slot time
Efficiency of CSMA protocols
1
1  2
Departure rate

geg
1eg
Arrival rate 
Equilibrium
g = (2)
g (transmission attempts per slot time)
(b)
S (throughput per packet time)
1.0
Nonpersistent
CSMA/CD
Nonpersistent
 = 0.01
CSMA
0.8
0.6
1-persistent CSMA
0.4
0.2
Slotted
ALOHA
Pure ALOHA
0.1
1
10
100
G (transmission attempts per packet time)
1000
TDMA
ALOHA
CSMA/CA
CSMA/CD
Maximum channel
transmission rate
Average packet delay
Delay vs. Arrival Rate
Arrival rate  per station
Topic:
Internetworking
 Routing & Forwarding
 Internet Protocol (IPv4); Datagram Fragmentation
 Link State Routing; Distance Vector Routing
 Addressing; CIDR
Packet Switching / Routing
Packet switching device
Network
ports
Example Internetwork
A
Network 3:
Ethernet
R1
B
C
C
A
Network 2:
Wi-Fi
(a)
D
D
Network 1:
Point- to-point
R2
Network 4:
Point-to-point
Interfaces on
Network 2
Interfaces on
Network 3
R1
Interfaces on
Network 1
B
Interfaces on
Network 4
R2
Network 5: Ethernet
E
F
(b)
E
Interfaces on
Network 5
F
Protocol Stack at
End-points vs. Routers
End-point protocol stack:
Router protocol stack:
Layer 3:
Layer 3:
End-to-End
End-to-End
Layer 2:
Layer 2:
Network
IP (Internet Protocol)
Routing Protocol
Network (OSPF, RIP, BGP, …)
Layer 1:
Layer 1:
Link
Link
Routing Problem
“Forwarding table”
“Interface 2”
“Interface 1”
(a)
“Interface 3”
“Packets”
“Interface 4”
Forwarding table
(b)
ets
k
c
Pa
Router
Destination
Output Interface
ece.rutgers.edu
Interface 3
cs.rutgers.edu
Interface 2
Network-layer Protocol:
Internet Protocol (IP)
Sender
Receiver
“User protocol”
“User protocol”
send()
handle()
IP protocol
IP protocol
Link layer protocol
Link layer protocol
IPv4 Header
0
7 8
4-bit
version
number
4-bit
header
length
15 16
8-bit differentiated
services (DS)
16-bit datagram length
(in bytes)
u
n
u D M
s F F
e
d
16-bit datagram identification
8-bit time to live
(TTL)
flags
31
8-bit user protocol
13-bit fragment offset
16-bit header checksum
32-bit source IP address
32-bit destination IP address
options (if any)
data
20
bytes
Dotted Decimal Notation for IPv4
32-bit IPv4 address (binary representation):
10000000 00000110 00011101 10000011
dotted decimal notation:
(network-layer address)
128 . 6 . 29 . 131
associated by
a lookup table
host name (for human use):
(application-layer address)
ece . rutgers . edu
Domain Name System (DNS)
visit website
www.comp.org
Internet



User

DNS client
DNS server

Web server
www.comp.org
 Web browser passes the name “www.comp.org” to DNS client
 DNS client sends query with “www.comp.org” to DNS server
 DNS server responds with IP address of “www.comp.org”
 DNS client passes the IP address to Web browser
 Web browser initiates connection to the Web server using its IP address
IP Datagram Fragmentation (1)
(a)
Wi-Fi
Host D
Host A
MTU = 1024 bytes
Router B
Ethernet
point-to-point
MTU = 1200 bytes
MTU = 512 bytes
Router C
IP Datagram Fragmentation (2)
JPEG image
1.5 Kbytes
Host A
1,536 bytes
JPEG
header
Image pixels
Router B
Application
TCP layer
1,180 bytes
TCP
header
TCP payload
( 1,160 bytes )
396 bytes
TCP TCP payload
header ( 376 bytes )
IP
header
IP
layer
1,200 bytes
IP payload
( 1,180 bytes )
508 bytes
IP
layer
IP
header
1,200 bytes
TCP
header
MF-flag = 0
Offset = 0
ID = 73592
TCP payload
( 1,160 bytes )
416 bytes
IP
header
MF-flag = 0
Offset = 0
ID = 73593
NO FRAGMENTATION
IP
header
IP payload
( 488 bytes )
MF-flag = 1
Offset = 0
ID = 73592
508 bytes
IP
header
IP payload
( 488 bytes )
MF-flag = 1
Offset = 61
ID = 73592
224 bytes
IP
IP pyld
header 204 B
MF-flag = 0
Offset = 122
ID = 73592
Headers of the fragment datagrams
FRAGMENTATION OCCURS HERE
Datagram Reassembly at Host D
Network Routing: Link State
1
Node
B
Step 0
7
1
4
Source
node A
Set of confirmed
nodes N0 (A)
Tentative
nodes
Node
D
4
6
F
Tentative
nodes
N2 (A)
1
4
A
25
E
7
C
D
1
B
E
1
7
N1 (A)
6
Node
F
Unconfirmed
nodes N  N0(A)
Step 2
1
B
A
Node
C
25
Step 1
Node
E
C
25
D
6
F
Tentative
nodes
Network Example for Routing
Protocols
Original network
Scenario 1:
Cost c(C,D)  1
Scenario 2:
Link BD outage
Scenario 3:
Link BC outage
B
B
B
B
10
A
1
D
1
1
10
7
A
1
D
1
1
10
7
C
C
(a)
(b)
A
10
1
1
D
1
7
1
A
D
1
7
C
C
(c)
(d)
Example of Link State Routing
Step
0
1
2
3
4
5
6
Confirmed set N 
Tentative set
Comments
(A, 0, )

Initially, A is the only member of Confirmed(A),
so examine A’s LSA.
(A, 0, )
(B, 10, B),
(C, 1, C)
A’s LSA says that B and C are reachable at costs
10 and 1, respectively. Since these are currently
the lowest known costs, put on Tentative(A) list.
(A, 0, ), (C, 1, C)
(B, 10, B)
Move lowest-cost member (C) of Tentative(A)
into Confirmed set. Next, examine LSA of
newly confirmed member C.
(A, 0, ), (C, 1, C)
(B, 2, C),
(D, 8, C)
Cost to reach B through C is 11=2, so replace
(B, 10, B). C’s LSA also says that D is reachable
at cost 71=8.
(A, 0, ), (C, 1, C), (D, 8, C)
(B, 2, C)
(A, 0, ), (C, 1, C), (D, 3, C)
(B, 2, C)
(A, 0, ), (C, 1, C), 
(B, 2, C), (D, 3, C)
Move lowest-cost member (B) of Tentative(A)
into Confirmed, then look at B’s LSA.
Because D is reachable via B at cost 111=3,
replace the Tentative(A) entry for D.
Move lowest-cost member (D) of Tentative(A)
into Confirmed. END.
Example – Link State (1)
B
10
A’s LSA
broadcast from node A
Node
Seq.# Neighbor B
ID
=1
Cost
10
=A
A
A’s LSA
re-broadcast from B
D
C
1
1
C
A’s LSA
re-broadcast from C
Example – Link State (2)
LSA from node B
(sent to A, C, D)
Node
Seq.# Neighbor A
ID
=1
Cost
10
=B
C
D
1
1
B
1
LSA from node D
10
(sent to B, C)
Node
Seq.# Neighbor
ID
=1
Cost
=D
A
D
1
LSA from node A
Node
Seq.# Neighbor B
ID
=1
Cost
10
=A
C
7
1
1
(sent to B, C)
LSA from node C
C
Node
Seq.# Neighbor
ID
=1
Cost
=C
A
B
D
1
1
7
B
C
1
7
Network Routing: Distance Vector
Neighbor
1
shortest paths (distances) from each neighbor
to the destination node
19
7
29
4
Source
Neighbor
2
Destin
ation
25
Neighbor
3
8
shortest path (src dest) = Min { 7  19, 4  29, 25  8 }
= 7  19 = 26
Distance Vector Calculation
DX Y   min c( X ,V )  DV (Y )
V  ( X )
Example - Distance Vector
B
10
A
1
D
1
1
7
C
Routing table at node A: Initial
A
B
C
A
0
10
1
B



C



Received Distance Vectors
From B
From C
A
B
C
D
10
0
1
1
A
B
C
D
1
1
0
7
Distance to
From
From
Distance to
Routing table at node A: After 1st exchange
A
B
C
D
A
0
2
1
8
B
10
0
1
1
C
1
1
0
7
Example - Distance Vector
DA ( B)  minc( A, B)  DB ( B), c( A, C )  DC ( B)  min10  0, 1  1  2
DA (C )  minc( A, B)  DB (C ), c( A, C )  DC (C )  min10  1, 1  0  1
DA ( D)  minc( A, B)  DB ( D), c( A, C )  DC ( D)  min10  1, 1  7  8
DB ( D)  minc( B, A)  DA ( D), c( B, C )  DC ( D)  min10  3, 1  2  3
B



C



From
Routing table
at node C
1
8
B
10
0
1
1
C
1
1
0
7
D
A




A
B
10
0
1
1
B
C




D




From
C
B
C
D
A




B




C
1
1
0
7
D




B
C
D
0
10
1

2
0
1
1
C
1
1
0
7
D

1
7
0
B



C



D
1
7
0
A
0
2
1
3
B
2
0
1
1
C
1
1
0
2
B
C
D
A
0
10
1

B
10
0
1
1
C
1
1
0
2
D

1
7
0
B
B
C
D
A
0
2
1
3
B
2
0
1
1
C
1
1
0
2
Distance to
A
B
C
D
A
0
2
1
8
B
2
0
1
1
C
1
1
0
2
D
8
1
2
0
A
B
C
D
A
0
2
1
3
B
2
0
1
1
C
1
1
0
2
D
3
1
2
0
Distance to
A
B
C
D
A
0
2
1
8
B
2
0
1
1
C
1
1
0
2
D
8
1
2
0
Distance to
A
A
Distance to
A
Distance to
D
D
Distance to
A
C
C
Distance to
A
Distance to
B
B
Distance to
B
D
From
2
A
C
Routing table
at node D
0
Distance to
From
From
Routing table
at node B
B
A
A
From
1
D
From
10
C
Distance to
From
0
B
From
A
A
From
C
From
B
After 3rd exchange:
Distance to
A
B
C
D
A
0
2
1
3
B
2
0
1
1
C
1
1
0
2
D
3
1
2
0
Distance to
C
D
B
10
0
1
1
C
1
1
0
7
D
8
1
2
0
From
A
After 2nd exchange:
Distance to
From
Distance to
From
From
Routing table
at node A
A
After 1st exchange:
Distance to
A
B
C
D
B
2
0
1
1
C
1
1
0
2
D
3
1
2
0
From
Initial routing tables:
A
B
C
D
B
2
0
1
1
C
1
1
0
2
D
3
1
2
0
Example – DV Routing Loops
Original network
Scenario 2:
Link BD outage
B
B
A
1
10
D
1
1
A
7
1
C
D
1
7
C
Routing table at node B before BD outage
From
Distance to
A
B
C
D
A
0
2
1
3
B
2
0
1
1
C
1
1
0
2
D
3
1
2
0
Routing table at node B after BD outage
1. B detects BD outage
2. B sets c(B, D) = 
3. B recomputes its
distance vector
4. B obtains 3 as the
shortest distance
to D, via C
Distance to
From
10
A
B
C
D
A
0
2
1
3
B
2
0
1
3
C
1
1
0
2
D
3
1
2
0
Topic:
IP Addressing and CIDR
 Hierarchical Structure of IP Addresses
 CIDR (Classless Interdomain Routing)
Example: Road Map
Forwarding Table Scalability
NEW YORK
96 mi.
BLOOMFIELD
NEWARK
KEARNY
91 mi.
85 mi.
Paterson
89 mi.
East Orange
ELIZABETH
80 mi.
Bloomfield
Fort Lee
Union
City
Irvington
Newark
Allentown
PATERSON
99 mi.
UNION CITY
93 mi.
Bayonne
Linden
EAST ORANGE
LINDEN
New York
Elizabeth
Carteret
88 mi.
New Brunswick
80 mi.
Princeton
CARTERET
75 mi.
NEW YORK
Trenton
compared to
Philadelphia
96 mi.
OLD IPv4 Address Structure
(32  n) bits
n bits
(a)
IPv4
old address
structure
0
31
Class
Network part
Host part
8 bits
24 bits
0
Class A
0
7 8
31
Network part
Host part
0 1
Class B
1 0
15 16
Network part
31
Host part
0 1 2
(b)
Class C
1 1 0
23 24
Network part
0 1 2 3
Class D
1 1 1 0
1 1 1 1
Host part
31
Multicast group part
0 1 2 3
Class E
31
31
Reserved for future use
Address Class Sizes
Number of networks of a given class
Class A
Class B
128
16,384
Class C
(first bit fixed to "0" for "Class A")
(first two bits fixed to “10" for "Class B")
2,097,152
(first three bits fixed to “110" for "Class C")
Number of IP addresses (hosts) in a network of a given class
Class A
Class B
Class C
65,536
256
16,777,216
Special IPv4 Addresses
0
31
00000000
This host
0
00000000
00000000
(length depends on IP address class)
000....000
A host on this network
00000000
31
Host identifier
0
31
11111111
Broadcast on this network
0
0
Loopback within this network
(most commonly used: 127.0.0.1)
11111111
11111111
(length depends on IP address class)
Network id
Broadcast on a distant network
11111111
31
1111.............1111
7 8
01111111
31
Anything
CIDR Example (1)
(a)
A
Subnet-3
C
Subnet-2
R1
B
1
D
3
2
Subnet-1
R2
1
2
Subnet-4
4
204.6.94.130
3
Subnet-5
E
F
to other networks
CIDR Example (2)
Subnet-3:
204.6.96.168/30
204.6.94.164
Subnet-2:
204.6.96.164/30
16
5
A
.9
4.
204.6.94.168
4.
6
Organization’s address subspace:
w.x.y.z/27
C
Subnet-5:
w.x.y.z16/30
4.
20
Subnet-3:
w.x.y.z8/31
204.6.94.170
Subnet-2:
w.x.y.z4/30
Subnet-4:
w.x.y.z12/31
B
204.6.94.172
Subnet-4:
204.6.96.172/30
(b)
204.6.94.166
0
/3
:
-1 60
et .1
6
bn 6.9
61
Su 4.
.1
20
94
6.
R1
Subnet-1:
w.x.y.z/30
D
20
204.6.94.169
(c)
204.6.94.173
R2
204.6.94.176
204.6.94.177
Subnet-5:
204.6.96.176/30
204.6.94.160
204.6.94.178
E
F
CIDR Example (3)
Subnet
Network prefix
Binary representation
1
204.6.94.160/30
11001100 00000110 01011110 101000--
2
204.6.94.164/30
11001100 00000110 01011110 101001--
3
204.6.94.168/30
11001100 00000110 01011110 101010--
4
204.6.94.172/30
11001100 00000110 01011110 101011--
5
204.6.94.176/30
11001100 00000110 01011110 101100--
Interface addresses
R2-1: 204.6.94.160
R1-2: 204.6.94.161
(unused)
b-cast: 204.6.94.163
C:
204.6.94.164
R1-3: 204.6.94.165
D:
204.6.94.166
b-cast: 204.6.94.167
A:
204.6.94.168
R1-1: 204.6.94.169
B-1: 204.6.94.170
b-cast: 204.6.94.171
R2-2: 204.6.94.172
B-2: 204.6.94.173
(unused)
b-cast: 204.6.94.175
R2-3: 204.6.94.176
E:
204.6.94.177
F:
204.6.94.178
b-cast: 204.6.94.179
CIDR-based Forwarding Tables
Router R1
Router R2
Remote router
1
2
1
2
3
Forwarding table:
Destination net prefix
1
4
3
Forwarding table:
Out port
Destination net prefix
Forwarding table:
Out port
Destination net prefix
Out port
204.6.96.164/30
3
204.6.96.160/27
1
204.6.96.160/27
1
204.6.96.168/30
1
204.6.96.172/30
2


0.0.0.0/0
2
204.6.96.176/30
3


0.0.0.0/0
4
0.0.0.0/0

default route
Topic:
Autonomous Systems
 Commercial Internet
 Peering and Transit Relationships
 Path Vector Routing
Autonomous Systems (ASs)
Macrospot.com
Noodle.com
Tier-2
Tier-1
ISP 
Tier-3
Tier-2
ISP 
Tier-1
ISP 
ISP 
Tier-2
ISP 
ISP 
Tier-3
Tier-3
ISP 
ISP 
Tier-3
ISP 
’s customers
’s customers
’s customers
ISP Business Relationships
(a) Paid Transit
(b) Peering
ISP 
ISP 
$
’s
customer
ISP 
peering
$
’s customer
$
’s customer
Figure (a) shows the pay-for-transit relationship.
In principle, a customer pays for incoming and outgoing traffic, and expects to be able to reach all other
customers or content providers on the global Internet.
Permissible amounts of traffic in both directions are regulated by the service level agreement (SLA)
between the provider and the customer.
ISP  has the same relationship with ISPs  and  as they have to their customers.
In other words,  and  are ’s paying customers.
In (b), ISP  (not shown) could peer with another same-tier ISP  (not shown) and their peering relationship
would work on the same principle as for ISPs  and .
ISP Business Relationship Example
Macrospot.com
Noodle.com
Key:
$
Transit
Peering
$
$
$
Tier-2
$
Tier-1
ISP 
Tier-1
ISP 
$
ISP 
$
$
Tier-3
$
ISP 
Tier-2
Tier-2
ISP 
$
ISP 
$
$
Tier-3
Tier-3
ISP 
ISP 
$
$
’s customers
Tier-3
ISP 
$
’s customers
’s customers
Providing Selective Transit (1)
AS 
AS 
AS 
$
$
’s
customers
$
’s
customers
’s
customers
(a)
AS 
AS 
$
$
$
AS 
AS 
AS 
AS 
AS 
AS 
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
(b)
AS 
(c)
AS 
$
AS 
$
$
AS 
$
$
$
AS 
AS 
AS 
AS 
AS 
AS 
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
(d)
(e)
Providing Selective Transit (1)
AS 
AS 
AS 
$
$
’s
customers
$
’s
customers
’s
customers
(a)
AS 
AS 
$
$
$
AS 
AS 
AS 
AS 
AS 
AS 
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
(b)
AS 
(c)
AS 
$
AS 
$
$
AS 
$
$
$
AS 
AS 
AS 
AS 
AS 
AS 
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
(d)
(e)
Providing Selective Transit (2)
AS 
AS 
AS 
$
$
’s
customers
AS and its customers are
customers of AS;
and AS and its customers
are customers of AS
$
’s
customers
’s
customers
(a)
AS 
AS 
$
$
$
AS 
AS 
AS 
AS 
AS 
AS 
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
(b)
AS 
AS 
$
AS 
customers of AS
AS 
$
$
$
(c)
customers of AS
$
$
AS 
AS 
AS 
AS 
AS 
AS 
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
$
’s
customers
(d)
(e)
Routing in Global Internet (1)
Macrospot.com
router in AS sends an
update message
advertising the destination
prefix 128.34.10.0/24
Noodle.com
AS 
AS 
AS 
B
E
J
G
C
AS 
D
M

{Cust}

P
AS 
{A
S
,A
S 
,A
S
Q
}
AS 
S
R
t}
{Cust


’s customers
O
N
}
S
, A
{AS

AS 
}
{AS, AS
L
K
{A
S
,A
S
}

AS 
I
F

{AS
}
AS 
H
{A
S
,A
S
}

{A S
,
AS
}
A
’s customers
’s customers
Routing in Global Internet (2)
Macrospot.com
Noodle.com
AS 
AS 
AS 
B
E
J
G
C
AS 
D
M

{Cust}

P
AS 
{A
S
,A
S 
,A
S
Q
}
AS 
S
R
t}
{Cust


’s customers
O
N
}
S
, A
{AS

AS advertises
only its
customers to its
peers, so AS
never learns that
AS has links to
AS and AS
AS 
}
{AS, AS
L
K
{A
S
,A
S
}

AS 
I
F

{AS
}
AS 
H
{A
S
,A
S
}

{A S
,
AS
}
A
’s customers
’s customers
Example - Path Vector

Routing table at AS : Initial


0 |  10 |  1 | 

 | 

 | 
 | 
 | 

From 
 | 
 | 
From 


10 |  0 | 


1 | 
1 | 




1 | 
1 | 
0 | 
7 | 
1

1
1
7

Path to
Routing table at node : After 1st exchange:
From
From

Path to

10
Received Path Vectors (1st exchange)





0 | 
2 | , 
1 | 
8 | , 

10 | 
0 | 
1 | 
1 | 

1 | 
1 | 
0 | 
7 | 
Example - Path Vector
D ( )  minc( ,  )  D ( ), c( ,  )  D ( ) min10  0, 1  1  2
D ( )  minc( ,  )  D ( ), c( ,  )  D ( ) min10  1, 1  0  1
D ( )  minc( ,  )  D ( ), c( ,  )  D ( ) min10  1, 1  7  8
Integrating IGP & EGP Tables
Learn from IGP
protocol that
destination x external
to own AS is reachable
via multiple speakers.
Use info from IGP
routing tables to
determine distance to
each of the speakers.
Hot-potato routing:
Choose the speaker at
the minimum distance
from this router.
Determine the output
port O that leads to the
chosen speaker. Enter
(x,O) in forwarding table
Example - Path Vector

Routing table at AS : Initial


0 |  10 |  1 | 

 | 

 | 
 | 
 | 

From 
 | 
 | 
From 


10 |  0 | 


1 | 
1 | 




1 | 
1 | 
0 | 
7 | 
1

1
1
7

Path to
Routing table at node : After 1st exchange:
From
From

Path to

10
Received Path Vectors (1st exchange)





0 | 
2 | , 
1 | 
8 | , 

10 | 
0 | 
1 | 
1 | 

1 | 
1 | 
0 | 
7 | 
Topic:
Link-Layer Technologies
 Point-to-Point Protocol (PPP)
 IEEE 802.3 a.k.a. Ethernet
Link Layer Services
Layer 3:
End-to-End
Layer 2:
Network
Layer 1:
Link
IEEE 802.
(Ethernet, Wi-Fi, …)
• Data-link layer: transfer datagram from one node to
adjacent node over a communication link
– Framing: encapsulate datagram into a frame, adding header, trailer.
• Identify what set of bits constitute a frame, that is, determining the
beginning and the end of a frame
– Channel access if shared medium
• MAC addresses used in frame headers to identify source & destination
• different from IP addresses!
– Reliable delivery between adjacent nodes
• Error detection
• Error recovery: forward error correction code, retransmission (ARQ)
– Flow control: pacing between adjacent sending and receiving nodes
– Half-duplex and full-duplex
• with half duplex, either transmit or receive on a link,
but not both nodes at same time
Link Layer Sublayering
Network layer / User
Logical link control
(LLC) sublayer
Link
layer
Network layer / User
Medium access control
(MAC) sublayer
Medium access control
(MAC) sublayer
Link
layer
Physical
(PHY) sublayer
Physical
(PHY) sublayer
(a)
(b)
bytes:
1
1
DSAP address
SSAP address
LLC Packet Data Unit:
LLC control
1
DSAP value
7
variable
Data
DSAP = Destination service access point
SSAP = Source service access point
LLC address fields
I/G
bits:
1 or 2
C/R
SSAP value
1
7
I/G = Individual/Group
C/R = Command/Response
Point-to-Point Protocol (PPP)
Visit http://en.wikipedia.org/wiki/HDLC for more details on High-Level Data Link Control (HDLC)
Internet provider’s premises
PPP over
fiber optic link
Customer’s home
Router
PPP
over dialup telephone line
PC
Modem
Modems
Router
PPP Functions
• Framing: encapsulation of network-layer datagram in data-link frame
– Identify what set of bits constitute a frame, i.e., determine the start & end of a frame
• Carry data of any network layer protocol (not just IP) at same time
– ability to demultiplex upwards
•
•
•
•
Bit transparency: must carry any bit pattern in the data field
Error detection (no correction)
Connection liveness: detect, signal link failure to network layer
Network-layer address negotiation: endpoints can learn/configure each
other’s network addresses
• Other characteristics of PPP:
–
–
–
–
no error correction/recovery
no flow control
out-of-order delivery acceptable
no need to support multipoint links (e.g., polling)
Point-to-point (PPP) Frame Format
bytes:
1
1
1
1 or 2
variable
2 or 4
01111110 11111111 00000011
Flag
Address
Control
1
01111110
Protocol
Data payload
Checksum
Flag
LCP or NCP Control Packets:
Value for LCP: C02116
Value for NCP: C02316
Flag
Address
Control
Code
bytes:
1
Protocol
ID
1
Payload
Length
2
Checksum
Flag
Information for
the control operation
variable
Point-to-point (PPP):
State Diagram
Dead
Carrier
detected /
Start

/ Exchange
TERMINATE packets
/ Drop carrier
Failed /
Terminating
Establishing Link Connection
Failed /

Done /
Drop carrier
Options agreed on /
Establishing

Authenticated /
Authenticating

Connecting to
Network-Layer
Protocol
NCP configured /

Send & receive
frames

Open
Topic:
IEEE 802.3 a.k.a. Ethernet
 Ethernet Medium Access Control (MAC) Protocol
 Ethernet Evolution
 Switched Ethernet
802.3 Link-Layer Frame Format
Ethernet Version Notation
Data rate
(e.g., 10 Mbps, 10 Gbps)
Baseband/Broadband
transmission
Wiring type (e.g., coaxial,
twisted pair or fiber optic)
MAC address
Network port
Time last frame received
00-01-03-1D-CC-F7
1
10:39
01-23-45-67-89-AB
1
10:52
A3-B0-21-A1-60-35
2
10:17
Thin-Cable Ethernet
Switched/Bridged Ethernet
Legacy Ethernet vs. Eth. Hub
Thin-Cable Ethernet
Ethernet Hub
Hub vs. Switch
OSI Layer-1
switching
Ethernet Hub
OSI Layer-2
switching
Ethernet Switch
Ethernet MAC & Link Duplexity
IEEE 802.3 MAC
(CSMA/CD)
10 Mbps PHY
IEEE Std 802.3-1985
802.3a, 802.3i, …
10Base2*, 10Base5*,
10Base-F, 10Base-FB,
10Base-FL, 10Base-FP,
10Base-T
100 Mbps PHY
IEEE Std 802.3u
1000 Mbps PHY
IEEE Std 802.3z
100Base-T, 100Base-T2,
100Base-T4*, 100Base-TX,
100Base-X, 100Base-BX10,
100Base-FX, 100Base-LX10
1000Base-T, 1000Base-X,
1000Base-BX10
(*) Not capable of operating in full duplex mode
10 Gbps PHY
IEEE Std 802.3ae
10GBase-E, 10GBase-L,
10GBase-R, 10GBase-S,
10GBase-T, 10GBase-W,
10GBase-X
Ethernet Switch
Learning Switches
B
Network 1
MAC address:
00-01-03-1D-CC-F7
01-23-45-67-89-AB
Port 1
A
D
Switch
Port 2
A3-B0-21-A1-60-35
49-BD-2F-54-1A-0F
Network 2
C
[ See the switching table in the next slide … ]
Switching Table
for the Previous Example
MAC address
Network port
Time last frame received
00-01-03-1D-CC-F7
1
10:39
01-23-45-67-89-AB
1
10:52
A3-B0-21-A1-60-35
2
10:17
Loops in Switched LANs (1)
B
Network 1
Port 1
A
Switch 1
Port 1
Switch 2
Port 2
Port 2
Network 2
C
D
Loops in Switched LANs (2)
Network 1
Switch 1 Port 1
C
Netw-1
Switch 2 P1
P2
C
P2
Port 2
C
P2
C
Netw-2
Packet
C
P1
C
(b)
Netw-1
S-2
P1
S-1
P1
P1
C
P2
Netw-2
(c)
P2
P1
C
P2
(d)
P1
P2
P2
Netw-2
C
P1
S-2
C
C
P1
P2
Netw-1
S-1
P1
S-2
P1
P2
P2
Network 2
(a)
S-1
C
802.1D Configuration BPDU
parameters and format
BPDU format:
Protocol
ID
Protocol
version ID
BPDU
type
Flags
Root
ID
Root path
cost
Switch
ID
Port
ID
Message
age
Max
age
Hello
time
Forward
delay
2 bytes
1 byte
1 byte
1 byte
8 bytes
4 bytes
8 bytes
2 bytes
2 bytes
2 bytes
2 bytes
2 bytes
Topic:
IEEE 802.11 a.k.a. Wi-Fi
 802.11 Architecture
 802.11 Medium Access Control
 RTS/CTS Protocol for Hidden Stations
Components of 802.11 LANs
Ad hoc network does not have distribution system nor access point
IBSS and Infrastructure BSS
Extended Service Set (ESS)
Distribution system (e.g., Ethernet LAN)
AP1
BSS1
AP2
AP3
BSS2
t=1
BSS3
t=2
802.11 Link Layer Protocol
Architecture
IEEE 802.11 MAC
802.11b Physical sublayer
1 Mbps PHY
(DBPSK)
2 Mbps PHY
(DQPSK)
5.5 Mbps PHY
(DBPSK/CCK)
11 Mbps PHY
(DQPSK/CCK)
802.11 Link or MAC-Layer
Frame Format
MAC header
bytes:
2
2
FC D/I
MSDU
6
6
6
2
6
2
0 to 2304
4
Address-1
Address-2
Address-3
SC
Address-4
QC
Data
FCS
MSDU = MAC Service Data Unit
FC = Frame control
D/I = Duration/Connection ID
SC = Sequence control
QC = QoS control
FCS = Frame check sequence
(a)
bits:
2
2
4
Protocol
version
Type
Type
1
1
1
To From
MF
DS DS
1
1
RT
PM MD
DS = Distribution system
MF = More fragments
RT = Retry
PM = Power management
1
1
1
W
O
MD = More data
W = Wired equivalent privacy (WEP) bit
O = Order
(b)
802.11 physical-layer frame:
Physical-layer preamble
144 bits
Synchronization
128 bits
SFD
16 bits
Physical protocol data unit (PPDU)
Physical-layer header
48 bits
Signal Service
8 bits
8 bits
MAC-layer frame (payload)
(variable)
Length
16 bits
CRC
16 bits
shown above
in part (a)
SFD = start frame delimiter
802.11 PHY Frame
(Long PPDU format)
Physical-layer preamble (long format)
Synchronization (128bits)
Physical-layer header
SFD (16 bits)
Signal (8 bits)
HEC (16 bits)
Payload
Length (16 bits)
(variable)
Service (8 bits)
PPDU = PLCP protocol data unit
PLCP = physical (PHY) layer convergence procedure
SFD = start frame delimiter
802.11 Address Fields
B
A
TA
SA
C
D
RA
DA
[Address-1]
RA = Immediate recipient of the current frame
(C)
[Address-2]
TA = Transmitter which transmitted the current frame (B)
[Address-3]
SA = Original source
(A)
[Address-4]
DA = Original destination
(D)
802.11 Protocol Architecture
802.11 MAC
802.11
FHSS
802.11
DSSS
802.11a
OFDM
802.11b
DSSS
802.11 Interframe Spaces (1)
CSMA / CA
Collision Avoidance
DIFS
PIFS
SIFS
Busy
Contention
period
.....
Frame transmission
Backoff
slots
Defer access
Select slot using binary exponential backoff
Time
802.11 Interframe Spaces (2)
DIFS
PIFS
SIFS
Busy
Contention
period
Frame transmission
.....
Backoff
slots
Defer access
Time
Select slot using binary exponential backoff
EIFS definition:
A station ready to transmit enters EIFS after detecting a corrupted frame
Busy
EIFS
detected a corrupted frame
Backoff
Frame transmission
IEEE 802.11b System Parameters
Parameter
Slot time
SIFS
DIFS
EIFS
Value for 1 Mbps channel bit rate
20 sec
10 sec
50 sec
(DIFS = SIFS + 2 × Slot time)
SIFS + PHY-preamble + PHY-header + ACK + DIFS = 364 sec
CWmin
CWmax
PHY-preamble
PHY-header
MAC data header
32
(minimum contention window size)
1024
(maximum contention window size)
144 bits (144 sec)
48 bits (48 sec)
28 bytes = 224 bits
ACK
14 bytes + PHY-preamble + PHY-header = 304 bits (304 sec)
RTS
20 bytes + PHY-preamble + PHY-header = 352 bits (352 sec)
CTS
14 bytes + PHY-preamble + PHY-header = 304 bits (304 sec)
MTU*
Adjustable, up to 2304 bytes for frame body before encryption
802.11 Basic Transmission Mode
Sender
Time
Data
4 3 2 1 0
Busy
Receive data
SIFS
Busy
DIFS Backoff
ACK
Receiver
Busy
DIFS Backoff
Another station
9 8 7 6 5
Suspend countdown and defer access
DIFS
Resume
countdown
after deferral
6 5 4 3
New packet /
802.11 Protocol State Diagram –
Sender
Sense
Idle / Wait for
DIFS
Idle /
Sense
Busy /
Send
ACK error-free /
End
ACK in error /
Busy /
Wait for
EIFS
Timeout /
(a)
1
Increase CW &
Attempt count
1
attempts 
max-attempts /
Abort
attempts 
max-attempts /
backoff == 0 /
Set
backoff
Wait for end of
transmission
Wait for
DIFS
Idle /
Sense
Busy /
Countdown
backoff  backoff  1
backoff  0 /
1
802.11 Protocol State Diagram –
Receiver
Receive
Packet error-free /
Wait for
SIFS
Packet in error /
(b)
Wait for
EIFS
Send
ACK
End
Examples of Timing Diagrams
for IEEE 802.11
1. A single station has two frames ready for
transmission on an idle channel.
2. A single station has one frame ready for
transmission on a busy channel. The
acknowledgement for the frame is corrupted
during the first transmission.
3. A single station has one frame ready for
transmission on a busy channel. The data frame is
corrupted during the first transmission.
802.11 Timing Diagrams
(a) Timing of successful frame transmissions under the DCF:
Packet arrival,
channel idle
DIFS
DIFS
Frame-1
Backoff
Time
Frame-2
ACK
(no backoff)
ACK
SIFS
SIFS
(b) Frame retransmission due to ACK failure:
(retransmission)
Busy
DIFS
Backoff
EIFS
Frame-1
Backoff
Frame-1
ACK
ACK
SIFS
SIFS
(c) Frame retransmission due to an erroneous data frame reception:
(retransmission)
Busy
DIFS
Backoff
Frame-1
ACK Timeout
Backoff
Frame-1
ACK
SIFS
RTS/CTS for Hidden Stations
(a)
A transmits Request-to-Send N bytes to B
(b)
B responds with Clear-to-Send N bytes
RTS(N-bytes)
A
B
C
A
B
C
CTS(N-bytes)
C listens but cannot hear A’s transmission
both A and C hear B’s transmission
A transmits N-bytes long data frame to B
N-bytes frame
A
B
C
Defer(N-bytes)
(c)
“I should be
quiet for N-byte
duration of
transmission”
RTS
Time
Data
4 3 2 1 0
SIFS
Sender
Busy
SIFS
Busy
DIFS Backoff
SIFS
RTS/CTS Transmission Mode
CTS
ACK
Receiver
NAV (Data)
NAV (CTS)
Busy
DIFS Backoff
Covered Station
Busy
DIFS
NAV (RTS)
8 7 6 5 4
Backoff
Access to medium deferred for NAV(RTS)
Hidden Station
Access to medium deferred for NAV(CTS)
Topic:
Quality of Service (QoS)
 Introduction & Prospects
 Network Neutrality Debate
Network Conceptual Model
Capture:
Transport:
Playout:
Network
Network
signals
packets
packets reordered, lost,
or variably delayed
Players and Parameters
SOURCE:
 Source information rate
 Statistical characteristics
(1) Reserved-resources path:
 Guaranteed delay bound
 Guaranteed loss rate
NETWORK:
 Available capacity/bandwidth
 Variable traffic load (usage)
 Hardware & software failures
RECEIVER:
 Delay/timeliness constraints
 Information loss tolerance
(2) Priority treatment at router:
 Reduced waiting in queue
(expedited forwarding)
 Reduced packet loss if
memory space overbooked
Network Conceptual Model (2)
Network
Network
We don’t know when sources will start/end their sessions; also for some types of data (video), datarate is variable
Download