Post on 30-May-2022
1Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Engineering Overview
of Computer Networking
2Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
What is Computer Networking?Logical separation of tasks in digital systems
Data exchange between computation unitsCommunication:Local operations (ALU, load, store, branch, OS, …)Computation:
Local computationRequest information
Receive informationLocal computation
Accept requestProcess requestLocal computationSend response
communication
communication
3Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Physical Transmission Serial data rate at physical layer
Bits per second = bps = b/sBytes per second = B/s1 B/s = 8 b/s
Capacity (bandwidth)Maximum data rate on mediumFixed by transmitter / medium / receiverLimits
Speed of circuitsSignal to noise ratio (SNR)
01
4Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Physical Transmission Throughput
Takes account ofUtilization = % time transmitter sendingErrors re-transmission more data on same capacityDelays less data received on same capacity
2 3 1 4
utilization = 11 / 16 = 68.75%througput = 10 / 16 = 62.5%
0 16
1
bit errors
bits received
error-free data received per secondthroughputcapacity
5Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Baud Rate
SymbolPhysical signal that encodes bits
Symbol rate (Baud rate)Symbols transmitted per second
Bit transmission rateBits transmitted per second = (symbols / second) (bits / symbol)
ExamplePulse amplitude modulation (PAM)Define 2N electrical levels from 0 to 11…1Each symbol (level) transmits N data bits
0001
1011
N = 2 (4 Level) PAM1.00 V
0.50 V0.75 V
0.25 V
Symbols per second
6Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Baud Rate
33 kbps dial-up modemDefine 210 = 1024 electrical symbols (max for SNR on phone line)Baud rate = 3300 symbols / second
Bits transmitted per secondData rate = (3300 symbols / second) (10 bits / symbol)
= 33,000 bps
0000000000
00000000010000000010
1111111111
N = 10 (1024 Level) PAM
...
Symbols per second
7Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Modeling InformationInformation
Set of possible answers (outcomes) to questions (tests)Finite set (yes/no, day of week, 256 pixel colors, etc)Infinite set ("Guess what happened today!")
Communication — transmission of symbol to receiverBefore transmission receiver has limited knowledge of symbol
Permitted range of symbols (universe of outcomes)Statistical distribution of symbols within range
After transmission receiver has better knowledge of outcomeReceiver tests message to decides on most likely symbol (outcome)Decision accuracy limited by noise
NoiseInterference, rounding-off errors, resolution of detector, etc.Communication does not determine unique outcome
8Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Modeling NoiseReceiver detects
Signal from transmitterNoise sources
Other transmittersResolution errorsElectrical cables and devicesLightening
Input Electrical current or voltageSum of Signal and Noise
Transmitter Receiver
Signal
Noise
Input = Isignal + Inoise
9Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Signal and Noise Inputs in 2‐Level Transmission
1 1 0 0 1 0 1 0 1 0 0 0
time0 2 3 4 5 6 7 8 9 10 11 12
AT
time
0 time
AA/2
Binary 2 level transmission
22 2 20noise noise noise noiseI I I I
2 21 12 2signal signalI A I A
Gaussian additive noise
DecisionSignal < A / 2 binary 0 Signal > A / 2 binary 1
Received signal = faded transmission + added noise
Signal to Noise Ratio
2 2
22 2signal
noise
I ASNRI
10Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Probability of Error in 2 Level Transmission
2 22 2
22 2
2 22
| 0 0 |1 11 1| 0 |12 2
1 | 0 |1212 2 2
1 1 12 2 2
1 11 erf 12 22 2
error error error
error error
error error
noise noise
AI I
A
P P P P P
P P
P P
A AP I P I
e dI e dI
A
2
2 2
2 2
0
1 1 12erf 1 erf2 2 2
1 1 21 erf erf2 2
,
signal
noise
xy
A I
I
SNR x e dy
4
113
1 0.24
25 2.1 10
1023 1.2 10
error
error
error
SNR P
SNR P
SNR P
11Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Quantifying InformationSet of possible outcomes (received symbols)
K = 2k different symbolsSymbol label = k-bit binary integers
Communication contentOne symbol of K possible symbolsOne label: k = log2 K bits
Information RatesSystem transmits one symbol in seconds
Shannon's theorem
b
W
= (W symbols / second) (k bits / symbol)= W k bits / second= W log2 K bps
Bit rate
= (1/) symbols / secondBaud rate
21 log 1maximum Maximum CapacityK SNR W SNR
12Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Shannon's Theorem — Examples Average signal power = average noise power
V.34 modemCapacity (Bit Rate) = 33,000 bps Symbol rate W = 3,300 Hz
2 2log 1 log 1 1Capacity W SNR W W
2
102
log 1
log 1 10 2 1
33,000 3,300
Required 1023 SNR
SNR SNR
13Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Probability of Error in DSSSDirect Sequence Spread Spectrum (DSSS)
Encode 1 data bit as an m-bit "chip" sequence 1 data bit error m/2 bit errors in one chip
bit = 8 Chips
Bit 1
Bit 0
14Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
DSSS Lowers Probability of Error
2
2
/ 2
/ 2 / 2 1
1
/ 2
bit error at least chip errors
chip errors chip errors
chip error chip error
chip error
m k m k
mk
m
P P m
P m P m
mP P
k
mP
m
2
4 42 2 6
810
810 1 10 ... 10
4
bits per chipchip error
bit error
mP
P
Example
15Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Inter‐Symbol Interference
Transmitted signal undergoes multipath delayReceived signal is sum of delayed contributions
Inter-Symbol Interference (ISI)Interference caused by overlap between sequential bitsCauses bit errors
Jitter Delay varies from bit to bitDifficult to determine proper sampling clock
T1
T3 > T2 > T1
T2 > T10 1 0
16Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Data Concentration High capacity link
No single node can utilize link capacityExample
Optical fiber cable with 4 fibers at 25 Gbps = 100 Gbps
Multiplexing Combine multiple nodes onto one linkExample
Optical fiber with 25 Gbps data rateCombine 25 nodes transmitting at 1 Gbps
25 inputsat 1 Gb/s
1 output at25 Gb/s
Multiplexor
17Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Multiplexing MethodsFrequency Division Multiplexing (FDM)
Divide available frequencies (bandwidth) among nodesNodes transmit simultaneously on different frequencies
ExampleFM radio uses 88 MHz to 108 MHz = 20 MHz bandwidthDivide 20 MHz into 100 channels = 200 kHz per FM channel
88 91.3 93.9 95.5 96.6 97.8 101 104.8 MHz88 מוסיקה צ"גל ' ב צ"גל ' ג ירושלים ' ד
18Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Multiplexing MethodsTime Division Multiplexing (TDM)
Divide capacity into time slotsNode transmits in assigned time slot
ExampleE1 digital line transmits at 2048 kbpsDivide 2048 kbps line into 32 time slots = 64 kbps per node
32 x 64 kbps = 2048 kbps = 2.048 Mbps
32 inputsat 64 kbps
1 output at2.048 Mbps
Multiplexor
32 outputsat 64 kbps
1 input at2.048 Mbps
Demultiplexor
19Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
E1 Multiplex
1125 s/sample
8000 samples/second
32 inputsat
8000samples/sec
1 output at32 x 8000 x 8 bps = 2.048 Mbps
byte from line 0
byte from line 1
byte from line 2
byte from line 31
0 1 2 ... 31
125 s
Every 125 sec multiplexor (MUX) receives 8‐bit sample from each line
(isochronous)
125 sec/frame3.91 sec/sample
32 samples/frame
20Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Cellular telephoneMixed Multiplexing
Time Division Multiple Access (TDMA)Used on GSM (2G) and UMTS (3G) phonesCombines FDM and TDM
Frequency Division Multiplexing (FDM)GSM bands = 25 MHzDivide 25 MHz into 125 channels = 200 kHz per channelTransmit 270 kbps over 200 kHz channel
Time Division Multiplexing (TDM)Divide 270 kbps into 8 times slots = 33 kbps per user33 kbps = 23 kbps for voice + 10 kbps control
21Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Data Statistics — CBRConstant Bit Rate (CBR)
Isochronous data Equal time interval between bitsBits per second = constant
Average data rateAverage data rate = peak data rate = minimum data rate
ExampleUncompressed digital audioSample analog signal every T seconds Round-off sample to n-bit numberDigital audio stream at n / T bps
22Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Multiplexing StatisticsDeterministic multiplexing (CBR)
N Nodes = N time slotsNode reserves fixed time slot
Guaranteed transmission capacityNode transmits in assigned time slot
Example
N Nodesassigned
fixedtime slot
DeterministicMultiplexor
N time slots at B bps
N x B bps
39.81312 Gbps256 x E4STM‐256
9.95328 Gbps64 x E4STM‐64
SDHPDH
2.48832 Gbps
622.08 Mbps
155.52 Mbps
51.84 Mbps
16 x E4
4 x E4
E4
21 x E1
STM‐16
STM‐4
STM‐1
STM‐0
139.264 Mbps4 x E3E4
34.368 Mbps4 x E2E3
8.448 Mbps4 x E1E2
2.048 Mbps32 x DS0E1
23Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Data Statistics — VBR Variable Bit Rate (VBR)
Bursty dataPeak data rate B > average data rate Assume packets are independent (Poisson statistics)
ExampleData sent by time-of-day client
Request time (1000 bits) once every hour (3600 seconds)Average data rate = 1000 bits / 3600 seconds = 0.28 bps
Peak data rate = 55 Mbps on 802.11g WiFiPeak data rate B = 55 Mbps > average data rate = 0.28 bps
, ,
, ,!
kT
P k T kT
TP k T e
k
probability of bits arriving
in seconds when average rate =
1 0.280.28, , 0.28 0.21
1!P e 1 bit 1 second
24Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Multiplexing StatisticsStatistical multiplexing (VBR)
M nodes > N time slotsBursty data
Average data rate < peak data rate BAverage traffic = M x < capacity = N x B
Actual traffic < capacity OKActual traffic > capacity data delayed or lost
Example Internet routers
M Nodesrequest
time slots
StatisticalMultiplexor
M > N time slots at B bps
N x B bps
25Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
SwitchingSwitch
Multiplexor + DemultiplexorData at input_porti output portji,j = 0, 1, 2, ... , N - 1
Example
N inputs x B bps= N x B bps
N outputs x B bps= N x B bps
Capacity = C bps
switch
1
2
3
4 1
2
3
4
26Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Circuit Switching — Circuit Mode ConnectionDeterministic multiplexing
Capacity C = N BDedicated (reserved) link
input_porti output portjNo competition (M nodes = N time slots)Guaranteed capacity B — if used or not
ExampleBezeq phone call64 kbps from telephone to telephone (even if no one speaks)
N inputs x B bps= N x B bps
N outputs x B bps= N x B bps
Capacity = C bps
switch
27Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Packet Switching — Packet Mode ConnectionStatistical multiplexing
Capacity C = N B < total possible demand = M B Dynamical time slot assignment (on request)
input_porti output portjCompetition
More ports than capacity (M > N)Demand > capacity delay
ExampleInternet routerPacket queue — first come first served
N inputs x B bps= N x B bps
N outputs x B bps= N x B bps
Capacity = C bps
switch
28Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Message Delay
Transmission delay TTTT = Time to inject bits into line = (bits in packet) / (bits per second)
Processing delay TprocPacket processing time in intermediate node
Propagation delay TpropTprop = (length of cable) / (signal speed)
Queuing delay TQTime packet waits in buffer for previous packets (congestion)TQ = (service time per packet) (packets waiting in buffer + 1)
Example: 1000 Mb / 100 Mbps = 10 sec
Example: 4 km / (2 108 km/s) = 2 10-8 sec << 10 sec
TT TpropTQ NodeTprocNode
29Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Example of Queuing Delay
Queuing delay TQPackets waiting in buffer = utilization / (1 – utilization)TQ = (service time per packet) / (1 – utilization)
Queuing delay exampleService time per packet = 10 ms / packet
Service rate = 100 packets / secondAverage traffic = S = 85 packets / second
Utilization = (85 packets / second) / (100 packets / second) = 0.85Buffer level = 0.85 / (1 – 0.85) = 5.7
TQ = (10 ms / packet) / (1 – 0.85) = 67 msSwitch capacity C = 100 packets / second
Demand > 100 buffer overflow excess delay
85
1 1 101
85 0.05! !
demand demand k k
S
k C k C k
SP C P k e ek k
TT TpropTQ NodeTprocNode
30Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Error ControlBit error
Data 1 received as 0 or data 0 received as 1
Packet LossCongestion or buffer overflow packet discarded
Error detectionError correction code / redundancy code / checksumChecksum transmitted with data in header / trailerReceiver compares independent hash with transmitted code
Error controlRequired
Discard corrupt packetOptional
Retransmit discarded / missing packets
bit errors in received dataBit Error Rate (BER)
bits in received data
packets lostPacket loss rate
packets transmitted
31Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Flow Control and Congestion ControlFlow control
Sender avoids overflow of receiver bufferCongestion control
All senders avoid overflow of intermediate network buffersBuffer arrival rate
Bytes / second arriving from networkBuffer empty rate
Bytes / second leaving to network or application layerBuffer file time
Example
Full
EmptyArriving bytes
Leaving bytes
overflowbuffer size
Tbuffer arrival rate buffer empty rate
overflow
64 KB 64 KBT 16 seconds
8 KB/sec 4 KB/sec 4 KB/sec
32Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Congestion Control
AssumptionsData packets arrive independently (Poisson statistics)
Random length (bytes)Average arrival rate in steady state
Data packets leave independently (Poisson statistics)Average emptying rate in steady state
Results
Queuing theory
arrival rateUtilization
empty rate
1 1 1Latency
empty rate arrival rate empty rate 1
Buffer Level Latency arrival rate1 0
2
4
6
8
10
12
14
16
18
20
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Utilization
latencybuffer level
33Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Congestion Control
(Over)-simplified throughput model
Realistic throughput behaviorHigh arrival rate at bufferLonger latency + overflowSender timeoutsRe-transmit more segments higher arrival rate at buffer
Buffer throughput
1
buffer utilization(from all senders)
latency
buffer utilization(from all senders)
latency
1
throughput at receivers
1
1
receive rate
throughtputmaximum receive rate
arrival ratebuffer utilization
empty rate
throughput at receivers
34Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Infrastructure layers
Physical layer (PHY)Physical transmission of bits
Data Link layer (DL)Management of PHYMake physical technology do what we want
Infrastructure managementDelivering data messages — 10% of effortMaking hardware work correctly — 90% of effort
OAM = Operations+Administration+MaintenanceApplication assumes infrastructure "just works""Just works"
Reliability, availability, stability, serviceability, growth
Data Link
physical bits
35Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Layered Protocol ModelLayered communication
Communication task divided into layersProtocol stack
Specific peer-to-peer protocol defined at each layerLayer n protocol
Performs VIRTUAL COMMUNICATION between layer n peers Processes only layer n informationPasses request to layer n – 1 for communication serviceReceives response from layer n – 1
Layer 1
…
Layer n – 2
Layer n – 1
Layer n
Layer 1
…
Layer n – 2
Layer n – 1
Layer n Layer n protocolVirtual peer transaction
Layer 1 protocolPhysical peer transaction
ServiceTransactions Layer n – 2 protocol
Virtual peer transaction
36Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Encapsulation — Protocol HeadersLayer n – 1 protocol
Receives service request from layer nRequest = message to layer n peer agent
Adds layer n – 1 HEADERHeader = message to layer n – 1 peer agent
Service Data Unit (SDU) at layer n – 1 Message received from layer nTreated as meaningless data by layer n – 1
Protocol Data Unit (PDU) at layer n – 1 Message sent by layer n – 1 protocolIncludes layer n – 1 SDU = layer n – 1 header + layer n PDU
Layer n – 1
Layer n
Layer n – 1
Layer n
Layer n – 1 SDU = Layer n PDULayer n –1 Header
Layer n PDU
Layer n – 1 PDU
37Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Functional Analysis of CommunicationOpen System Interconnection Model (OSI)
DescriptionFunctionLayer
Physical
Data Link
Network
Transport
Session
Presentation
Application
Data transmission between neighboring hardware agents on physical channels (electrical, optical, radio, …)1
Control of data transmission between neighboring hardware agents (one hop)2
End-to-end data routing between host nodes via multiple hops3
Reliable end-to-end data exchange between host nodesPrevents data loss, errors, repetitions, ordering errors4
Identification, separation, and continuity of multiple ongoing data transactions between software agents5
Syntax and semantics of exchanged data6
Exchange of data between user applications7
38Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet Functional Model
Physical
Data Link
Network
Transport
Session
Presentation
Application
OSI Function CommentInternet
LayerOSI
Layer
Infrastructure
Network
Transport
Application
1
Internet protocols do not discuss physical data transmission
2
End-to-end data routing as in OSI3
4
Internet session management can be:Reliable — with transport serviceUnreliable — without transport service
5
6Application provides presentation service and some session service (transactions)
7
Ref: http://tools.ietf.org/html/rfc4949
39Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet PDUsProtocol Data Unit (PDU)
Attachment Hardware Address
Network (IP) AddressPort
SocketIDPDUMessageLayer
Signal Frame
DatagramSegmentMessage
BitsHeader + Trailer
Header Header Data
PhysicalData LinkNetworkTransportApplication
T-DLApplication DataH-TH-NH-DL
Headers added by layers 2, 3, 4 Trailer
Host-to-host data framenetwork datagramtransport segment
EndpointNetwork Address + Port
40Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Data Link SublayersLogical Link Control (LLC) sublayer
Multiplexing of data sources / destinationsPacket type identificationError correctionFlow control
Medium Access (MAC) sublayerNetwork topologyMedium access management
Sharing medium among nodesPermission to transmit
Data frame structureHardware (MAC) addressingError detection
1
2MAC
Sublayer
Physical Layer
Data Link Layer
LLC Sublayer
41Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Data Link FunctionsSimilar to transport layer functions
FramingAssemble network PDUs into hardware packetsAttach header + trailer for Data Link and Physical layers
Medium access + flow control + congestion control When / how transmitter sends data onto linkTransmitter avoids overflow of receiver bufferTransmitters avoid interfering with other transmitters
Error controlDetect / correct transmission bit errors
Local addressingTransmit locally using hardware MAC addresses
Transport Reliability
Data LinkReliability
Data LinkReliability
42Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Medium Access SharingTime division
Each host granted full bandwidth in allocated time slotTime slot allocated deterministically or statistically
ExamplesDeterministic — telephone switchingStatistical — Ethernet, WiFi, …
Frequency divisionEach host granted partial bandwidth in all time slotsExamples
Commercial radio / TVBluetooth
Code divisionEach host granted full bandwidth in all time slotsEach host transmits using different coding schemeExample
Cellular CDMA
43Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Common Shared Medium Networks
ITU 2G / 3G cellular networkWireless code‐division access
CDMA / CDMA2000
ITU 2G / 3G cellular networkWireless time/frequency‐division access
GSM / UTMS
IEEE 802.16 metropolitan area networkWireless time/frequency‐division access
WiMAX
IEEE 802.15 personal area networkWireless frequency‐division access
Bluetooth
IEEE 802.11 local area networkWireless time‐division access
IEEE 802.3 local area networkWired time‐division access
WiFi
Ethernet
44Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Connection TypesConnection
State machine associated with data exchangeSet-up channel before data exchangeMonitor channel state during data exchangeMultiple transactions associated with connection stateClose channel after data exchange
Connection-orientedExample — phone call
Connection at application layerEnter number answer call extended conversation disconnect
ConnectionlessExample — email message
No connection at application layerSend email hope message arrives hope message is found / read
45Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
High‐Level Data Link Control (HDLC)Family of data link protocols
Based on IBM SDLC Layer 2 protocol in mainframe SNA Originally for communication between CPUs and peripherals
Link Access Protocol (LAP)Versions of HDLC used in public network architectures
SLIP, PPPInternet point‐to‐point
IEEE 802.2Ethernet Logical Link Control (LLC)
LAPDISDN
LAPFFrame Relay
LAPBX.25
46Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
HDLC Frame StructureGeneral HDLC frame
Address8 bit address 256 hardware addresses
Control fieldSpecifies frame type / control
01111110 Address Control data CRC 01111110
8 8 8 0 16 / 32 8
7 6 5 4 3 2 1 0
Information (data) 0 SEQ N(S) p/f NEXT N(R)
7 6 5 4 3 2 1 0
Supervisory (flow control) 1 0 type p/f NEXT N(R)
7 6 5 4 3 2 1 0
Unnumbered (management / connectionless) 1 1 type p/f subtype
47Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
HDLC Internet ProtocolsSerial Line Internet Protocol (SLIP)
RFC 1055 (old and rarely used)
Point-to-Point Protocol (PPP)Layer 2 protocol used between
Internet routersHost and Internet service provider (ISP)
Address = 11111111 = broadcastHDLC control = 11000000 = Unnumbered (connectionless data)Protocol
Protocol in data fieldNetwork protocol or link negotiation protocol (layer 2 control sublayer)
0xC0IP datagram with byte stuffing (C0 DB DC, DB DB DB)0xC0
01111110 11111111 11000000 Protocol Data CRC 01111110 8 8 8 8 or 16 0 16 / 32 8
48Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
PPP Protocol OptionsStandard network protocols
IP, IPX, AppleTalk, …Datagram in data field
Control sublayersLink Control Protocol (LCP)
PPP optionsHeader compression (remove control / address fields)Size of protocol / CRC fields and data
Test Terminate
Network Control Protocol (NCP)Network layer options
ProtocolAddressHeader compression (encode header fields)
Authentication (ISP user / password exchange)
01111110 11111111 11000000 Protocol Data CRC 01111110 8 8 8 8 or 16 0 16 / 32 8
49Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Ethernet Frame
4 bytes46 – 1500 bytes2 bytes6 bytes6 bytes1 byte7 bytes
CRCDataType or Length
SrcAddress
Dest AddressStartPreamble
IP = 0x0800 AppleTalk = 0x809BARP = 0x0806
Length of data field (<1500)Length
CRC‐32CRC
Code identifying protocol in data fieldUsed in most Ethernet systemsType codes > 1536 =0x600
Type
Hardware (MAC) address of node48‐bit MAC addresses assigned by OEM and fixed in hardwareBroadcast address FF:FF:FF:FF:FF:FF (frame read by all STAs)
Address
10101011Start
7 bytes of 10101010 for sync of receiversPreamble
50Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Ethernet Switch (Hub)Implements Ethernet medium access (MAC) protocol
Simplest layer 1 + 2 packet switch architectureFrame at input port output port by DEST address
Learning modeSRC address in frame associates MAC address with port number
1
2
3
4 1
2
3
4
N inputs x B bps= N x B bps
N outputs x B bps= N x B bps
Capacity = C bps
switch
Switch Fabric: typically C = N x B no blocking or buffering
51Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Asynchronous Transfer Mode (ATM)Complex layer 1 + 2 packet switch infrastructure
Path + Circuit SwitchingVPI — virtual path identifierVCI — virtual circuit identifier
Capacity2.5 Gbps (STM-16)
Small frames (cells) fast priority switching + low latency (delay)53 byte cell = 5 byte header + 48 byte data
GFC VPI
VPI VCI
VCI
VCI PTI CLP
HEC
PAYLOAD
PAYLOAD
8 bits
1
2
3
4
5
53
VPI
VPI VCI
VCI
VCI PTI CLP
HEC
PAYLOAD
PAYLOAD
8 bits
1
2
3
4
5
53
at User-to-Network Interface (UNI) at Network-to-Network Interface (NNI)
GFCGeneric Flow Control
PTIPayload Type Indicator
CLPCell Loss Priority
HECheader error check
52Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Virtual Path:Virtual CircuitPath = set of circuits
VCI 1
VCI 2
VCI 1
VCI 2
VPI 4 VPI 7
VCI 3
VCI 4
VPI 2
VCI 1VPI 3
VCI 1
VCI 2
VPI 4
VCI 1 VPI 8
VP
VP
physicaltransmission
path
VP
VP
VC
VC
VC
VC
53Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Quality of Service (QoS) ParametersService Level Agreement (SLA)
Defines parameters for each service flowService implemented in switching operations
Peak Cell Rate (PCR)Maximum instantaneous transmission rate
Sustained Cell Rate (SCR)Average transmission rate measured over time
Minimum Cell Rate (MCR) Minimum required cell rate
Cell Loss Ratio (CLR)Percentage of cells lost to error / congestion
Cell Transfer Delay (CTD)Total in system delay due to propagation + queuing + service delay
Cell Delay Variation (CDV)Variance of CTD (jitter)
Burst Tolerance (BT) Maximum burst size (cells) permitted at peak rate
54Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Quality of Service (QoS)
Traffic categoriesConstant Bit Rate (CBR)
Emulates isochronous circuit mode
Variable Bit Rate (VBR)Statistical multiplexingSpecified QoS parameters
Available Bit Rate (ABR) Cheaper statistical multiplexingNo guaranteed minimum loss or delay
Unspecified Bit Rate (UBR) Cheapest statistical multiplexingNo guaranteed QoS
55Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Protocol LayersATM Adaptation Layer (AAL)
Convergence sublayerSAP to higher layersProvides service specific functions
Segmentation And Reassembly (SAR) sublayerPackage higher layer data into / from ATM cellCell loss detection
ATM LayerAddressing / Switching QoS
7 Application Application 6 Presentation Presentation 5 Session Session 4 Transport Transport 3 Network ATM Switch Network 2a AAL AAL 2b ATM ATM ATM ATM 1 Physical Physical Physical Physical
56Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
ATM Adaptation Layer
SARSegmentation and Reassembly
messagehigher layer
AAL
convergencesublayer
AAL‐SDU
header payload trailer
SAR sublayer
SAR
header payload trailer
SAR‐PDU (48 bytes)
ATM Layer
header payload
ATM‐PDU (cell) (53 bytes)
57Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Connection‐Oriented RoutingNetwork of switches and links
Circuit switching or packet switching
Switched Virtual Circuit (SVC) Set-up / close messages carry source and destination addresses
Example
Packet routing by VC ID in header (layer 2 or layer 3)Every packet follows same VC route Example
AB
C
E
F
D
1
2 3
4
5
6
Set-up VC – 1: B 1 4 6 F
dataVC – 1
58Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Virtual Circuit LabelingSwitch topology
Mapping of node to interface numberExample
At Switch 1 Interface 1 = Node BInterface 2 = Node AInterface 3 = Switch 2
VC numberLabels src-to-dest pathAssigned at routersCan change at each switchExample
ATM network packet
Routing tableMapping between interface / VC pairs
A
B C
1
23 1 2
Switch 1 Switch 214
23 3442
59 72
Switch 1 Routing Table
422593141233593422233141
OutInVCIntfcVCIntfc
CRC DataPriorityType VCIVPI
59Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Connectionless RoutingNetwork of routers and links
Packet switching
Each datagramRouted individually through networkHas source and destination address in header
Data Link header or Network headerDatagrams may follow separate routesExample
B 1 4 6 FB 1 5 6 F
AB
C
E
F
D
1
2 3
4
5
6
datasrc = B dest = F
60Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Datagram ForwardingRouter topology
Mapping of node to interface numberExample
At Router 1 Interface 1 = Node BInterface 2 = Node AInterface 3 = Router 2
Node addressLabels nodeRouter handles next hopSrc + dest address in IP header
Routing tableMapping between dest addr and interface
A
B C
1
23 1 2
Router 1 Router 2
Switch 1 Routing Table
3other1B2A
OutInIntfcDest Addr Rangedataother fields destsrc
61Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet Protocol version 4 (IPv4)IP datagram format
16 bits8 bits4 bits4 bits
Data
Options
Destination IP Address
Source IP Address
Header ChecksumProtocolTime to Live
Fragment Offset (13 bits)FlagsIdentification
Total Length (header + data in bytes)Service TypeHlen Version
MF (More Fragments — all frags but last)DF (Don't Fragment)0FlagsOffset in 8‐byte units from start of original datagram (fragmented)Fragment Offset
Protocol of data carried by datagram (usually TCP or UDP)ProtocolRouters perform: {if (--TTL == 0) delete datagram}Time To Live (TTL)
Provides a unique ID to each datagramIdentification
Differentiated Services Code Point (DSCP)Explicit Congestion Notification (ECN)
Service type(see chapter 5)
Header length in 32‐bit multiples Hlen
62Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet address32-bit address Written as 4 octets (8-bit numbers in decimal) separated by dotsExample
www.hadassah.ac.il = 212.179.79.228
Networks / Subnets / HostsNetwork.Host
Network number = 212.179.79.0Host number = 228
Network.Subnet.HostSubnet 0 = 212.179.79.1 – 212.179.79.127Host address range = 212.179.79.X
X = 0xxxxxxx (binary)Subnet 1 = 212.179.79.128 – 212.179.79.254Host address range = 212.179.79.X
X = 1xxxxxxx (binary)
Internet Protocol version 4 (IPv4)IPv4 Addressing
63Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
3 main address classesA — small number of large networks (up to 224 = 16 Mhosts)C — large number of small networks (up to 28 = 256 hosts)
Internet Protocol version 4 (IPv4)Address classes
class octet 1 octet 2 octet 3 octet 4 network range
A 0 7 bits 8 bits 8 bits 8 bits 1.0.0.0 to 127.0.0.0
network host B 10 6 bits 8 bits 8 bits 8 bits 128.0.0.0 to
191.255.0.0 network host C 110 5 bits 8 bits 8 bits 8 bits 192.0.0.0 to
223.255.255.0 network host D 1110 4 bits 8 bits 8 bits 8 bits 240.0.0.0 to
247.255.255.255 multicast address
64Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Length of network number = 1, 2, 3, … , 31Not restricted to 7, 16, 24
Address formatOctet1.Octet2.Octet3.Octet4/bits_in_network_number
Examples Class A address — 10.0.1.5/8
8-bit network number = 10.0.1.0Class C address — 192.168.0.37/24
24-bit network number = 192.168.0.0General node address — 192.168.0.33/27
Network address = 192.168.0.32Host addresses 192.168.0.32 — 192.168.0.63
Internet Protocol version 4 (IPv4)Classless Inter‐Domain Routing (CIDR)
00001330168192
host27-bit network address001000000001010100011000000
65Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Forming subnet mask1 in all bits of network number0 in all bits of host numberEncodes same information as number of bits in network number
ExampleGeneral node address — 192.168.0.33/27
27-bit network numberMask
11111111.11111111.11111111.11100000255.255.255.224
Using maskMask AND IP address = network number
Example255.255.255.224 AND 192.168.0.33 = 192.168.0.32
Internet Protocol version 4 (IPv4)Subnet mask
66Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet Protocol version 4 (IPv4)Subnet example
subnet 0
194.30.5.1 194.30.5.2
194.30.5.33
194.30.5.35
194.30.5.34
subnet 1
194.30.5.3
194.30.5.65
194.30.5.66 194.30.5.67
subnet 2
194.30.5.99
194.30.5.97
194.30.5.98
subnet 3
194.30.5.129
194.30.5.130 194.30.5.131
subnet 4
194.30.5.32/27255.255.255.224
194.30.5.0/27255.255.255.224
194.30.5.64/27255.255.255.224
194.30.5.128/27255.255.255.224
Octet4 = 3-bit_subnet _number.5-bit_host_number
67Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet Protocol version 4 (IPv4)Reserved addresses
Reserved240.0.0.0/4
Multicast (Class D)224.0.0.0/4
Private network192.168.0.0/16
Private network172.16.0.0/12
Loopback (destination = this node)127.0.0.0/8
Private network10.0.0.0/8
Current network (source address)0.0.0.0/8
DescriptionCIDR address block
Broadcast on CIDR networkIP address = octet1.octet2.octet3.octet4/nw_bits
Network number = MASK AND IP Broadcast = MASK' OR IP
MASK 32 – nw_bitsnw_bits00...011...1
MASK' 32 – nw_bitsnw_bits11...100...0
68Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet RoutingAutonomous System (AS)
Nodes managed by one organizationHierarchical routing
Interior Gateway Protocols (IGP) Routing protocols within one AS (Intra-AS)
Exterior Gateway Protocols (EGP)Routing protocols between ASs (Inter-AS)
Edge router (gateway router)Router within AS linked to router in different AS
AS‐1AS‐2Edge Routers
IGP IGPEGP
AS‐3
IGP
69Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Relationship of Protocol LayersTypical network
Application Application 16‐bit
TCP Port 16‐bit TCP Port
32‐bit IP Address 32‐bit
IP Address 32‐bit
IP Address 32‐bit IP Address
32‐bit IP Address 32‐bit
IP Address 48‐bit
Ethernet Address
48‐bit
Ethernet Address
PPP PPP 48‐bit
Ethernet Address
48‐bit
Ethernet Address
Ethernet (PHY) Ethernet
(PHY) PHY PHY Ethernet (PHY) Ethernet
(PHY) Host Router Router Host
Locate router by IP address(uses default gateway)
Send to router by MAC addressEthernet always uses source / destination Ethernet addresses — not IP addresses
Host finds MAC address for router using an address resolution protocol (ARP)
Point‐to‐point Locate host by IP addressSend to host by MAC address
70Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Network Address Translation (NAT)Router
Receives IP datagram Exchanges IP source / destination address in headerForwards datagramMaintains list of translations
Autonomous systemsAllocate private network addresses internally
10.0.0.0 and 192.168.0.0Only gateway and backbone devices require unique IP addresses
Local nodes on AS re-use private addressesExample
10.0.0.110.0.0.2
10.0.0.3 109.65.228.42
209.85.229.147
138.76.29.7
10.0.0.1
10.0.0.2
10.0.0.3
71Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Network Address Translation (NAT)
No translation required on traffic internal to ASLocal addresses = real IP addresses
Local node to external nodeOutgoing packet
Source endpoint = local IP address + application source port numberDest endpoint = remote IP address + well-known port number
Gateway router NAT Replaces
Local IP address with gateway IP address Local application source port with unique unused NAT port
Records mappingNAT source port local IP address + source port number
Forwards packetExternal node to local node
Gateway router replaces NAT port local IP + app source port
Translation details
72Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Host A HTTP request to Server SSource port = 1025 Source IP = 10.0.0.2Destination port = 80 Destination IP = 209.85.229.147
Outgoing NAT at Gateway router BSource port = 3745 Source IP = 109.65.228.42Destination port = 80 Destination IP = 209.85.229.147
Server S HTTP response to Host ASource port = 80 Source IP = 209.85.229.147Destination port = 3745 Destination IP = 109.65.228.42
Incoming NAT at Gateway router BSource port = 80 Source IP = 209.85.229.147Destination port = 1025 Destination IP = 10.0.0.2
Network Address Translation (NAT)Example
10.0.0.110.0.0.2
10.0.0.3 109.65.228.42
209.85.229.147
138.76.29.7
10.0.0.1
10.0.0.2
10.0.0.3
Host AServer Srouter B
73Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
ProblemHow to operate service behind NAT
SolutionsStatic router referral
Define service port on Server QRefer all incoming traffic at gateway for service port to Server Q
Relay serverServer Q connects to Server E with public address (no NAT)Host M requests service from Server Q via Server E Server Q replies via Server E
Universal Plug and Play (UPnP)Specialized protocols for NAT traversal
Network Address Translation (NAT)Traversal problem
10.0.0.110.0.0.2
10.0.0.3 109.65.228.42
209.85.229.147
138.76.29.7
10.0.0.1
10.0.0.2
138.76.29.18
Host M
Server Q Server E
74Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Quality of Service (QoS) Network parameters
Bit error rate (BER)< 10-9 on fiber optic cable< 10-3 on wireless
Packet loss rateDepends on congestion control policy
Error control
Dynamic variations inData rate / propagation delay (jitter) TtransQueuing delay TQProcessing delay Tproc
Delay variation
End-to-end transmission time for one bitHigh data rate lower transmission delay TtransCongestion / priority longer queuing delay TQDatagram service longer processing delay Tproc
Delay
Physical transmission speed in bpsData rate
75Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
QoS and Network PoliciesData Rate
DelayTimeDelay
Variation
ErrorControl
TransmissionSpeed
AccessDelay
CongestionControl
PriorityControl
ConnectionType
76Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
QoS Requirements for Various Services
Service Speed Error Control Delay Delay
Variation
e‐mail — good — —
file transfer
NFS
database access
reasonable maximum reasonable reasonable
voice fast good very small very small
video
real time control very fast good very small very small
77Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet Transport Layer ConnectionsReliable transport (TCP)
Connection-orientedTCP connection established before data transfer
Error-free deliveryData delivered
In original order No errors, duplications, omissions
Flow controlControl sender rate to prevent buffer overflow in receiver
Congestion controlControl sender rate to prevent buffer overflow in network
Unreliable transport (UDP)Connectionless Lower overhead faster but no guarantees Segments with errors discarded with no warning to application
78Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Transport Layer —QoS Trade‐Off
Reliable TransportGenerally preferred when possible
Unreliable TransportUsed when
Some data loss tolerable Delay or jitter intolerableExample — video delivery
Datagram StreamSocket type
None Error correction, packet ordering, congestion control, session state
managementProcessing overhead
Connectionless Connection-orientedConnection No error correction Error-freeError control
UDPTCPProtocolUnreliable TransportReliable Transport
79Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Source / Destination PortsClient
Opens socket to send requestsClient / OS binds port number to socket
1024 client port 65,535 identifies client applicationServer
Opens listen socket mapped to accept sockets for requestsBinds well-known port to service socket
0 well-known port 1023 identifies service application
Transport
Client ApplicationBind socket to port 1025Connect to port 80
Transport
Server ApplicationBind socket to service port 80Accept from 1025
Requestsrc: 1025 dest: 80
Responsesrc: 80 dest: 1025
80Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Multiplexing / DemultiplexingApplications send / receive data on sockets
Multiple sockets multiple conversationsTransport layer segment
Transport header + application data (PDU)TCP / UDP headers carry source + destination ports
Multiplexing / demultiplexingSegments transmitted on same infrastructure Sorted by destination port at destination
Transport
Client Applications
Transport
Server Application
1025 80
10261025 80
1026 80
1025 80 1026 80
1025 80
1025 80
1026 80
1026 80
1025 801026 80
1025 801026 80
81Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
User Datagram Protocol (UDP)Internet unreliable transport protocol
Defined in RFC 768Used when low delay / jitter more important than error controlStreaming multimedia, multiplayer games, ...
UDP segment
UDP header
Length Number of bytes in UDP segment < 216 = 65,536Maximum length of data = 64 KB – lengths of all headers
application dataheader
checksumlength
destination portsource port
32 bits
82Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP Header
Options
urgent pointerchecksum
window sizeflagsnot usedHLEN
acknowledgement number (ACK)
sequence number (SEQ)
destination portsource port
32 bits
Options fields + padding for multiple of 32 bits10 – 320 bitsOptions
Offset from SEQ points to last urgent data byte16 bitsUrgent pointerNumber of bytes receiver can receive now16 bitsWindow sizeControl bits9 bitsFlags Not used3 bitsReserved Length of TCP header in 32-bit words4 bitsHLEN (data offset)
83Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP HeaderFlags
No more data from senderFIN
Synchronize sequence numbersSYN
Reset connectionRSTPush buffered data to receiving applicationPSHAcknowledgment field validACKUrgent pointer field validURG
ECN-EchoIf SYN = 1 peer is ECN capableIf SYN = 0 packet with Congestion Experienced flag in IP header received during normal transmission
ECE
Congestion Window Reduced (CWR) flag Sender indicates receiving segment with ECE flag setCWR
ECN-nonce concealment protectionNS
84Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP Connection Set‐up
Client SYN segment SYN flag = 1SEQ = random number xNo data
Server SYN-ACK segmentSYN flag = ACK flag = 1SEQ = random number yACK = x + 1No data
Client ACK segmentSYN flag = 0ACK flag = 1SEQ = random number x + 1ACK = y + 1May contain data
Three-way handshake
Client Server
SYN flag = 1ACK flag = 0SEQ = xACK = 0
SYN flag = 1
ACK flag = 1
SEQ = y
ACK = x + 1
SYN flag = 0ACK flag = 1SEQ = x +1ACK = y + 1data
Connection request(synchronize)
Accept
ACK
85Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Initial sequence number (ISN)Random SEQ in 3-way handshake
Prevents counterfeit segmentsAt end of handshake SEQ = ISN + 1
SEQ — byte sequencingSEQ = previous SEQ + length(data bytes in previous segment)
= ISN + 1 + data bytes sent in all previous segments
ACK — byte acknowledgementACK = next (expected) SEQACK = x + 1
Acknowledge x — now expect x+1
SEQ = x+501 ACK = y+1data = 400 bytes
TCP SEQ + ACK
Client Server
SEQ = y+1 ACK = x+501
First data segment after handshake
SEQ = y+1 ACK = x+901
SEQ = x+1 ACK = y+1data = 500 bytes
86Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Send and Receive WindowsSend buffer
Holds sent segments until ACKedOn timeout resend segments from send buffer
Send windowAvailable space in send buffer
Receive bufferHolds received segments until requested by application
Receive window Available space in receive buffer
Full
Send Window
SendingApplication
Network Layer
Send Buffer
Full
Receive Window
ReceivingApplication
Receive Buffer
87Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Simplified TCP Sender — 1// initialize
SEQ = ISN + 1SendBase = ISN + 1 // last byte ACKedInFlight = 0 // unACKed bytes sentRTO // timeout intervalSendWindow, RecvWindow // send & receive windows
// main loopif (new data from application)
Prepare data segmentsequence number for segment = SEQSEQ = SEQ + length(data)
if InFlight < min{SendWindow,RecvWindow)Pass segment to IP InFlight = InFlight + length(data)if !(timer running) timer = RTO
88Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Simplified TCP Sender — 2if (receive ACK = y)
stop timerif (y > SendBase)
newACKs = y – SendBase // bytes ACKedSendBase = yInFlight = InFlight – newACKs if (InFlight > 0) timer = RTO
if (timeout)SEQ = SendBase = min{unACKed SEQ}resendtimer = RTO
89Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Simplified TCP Receiver — 1// initialize
Set RecvWindow = receiver buffer sizeexpected = Sender ISN + 1ack_buffer = 0 // received unACKed segmentsack_max // delayed ACK triggerack_delay = 250 msec // local policy: < 500 msecStart ACK delay timer = ack_delay
if (ACK delay timer = 0 && ack_buffer > 0)Send ACK = expected with updated RecvWindowACK delay timer = ack_delayack_buffer = 0
90Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Simplified TCP Receiver — 2if (receive SEQ = x)
if (x = expected && error-free)expected = expected + length(data)if (NACK = 1)
Send ACK = expected with updated RecvWindowACK delay timer = ack_delayack_buffer = 0NACK = 0
else if (ack_buffer < ack_max)nextACK = expectedack_buffer++
else if (ack_buffer = ack_max)Send ACK = expected with updated RecvWindowACK delay timer = ack_delayack_buffer = 0
elseSend ACK = expected with updated RecvWindowACK delay timer = ack_delayNACK = 1
91Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP SEQ + ACK
Sender Receiver
ACK = 100
No errors
Timeo
utSEQ = 92 8 data bytes
ACK = 120
SEQ = 100 20 data bytes
ACK = 180
SEQ = 120 20 data bytes SEQ = 140 20 data bytes SEQ = 160 20 data bytes
SEQ = 180 20 data bytes
92Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP SEQ + ACK
Sender Receiver
ACK = 100
Bit errorsTimeo
ut
SEQ = 92 8 data bytes
ACK = 120
SEQ = 100 20 data bytes
ACK = 160
SEQ = 120 20 data bytes SEQ = 140 20 data bytes SEQ = 160 20 data bytes
SEQ = 160 20 data bytes
Corruptpacket
discarded
error
93Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP SEQ + ACK
Sender Receiver
SEQ = 92 8 data bytes
ACK = 100
Timeout
Timeo
ut
error
SEQ = 92 8 data bytes
SEQ = 100 20 data bytes
94Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP SEQ + ACK
Sender Receiver
ACK = 100
Lost ACKTimeo
ut
error
SEQ = 92 8 data bytes
SEQ = 100 20 data bytes
SEQ = 92 8 data bytes
ACK = 100
Receiver discards duplicate packet
95Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP SEQ + ACK
Sender Receiver
Missed ACKTimeo
ut SEQ = 100 20 data bytes
SEQ = 120 10 data bytes
SEQ = 92 8 data bytes
ACK = 100
ACK = 120
ACK = 120
SEQ = 92 8 data bytes Receiver discards duplicate packet
ACK 120 acknow
ledges all bytes <
120
96Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP SEQ + ACK
Sender Receiver
ACK = 100
Cumulative ACK
Timeo
ut
error
SEQ = 100 20 data bytes
SEQ = 120 10 data bytes
SEQ = 92 8 data bytes
ACK = 120
ACK all previous bytes
97Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
TCP Connection CloseSymmetric
Client or server may close connection
FIN segment SYN flag = 1SEQ = cumulative SEQ number
ACK segmentACK flag = 1ACK = SEQ + 1
FIN segmentFIN flag = 1SEQ' = cumulative SEQ number
ACK segmentACK flag = 1ACK = SEQ' + 1
Client Server
FIN flag = 1SEQ
FIN flag = 1
SEQ'
ACK flag = 1ACK SEQ'+1
ACK flag = 1
ACK SEQ+1
98Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Socket Calls — Between App and OSSocket, Bind
OS creates resources for network connectionOS returns to App socket descriptor (socket ID)
Listen Server OS makes service available
ConnectClient OS attempts connection to service
AcceptServer OS creates new connection socketServer OS returns new descriptor to AppListen socket continues to listen
SendApp sends data to OS, pointed at socketOS transmits data on associated connection
ReceiveApp requests data from OS socket bufferOS returns data to AppPHY
OS
App
call
return
SocketCalls
OSActivity
Socket ID points to OS resources
99Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Using UDPServerClient
Server UDP Agent
Perform checksum
ErrorDiscard segment
No errorPass data to socket by port
Application
Open socket
Bind service portListen on socketReceive data from listen socket
Client UDP Agent
Accept data
Add header with checksumSend to server
Application
Open socket
Send data on socket to endpoint (node address + service port)
If required — add reliability features at client / server application level
100Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
ConnectionServerClient
= socket(domain, type, protoc_ID col)
connect( , service_endpoc_ID int)
connection set‐up
address type service type = socket(domas_ in, type, protID ocol)
bind( , s_endpoint, s_endpoint_s_ID len)
s_IDlisten( , backlog)
= accept( , c_endpoint, endpoint_s s_ID len)
send( , data, len, s flags)
data
receive( , buffer, len, flc_ID ags)
bind( , c_endpoint, c_endpoint_c_ID len) If client skips bind()OS sets a default port
101Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Perl Server Socket Example#!/usr/bin/perl$flag = "1";use IO::Socket; $sock = IO::Socket::INET->new(
LocalHost => '127.0.0.1',LocalPort => 1234, Listen => 1, Reuse => 1, Proto => 'tcp') || die "Error creating socket\n";
$client = $sock->accept(); while($flag == "1") { $line = <$client>;print $line; print $client "Received\n"; if ($line =~ /bye/) {$flag = "0";}
} close($sock);
Server Prints data from client EchoesReceivedCloses on data bye
In CLI run perl script$perl servlet.pl
In second CLI enter:$telnet 127.0.0.1 1234Trying 127.0.0.1...Connected to 127.0.0.1.Escape character is '^]'.
LOOPBACK ADDRESS (for testing)127.0.0.1
Local calls on this machine
102Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Assistive Application Protocols used with IP LayerDomain Name System (DNS)
Convert between node name and network address
Address Resolution Protocol (ARP)Convert between network and hardware addressesDiscover local subnet topology
Dynamic Host Configuration Protocol (DHCP)IP address allocation on request from DHCP server
Server typically in gateway routerServer allocates IP address from pool of available addressesDHCP message types
DHCP server discovery (host broadcast)DHCP offer (server response)DHCP request (host request)DHCP ACK (server provides address)
103Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Domain Name System (DNS)
Local Node
NameCache
Resolverrequest
response
Resolver
Default Name Server
Foreign Name Server
request
response
Forwarder Higher in hierarchy
Address Resolution Hierarchy$ nslookup www.hadassah.ac.ilServer: 10.0.0.11Address: 10.0.0.11#53
Non-authoritative answer:www.hadassah.ac.il canonical name = hathi.hadassah.ac.ilName: hathi.hadassah.ac.ilAddress: 212.179.79.228
104Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Address Resolution Protocol (ARP)Look-up MAC address by IP address (RFC 826)
Q: Who has IP = a.b.c.d ? (MAC layer broadcast)A: I am IP = a.b.c.d with MAC = u:v:w:x:y:z
STAs store mappings in arp table
ARP packet fields
Target protocol addressTPA
Target hardware address (ignored in requests)THA
Sender protocol addressSPA
Sender hardware addressSHA
1= request / 2 = replyOperation
Protocol length — length in octets of network addressPLEN
Hardware length — length in octets of MAC addressHLEN
Protocol type — network protocolPTYPE
Hardware type —MAC protocolHTYPE
105Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Internet Control Message Protocol (ICMP)Control protocol
Network management informationError reporting
Unreachable host / network / port / protocolEcho request / replyPackets carried in IP datagrams
Packet structure
Rest of Header — message specificPadding — data field
Padding64
Rest of Header32
ChecksumCode (subtype)Type0
24 – 3116 – 238 – 150 – 7Offset
Selected Message Types
bad IP header012TTL expired011
router discovery010
route advertisement09
echo request08
dest host unknown7
dest network unknown6
dest port unreachable3
dest protocol unreachable2
dest host unreachable1
dest network unreachable0
3
echo reply00descriptionCodeType
106Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
PingClient application program
Client sends echo request packets to destination IP addressType = 8 Code = 0 16-bit ID number 16-bit sequence number
OS dependentLinux ping
Default = continuous packets with 56 padding bytes Windows ping.exe
Default = 4 packets with 32 padding bytes Ping server (OS service)
Responds to each echo request packet with echo rely packetType = 0 Code = 0 16-bit ID number 16-bit sequence number
Ping clientMeasures round trip time (RTT)Reports packet losses, RTTs and average RTT
UDP pingUses UDP instead of ICMP
107Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Ping Examplec:\>ping www.hadassah.ac.il
Pinging hathi.hadassah.ac.il [212.179.79.228] with 32 bytes of data:
Reply from 212.179.79.228: bytes=32 time=32ms TTL=119Reply from 212.179.79.228: bytes=32 time=70ms TTL=119Reply from 212.179.79.228: bytes=32 time=135ms TTL=119Reply from 212.179.79.228: bytes=32 time=83ms TTL=119
Ping statistics for 212.179.79.228:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:Minimum = 32ms, Maximum = 135ms, Average = 80ms
108Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Traceroute Client application program
Multiple echo request packets to destination IP addressFirst packet TTL = 1Each subsequent packet has TTL++
OS dependentLinux traceroute / tracepath
UDP to unlikely port number (port typically not defined)Windows tracert.exe
ICMP echo request packetsIntermediate routers
if (--TTL == 0){delete ; ICMP type 11 to client}ICMP packet carries router name + IP address
ICMP sequence = list of intermediate routers (hops = 1, 2, … )Destination node
UDP segment — ICMP port undefined (type 3 code 3) message ICMP packet — ICMP echo reply message
109Dr. Martin LandReviewProtocols and Networks — Hadassah College — Fall 2021
Traceroute Examplec:\>tracert www.hadassah.ac.il
Tracing route to hathi.hadassah.ac.il [212.179.79.228]over a maximum of 30 hops:
1 2 ms 1 ms 2 ms 10.0.0.1382 18 ms 19 ms 17 ms bzq-179-37-1.static.bezeqint.net [212.179.37.1]3 18 ms 17 ms 17 ms bzq-179-48-201.static.bezeqint.net [212.179.48.201]4 17 ms 17 ms 17 ms bzq-179-80-241.static.bezeqint.net [212.179.80.241]5 17 ms 18 ms 17 ms bzq-179-124-201.static.bezeqint.net [212.179.124.201]6 17 ms 17 ms 17 ms bzq-179-124-138.static.bezeqint.net [212.179.124.138]7 19 ms 18 ms 18 ms bzq-179-59-1.static.bezeqint.net [212.179.59.1]8 32 ms 36 ms 41 ms 10.20.110.189 105 ms 84 ms 71 ms bzq-179-79-228.static.bezeqint.net [212.179.79.228]
10 73 ms 88 ms 150 ms bzq-179-79-228.static.bezeqint.net [212.179.79.228]
Trace complete.
c:\>
1Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
AccessNetworking
Connecting the Userto the World
2Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Small Office / Home Office (SOHO)LAN (Local Area Network) to WAN (Wide Area Network)
Ethernet
WiFi
ADSL
WiFi Access PointEthernet Switch
IP RouterADSL Modem
Cable‐based transmission protocol defined at PHY layerG.992.5ADSL
802.11
802.3
Wireless LAN protocol defined at DATA LINK and PHY layersWiFi
Cable‐based LAN protocol defined at DATA LINK and PHY layersEthernet
Internet
3Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Laptop Browser to Web Server — Simplified View
Access
IP
ADSL
WiFi Router
WiFi
IP
ADSL
Access
IP
ServerInternetLaptop
PHYPHY
Data LinkData LinkWiFi
IPIPIP
TCPTCP
HTTPHTTP
4Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
ADSL — Asymmetric Digital Subscriber LineHigh speed transmission on standard voice line
POTS — plain old telephone service24 Mbps downstream3.3 Mbps upstream
Ref: JDSU, ADSL Technology, JDS Uniphase Corporation, 2005
5Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
ADSL Access Network
Ref: Vodaphone, Wholesale Layer2 DSL (W‐DSL‐L2I), VTCW011 ‐ I 03/13
6Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Typical Bezeq ATU‐R
ADSL33 Mbps
IP Routing
802.3Ethernet
802.11WiFi
7Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Bezeq Fast Internet Access
usermanagement
and IP datagramforwarding
IP datagramforwarding
Bezeq ISP
Internet routing
ADSL modem onpoint-to-point
channel
Server
IPnetwork
telephonenetwork
Client
switchedATM
network
8Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Fast Internet Protocols — Envisioned Campus CasePPP
Point to Point ProtocolLogon + connection management
PPPoEPPP over EthernetVirtual point‐to‐point connection over shared LANClient opens private session with ISP
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
Router
802.3
PPPoE
PPP
9Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Fast Internet Protocols — Envisioned Campus CaseATM
Asynchronous Transfer ModeData Link protocol for broadband
telephone servicesPermits real time QoS
MPOA + AAL5Adaptation protocols for ATM
ADSLPhysical bit transmission
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Router
802.3
PPPoE
PPP
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
10Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Fast Internet Protocols — Envisioned Campus Case
Connection to ISPClient runs Network Control Protocol (NCP) over PPPCHAP (challenge handshake authentication protocol) —User Name + PasswordISP authorizes user and engages IP forwarding
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Router
802.3
PPPoE
PPP
802.3802.3
PHY
PPPoE
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
802.3
PHY
PPPoE
PPP
ISP
Connection to ISP
11Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Fast Internet Protocols — Envisioned Campus Case
IP forwardingISP forwards IP datagrams to server via Internet backbone
Client
Ethernet
802.3
PPPoE
PPP
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
Router
802.3
PPPoE
PPP
802.3802.3
PHY
PPPoE
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
802.3
PHY
PPP
IP
PHY
PPPoE
PPP
ISP
PHY
Server
PPP
IP
TCP
App
Connection to ISPIP Routing
12Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Fast Internet Protocols — Typical SOHO Case
Router/modem initiates connection to ISPRuns NCP over PPP over PPPoE over EthernetRouter provides always‐on Internet access over WiFi + Ethernet
Client
WiFi
802.11
IP
TCP
App
802.3
ADSL
ATM
AAL5
MPOA
PPPoE
PPP
Router
WiFi
802.3802.3
PHY
PPPoE
ADSL
ATM
AAL5
MPOA
PPPoE
Bezeq
802.3
PHY
PPP
IP
PHY
PPPoE
PPP
ISP
PHY
Server
PPP
IP
TCP
App
Connection to ISPIP Routing
13Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Telephone Network Local loop (last mile)
Analog voice + dataVoice 64 kbps (DS0)
PDH / SDH digital hierarchyDS0 streams combined to hierarchy of data rates1.544 Mbps (T1) to 40 Gbps (STM-256)
ESS7Hierarchical tree of central office switches for DS0 streams
ATMGeneral packet switch mesh Switches 2.5 Gbps streams
(STM-16)
local loop
ESS ATM
Central Office
Router
local loop
ESS ATM
Central Office
Router
local loop
ESS ATM
Central Office
Router
14Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Digital Voice on Telco Telephone Sample analog voice signal every 0.125 ms
0.125 ms per voice sample 8000 voice samples / second
Round-off sample to 8-bit dataData {0, 1, 2, ... , 255}Sample = {158.276, 158.879, 159.724, 159.821, 159.312, 158.791}Data = {158, 159, 160, 160, 159, 159}
DS-0 stream(8000 samples / second) (8 bits / sample) = 64 kbps64 kbps digitized voice (no compression)
158 159160 160 159 159
157
158
159
160
161
t
15Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Data Concentration Multiplexing
Combine multiple nodes onto one link
32 inputsat 64 kbps
1 output at2.048 Mbps
Multiplexor
32 outputsat 64 kbps
1 input at2.048 Mbps
Demultiplexor
39.81312 Gbps256 x E4STM‐256
9.95328 Gbps64 x E4STM‐64
SDHPDH
2.48832 Gbps
622.08 Mbps
155.52 Mbps
51.84 Mbps
16 x E4
4 x E4
E4
21 x E1
STM‐16
STM‐4
STM‐1
STM‐0
139.264 Mbps4 x E3E4
34.368 Mbps4 x E2E3
8.448 Mbps4 x E1E2
2.048 Mbps32 x DS0E1
16Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Cellular NetworkWireless to base station — uses Telco network for WAN service
Base System (BS)
Telco VoiceNetwork
CellController
ClusterController
Mobile SwitchingCenter (MSC)
Public Land Mobile Network
Mobile Station(MS)
HLRVLR
CellCluster
GPRS
Internet
SGSN
GGSN
Voice
Data
17Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
3G Cellular Network
18Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Enormous investment in existing equipmentGlobal network of hardware nodes + transmission lines
Developed to provide many servicesInternet (IP-based unreliable connectionless) just one service
Most developed before Internet Telegraph — 1794Telephone — 1876Teletype modem — 1943Digital telephone — 1962Internet opened to public — 1992
Hardware updates Replacement of manufactured hardwareSlower than software updatesMore expensive than software updates
Network InfrastructureEconomic perspective
19Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Enterprise NetworksEnterprise
The word (ref: http://www.etymonline.com)Past participle of entreprendre — "undertake, take in hand" From Old French — entre "between" + prendre "to take"
The pose
Enterprise networkLarger + more complex + more expensive + more awesome than SOHOIntegrated LAN + WAN technologies
Traditionally implemented in specifically‐designed hardware systemsIncreasingly implemented as Software Defined Networks (SDN)
SecurityHigh overall traffic volume
20Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Traditional Network InfrastructureCisco Smart Business Architecture (SBA) Ref: WAN Design Overview, Cisco 2013
21Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Technologies in the Cisco SBA Conventional Layer 3 routing
Permits universal access to any host / nodeNext‐hop IP datagram forwarding
Conventional Layer 2 switching —N x N non‐blocking switchingPermits access to nodes on same physical networkEthernet MAC physical port‐to‐port switchingESS7 64 kbps voice telephone switchATM cell switching for switched and permanent virtual circuitsFrame Relay switching for permanent virtual circuits
PHY
Data Link
IP
PHY
Router
PHY
Data Link
IP
Next Hop by IP
PHY
Data Link
Next Hop by MAC or VC
NodeSwitchNode
PHYPHY
Data LinkData LinkData Link
IPIP
TCPTCP
HTTPHTTP
22Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Technologies in the Cisco SBAVirtual LAN (vLAN)
LAN switch configured to partition nodes into subnetsNo router needed for subnet partitions
Virtual Private Network (VPN)Private network implemented on public infrastructure
Router Network
Subnet Subnet
Internet
Private Network Private Network
Access Restricted by IP
Programmable Switch
23Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Technologies in the Cisco SBAMultiprotocol Label Switching (MPLS)
Label header added to IP datagramLabel identifies end-to-end routeImplements end-to-end virtual circuit
MPLS enabled router Next hop by MPLS labelFaster than next hop IP routing
Saves time of layer 3 processingDatagram read / write, routing, TTL
Switch / Router InteractionPermits vLAN and VPN definitionOptimizes multimedia streaming
Application TCP IP DL PHY
DL PHY
Application TCP IP DL PHY
DL PHY
DL PHY
DL PHY
24Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Technologies in the Cisco SBANexus 7000 Switch
100 Gbps Ethernet switchCopper or fiber access portsQoS control
Cut-through architecture (forward data without buffering)Low latency + jitter
Extensible through fabric extenders (FEX)Scalable to 15.76 Tbps (15,760 Gbps)
Supports virtual networking through MPLS
Nexus 2000Fabric extender (FEX)Add remote ports to Nexus 7000
Ref: http://www.cisco.com
25Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Technologies in the Cisco SBACisco XR 12000 Router
For large enterprises and service providers1280 Gbps capacityInternet protocols
IPv4/v6, MPLSBGPv4/v6, IS-IS, OSPFv2.0, RIPv2, IGMP, DVMRP, PIM DX/SX
Infrastructure protocolsSONET/SDH, Ethernet, ATM, copper (DS-3/E3)
Cisco 7600 RouterWAN router240 Gbps capacityInfrastructure — Telco leased lines DS0 to OC-192
Cisco 3900 RouterFor branch office4 Gigabit Ethernet ports
26Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Facts of Life for Telephone Business 2000 — 2008Enterprise
Business revolves around data center Access + storage + processing + service
Employees still talkMobility = standardVideo calls growing — voice calls still cost money
Network infrastructure providers (Telcos)Most installed infrastructure designed for voice callsProfit in leased lines not voice calls
Internet + private WAN + mobile backhaulStrategy
Scrap PSTNCash-in central office real estateBuild data-oriented mesh networkSupport voice as media streaming
local loop
ESS ATM
Central Office
Router
local loop
ESS ATM
Central Office
Router
Switching Hierarchy
27Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Next Generation Networks (NGN)ITU initiative for long-term network planning
Standardizes current view of technology convergenceITU-T Recommendation Y.2001 (12/2004)
All-IP networkEvery service over IPIP over every infrastructure
Universal gateway pointDissolve traditional service
boundariesUniversal mobilityEvery service to every user
QoS controlIPv6MPLSSIP
Every Service
Every Infrastructure
IP
Transport
Network
Physical
Data Link
Session
Presentation
Application
OSI Layer
28Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
What is Cloud Computing?Outsourcing service model
Replace user hardware/software with "computing as service"Service Level Agreement (SLA)
Defines service provided to userGuarantees performance and quality of serviceProvider handles operations+administration+maintenance (OAM)
Business advantagesEconomies of scale to large provider lower cost to userUser cuts labor/capital costs from balance sheet happy investors
Customers Pizza Online
X86 Server
Delivery
Customers Pizza Online Cloud Inc.
Delivery
Virtual X86
Service
29Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
What is Cloud Computing?Cloud service organized from conventional resources
User chooses service level agreement (SLA) from menuProvider offers menu
Mix of hardware + software + network typesSLA implemented with dedicated or virtual system
Dedicated systemConstructed to perform only one specific taskExample — WiFi access point
Virtual systemImplemented in software on a generic systemExample — Java code running on Java VM over Linux
Unique technological issuesService reliability — provider financially committed to SLAProvider-side — seeks minimum configuration cost for SLAUser-side — seeks minimum contract cost for requirements
30Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Service Hierarchy in Cloud ComputingInfrastructure as a service (IaaS)
User sees virtual hardware environment Real hardware or hypervisor / system virtual machine
User installs OS installs software runs jobs
Platform as a service (PaaS)User sees virtual OS environment
OS on single hardware platform or virtual OSUser installs software runs jobs
Software as a service (SaaS)User sees virtual application software environment
Applications running on private OS or "sandboxed" on shared OSSandbox — private execution environment per application instance
User runs jobsStorage as a service (STaaS)
User sees virtual mounted storage device
31Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Considerations in Cloud ComputingCost
Provider issuesEconomies of scale lower cost per compute job
User issuesCapital + OAM costs operating costsLower start-up costs operating debt
Reliability Provider issues
Redundant infrastructure continuity + disaster recoveryCentralized management of OAM, security, performanceVirtualization serve multiple users on physical serverMultitenancy provide multiple sandboxed application instances on OS
User sees guaranteed serviceAgility
User / provider reconfigure service / infrastructure as needed Growth, load balancing, time-zone serving
32Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Cloud OwnershipPublic cloud
Service provider as public utility — sells / rents computing serviceInitial providers leverage large existing infrastructureAmazon, Microsoft, Google, IBM
Menu of services at fixed prices
Private cloudCloud infrastructure for private organizationManaged internally or outsourcedIsolates service developers from implementation issues
Standard development platformRequirements for economic justification
Large organization Technology-based servicesFrequent new serviceExample — internet content provider
33Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
What's Different in Cloud NetworkingEnd user
Not muchAccesses service "somewhere" on network
Business service providerDefine business serviceOutsource implementationOAM limited to SLA-level virtual environment
Cloud service providerManage vast real environment mapped to virtual environmentsOAM requires effective picture of real system from SLA POV
34Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Networking FunctionsForwarding function
Data transferImplement network protocolsHigh performance dedicated hardware
Control functionManagement of forwarding function
Configuration of network topology and policiesSupervision, measurement, maintenance
Traditional controlImplemented in dedicated hardware Switches, cable connections, programming at console interface
Software Defined Networking (SDN) control Implemented in system softwareGeneric control interface in hardwareSystem programmer configures modes, connections, policies
35Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Software Defined Networking (SDN)SDN Application
Programs communicate network requirements to SDN Controller Receive abstracted view of network for planning
SDN ControllerTranslates requirements from SDN application to SDN Datapaths Provides SDN applications with view of network
SDN DatapathLogical network device controls data forwarding hardware
Single forwarding device Logical device defined from internal network of forwarding devices
FabricHardware associated into SDN
36Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Cisco Software‐Defined Access DesignUnderlay network
Physical dedicated hardwareOverlay network
Virtual network implemented in SDNManagement
Identity Services Engine (ISE)Account database
DNA CenterHardware database
Border nodeConnects fabric to WAN
Edge nodeConnects fabric to user
References: https://www.cisco.com/c/dam/en/us/td/docs/solutions/CVD/Campus/CVD‐Software‐Defined‐Access‐Design‐Sol1dot2‐2018DEC.pdf
https://www.cisco.com/c/dam/en/us/solutions/collateral/enterprise‐networks/enterprise‐network‐security/data‐center‐design‐playbook.pdf
37Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Layer 2 OverlayLayer 2 (Data Link) Logical network
Edge switchesEthernet, etcConnect users
Intermediate switchBorder switches
Physical networkPhysical switchesCables
38Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Layer 3 OverlayLogical IP + switched network
Edge and border switchesIntermediate IP router
Physical networkSame as Layer 2Physical switchesCablesIP routing implemented
in software
39Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Centralize Decentralize Centralize ?1950s — 60s
Centralized mainframe computer + multiple OS instances over hypervisorTimesharing OS serves multiple usersUser sees OS environment via dumb terminal (thin client)
1970s User applications offloaded to minicomputers + timesharing servicesUser sees timeshared OS environment via dumb terminal
1980sUser applications offloaded to personal workstations (PC)User sees single-user OS environment running locally
1990sNetwork single user workstations User sees single-user OS environment running locally
2000sCentralized control of local OS environment by IT departments
2010sCloud + netbook / tablet / smart phone — dumb terminal with high-res GUI
40Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
What Network Access Providers Do
https://www.rad.com/system/files/Media/rad‐catalog‐2019.pdf
41Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
VirtualizationHighly configurable network hardwareSoftware defined network (SDN) functions
NID—Network Interface DeviceNTU—Network Termination Unit
for Carrier Ethernet
Distributed Network Functions Virtualization (D‐NFV)
42Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Carrier EthernetEthernet
802.3 CSMA/CD shared medium local area (~ 100 m) networkData rates — 10 Mbps to 100 Gbps on copper or optical fiber
Carrier EthernetBridge Ethernet LAN segments over WANOperates as single Ethernet broadcast domain
E-Line — point-to-point connectionE-LAN — general meshE-Tree — hierarchical tree
43Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Cyber Security
EthernetETH
Terminal Protocol (?)TP
Remote Terminal UnitRTU
Intelligent Electronic DevicesIED
MAC layer security standard (802.1AE)MACsec
Supervisory Control and Data AcquisitionRemote Monitoring and Control
SCADA
Data Communications ChannelPort Based Network Access Control (802.1X)
DCC
44Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
vCPE (virtual customer premises equipment)
VNF — Virtualized Network FunctionGPON —Gigabit Passive Optical NetworkPDH — Plesiochronous Digital Hierarchy (standard telco multiplex hierarchy)GbE—Gigabit EthernetL2/L3 — layer 2 (data link) switching + layer 3 (IP) routing
45Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Carrier Ethernet
ETXCarrier Ethernet demarcation and aggregation
MinID login system
46Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
TDM Over Packet Mode Networks
PSNPacket Switched Network
PBXPrivate Branch Exchange — telephone switchboard
47Dr. Martin LandAccess NetworkingProtocols and Networks — Hadassah College — Fall 2021
Cellular Backhaul
Cell site2G BTS or 3G/4G Node B (NB/eNB) connects mobile device to cellular network
BackhaulCarry digital voice from mobile cell site to telephone central office
1Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6
2Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv4 & IPv6 Header Comparison
Fragment OffsetFlags
Total LengthType of ServiceIHL
PaddingOptions
Destination Address
Source Address
Header ChecksumProtocolTime to Live
Identification
Ver
Next Header
Hop Limit
Flow LabelTraffic Class
Destination Address
Source Address
Payload Length
Ver
IPv4 HeaderIPv4 Header IPv6 HeaderHeader
3Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6 Address ScopeAddress assigned to interface
Interface IDAddresses depend on scope
Link LocalLocal hardware connectionBroadcast domain
Site LocalAutonomous system (AS)Network of one organization
Global
Link-LocalSite-LocalGlobal
4Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Types of IPv6 AddressesUnicast
One address on a single interfaceDelivery to single interface
MulticastAddress of a set of interfacesDelivery to all interfaces in set
AnycastAddress of a set of interfacesDelivery to closest single interface in set
No broadcast addresses
5Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6 Address128-bit address
340,282,366,920,938,463,463,374,607,431,768,211,456 addresses50,000 addresses per square meter of land on Earth
Colon-separated 16-bit hex2031:0000:130F:0000:0000:09C0:876A:130B
Leading zeros optional2031:0:130F:0:0:9C0:876A:130B
Successive 16-bit 0 fields written :: (once)legal 2031:0:130F::9C0:876A:130B
illegal 2031::130F::9C0:876A:130B
IPv4 compatible — used in tunneling IPv6 through IPv40:0:0:0:0:0:1.2.3.4 = ::0102:0304
IPv4 mapped — used by IPv6 source sending to IPv4 dest0:0:0:0:0:FFFF:1.2.3.4 = ::FFFF:0102:0304
6Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6 Prefix
Used in telephonyReserved for ATM0200::/70000 001
Assigned to a groupMulticast AddressFF00::/81111 1111
Addresses used with an AS (like 10.0.0.0 in IPv4)Site Local AddressFEC0::/101111 1110 11
HexBinary
FE80::/10
2000::/3
0::/8
Address hosts on LAN segmentLink Local Address1111 1110 10
Aggregation of host addresses into networks
and subnets
Aggregatable GlobalUnicast Address001
Not assignedReserved address0000 0000
ApplicationTypePrefix Format (PF)
7Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Unicast Address FormatsLink Local
Site Local
Global
MAC derivedMUST be 01111111010FE80::/10
Interface ID (64 bits)Reserved (54 bits)FP (10 bits)
MAC derived
Interface ID (64 bits)
Locally Administered1111111011FEC0::/10
Subnet (16 bits)Subnet (38 bits)FP (10 bits)
Locally Administered
MAC derived or Locally Administered or Random
Interface ID (64 bits)
Provider Administered001
2000::/3
Subnet (16 bits)ISP assigned (45 bits)FP (3 bits)
8Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Hierarchical Addressing & Aggregation
Authority Assigns 2001:0410::/32 to ISP
ISP Assigns 2001:0410:1:/48 to customer 1Assigns 2001:0410:2:/48 to customer 2
Customer 1Assigns subnets 2001:0410:1:1/64 , 2001:0410:1:2/64
ISP
2001:0410::/32
Customer 2 IPv6 Internet
2000::/32001:0410:0002:/48
2001:0410:0001:/48
Customer 1
9Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Extension HeadersNext header field
Points to header following IPv6 header
Extension headersMultiple of 8 bytesSyntax depends on optionHeaders (except 60) appear only once
UDP Header17
TCP Header6
Upper Layer Protocol
IPv6 ICMP Packet58
Resource Reservation Protocol46
Interdomain Routing Protocol45
IPv6 Header41
IP Option Header
Destination Options Header60
No Next Header59
IPv6 Authentication Header51
Encapsulating Security Payload50
IPv6 Fragment Header44
IPv6 Routing Header43
Hop‐by‐Hop Options Header0
10Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6 Option HeadersTunneling
Option 41IPv6 datagram in data field of IPv6 datagramExample — used with fragmentation when router adds option field
Hop-by-hop header Options checked by every router and destination node
Destination options headerOptions checked by destination node
Routing headerSource sets route through network
Fragment headerHandles fragmentation
Authentication header / Encapsulating Security PayloadImplement IPsec
11Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Option Header Examples
TCP Header + Data Fragment
Fragment HeaderNext = TCP
Hop‐by‐Hop HeaderNext = Fragment
IPv6 HeaderNext = Routing
TCP Header + Data Fragment
Fragment HeaderNext = TCP
Routing HeaderNext = Fragment
IPv6 HeaderNext = Routing
TCP Header + DataRouting HeaderNext = TCP
IPv6 HeaderNext = Routing
TCP Header + DataIPv6 HeaderNext = TCP
12Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Traffic Class + FlowDSCP — 6 bits
Differentiated Services Code PointSets per-hop behavior according to service
ECN — 2 bitsExplicit Congestion NotificationRouter can set congestion indication
FlowStream of related packets from 1 source to 1 destination Require particular handling by routers
Requirements cached in routersExample — real time priority
24 bit flow labelChosen randomly from 1 to FFFFF0 — not part of a flow
Flow identified by label + src IP + dest IP
13Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
ICMPv6ICMP — Internet Control Message Protocol
ICMP Message32
ChecksumCode (subtype)Type0
16 – 318 – 150 – 7Offset
Redirect Message137
Neighbor Advertisement136
Neighbor Solicitation135
Router Advertisement134
Router Solicitation133
Group Membership Reduction132
Group Membership Report131
Group Membership Query130
Echo Reply129
Echo Request128
Parameter Problem4
Time (Hop Count) Exceeded3
Packet Too Big2
Destination Unreachable1
14Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Neighbor DiscoveryIdentify hosts and routers on physical LAN segment
Replaces ARP
Address resolution Obtain MAC address for neighbors
Neighbor SolicitationNode sends ICMP neighbor solicitation message to host
Neighbor advertisementNeighbor sends ICMP neighbor advertisement with MAC address
Interface IDFF02::
64‐bit host address64‐bit local link multicast prefix
15Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Router and Prefix DiscoveryRouter advertisements
Routers send ICMP messages to hosts on some scheduleAddressed to FF02::1
Multicast address — all systems on local linkProvides configuration parameters
MTUGlobal IP prefixIP address configuration method (ICMP / stateless)
Router solicitation messageHost sends ICMP message to request router serviceAddressed to FF02::2
Multicast address — all routers on local linkRouters respond with router advertisement
16Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Stateful Auto‐ConfigurationDHCP service
Similar to IPv4DHCP messages
SolicitAdvertiseRequestReplyReleaseReconfigure
DHCP client Waits for DHCP advertisementSends DHCP request
DHCP server Sends DHCP replyProvides IP address + configuration parameters
17Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Stateless Auto‐ConfigurationNode reads 48-bit MAC address from hardwareConverts 6-byte MAC address to 8-byte node address
48-bit MAC address 24 bits FFEE 24 bitsExample: 11 22 33 44 55 66 11 22 33 FF EE 44 55 66
Extends link-local prefix to 64 bitsFE80::/10 FE80::/64
Attaches link-local prefix to node address Creates temporary link-local unicast addressExample: FE80::1122:33FF:EE44:5566
Verifies unique address with neighbor solicitationNo response to link-level address assigns address to interface
Sends router solicitationRouters respond with router advertisement
No response node attempts DHCPResponse message provides parameters — MTU, global prefix
Replaces FE80::/64 global prefix to form global unicast address
18Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobile IP (RFC 2002)Internet protocol supporting host mobility
Maintains TCP connections as host changes locationSupports authentication
Mobile host maintains single long-term IP addressVersion 4 IP address and address format are unaffected
Routing tunnel replaces standard IP routing
Router
132.4.16.X X=1, 2, 3, ..., 254
1 2 3
Router
138.27.192.Y Y=1, 2, 3, ..., 254
1 2 3
138.27.192.87
19Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobile IP Basic IdeaSimilar to
Call forwardingMail forwarding at
post office
Mobile Node Permanent IP
addressUsual home service routerFinds mobile service routers when roaming
Home router and mobile service router coordinate
IP datagramsSent to usual home routerForwarded by home router to mobile service routerForwarded to Mobile Node
IP datagram
IP datagram
IP datagram
20Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobile IP EntitiesMobile Node (MN)
Host or router that can change its point of attachmentHome Address
Permanent IP address assigned to MNCorrespondent Node (CN)
Node that sends datagrams to MN home addressHome Agent (HA)
Maintains table of registered mobile nodes Forwards datagrams addressed to mobile node
Foreign Agent (FA)Delivers datagrams between MN and HA
Mobility AgentHA or FA supporting mobility
Care-of-Address (COA)FA address used to identify current location of MN
21Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Agent DiscoveryMobility Agents broadcast availability
Home Agents (HA) Foreign Agents (FA)
Mobile Node (MN) looks for Local router services when connected to home networkForeign Agent (FA) services when connected to foreign network
FA advertises services
22Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Care‐of‐Address DiscoveryMobile Node (MN)
Requests service from Foreign Agent (FA)
Foreign Agent Assigns Care-of-Address (COA) to MN FA can have 1 or more available COAsUsually FA assigns same COA to all MNs
MN requestsservice from FA
23Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
RegistrationForeign Agent
Requests Mobile IP support from MN’s Home AgentHome Agent
Agrees to provide Mobile IP supportMN
Registers COA with its HAHA forwards datagrams to FA
Datagrams for MN arrive at HA
MN registerswith FA and HA
FA forwardsrequest to HA
HA acceptsor rejects
FA informsMN of status
24Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Establishment of Service in Mobile IP
MN in home network
MN in foreign network
25Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobile IP End‐to‐End Delivery
StandardIP datagram
From: CN IP addressTo: MN Home Address DATA
EncapsulatedIP datagram
From: HA IP addressTo: FA COA Address
From: CN IP addressTo: MN Home Address DATA
StandardIP datagram
From: CN IP addressTo: MN Home Address DATA
CN
MN
FA
HA
26Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Roaming and Hand‐OffRoaming MN
Moves to new attachment point (network)Requires change of FA
Multiple bindings Multiple COAs — old + newAvoid datagram lossAvoid too frequent registrations
HA Forwards each packet to multiple COAs
MNReceives packet at one COA
Route optimization after reconnection
27Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Change of Foreign AgentCN HA FAold FAnew MN
IPdatagram
EncapsulatedIP
datagram IPdatagram MN changes
location
registration
registration
updateACK
EncapsulatedIP
datagram
IPdatagram
EncapsulatedIP
datagram
IP datagram
IPdatagram
IPdatagram
ACK
EncapsulatedIPdatagram
28Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Triangle RoutingHome agent is bottleneck
Increases network load
29Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Route Optimization
(1)IP
datagramIP
datagrams (2b) Warning
(3) Binding Request(4) Binding Update
(5)IP datagram
HAFA
(2a) EncapsulatedIP datagram
30Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Roaming Under Route Optimization
31Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6 Mobile IPImplements Mobile IP
1. Mobile node (MN) obtains local address using autoconfiguration Roaming address = care-of-address (CoA) No special Foreign Agent
2. MN registers with Home Agent by sending Binding Update3. HA forwards traffic for registered MN
Tunnels packets from CN to MN4. MN sends packets to CN directly5. Route optimization — HA provides CN with CoA
HA
MN
CN
12
34
5
32Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IPv6 Mobility SupportNode writes home address in destination option header
Destination node can identify datagram by home address Tunneling
Using IPv6 routing extension headers instead of encapsulationReduces processing cost of delivering packets
HandoverNode moves from ESS to ESSLayer 2 handover — change AP and ESS IDNode detects change in on-link subnet prefix Updates CoA
IPv6 Mobility header messagesHome Test Init, Home Test, Care-of Test Init, and Care-of TestBinding Update / Acknowledgement
MN to notifies node or HA of current binding
1Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Basics of
Wireless Networking
2Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Energy and PowerEnergy
The ability to do workEnergy can be kinetic (movement) or potential (stored)
PowerEnergy transfer per secondTransfer can be kinetic (motion) or potential (moving stored energy)
UnitsPower is measured in WattsEnergy is measured in Joules = Watts seconds 1 kW-hour = 1000 Watts 3600 seconds/hour
= 3.6 106 Joules
3Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Electricity and Magnetism
2 ,
0
Electric fieldMagnetic field
Power
charge at distance
RR
EB
E×B
E
B
A charged object may create
Radiation (transfer of power) from a charged object
Motionless charge does not radiate
Antenna accelerat0 0Accelerated charges induce fields and
Antenna radiates power as electromagnetic waves
=
E B
es charges electric current
4Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Radio Communication
Moving electric charge is called electric currentCurrent depends on time charges must accelerate
Electromagnetic radiation satisfies wave equation Radiated power depends on time t and distance R from antenna
Transmitteraccelerates
chargesup and downon antenna
Informationsignal
controlsmotion
of charges
Power needed to accelerate charges getsradiated away as electromagnetic power
Radiation spreads in every directionlike expanding sphere
Radiated poweraccelerates
chargesup and downon receiver
antenna
Motionof chargeprovides
informationsignal toreceiver
5Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Wave Motion
Wave height has peaks and troughsy = height of peak above center = depth of trough below center
At fixed distance from shore, wave rises and falls over timeT = time between two wave peaks (period) f = 1/T = number of wave peaks per second (frequency)
At fixed time, multiple wave peaks at various distances = distance between two wave peaks (wavelength)
Surfer rides peak of wavePeak depends on distance and time peak moves over timeSpeed of moving peak = f
R
yy
Ocean waves rolling onto a beach
6Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Charge Moving on AntennaCharge on antenna accelerated up and down
Oscillates top to bottom (distance L) every T seconds
t0
T/4 T/2 3T/4 T y t
2L
2L
1
cos 2 cos 22 2
Frequency oscillation cycles per second
position of charge on antenna at time y
y
f Tt t
L t Lt ftT
L
movingcharge
y (t)
7Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Field is Solution to Maxwell Equations
0 0
0 0
cos 2 cos 2, ,
1/,
distance from antenna to point of measurementtime (measured on some clock)frequency
are physical constantsspeed of light
R Rf t f tc cR t R tR R
Rtf T
c
E BE B
E B
Radiation fiel ds
R
R
P
20 02
0 020
cos 2
1 12
T
Rf tcR
P P t dtT R
E BP E B
E B
Radiated power
Average powe
r Fading
8Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Wavelength
0 00
cos 2 cos 2cos 2,
cos 2 1 0,1,2,...
ccT f cf
f R R tftRf t c TcR tR R R
R t R tT T
R tT
E EEE
Define electromagnetic wavelength
Radiation field
Wave peaks
0 0 0R R t t R tT T
R f ct T
Wave peaks travel at speed of lightv
Speed
9Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Spherical Waves in Space and TimeAt fixed distance wave rises and falls over time
t
T/4 T/2 3T/4 T
0
1 2
, cos 2
cos 2
constconst
const
ttT
ft
RR
R
C C
EE
2
0
1
, cos 2
cos 2
constconst
RRR T
C
t
R CR
t
EE
R
-1/R
4
2 3
4
1/R
At fixed time, multiple wave peaks at various distancesWave peaks decrease at larger distances from source
10Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Electromagnetic Spectrum
Radio antennas are effective in the frequency rangefrom ~ 30 kHz ( = 10 km)to ~ 300 GHz ( = 1 mm)
Chemical reactions generate higher frequencies:Infra-Red (IR) Visible LightUltra-Violet (UV) X-rays (Roentgen)
Nuclear reactions generate gamma rays (γ)
11Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Electromagnetic Spectrum
ExampleLine antenna most efficient when L = / 2GSM cellphones operate at f ~ 1 GHz = (31010 cm/sec)/(109 Hz) = 30 cm L ~ 15 cm = phone size
Wavelength(m) 104 102 100 10-2 10-4 10-6 10-8 10-10 10-12 10-14 10-16
Frequency (Hz) 104 106 108 1010 1012 1014 1016 1018 1020 1022 1024
radio microwave IR visible UV X-ray gamma
1 MHz ~ 300 m 100 MHz ~ 3 m 10 GHz ~ 3 cm
VLF < 30 kHz LF 30 - 300 kHz MF 300 kHz - 3 MHz HF 3 - 30 MHz VHF 30 - 300 MHz UHF 300 MHz - 3 GHz SHF 3 - 30 GHz EHF > 30 GHz
103 10 cm/s f c
12Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Radio Wave PropagationTransmitter generates radio waves
Waves propagate (spread out) through spacePart of radiated power may be obstructedPart of radiated power is detected by receiver
ionotropic wave
line of sight wave
ground wave
tropospheric wave
Transmitter Receiver
13Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Interference with Radio Signals
absorption
reflection
refraction
medium
14Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Multipath FadingObstacles reflect radio waves
Receiver gets signals from multiple pathsTime-to-arrive depends on path taken by signalReceiver gets signals transmitted at different times
ExampleThree signals sent at times t1 < t2 < t3
Antenna receives all three signals at time tSignal 1 sent first and followed longest path d1Signal 2 sent second and followed second longest path d2 < d1Signal 3 sent last and followed shortest path d3 < d2
Sum of waves can cancel out signals
d3
d1
d2
15Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Cancellation of Signals in Wave MotionWave amplitudes
combine by adding
pulse
pulse
String receives two pulses at t = 0
String at t = 1
String at t = 2
String at t = 3
String at t = 4
16Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Wave Interference
0 0
0 0
, ,
cos 2 cos 2
cos 2 c1
where and R t R R t t
R R t t
R R Rft f t tR R R
R ftRR R
R
E E E
E EE
E EE
Two waves arrive at antenna by slightly different paths
0
os 2
1
cos 2 cos 2 2
R R ft f t
RR
R R Rft ft f tR
EE
Ignoring
17Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Wave Interference
0
1 12 2
0
cos 2 cos 2 2
cos cos 2cos cos
2co c2 ss o
R R Rft ft f tR
A B A B A B
R ftR
R c
R f t
t
EE
EE
Using identity
Transparent medium
0
1c
12
os
cos cos 02
R c tf t t f c f
R f
R ff t
t
R t
Total cancellation
18Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
IEEE 802.11 Protocol LayersPhysical Layer Convergence Sublayer
Specifies header for PHY Dependent SublayerDirect Sequence Spread Spectrum (DSSS)Frequency Hopping Spread Spectrum (FHSS)
Transmission typeModulation schemeData transmission rates
MAC layer Medium accessAddressingProcedures Data
Link Layer
LLC802.2
LLC frame for SEQ/ACK/ControlBridging Exchange of 802.2 PDUs
MAC
802.11
CSMA/CA, MACA, CFP
Physical Layer
Convergence PHY-Dependent Convergence Sublayer
PHY FHSS, DSSS, IR, Data rates
Wi‐FiTrademark of Wi‐Fi Alliance trade association
19Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
WiFi Ad Hoc ModeIndependent Basic Service Set (IBSS)
Any set of 802.11 STAs (wireless stations)All STAs transmit / receive on same frequencyPeer-to-peer serviceNo connection to a wired network
Simple unmediated communicationSTAs communicate directly with one anotherUseful for quick set upAuthentication or Registration not required
Multiple IBSSs are independentNo bridgingNo hand-off
Independent Basic Service Set
station
station
station
station
20Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
WiFi Infrastructure ModeBasic Service Set (BSS)
A set of wireless end stations (STA)An Access Point (AP)
Connected to the wired network infrastructure Acts as base station for the wireless networkAll traffic flows through AP by Contention or Polling (CFP)
Stations must Associate with APAuthenticationRegistration
Basic Service Set
station
station
accesspoint
station
Wired LAN
Internet
21Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
WiFi Extended Infrastructure ModeExtended Service Set (ESS)
Two or more BSSs Form single subnetwork (broadcast domain)Looks like one large BSS to LLC layer One Access Point (AP) in each BSS
BSSs connected via Distribution System (DS)DS is backbone networkDS performs MAC-level transport of MAC SDUs DS implementation not specified in 802.11
PortalSoftware gateway function in APBridges BSS to any non-802.11 DS protocol
DS services permit handoffStation moving from one BSS to another Requires coordination between APs
Basic Service Set
station
station AccessPoint
station
Basic Service Set AccessPoint
station
stationstation
DistributionSystem
Internet
22Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Hidden Node ProblemA transmits to B
C cannot receive from A — out of range
C transmits — corrupts transmission from A to B
A B C D
transmit range
nowait
interfere
23Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Exposed Node ProblemB transmits to A
C receives transmission from B — delays transmission to D
Inefficient — C transmission to D will not interfere with B to A
A B C D
wait
24Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
CSMA with Collision Avoidance (CSMA/CA)Carrier Sense Multiple Access (CSMA)
Stations listen for transmissionsDo not transmit if carrier is detectedCollision detection not possible
Hidden node problemAntenna cannot receive while transmitter active
Collision Avoidance (CA)Non-persistent accessRandom backoff
A B C D
25Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Multiple Access with Collision Avoidance (MACA)Channel set-up before data transmission
RTS — Request To SendCTS — Clear To SendACK — Acknowledge error-free transmission
Net Allocation Vector (NAV)Transmitted in RTSEchoed in CTSPredicted data transmission time
Trade-off Adds overheadBetter throughput in hidden and exposed Nodes
RTS
CTS
DATA
ACK
26Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Multiple Access with Collision Avoidance (MACA)C sends 30-byte RTS to D
Includes NAV for data transmissionB and D hear RTS
D responds with CTS to C Echoes NAVC and E hear CTS
B hears RTS but not CTSB can transmit to A — no interference with C to D
E hears CTS but not RTSE waits data transmit time before transmission to F
A B C D
RTS CTS
E F
27Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
MAC Sublayer Frame Structure
Frame Control
Duration/ ID
Address 1 Address 2 Address 3 Sequence Control
Address 4 Frame Body FCS
2 bytes 2 bytes 6 bytes 6 bytes 6 bytes 2 bytes 6 bytes 0-2312 bytes 4 bytes
Frame Control Control flags
Duration/ID Timing control
Addresses Various MAC entities
Sequence Control Sequence/Fragment number for error/flow control
Frame Body 0 or more data bytes (SDU)
28Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Frame Control
Protocol Version Type Subtype To
DS From DS
More Fragments Retry Power
Management More data WEP Order
2 bits 2 bits 4 bits 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit 1 bit
Type and Subtype Data, Control, Management with subtypes
To DS/From DS Access Point (AP) is destination/source
More Fragments Part of fragmented LLC packet
Retry Indicates re-transmission of bad packet
STA alerts AP of its mode
Value of 1 STA will be in power-save mode Power Management
Value of 0 STA will be in active mode
More Data AP alerts STA (in power-save mode) of buffered frames
WEP Indicates WEP encrypted data
Order Indicates Strictly Ordered service class
29Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
MAC Layer Address Fields4 Address Fields
5 possible MAC entities:BSS Identification Number (BSSID)
Source Address (SA)Station that initiated the message
Destination Address (DA)Final destination for the message
Transmitting Station Address (TA)Source station for the message on this hop
Receiving Station Address (RA)Destination station for the message on this hop
30Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Address Field Definitions
To DS
From DS Address 1 Address 2 Address 3 Address 4
0 0 DA SA BSSID 0 1 DA BSSID SA 1 0 BSSID SA DA 1 1 RA TA DA SA
Source address for DS to DS messages (802.11 is also DS)Address 4Final destination or source when DS performs distributionAddress 3Immediate source addressAddress 2Immediate destination addressAddress 1
station accesspoint
Internet
stationstation
station
station
31Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Addressing in an IBSS
Independent Basic Service Set (IBSS) No Access Point (AP) and no DSFields To DS and From DS are 0
To DS
From DS Address 1 Address 2 Address 3
0 0 DA SA BSSID
Independent Basic Service Set
station
station
station
station
Address 1 Immediate destination address (DA)Address 2 Immediate source address (SA)
Address 3BSSID Identifies Ad Hoc network Prevents message from reaching outside IBSS
32Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Data Addressing in a BSS
Basic Service Set (BSS)All transmissions are sent To/From Access PointTo/From DS actually means To/From AP
To DS
From DS Address 1 Address 2 Address 3
0 1 DA BSSID SA 1 0 BSSID SA DA
Basic Service Set
station
station
accesspoint
station
Wired LAN
Address 1 Immediate destination address (DA)
Address 2 Immediate source address (SA)
Address 3 Final Destination or Source
33Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
BSS Addressing Example
Station A sends message to Station B via AP (BSSID)
To DS
From DS Address 1 Address 2 Address 3
0 1 DA BSSID SA 1 0 BSSID SA DA
Basic Service Set
stationA
stationB
accesspoint
To DS = 0From DS = 1
To DS = 1
From DS = 0
Wired LANAddress 1 = BSSID
Address 2 = Station AAddress 3 = Station B
Address 1 = Station BAddress 2 = BSSID
Address 3 = Station A
34Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Control and Management Addressing in a BSS
Control and Management messages in a BSS: Only involve stations in the BSS and the APAre sent with To DS = From DS = 0Either the Source or the
Destination will be the AP (BSSID)
Address 3 in included as anerror check
Basic Service Set
station
station
accesspoint
station
Wired LAN
To DS
From DS Address 1 Address 2 Address 3
0 0 DA SA BSSID
35Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Addressing in an ESS
Extended Service Set (ESS)All transmissions are sent via an APTo the stations, entire ESS looks like one BSSStations do not know if message passes via DS or not
To DS
From DS Address 1 Address 2 Address 3
0 1 DA BSSID SA 1 0 BSSID SA DA
Basic Service Set
station
station AccessPoint
station
Basic Service Set
AccessPoint
station
stationstation
DistributionSystem
Address 1 Immediate destination address (DA)Address 2 Immediate source address (SA)Address 3 Final Destination or Source
36Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
ESS Addressing Example
Station A sends message to Station B viaAP1 (BSSID1) DS AP2 (BSSID2)DS must forward Data, Sequence, SA, and DA
By some legal means
To DS
From DS Address 1 Address 2 Address 3
0 1 DA BSSID SA 1 0 BSSID SA DA
Basic Service Set
stationA
AccessPoint
1
Basic Service Set
AccessPoint
2station
B
DistributionSystem
Extended Service Set
To DS = 1From DS = 0
Address 1 = BSSID1Address 2 = Station AAddress 3 = Station B
Address 1 = Station BAddress 2 = BSSID2
Address 3 = Station ATo DS = 0
From DS = 1
37Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobility ManagementRegistration
Performed when mobile station (MS) activated in Service AreaAuthentication
WiFi — managed by access point (AP)GSM / 3G / 4G
Home Location Register (HLR)Maintains account + location information for home customers
Visitor Location Register (VLR)Cache of HLR data on active roamers in each Service Area
Call EstablishmentPerformed when user initiates or receives call
SecurityProtects from fraud and eavesdropping
Handoff (handover)Performed when MS changes attachment point to network
38Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Handoff (Handover)User moves between cells
Hard HandoffOld cell transfers control to new cell Break-Before-Make sequence
Transceiver in old cell stops transmitting to userTransceiver in new cell begins transmitting to user
New BS assigns user frequency pair from its frequency group
Soft HandoffCentral transceiver coordinates with nearest cellsDetermines which transmitter is receiving strongest signal from userMake-Before-Break sequence
Transceiver in old cell transmitting to userTransceiver in new cell begins transmitting to user Transceiver in old cell stops transmitting to user
39Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
1970 — 0G Mobile Phone System (MPS) One central transceiver (transmitter/receiver)
Mobile telephones communicate via central transceiverTransmit at high power for maximum distanceSystem covers 65 to 80 km
Modulation is standard analog FM Supports 12 simultaneous mobile phone calls If 12 channels busy, other calls are blocked
Requires 24 carrier frequencies2 frequencies per phone:
Dedicated transmit frequency Dedicated receive frequency
40Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Cellular ConceptDivide coverage area into cells
In each cellCentral cell transceiver serves all clients in cellMobile Stations communicate via cell transceiverEach active device allocated frequency pair
Receive — downstream from base stationTransmit — upstream to base station
Transmit at low power (just enough to cover a cell)Use same frequencies in many cellsNo interference between cells
Handoff Telephone can move from cell to cell during a callRequires cell-to-cell infrastructure and coordination
B
C
A
C
C
B
A
B
A
B
A
C
B
41Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Frequency (Channel) Reuse Patterns
B
C
DE
F
GA
B
C
DE
F
GA
B
C
DE
F
GA
B
C
A
C
C
B
A
B
A
B
A
C
B
7 cell reuse
3 cell reuse
4 cell reuse
B
D
A
C
B
C
D
D
C
A
B
A
A
42Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobile Network Switching HierarchyMobile Service Provider
Service Areas or Registration AreasClusters
Cells
Mobile ServiceProvider
Mobile ServiceProvider
ServiceArea
ServiceArea
ServiceArea
ServiceArea
BC
DE
F
GA
BC
DE
F
GA
BC
DE
F
GA
B
C
DE
F
G
A
B
C
DE
F
G
A
B
C
DE
F
G
AB
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
B
C
D
E
F
G
A
ClusterCell
43Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Mobility Elements in GSM
Base System(BS)
BTS BSC MSCPLMN
BSS
HomeSubscribers
BTS BSC MSCPLMN
BSS
Base System(BS)
Service Area
Service Area
Roamer
HLRVLR
HLRHome
Subscribers
Home SubscriberRegistration
Roaming SubscriberRegistration
Query to HomeMSC HLR
for VLR Entry
PLMN— public land mobile network, the portion of the cellular network that operates over cables.
44Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Cellular Network: GSM (2G) UMTS (3G)
Radio Network System (RNS)Base Station Subsystem (BSS)
Radio Network Controller (RNC)Base Controller System (BSC)
Node‐BBase Transmitter System (BTS)
UMTS NameGSM Name
45Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Registration ProcessMS enters Service Area
Establishes low bit-rate control channel with service provider
MS requests serviceBTS allocates a frequency pair
MS reports to Mobile Switching Center (MSC)Location, Status, and Identity
Dedicated hardware ID code in phoneSubscriber Identity Module (SIM) card identifies customer in GSMMobile Station generates access code to network
Transmits code by public key encryption (PKE) algorithm
Mobile Switching Center (MSC)Authenticates customer identity with HLRFor roaming subscriber, creates VLR entry Updates Home Location Register (HLR) and billing database
46Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Registration
MS BTS BSC MSC VLR HLRChannel requestActivation responseActivation ACKChannel assignmentLocation update requestAuthentication requestAuthentication responseAuthentication checkTMSI assignmentTMSI ACKUpdate VLR / HLR entriesChannel release
47Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Call Establishment
MS BTS BSC MSCRequest control channelAssign control channelCall establishment requestAuthentication requestAuthentication responseEncryption keyEncryption responseDestination addressRouting responseTraffic channel requestAssign traffic channelAvailable or busyCall acceptedConnection establishedData exchange
MS Initiated
48Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Call Establishment
MS BTS BSC MSC VLR HLR GMSC PSTN CallerStandard call set-upRequest to Gateway MSCHLR user requestAssign roaming numberRequest to MSC (user location)Update user statusPage MSAuthenticationCall connection
Mobile Terminated
49Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Handover Types
Intra-cellChange frequencies to avoid interference
Inter-cell — Intra-BSCMS moves between cells within control of one BSC
Inter-BSC — Intra-MSCMS moves between cells controlled by different BSCs MSC controls handover
Inter MSCMS moves between cells controlled by different MSCs
MSC MSC
BSC BSCBSC
BTS BTS BTSBTS
MS MS MS MS
50Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Inter‐BSC Handover Procedure
BTSold BSCnew
measurementreport
BSCold
Handoff link establishment
MSCMSmeasurement
report
Handoffrequired
BTSnew
Handoff request Channel
activation
Activation ACK
Handoff Request
ACKHandoff command
Handoff completeHandoff
completeclear commandclear command
clear completeclear complete
Handoff commandHandoff
command
51Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
3G RelocationServing RNC (SRNC) — RNC-1
Primary Node-B — 1Monitoring Node-B — 2
MSC
RNC-1 RNC-2
1 2 3 4Node-B Cells
Clusters
52Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
3G RelocationServing RNC (SRNC) — RNC-1
UE relocates to primary Node-B — 2Monitoring Node-B — 1
MSC
RNC-1 RNC-2
1 2 3 4Node-B Cells
Clusters
53Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
3G RelocationServing RNC (SRNC) — RNC-1
Active Node-B — 2Relaying RNC (RRNC) — RNC-2
Primary Node-B — 3 Monitoring Node-B — 4
MSC
RNC-1 RNC-2
1 2 3 4Node-B Cells
ClustersSRNC (RNC-1)
combines data from 2 and 3
54Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
3G RelocationServing RNC (SRNC) — RNC-1
No active Node-BRelaying RNC (RRNC) — RNC-2
Primary Node-Bs — 3 + 4
MSC
RNC-1 RNC-2
1 2 3 4Node-B Cells
ClustersRNC-2
combines data from 3 and 4
SRNC (RNC-1)receives combined datafrom RNC-2
55Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
3G RelocationServing RNC (RRNC) — RNC-2
Monitoring Node-B — 3Primary Node-B — 4
MSC
RNC-1 RNC-2
1 2 3 4Node-B Cells
Clusters
56Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Voice Transmission Summary
Voice 8000Samples/sec
3300 HzFilter
13-bitQuantization
8:1Compression
104 kbps
13 kbps 260-bitbuffer
104 kbps 20 msec = 2080 bits13 kbps 20 msec = 260 bits
CRCGenerator260:456
13 kbps 456 bits = 8 blocks 57 bits/block
57 57
24
1 2 3 4 5 6 7 8
16 17 18 19 20 21 22 238 9 10 11 13 14 150 1 2 3 4 5 6 7
57 user bits per field 2 fields per frame 24 frames per multiframe = 2736 user bits per multiframe
2736 bits per multiframe / 120 ms per multiframe = 22.8 kbps
22.8 kbps / (456/260) = 13 kbps
1 user time slot / frame
24 frames / multiframe
57Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Protocol Stack
BSSAPBSSAPRRMRRMSCCPSCCPBTSMBTSMRRM'RRM'
MSRadioLAPDm
MMCM
BTSRadioLAPDm
64 kbpsLAPD
BSC64 kbps
LAPD MTP
MSC64 kbps
MTP
MMCM
Message Transfer Part — standard PSTN signaling and managementMTPSignaling Connection Control Part (SCCP) — one SCCP connection per MSSCCPBSS Application Part (call setup + management)BSSAPBase Transceiver Station Management (BTS to BSC management messages)BTSMLink Access Protocol D — ISDN layer 2 protocol (Q.920/921) for LLC servicesLAPD
Radio Resource Management — allocates physical parameters for radio systemSeparate protocol instances at MS/BTS layer and MS/BSC layer
RRMRRM'
Mobility ManagementMMConnection ManagementCM
58Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GSM Logical Channel Structure
TCH/FFull rate
TCH/HHalf rate
BCHBroadcast Channel
TCHTraffic Channel
CBCHCell Broadcast ChannelMSC to MS broadcasts
DCCHDedicated Control Channel
FACCHSACCH
FCCH SCH BCCH PCH AGCH RACH ACCH SDCCH
CCHControl Channel
CCCHCommon Control Channel
59Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
General Packet Radio Service (GPRS)Provides packet mode data access for GSM
IP-based architectureBegan as 2.5G enhancement
IP datagrams separated from circuit mode traffic at cluster Packet Control Unit (PCU)
Packet mode function in BSC to handle IP datagramsCircuit mode voice/data routed to MSC
Forwarded to other MSC or PSTNPacket mode data is routed to Serving GPRS Support Node (SGSN)
Forwarded to InternetPCU to SGSN runs IP over Frame Relay
Mobility managementCircuit mode traffic uses PSTN / PLMN routingPacket mode traffic uses IP routing
60Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS System Architecture
cell MSCBS
Internet
SGSN
GGSN
PSTN
PCU GPRSBackboneMS
PLMN - 1
GGSN
cell MSCBS
SGSN
PCUMS
cell MSCBS
SGSN
PCU GPRSBackboneMS
PLMN - 2
GPRSBackbone
BorderGateway
BorderGateway
61Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Support NodesServing GPRS Support Node (SGSN)
Packet-switched version of MSCHandles packets to / from Mobile Stations (MS) Handles MS mobility management
Gateway GPRS Support Node (GGSN) Interfaces SGSNs to external IP networks Maintains routing information
Exterior gateway for GPRS networkDHCP — assigns IP addresses to MSRoutes incoming IP datagrams to appropriate PCU
PSTN
GGSNcell MSCBS
SGSN
PCU GPRSBackboneMS Internet
62Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Architecture Protocol Stack
From Internet
MS to SGSN Tunnel SGSN to GSSN Tunnel
MS to BSS Tunnel BSS to SGSN Tunnel
63Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Packet Data Protocol — PDP ContextPDP context
Data structure stored in SGSN and GPRS Subscriber session information during active GPRS session
Tunnel Endpoint ID (TEID) ID allocated by SGSN / GGSN Identifies SGSN — GGSN tunnel for sessionSimilar to VC number in SVC
RecordsSubscriber IP addressIMSITunnel Endpoint ID (TEID) at GGSNTunnel Endpoint ID (TEID) at SGSN
64Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Protocol Structure — 1Fixed-system application sends data to MS
IP datagrams or X.25 packetsBasic hops
Internet GGSN SGSN BSS MSGGSN SGSN
L1L1
Standard user IP datagrams from InternetIP
GGSNSGSN
L2L2IPIP
Standard TCP/IP and infrastructure protocols
TCP/UDPTCP/UDP
GPRS Tunneling Protocol (GTP)GTP header added to user IP datagram
Call Data Records (CDR) for billingHandles call failure
GTPGTP
65Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Protocol Structure — 2
SGSN-to-MS Tunnel
Logical Link Control (LLC)LLC headerFlow controlError controlLink control
Sub-Network Dependent Convergence Protocol (SNDCP)
SNDCP headerEncapsulates GTP + user IP datagrams Provides
Session servicesSAR (Segmentation and Reassembly)
Maps user IP datagrams to LLC channel
BSS SGSNL1bisNW
BSSGP
LLC
SNDCP
L1MS
L2IP
TCP/UDP
LLC
GTPSNDCP
66Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Protocol Structure — 3SGSN to BSS
Frame Relay packetsMaps BSSGP signaling to Frame Relay signaling
Map LLC packets to BSSGPBase Station System GPRS Protocol (BSSGP) Processes routing and QoS information Routing layer for Frame Relay signaling Call setup / control signaling over Frame Relay
SGSNL1bisNW
BSSGP
LLCSNDCP
L1L1bisBSS
L2NW
IPBSSGP
TCP/UDP
GTP
67Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Protocol Structure — 4BSS to MS
GSM Radio Frequency (RF)MS allocated 1 to 8 GSM time slots 18 kbps per time slot 18 kbps to 144 kbps
Media Access Control (MAC)Between MS and BSSControls access to GPRS
Radio Link Control (RLC)MS-to-BSS Logical Link Control Flow control, error control, link control
BSSGP
L1bis
NW
RLC
BSS
RF
MAC
LLC
RF
MS
MAC
RLC
SNDCPIP
68Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Connection Process
69Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
GPRS Connection ProcessMS switches on and sends GPRS attach requestUser Registration — 1
Associate PLMN address with Packet Data Protocol (PDP) address PDP address — Static or dynamic IPPLMN address — International Mobile Subscriber ID (IMSI)
AuthenticationBSC queries Home Location Registers (HLR) — 2HLR updates Visitor Location Registers (VLR) — 3
Call Admission Control (CAC) — 4Determines required network resourcesGrants resources if available
Routing — hop-by-hop IP datagram deliveryRouting tables in GSN (GGSN or SGSN)
Address conversion / VC mappingGSN handles compression and encryption
70Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Enhanced Data Rates for GSM Evolution (EDGE)Standard: GPRS-136HS
Formally defined as 3G enhancement to GPRS
Considered 2.75G enhancement
Uses enhanced modulation technique
Transmits 60 kbps in each time slot
8 slots 60 kbps/slot = 480 kbps
Uses 384 kbps for user data
71Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
High Speed Circuit Switched Data (HSCSD)Circuit Switched Data (CSD)
14.4 kbps circuit mode data connection in 2G GSM User data replaces digitized voice in 1 time slot
High Speed Circuit Switched Data (HSCSD)2.5G enhancementUp to 8 slots (full user frame) allocated to one data channelUp to 115.2 kbps
Transparent data transmissionUser data stream can contain signaling to network
Allows dynamic reconfiguration of data connection (data rate, QoS) HSCSD data frames carry data sub-stream numbers
Maintains order of transmission over GSMNon-transparent data transmission
Only user data in data streamNo signaling or reconfiguration
LLC functions performed by GSM protocols
72Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
High Speed Downlink Packet Access (HSDPA)Higher data rates for packet data
Downlink speeds of 1.8, 3.6, 7.2, 14.0, 337 MbpsHS-DSCH simplified for fast packet data
Power control and variable chip rate eliminatedHybrid automatic repeat-request (HARQ)
LLC layer added between PHY and MAC (not in RLC)Incremental redundancy
Corrupted packets not discardedRetransmitted packets combined until error-free packet assembledFaster than waiting for uncorrupted retransmitted packet
Fast packet scheduling2 ms scheduling granularity (instead of 10 ms)Transmission scheduled to UEs reporting highest power levels
Adaptive Modulation and Coding (AMC)Modulation scheme and code rate depend on channel quality
73Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
SMS in GSM Architecture
GMSCSMSC
IWMSC
SME
SMSC
SME: Short Messaging EntitySMSC: Short Message Service CenterGMSC: Gateway Message Service CenterIWMSC: Interworking Message Service Center
74Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
SMS NodesShort Messaging Entity (SME)
Any entity that can receive or send short messagesFixed network elementMobile StationAnother service center
Short Message Service Center (SMSC)Store and forwarding of SMS between SME and MS
Gateway Message Service Center (GMSC)Receives SMS in SMSCInterrogates HLR for routing informationDelivers SMS to MSC for destination SME
Interworking Message Service Center (IWMSC)Receives SMS from MSC Delivers SMS to appropriate SMSC for forwarding
75Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
SMS Delivery to MS
SME SMSC HLR MSC VLR BSSSMS
Submit RouteRequest
Route
SMSForward
MS
UserInfo
ACK
UserInfo Page
ACKACK
SMSForward SMS
ForwardACK
ACKDeliveryReportDelivery
Report
76Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
CDMACode Division Multiple Access
Commercial system developed by Qualcomm Operates on AMPS frequencies
Channelization25 MHz radio band per directionDivide band into 1.25 MHz RF channels25 MHz per cluster / 1.25 MHz per channel = 20 channels per cluster
DSSS digital transmissionTransmit 1.2288 Mcps in 1.25 MHz radio channelVoice and control modulation — QPSK
Code divisionUsers transmit simultaneously using independent chip sequences
Orthogonal (Walsh) Codes / Pseudorandom noise (PN) codesReceiver separates channels by decoding chip sequences
StandardsIS-95 — now called CDMAone
77Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Orthogonal CDMA Codesm-dimensional vector space with inner product
m orthonormal basis vectors
Code schemeBasis vector Si is code assigned to station iStation i transmits ti Si with coefficientTotal transmission from all stations
1
1 mi ii
U Vm
U V
1
1 1 1
, 1, ... ,
,
0,,
1 1 1
with coefficient for any vector i
mi i ii
i j ij
m m mi i i j j j i j j ij ij j j
S i m
t S t
i jS S m
m i j
t S S t S t S S t m tm m m
T T
T
1 ,0 ,
1 ,
data 0no transmissiondata 1
it
1
mi iit S
T
78Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Example 4‐Chip CDMACode vectors for m = 4 stations
4-bit transmission levels (chips)
Radio signal amplitudes added together
1 2 3 4
1 1 1 11 1 1 11 1 1 11 1 1 1
S S S S
Binary 1 Binary 0 Station 1 –1 –1 –1 –1 +1 +1 +1 +1 Station 2 –1 +1 +1 –1 +1 -1 -1 +1 Station 3 –1 –1 +1 +1 +1 +1 -1 -1 Station 4 –1 +1 -1 +1 +1 -1 +1 -1
79Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Example 2‐bit Transmission
Data 0 1Station 1 Signal +1 +1 +1 +1 -1 -1 -1 -1
Data 0 1 Station 2 Signal +1 -1 -1 +1 -1 +1 +1 -1
Data no data 1 Station 3 Signal 0 0 0 0 -1 -1 +1 +1
Data 0 1 Station 4 Signal +1 -1 +1 -1 -1 +1 -1 +1 Total Transmission Signal +3 -1 +1 +1 -4 0 0 0
80Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Example 2‐bit Transmission
1
2
3
4
T
+3 -1 +1 +1 -4 0 0 0
Data
Chip
81Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Example DecodingInner Product
4
1
14 i ii
U V
U V T Sj jt
1 11 4 4
1 12 4 4
1 13 4 4
1 14 4 4
3, 1, 1, 1 1, 1, 1, 1 3 1 1 1 1 0
3, 1, 1, 1 1, 1, 1, 1 3 1 1 1 1 0
3, 1, 1, 1 1, 1, 1, 1 3 1 1 1 0
3, 1, 1, 1 1, 1, 1, 1 3 1 1 1 1 0
no data
t
t
t
t
1 11 4 4
1 12 4 4
1 13 4 4
1 14 4 4
4,0,0,0 1, 1, 1, 1 4 1 1
4,0,0,0 1, 1, 1, 1 4 1 1
4,0,0,0 1, 1, 1, 1 4 1 1
4,0,0,0 1, 1, 1, 1 4 1 1
t
t
t
t
First bitT = (+3, -1,+1,+1)
Second bit T = (-4,0,0,0)
82Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Orthogonal Walsh CodesWalsh 0
Walsh 1
Walsh 2
Walsh 3
Walsh N
W0 = 1 W0' = - 1
W1 =W0 W0
W0 W0'=
1 11 -1
=1 1 1 11 -1 1 -11 1 -1 -11 -1 -1 1
W2 =W1 W1
W1 W1'
W3 =W2 W2
W2 W2'
WN =WN-1 WN-1
WN-1 WN-1'
=S1
S4
S3
S2
Walsh N is 2N 2N matrix
83Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Pseudo‐Noise (PN) CodingPseudorandom Bernoulli sequence of 1 or –1
Equivalent to sequence of m coin tossesNearly equal number of 1 and –1 in each code
By central limit theorem
Codes are "nearly orthogonal"For codes A and B with chip patterns Ci
(A) and Ci(B)
2
1 1
1 1 1 1m mA Bi ii i
A B C Cm m
1
21 1 1 -1 -1 1 -1 -11
1
1 44
m A Bi ii
m
i
A B C Cm
P P P P P P P Pm m
1 11 1 11 12 2
P P P Pm
84Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Channel CodingForward channels
64 orthogonal Walsh codes to 64 usersTheoretically perfect separation between users
All signals in same cell scrambled using PN sequence Reduces interference between same Walsh code in neighboring cellsShort PN sequence uses cell ID as seedPaging and traffic scrambled with long PN sequence before Walsh
Reverse channels Orthogonal codes not applicable in uplink
Orthogonality requires time synchronizationMSs transmit asynchronously
Long PN sequenceStream is scrambled using short PN sequence Carries cell ID
85Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
4G CellularInitial planning for 4th generation cellular systems
ITU working group planning IMT-2000 IMT-AdvancedConceived as network supporting mobility — not telephones + dataConvergence with NGN
4G objectivesHigher network capacity than 3GSpectral efficiency (high bps / Hz and bps / Hz /site)100 Mbps for moving client and 1 Gbps for stationary client100 Mbps between any two points in worldSmooth handoff across heterogeneous networksGlobal roaming across multiple networksQoS for multimedia support — audio, HDTV, etcInteroperability with existing wireless standardsAll IPv6 packet switched network — eliminate circuit mode entirely
86Dr. Martin LandWirelessProtocols and Networks — Hadassah College — Fall 2021
Long Term Evolution (LTE)3.5G service
Early introduction of certain 4G enhancementsMarketed as 4G — does not meet 4G standards
Improved radio interface + data rates299.6 Mbps downstream75.4 Mbps upstream
Improved mobilitySupports MS moving at 500 km/h
Voice over LTE (VoLTE)Packet switched voiceLong-term replacement for circuit switched voice networkEnhanced voice encoding as VBR stream
Circuit-switched fallback (CSFB)Intermediate migration pathData over LTE + circuit switched voice
1Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Congestion and Flow Control
inTCP
2Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Flow Control and Congestion ControlFlow control
Sender avoids overflow of receiver bufferCongestion control
All senders avoid overflow of intermediate network buffersBuffer fill rate
Bytes / second arriving from networkBuffer empty rate
Bytes / second leaving to network or application layerBuffer file time
Example
Full
EmptyArriving bytes
Leaving bytes
overflow
buffer sizeT
buffer fill rate buffer empty rate
overflow
64 KB 64 KBT 16 seconds
8 KB/sec 4 KB/sec 4 KB/sec
3Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Congestion ControlFlow control
Avoid overflow in TCP receiver bufferCongestion control
Avoid overflow in router buffers
Flow Control TCPBuffer
RouterBuffer
4Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Queuing TheoryAssumptions
Segments arrive independently (Poisson statistics)Random length (bytes)Average arrival rate in steady state — Packets/sec, Bytes/sec, or bps
Segments leave independently (Poisson statistics)Average emptying rate in steady state — Packets/sec, Bytes/sec, or bps
Results
ExampleArrival rate = 90 packets / sec Empty rate = 100 packets / secUtilization = (90 packets / sec) / (100 packets / sec) = 0.9 = 90%Buffer level = 0.9 / (1 – 0.9) = 9 packets in bufferLatency = 1 / (100 packets / sec) 9 packets in buffer = (9 / 100) sec = 0.09 sec
arrival rateUtilization
empty rate
1 1 1Latency
empty rate arrival rate empty rate 1
Buffer Level Latency arrival rate1
0
2
4
6
8
10
12
14
16
18
200 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9
Utilization
latencybuffer level
5Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Buffer Throughput(Over)-simplified throughput model
Realistic throughput behaviorHigh arrival rate at bufferLonger latency + overflowSender timeoutsRe-transmit more segments higher arrival rate at buffer
1
buffer utilization(from all senders)
latency
buffer utilization(from all senders)
latency
1
throughput at receivers
1
1
receive rate
throughtputmaximum receive rate
arrival ratebuffer utilization
empty rate
throughput at receivers
receive rate (error‐free in‐order)
goodputmaximum receive rate
6Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Flow ControlSource window
Initial source window = maximum number of "unACKed" bytesDetermined by congestion + flow control
Destination windowNumber of bytes receiver can acceptDetermined by available space in receiver bufferBuffer level = Previous level + arriving bytes – bytes read by AppApplication reads too slowly decrease destination window
Sliding windowWindow field in TCP header Number of bytes receiver will acceptReceiver discards bytes above window size Full
EmptyArriving bytes
Bytes read by App
7Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Flow Control Example
04 KB
Persist Timeout4 KB4 KB
App reads 4 KB
00
08 KB6 KB00 KB6 KB
App reads 4 KB6 KB2 KB
04 KB
2 KB6 KB2 KB2 KB
4 KB4 KB4 KB64 KB6 KB2 KB4 KB64 KB8 KB02 KB64 KB8 KB0—64 KB
Dest Window
Buffer LevelIn FlightSource
Window
2 KB2 KB
ACK 4 KB window = 4 KB
2 KB
ACK 6 KB window = 6 KB
6 KB
ACK 12 KB window = 0 KB
ACK 12 KB + 1B window = 4 KB1 B
2+2 = 4
2+4 = 6
6+6 = 12
ACK 12 KB window = 4 KB6+6 = 12error
8Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Receive Window Bugs — 1Bug — deadlock
Receiver advertises window = 0Window update with window > 0 is lost deadlock
Fix — persist timeoutSender attempts small segmentACK contains new window size
Sender Receiver
win = 0
win > 0
error
1 byte
ACK
win > 0
1 byte
win = 0
9Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Receive Window Bugs — 2Silly Window Problem
Application reads received data slowlyReceiver advertises small window Data bytes ~ header bytesMore segments / file transfer larger total traffic (data + headers)
Nagle Algorithm — bug fix for Silly WindowSender accumulates application data — sends large segmentsWorks badly with Telnet (requires small segments)
Receiver side bug fixReceiver keeps 0 window size until it can advertise large window
10Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Congestion ControlEnd-to-end congestion control
Based on host estimatesNo feedback from intermediate network nodes
Slow-startBegin session with low transmission rateIncrease rate until timeouts begin
Fast retransmitDo not wait for timeoutRe-transmit after duplicate ACKs (dupACKs)
Congestion avoidanceLimit transmission rate after duplicate ACKsGrowth rate of transmission rate slows
11Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Slow‐StartCongestion window (cwnd)
Source windowMaximum number of "unACKed" bytes
Initial cwnd = 1 MSS (maximum segment size)Data rate = 1 MSS / RTT
RTT = round trip time = time from send to ACK Maximum cwnd = destination window
Exponential growthOn (ACK)
cwnd cwnd + size of data ACKedif (cwnd > maximum cwnd)
cwnd max cwndOn (ACK timeout)
cwnd initial cwnd = 1 MSS
Sender Receiver
RTT
Timeout
ACK 1 MSS
ACK 2 MSS
ACK 3 MSS
12Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Computing TCP's Retransmission Timer — RFC 2988Initialize
RTO 3 secondsG clock granularity (typically 500 ms)R first RTT measurement (round trip time)SRTT RRTTVAR R/2RTO max(1 sec, SRTT + max(G, 4 * RTTVAR))
Update after measurements R'RTTVAR (1 - ) * RTTVAR + * |SRTT – R'|SRTT (1 - ) * SRTT + * R'RTO max(1 sec, SRTT + max (G, 4 * RTTVAR))
= 1/8
= 1/4
Sender Receiver
SEQRTT
ACK
13Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Fast RetransmitBetter performance with RTO >> RTT
3 duplicate ACKs (dupACKs) for segment re-send segment
Sender Receiver
Timeo
ut
error
SEQ = 100
SEQ = 200
SEQ = 300
SEQ = 400
SEQ = 200 (duplicate)
ACK = 200
ACK = 200 (duplicate)
SEQ = 500
ACK = 200 (duplicate)
ACK = 200 (duplicate)
ACK = 600
14Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Congestion Avoidance
Slow start phaseOn (ACK && cwnd < ssthresh)
cwnd cwnd + size of data ACKedOn (ACK timeout)
ssthresh cwndcwnd initial cwnd = 1 MSSRTO 2 * RTO
Congestion avoidance phaseOn (ACK && cwnd > ssthresh)
cwnd cwnd + 1 MSSFast retransmit with fast recovery
On (3 dupACKs)ssthresh cwnd / 2 cwnd ssthresh + 3retransmit, wait 1 RTT continue
Reno protocol
If dupACKs > 3cwnd++ on each dupACK
15Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Sender with Reno — 1// initialize
SEQ = ISN + 1SendBase = ISN + 1InFlight = 0cwnd = 1 MSSSet ssthreshold large (local policy)RTO = timeout interval
on (new data from application)Prepare data segment:sequence number = SEQif InFlight < min{cwnd,SendWindow,RecvWindow)
Pass segment to IP SEQ = SEQ + length(data)InFlight = InFlight + length(data)if !(timer running) timer = RTO
16Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Sender with Reno — 2if (receive ACK = y)
stop timerif (y > SendBase)
dupACK = 0newACKs = y – SendBase // bytes ACKedSendBase = yInFlight = InFlight – newACKsif (cwnd < ssthresh) cwnd = cwnd + newACKs else cwnd = cwnd + 1 MSSif (InFlight > 0) timer = RTO
17Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Sender with Reno — 3// if (y > SendBase)else
dupACK++if (dupACK = 3)
SEQ = SendBase = min{unACKed SEQ} and retransmittimer = RTOssthresh = cwnd / 2cwnd = ssthresh + 3wait 1 RTT // wait for ACK of resent packet
if (dupACK > 3)cwnd = cwnd + 1 MSS and resend again
if (timeout)SEQ = SendBase = min{unACKed SEQ} and retransmitssthresh = cwndcwnd = initial cwnd = 1 MSSRTO = 2 * RTOtimer = RTO
18Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Receiver with Reno — 1// initialize
Set RecvWindow = receiver buffer sizeexpected = Sender ISN + 1ack_buffer = 0ack_max (local policy: delayed ACK trigger)ack_delay = 250 msec (local policy: < 500 msec)Start ACK delay timer = ack_delay
if (ACK delay timer = 0 && ack_buffer > 0)Send ACK = expected with updated RecvWindowACK delay timer = ack_delayack_buffer = 0
19Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
TCP Receiver with Reno — 2if (receive SEQ = x)
if (x = expected && error-free)expected = expected + length(data)if (NACK = 1)
Send ACK = expected with updated RecvWindowACK delay timer = ack_delayack_buffer = 0NACK = 0
else if (ack_buffer < ack_max)nextACK = expectedack_buffer++
else if (ack_buffer = ack_max)Send ACK = expected with updated RecvWindowACK delay timer = ack_delayack_buffer = 0
else Send ACK = expected with updated RecvWindowACK delay timer = ack_delayNACK = 1
20Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno Example — 1Counting in bytes: SEQ = SEQm (1 MSS) ACK = ACKm (1 MSS)ssthresh = 32 Receiver sends ACK for every 4 packets (or ACK delay)
ReceiverSender
48+4 = 12
412
8 – 15 (8)888
04+4 = 8
4 – 7 (4)
2 – 3 (2)
1 (1)
Packets Sent
48
444
02+2 = 4
24
222
01+1 = 2
12
111
New ACKsACKm SentSEQm Sentin‐flightcwnd
21Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno Example — 2
New ACKsACKm SentPackets SentSEQm Sentin‐flightcwnd
48 – 63 (16)483232
1628+4 = 32
432
2024+4 = 28
428
40 – 47 (8)402424
1620+4 = 24
424
32 – 39 (8)322020
1216+4 = 20
420
16 – 31 (16)161616
012+4 = 16
416
412
22Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno Example — 3
New ACKsACKm SentPackets SentSEQm Sentin‐flightcwnd
1237+1 = 38
456
1636+1 = 37
452
2035+1=36
448
2434+1 = 35
444
2833+1 = 34
440
64 – 67 (4)643233
2832+1 = 33
436
48 – 63 (16)483232
23Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno Example — 4
New ACKsACKm SentPackets SentSEQm Sentin‐flightcwnd
76 – 98 (23)762323
023
1676 (cumulative)
Retransmit 1 packet60601622
16ssthresh 1919 + 3 = 22
0603rd dupACK
1639
060
1639
060
1638+1 = 39
460
68 – 75 (8)682038
24Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno: First Alternative Scenario
01+1 = 2
cwnd = in‐flight no more packets no 3 dupACKs Timeout
New ACKsACKm SentPackets SentSEQm Sentin‐flightcwnd
14
3 (1)311
01
03
33+0 = 3
03
4 – 5 (2)433
12+1 = 3
13
2 – 3 (2)222
01+1 = 2
12
1 (1)111
25Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno: Second Alternative Scenario – 1
8ssthresh 33 + 3 = 6
7 (1)77retransmit
07
073rd dupACK
New ACKsACKm SentPackets SentSEQm Sentin‐flightcwnd
07
7 packets can cause 7 dupACKs8 – 13 (6)877
14+3 = 7
37
4 – 7 (4)444
02+2 = 4
24
2 – 3 (2)222
01+1 = 2
12
1 (1)111
26Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Reno: Second Alternative Scenario – 2
7 (1)799
89
076th dupACK
88
87
14 – 23 (10)101410
09+1 = 10
074th dupACK
714 (cumulative)
New ACKsACKm SentPackets SentSEQm Sentin‐flightcwnd
075th dupACK
27Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Selective Acknowledgment OptionSelective ACK (SACK)
Permits ACK for segments with gapsOption negotiated between hostsDefined in RFC 2018
ExampleLast ACK = 5000Send 8 segments 500 data bytes / segmentCase 1
First 4 segments received and last 4 droppedReceiver returns normal ACK = 5000 + 4 * 500 = 7000No SACK option field
Case 2First segment lost and 7 segments receivedFor each segment receiver returns segment with
ACK = 5000 SACK option field with start + end ACK
Option Field
8999550050008500849955005000800079995500500075007499550050007000699955005000650064995500500060005999550050005500———5000EndStartACKData
28Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Active Queue Management (AQM)Standard Queue
At receiver Full buffer drop excess packets
At senderNo ACK timeout signal congestion
Random Early Detection (RED)Router
Detects congestion earlyDrops random packets
Sender Sees dupACKs or timeoutAssumes congestionLowers cwnd
Full
EmptyArrivingpackets
Leavingpackets
buffer utilization(all senders)
latency1
0.85 1
throughput at receivers
29Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
RED AlgorithmAlgorithm
for each packet arrivalcalculate avg = average queue size
if minth avg < maxthcalculate probability pawith probability pa:
mark arriving packet for dropelse if maxth avg
mark arriving packet for dropParameters
maxp = maximum mark probability (0.1 to 0.5)minth ~ 5 maxth ~ 30
pb maxp (avg − minth) / (maxth − minth)pa pb / (1 − count pb)count = number of consecutive dropped packets
30Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
AQM with ECNExplicit Congestion Notification (RFC 3168)
1. IP router predicts congestion — RED with mark (no drop)2. IP router indicates congestion to receiver in IP header3. Receiver indicates congestion to sender in TCP ACK header
App
TCP
IP
DL
PHY
IP datagram 85%Full
IP datagramwith ECN
TCP segmentwith ECN
App
TCP
IP
DL
PHY
1 2
3
31Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Explicit Congestion Notification (ECN)
Differentiated Services Code Point (DSCP)QoS requirements
Explicit Congestion Notification (ECN)
2 bitsECN
16 bits6 bits4 bits4 bits
DataOptions
Destination IP AddressSource IP Address
Header ChecksumProtocolTime to LiveFragment Offset (13 bits)FlagsIdentification
Total Length (header + data in bytes)DSCPHlen Version
IP datagram
To allow protocol error checking
For retransmissions
CE (Congestion Experienced)11
ECT(1) — ECN Capable Transport (1)10
ECT(0) — ECN Capable Transport (0)01
Not ECN capable00
32Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Explicit Congestion Notification (ECN)TCP header flags
ECN‐EchoECE
Congestion Window Reduced (CWR) flagCWR
ECN‐nonce concealment protectionNS
Options urgent pointerchecksumwindow sizeflagsnot usedHLEN
acknowledgement number (ACK)sequence number (SEQ)
destination portsource port32 bits
No more dataFIN
SynchronizeSYN
ResetRST
Push bufferPSH
AcknowledgmentACK
Urgent pointerURG
33Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN NegotiationTCP client
SYN ECE = CWR = 1 in SYNTCP server
ECE = 1 in SYN-ACKIP
ECT(0) , ECT(1) in SYN and SYN-ACK
client serverSYN with ECE = CWR = 1
SYN‐ACK with ECE = 1 C
WR = 0
ACK
34Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 1No congestion
Measure long term average buffer level nCompare with threshold level th
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
IP datagramECN = 01 (ECT)
TCP segmentECE = CWR = 0
App
TCP
IP
DL
PHY
35Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 2No congestion
App
TCP
IP
DL
PHY
TCP ACKECE = CWR = 0
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
IP datagramECN = 01 (ECT)
36Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 3Incipient congestion
Router Sees ECN = ECT in incoming IP headerSets ECN = CE in outgoing IP headerNotifies receiver of incoming congestion
App
TCP
IP
DL
PHY
n > th
TCP segmentECE = CWR = 0
App
TCP
IP
DL
PHY
IP datagramECN = 10 (ECT)
IP datagramECN = 11 (CE)
37Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 4Incipient congestion
Receiver Sets ECE = 1 in TCP headerNotifies sender of congestion
App
TCP
IP
DL
PHY
IP datagramECN = 10 (ECT) n < th
TCP ACKECE = 1 CWR = 0
App
TCP
IP
DL
PHY
IP datagramECN = 10 (ECT)
38Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 5Incipient congestion
Sender Lowers congestion window (once per RTT)Sets CWR = 1 in TCP header (ACK of ECE to receiver)
App
TCP
IP
DL
PHY
TCP segmentECE = 0 CWR = 1
App
TCP
IP
DL
PHY
n > thIP datagramECN = 01 (ECT)
IP datagramECN = 11 (CE)
39Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 6Incipient congestion
Receiver Sees CWR = 1 in sender TCP headerCE in IP header new incoming ECE = 1 in ACK TCP header
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
TCP ACKECE = 1 CWR = 0
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT)
40Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 7Continued congestion
Sender Lowers congestion window once per RTTSets CWR = 1 in TCP header (ACK of ECE)
App
TCP
IP
DL
PHY
TCP segmentECE = 0 CWR = 1
App
TCP
IP
DL
PHY
n > thIP datagramECN = 01 (ECT)
IP datagramECN = 11 (CE)
41Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 8Continued congestion
Receiver Sees CWR = 1 in sender TCP headerCE in IP header new incoming ECE = 1 in ACK TCP header
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
TCP ACKECE = 1 CWR = 0
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT)
42Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 9End of congestion
Sender sets CWR = 1 in TCP header (ACK of ECE)Router sends ECN = 01 in IP header (signals no congestion)
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
IP datagramECN = 01 (ECT)
TCP segmentECE = 0 CWR = 1
App
TCP
IP
DL
PHY
43Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 10End of congestion
Receiver sends ECE = 0 in TCP header (signals no congestion)
App
TCP
IP
DL
PHY
TCP ACKECE = CWR = 0
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
IP datagramECN = 01 (ECT)
44Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Operation — 11End of congestion
Sender clears CWR and begins raising congestion windowRouter sends ECN = 01 in IP header
App
TCP
IP
DL
PHY
IP datagramECN = 01 (ECT) n < th
IP datagramECN = 01 (ECT)
TCP segmentECE = CWR = 0
App
TCP
IP
DL
PHY
45Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
RED and ECN GoodputParameters
minth = 5 maxth = 30
5
5.5
6
6.5
7
7.5
8
8.5
9
9.5
10
0 100 200 300 400 500 600Number of flows
Goo
dput
(Mbp
s)
ECN (max_p=0.1)RED (max_p=0.1)ECN (max_p=0.5)RED (max_p=0.5)
Ref: Kinicki and Zheng, A Performance Study of Explicit Congestion Notification (ECN) with Heterogeneous TCP Flows
46Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
RED and ECN DelayParameters
minth = 5 maxth = 30 maxp =0.5
0
0.02
0.04
0.06
0.08
0.1
0.12
0.14
0.16
0.18
0.2
0 100 200 300 400 500 600
Number of flows
One
-way
del
ay (S
econ
ds) ECN (Fragile flows)ECN (Average flows)ECN (Robust flows)RED (Fragile flows)RED (Average flows)RED (Robust flows)
47Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Goodput with 120 flowsParameters
minth = 5 maxth = 30
55.5
66.5
77.5
88.5
99.510
0 0.2 0.4 0.6 0.8 1
max_p
Goo
dput
(M
bps)
ECN (max_th=15)RED (max_th=15)ECN (max_th=30)RED (max_th=30)
48Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
ECN Nonce (RFC 3540)Problem
Unscrupulous or poorly implemented receiverClears ECN-Echo — no congestion signals to senderGives receiver advantage over connections that behave properly
SenderIP header with ECN = 01 = ECT(0) or ECN = 10 = ECT(1)
Except retransmissions (Not ECN Capable) and CE packetsKeeps per-packet map of SEQ to nonce (0 or 1)
RouterForwards packet or overwrites ECT with ECN = 11 = CE
ReceiverKeeps cumulative ACK number (standard TCP)Keeps cumulative sum % 2 of received nonces for ACKed packetsNS flag in TCP header = sum of nonces for ACKed packetsCE packets — use nonce = 0
49Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Nonce ExampleHonest Receiver
Sender Receiver
SEQ_1 ECT(0)
SEQ_2 ECT(0)
SEQ_3 ECT(1)
SEQ_4 ECT(0)
ACK_3 NS = 0
SEQ_5 ECT (1)
ACK_6 NS = 0 ECE = 1
SEQ_5 CEnonce = 0 0
0
0
1
1
Nonce Sum
NS initialized to 1 Sent in SYN‐ACK and ACK of handshake
Sender sees correct NS
Sender sees correct NS
50Dr. Martin LandCongestion / Flow Control in TCPProtocols and Networks — Hadassah College — Fall 2021
Nonce ExampleCheating Receiver
Sender Receiver
SEQ_1 ECT(1) sum = 0SEQ_2 ECT(0) sum = 0
SEQ_3 ECT(1) sum = 1
SEQ_4 ECT(0) sum = 1
ACK_3 NS = 0 (guess)
SEQ_5 ECT (1) sum = 0
ACK_6 NS = 1 (guess)
SEQ_3 CEnonce = 0
SEQ_6 ECT(0) sum = 0
Receiver ignores CEDoes not set ECEGuesses nonce sum after CE
1
1
0
0
0
0
Guess
Sender sees wrong NS
Sender sees wrong NS