outloutl neine -...
TRANSCRIPT
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
CPSC 441 Review 1
Reference ModelsReference Models
OSI model 7-layer model application OSI model 7 layer model application presentation session transport network data link and physicalp y
TCPIP model 4-layers application y pp transport Internet and Host-to-Network
Internet Protocol Stack ndash a hybrid of TCPIP and OSI reference models
CPSC 441 Review 2
Layers and ProtocolsLayers and Protocols
Layered network architecture hellip whyLayered network architecture hellip whyReduces design complexity
The purpose of a layerhe purpose of a layerLayer-N peers converse with each other using protocols each layer provides functionality to th hi h l the a higher layer
ProtocolsA t f l i th f t d A set of rules governing the format and meaning of messages exchanges by peer entities within a layer
CPSC 441 Review 3
y
Protocols Layers and PDUrsquosProtocols Layers and PDU s
Protocol Layer PDUyHTTP FTP Application layer messageTCP UDP Transport layer segmentICMP IP Network layer datagramPPP Ethernet Data link layer frameIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 4
More on Layers and Protocols More on Layers and Protocols
Protocol Layer Imm Lower Layery yHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 5
InternetworksInternetworks
A collection of interconnected networks is A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big p yinternetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 6
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Reference ModelsReference Models
OSI model 7-layer model application OSI model 7 layer model application presentation session transport network data link and physicalp y
TCPIP model 4-layers application y pp transport Internet and Host-to-Network
Internet Protocol Stack ndash a hybrid of TCPIP and OSI reference models
CPSC 441 Review 2
Layers and ProtocolsLayers and Protocols
Layered network architecture hellip whyLayered network architecture hellip whyReduces design complexity
The purpose of a layerhe purpose of a layerLayer-N peers converse with each other using protocols each layer provides functionality to th hi h l the a higher layer
ProtocolsA t f l i th f t d A set of rules governing the format and meaning of messages exchanges by peer entities within a layer
CPSC 441 Review 3
y
Protocols Layers and PDUrsquosProtocols Layers and PDU s
Protocol Layer PDUyHTTP FTP Application layer messageTCP UDP Transport layer segmentICMP IP Network layer datagramPPP Ethernet Data link layer frameIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 4
More on Layers and Protocols More on Layers and Protocols
Protocol Layer Imm Lower Layery yHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 5
InternetworksInternetworks
A collection of interconnected networks is A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big p yinternetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 6
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Layers and ProtocolsLayers and Protocols
Layered network architecture hellip whyLayered network architecture hellip whyReduces design complexity
The purpose of a layerhe purpose of a layerLayer-N peers converse with each other using protocols each layer provides functionality to th hi h l the a higher layer
ProtocolsA t f l i th f t d A set of rules governing the format and meaning of messages exchanges by peer entities within a layer
CPSC 441 Review 3
y
Protocols Layers and PDUrsquosProtocols Layers and PDU s
Protocol Layer PDUyHTTP FTP Application layer messageTCP UDP Transport layer segmentICMP IP Network layer datagramPPP Ethernet Data link layer frameIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 4
More on Layers and Protocols More on Layers and Protocols
Protocol Layer Imm Lower Layery yHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 5
InternetworksInternetworks
A collection of interconnected networks is A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big p yinternetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 6
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Protocols Layers and PDUrsquosProtocols Layers and PDU s
Protocol Layer PDUyHTTP FTP Application layer messageTCP UDP Transport layer segmentICMP IP Network layer datagramPPP Ethernet Data link layer frameIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 4
More on Layers and Protocols More on Layers and Protocols
Protocol Layer Imm Lower Layery yHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 5
InternetworksInternetworks
A collection of interconnected networks is A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big p yinternetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 6
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
More on Layers and Protocols More on Layers and Protocols
Protocol Layer Imm Lower Layery yHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 802 11IEEE 80211
Assuming the Internet Protocol StackAssuming the Internet Protocol Stack
CPSC 441 Review 5
InternetworksInternetworks
A collection of interconnected networks is A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big p yinternetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 6
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
InternetworksInternetworks
A collection of interconnected networks is A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big p yinternetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 6
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Network CoreNetwork Core
Packet switching ndash a technique for Packet switching a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquop y
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMATDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 7
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
DelayLoss in Packet Switched N t ksNetworks
Queuing delay and packet lossQueuing delay and packet loss
Transmission delayTransmission delay
Propagation delayPropagation delay
CPSC 441 Review 8
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 9
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Application LayerAppl cat on Layer
Processes communicating across networksProcesses communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos Hypertext Transfer Protocol the Web s application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a Persistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 10
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
HTTP Continued hellipHTTP Cont nued hellip
HTTP headersHTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
CPSC 441 Review 11
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
The World Wide WebThe World W de Web
What is a Web ProxyWhat is a Web ProxyWhat is a caching hierarchyCaching issues ndashCaching issues
Cache consistency issuesbull The ldquoconditional HTTP GETrdquo request
Cache replacement issuesPrefetching
Cookies ndash a means to maintain state in stateless HTTP servers
CPSC 441 Review 12
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
DNS Domain Name SystemD D m m y m
Internet hostsInternet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host d IP ddname and IP address
distributed database implemented in hierarchy of many name serversof many name serversDistributed for scalability amp reliability
CPSC 441 Review 13
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
DNS Services D
Hostname to IP address translationHost aliasingHost aliasing
Canonical and alias namesMail server aliasingMail server aliasingLoad distribution
Replicated Web servers set of IP addresses Replicated Web servers set of IP addresses for one canonical name
CPSC 441 Review 14
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
root DNS serverDNS Infrastructure2
3TLD DNS
DNS Infrastructure
Host at cispolyedu 4
5
TLD DNS serverp y
wants IP address for gaiacsumasseduInfr structure
local DNS serverdnspolyedu
1678
InfrastructureClient resolverLocal DNS server
1
authoritative DNS serverdnscsumassedu
8Authoritative DNS ServerRoot DNS Server
requesting hostcispolyedu
gaia cs umass edu
dnscsumassedu
Top-Level Domain DNS Server
CPSC 441 Review 15
gaiacsumassedu
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Electronic Mail outgoing message queueE
Three major user mailbox
message queue
useragentm j
componentsuser agents
E d O tl k
useragent
mailserver
agent
SMTPeg Eudora Outlook Pine Netscape Messenger
mail servers
mailserver user
agent
SMTP
SMTPmail servers
Incoming outgoing messages
Push protocol SMTP
useragent
mailserver
SMTP
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
useragent
user
CPSC 441 Review 16
IMAP POP3 agent
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 17
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Transport LayerTransport Layer
Logical end-to-end communication between g mmprocesses running on different end systemsM lti l i d lti l iMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde multiplexingUDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data d ldeliverySome applications use UDP while some use TCP Why
CPSC 441 Review 18
y
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Reliable Delivery ConceptsRel able Del very Concepts
GBN SR ndash also called ldquostop-and-waitrdquo GBN SR also called stop and wait protocolsACK NAK SACKK K KPerformance of ldquostop-and-waitrdquo
Pipeliningp gSimilaritydifferences between TCP and the above protocolsp
CPSC 441 Review 19
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP segment structure (12)
source port dest port
32 bitsURG urgent data
(generally not used)countingby bytes
sequence numberacknowledgement number
Receive windowFSRPAUhead not
(generally not used)
ACK ACK valid
PSH h d
by bytes of data(not segments)
Receive windowUrg data pnterchecksum
FSRPAUlen used
Options (variable length)
PSH push data now(generally not used)
RST SYN FIN
bytes rcvr willingto accept
application
Options (variable length) connection estab(setup teardown
commands) ppdata
(variable length)Internet
checksum(as in UDP)
CPSC 441 Review 20
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Segment Structure (22)TCP Segment Structure ( )
Sequence and acknowledgement numberingSequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in Checksum compulsory in TCP but not in UDPHandshaking procedures during TCP Handshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 21
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Flow ControlTCP Flow Control
receive side of TCP sender wonrsquot overflowreceiverrsquos buffer by
flow controlf
connection has a receive buffer
receiver s buffer bytransmitting too much
too fast
speed-matching service matching the service matching the send rate to the receiving apprsquos drain
trateapp process may be slow at reading from buffer
CPSC 441 Review 22
buffer
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Connection EstablishmentTCP Connection Establishment
client serverCLOSED client serverCLOSED
LISTEN
Passive open
SYNSYN+ACK
Active openSYN
LISTEN
SYN_SENTSYN_RCVD
SYNSYN+ACK
SYN+ACKACK
EstablishedACK
SYN+ACKACK
Solid line for client
Dashed line for server
CPSC 441 Review 23
Dashed line for server
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Connection TerminationTCP Connection Termination
client serverclient serverclosing
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
wait
_
TIME_WAIT
tim
ed
CLOSED
CLOSED
CPSC 441 Review 24
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Principles of Congestion Controlp f gCongestion informally ldquotoo many sources sending too much data too fast for network to sending too much data too fast for network to handlerdquoDifferent from flow controlM if t tiManifestations
Packet loss (buffer overflow at routers)Increased end-to-end delays (queuing in router buffers)
Results in unfairness and poor utilization of network resources
Resources used by dropped packets (before they were y pp p ( ylost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 25
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Congestion Control ApproachesCongest on Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoload on the network is reasonableEnd-end congestion control
no explicit feedback from networkno explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion control id f db k d routers provide feedback to end systems
single bit indicating congestion (eg ECN)explicit rate sender should send at
CPSC 441 Review 26
explicit rate sender should send at
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Congestion Control OverviewTCP Congest on Control Overv ew
end-end control (no network assistance)end end control (no network assistance)Limit the number of packets in the network to window WRoughly
W
W is dynamic function of perceived network
rate = WRTT Bytessec
W is dynamic function of perceived network congestion
CPSC 441 Review 27
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Congestion ControlsTCP Congest on ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast RetransmitFast Retransmit
Reno (Jacobson 1990)Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 28
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP TahoeBasic ideas
Gently probe network for spare capacityD ti ll d t tiDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation f p m m error recovery
for every ACK if (W lt ssthresh) then W++ (SS)if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
CPSC 441 Review 29
W = 1
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Reno Fast RecoveryObjective prevent `pipersquo from emptying after fast retransmit
each dup ACK represents a packet having left the pipe (successfully received)Letrsquos enter the ldquoFRFRrdquo mode on 3 dup ACKsLet s enter the FRFR mode on 3 dup ACKs
ssthresh larr W2retransmit lost packetretransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non dup ACK (1 RTT later)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 30
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Reno SummaryTCP Reno Summary
Fast Recovery along with Fast Retransmit Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKsp K
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 31
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
TCP Reno ThroughputTCP Reno ThroughputAverage throughout 75 WRTTThr u hput in t rms f l ss r t Throughput in terms of loss rate
MSSsdot221LRTT
MSS221
What happens if L-gt0Does link capacity matter if we experience Does link capacity matter if we experience random lossHigh-speed TCP
CPSC 441 Review 32
High speed TCP
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 33
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Network LayerNetwork Layer
Transport segment from sending to Transport segment from sending to receiving hostNetwork layer protocols in every host y p y router [contrast with transportapplication layer]Main functions of network layer
Forwarding ndash moving datagrams within a routerRouting ndash determine end-to-end paths taken by packets
CPSC 441 Review 34
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
IP datagram formatIP t l i
ver length
32 bitsIP protocol versionnumber
header length(bytes) for
total datagramlength (bytes)head
lentype ofservice
16-bit identifierInternetchecksum
time tolive
( y )
max numberremaining hops
forfragmentationreassembly
len serviceldquotyperdquo of data flgs fragment
offsetupperlayer checksumlive
32 bit source IP address
remaining hops(decremented at
each router)
upper layer protocol
layer
32 bit destination IP address
data ( i bl l n th
upper layer protocolto deliver payload to Options (if any) Eg timestamp
record routetaken specifyhow much overhead
ith TCP (variable lengthtypically a TCP
or UDP segment)
list of routers to visit
with TCP20 bytes of TCP20 bytes of IP
CPSC 441 Review 35
= 40 bytes + app layer overhead
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
IPv4 AddressinggIP address 32-bit identifier for host
223111
223 1 2 1identifier for host router interfaceinterface connection
223112223114 223129
223 1 2 2
223121
between hostrouter and physical link
routerrsquos typically have
223113223122
2231327
router s typically have multiple interfaceshost may have multiple interfaces
223132223131
interfacesIP addresses associated with each interface
223111 = 11011111 00000001 00000001 00000001
CPSC 441 Review 36
interface223 1 11
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Classful AddressingClassful Address ngAddresses consists of 0 Network
(7 bits)Host (24 bits)
Network partHost part
IP addresses divided into five
(7 bits)
Class A
classes A B C D and E Problems
1 Network(14 bits)
Host (16bits)0
Class B
1110 Multicast address
Class D
110 Network(21 bits)
Host (8bits)
Class C Class DClass C
1111 Future use addresses
Class E
CPSC 441 Review 37
Class E
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Subnets MotivationSubnets Mot vat on
The ldquoclassfulrdquo addressing scheme proposes The classful addressing scheme proposes that the network portion of a IP address uniquely identifies one physical networky p y
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hostsexhausted before we have 4 billion hosts
Take bits from the host number part to Take bits from the host number part to create a ldquosubnetrdquo number
CPSC 441 Review 38
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Addressing in the InternetAddress ng n the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addresssubnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 gbits These corrsp to classes A B and C resp
subnet host
11001000 00010111 00010000 00000000
subnetpart
hostpart
CPSC 441 Review 39
2002316023
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
NAT Network Address Translation
local networkrest of
10001
10 0 0 4
(eg home network)100024
Internet
1000210004
13876297
10003
Datagrams with source or destination in this network
All datagrams leaving localnetwork have same single source destination in this network
have 100024 address for source destination (as usual)
network have same single source NAT IP address 13876297different source port numbers
CPSC 441 Review 40
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Routing Algorithm Classificationg g m f1 Global decentralized Global
2 Static dynamicStaticGlobal
all routers have complete topology link cost infoldquoli k rdquo l i h
Staticroutes change slowly over time
D ildquolink staterdquo algorithmsDecentralized
router knows about
Dynamicroutes change more quickly
periodic update l k physically-connected
neighborsIterative distributed
in response to link cost changes
3 Load sensitivitycomputationsldquodistance vectorrdquo algorithms
Many Internet routing algos are load insensitive
CPSC 441 Review 41
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Why Hierarchical RoutingWhy H erarch cal Rout ngscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyadministrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 42
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Hierarchical Routingg
aggregate routers into ldquo
Gateway routerregions ldquoautonomous systemsrdquo (AS)routers in same AS run
yDirect link to router in another AS
routers in same AS run same routing protocol
ldquointra-ASrdquo routingp t l
Establishes a ldquopeeringrdquo relationshipPeers run an ldquointer-AS protocol
routers in different AS can run different intra-AS r utin pr t c l
Peers run an inter AS routingrdquo protocol
AS routing protocol
CPSC 441 Review 43
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Interconnected ASes
3
Interconnected ASes
3b3a
1c2aAS3
AS2
2c2b
3c
1d AS1AS2
1a 1bForwarding table is configured by both
Intra-ASRouting algorithm
Inter-ASRouting algorithm
g yintra- and inter-AS routing algorithm
Intra-AS sets entries Forwarding
table
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for
CPSC 441 Review 44
sets entries for external dests
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 45
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Link Layer IntroductionL nk Layer Introduct onSome terminology
hosts and routers are nodes
ldquolinkrdquo
communication channels that connect adjacent nodes along communication path are linksp
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
data-link layer has responsibility of transferring datagram from one node
CPSC 441 Review 46
transferring datagram from one node to adjacent node over a link
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
ARP Address Resolution Protocol
Each IP node (Host R ) LAN h
Question how to determineRouter) on LAN has ARP tableARP Table IPMAC
MAC address of Bknowing Brsquos IP address
ARP Table IPMAC address mappings for some LAN nodes IP dd MAC dd TTL
1A-2F-BB-76-09-AD
237 196 7 23
237196778
lt IP address MAC address TTLgtTTL (Time To Live) time after which address m ppin ill b f tt n
LAN
237196723 237196714
mapping will be forgotten (typically 20 min)58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
CPSC 441 Review 47
F237196788
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointp pPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 48
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Taxonomy of Multiple Access Control Protocolsy p
Three broad classesChannel PartitioningChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accessh l t di id d ll lli ichannel not divided allow collisions
ldquorecoverrdquo from collisionsldquoTaking turnsrdquoTaking turns
Nodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 49
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Random Access ProtocolsRandom Access Protocols
When node has packet to sendptransmit at full channel data rate Rno a priori coordination among nodes
t t itti d ldquo lli i rdquotwo or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsExamples of random access MAC protocolsslotted ALOHAALOHA
CPSC 441 Review 50
CSMA CSMACD CSMACA
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
CSMACD (Collision Detection)CSMACD (Coll s on Detect on)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage wastage
collision detectioneasy in wired LANs measure signal strengths easy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 51
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp 4 If adapter detects
another transmission while datagram from net layer amp creates frame
2 If adapter senses channel dl
another transmission while transmitting aborts and sends jam signal
5 f b d idle it starts to transmit frame If it senses channel busy waits until
5 After aborting adapter enters exponential backoff after the mth y
channel idle and then transmits
3 If d t t s its
collision adapter chooses a K at random from 0 1 2 2m-1 Adapter 3 If adapter transmits
entire frame without detecting another
012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 52
gtransmission the adapter is done with frame
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Ethernetrsquos CSMACD (more)E D (m )Jam Signal make sure all
other transmitters are Exponential Backoff
Goal adapt retransmission other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet
Goal adapt retransmission attempts to estimated current load
heavy load random wait Mbps Ethernet for K=1023 wait time is about 50 msec
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 f m y Kbit transmission timesafter second collision choose K from 0123hellipSeeinteract with Java
l b K f m
after ten collisions choose K from 01234hellip1023
applet on AWL Web sitehighly recommended
CPSC 441 Review 53
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
CSMACD efficiencyCSMACD eff c ency
tprop = max prop between 2 nodes in LANprop p pttrans = time to transmit max-size frame
1
transprop tt 511efficiency
+=
Efficiency goes to 1 as tprop goes to 0Goes to 1 as ttrans goes to infinityMuch better than ALOHA but still decentralized simple and cheap
CPSC 441 Review 54
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hubD
Switch is a link layer store-and-forward deviceCSMACD i hCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithmsmaintain routing tables implement routing algorithms
CPSC 441 Review 55
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
A network with switch router and h bshubs
il to externalnetwork
router
mail server
web server
switch
IP subnet
hub hubhubhub hub
CPSC 441 Review 56
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Wireless Networking TechnologiesW g g
Mobile devices ndash laptop PDA cellular p p phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad h m dAd hoc mode
Access technologyAccess technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 57
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Infrastructure Modeinfrastructure mode
base station connects base stat on connects mobiles into wired networkhandoff mobile h b i
network infrastructure
changes base station providing connection into wired network
CPSC 441 Review 58
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Ad hoc ModeAd hoc mode
no base stationsno base stat onsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among network route among themselves
CPSC 441 Review 59
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
CA B C
AB
Arsquos signalstrength
Crsquos signalstrength
Hidden terminal problemB A hear each other
space
Signal fadingB A h h hB C hear each other
A C can not hear each othermeans A C unaware of their
B A hear each otherB C hear each otherA C can not hear each other i t f i t B
CPSC 441 Review 60
interference at B interfering at B
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if h l idl f DIFS th1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
sender receiver
DIFSystart random backoff timetimer counts down while channel idletransmit when timer expires
datatransmit when timer expires
3 if no ACK increase random backoff interval repeat 2
802 11 i
SIFS
ACK80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due
ACK
CPSC 441 Review 61
return ACK after SIFS (ACK needed due to hidden terminal problem)
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Avoiding collisions (more)ng n (m )idea allow sender to ldquoreserverdquo channel rather than random
access of data frames avoid collisions of long data framessender first transmits small request-to-send (RTS) packets to base station using CSMA
RTSs may still collide with each other (but theyrsquore short)BS broadcasts clear-to-send CTS in response to RTSRTS heard by all nodesRTS heard by all nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
CPSC 441 Review 62
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Collision Avoidance RTS-CTS exchange
APA B
reservation collision
DATA (A)defer
time
defer
CPSC 441 Review 63
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Mobile IP OverviewMob le IP Overv ew
Let routing handle it routers advertise permanent g paddress of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile located
not scalable
to millions ofrouting tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it
mobiles
let end systems handle it indirect routing communication from correspondent to mobile goes through home
h f d d agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
CPSC 441 Review 64
address of mobile sends directly to mobile
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
OutlineOutl neIntroduction
Applications
Transport LayerTransport Layer
Network Layer
LANs and WLANs
M lti di N t kiMultimedia Networking
Questions
CPSC 441 Review 65
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
MM Networking Applications MM Network ng Appl cat ons Fundamental
characteristicsClasses of MM
li ti characteristicsTypically delaysensitive
applications1) Streaming stored
di nd id sensitiveend-to-end delaydelay jitter
audio and video2) Streaming live audio
and video delay jitterBut loss tolerant infrequent losses
and video3) Real-time interactive
audio and video qcause minor glitches Antithesis of data
audio and videoJitter is the variability of packet delays within h k
CPSC 441 Review 66
the same packet stream
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Multimedia Over ldquoBest Effortrdquo IInternet
TCPUDPIP no guarantees on delay lossg y
But you said multimedia apps requiresQoS and level of performance to be
effective
T d rsquo lti di li ti i l t
effective
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
CPSC 441 Review 67
( p ) y
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
How to provide better support f M lti di (14)for Multimedia (14)
Integrated services philosophy architecture f idi QOS t s i IP for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture areComponents of this architecture are
Admission controlReservation protocolReservation protocolRouting protocolClassifier and route selection
CPSC 441 Review 68
Packet scheduler
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
Concerns with Intserv (24)( )Scalability signaling maintaining per-flow router state difficult with large number of flows ff g m f fFlexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachDiffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)p g ( )Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 69
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
How to provide better support for Multimedia (34)for Multimedia (34)
Challenging to stream large files (eg video) from single
origin server in North America
origin server in real timeSolution replicate content at hundreds of servers at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of
CDN distribution node
CDN servers ahead of timeplacing content ldquocloserdquo to
id i i user avoids impairments (loss delay) of sending content over long paths
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 70
CDN server typically in edgeaccess network
in Europe
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71
How to provide better support for M lti di (44)Multimedia (44)
R1 R1duplicate
creationtransmissionduplicate
MulticastBroadcast
R1
R2
R1
R2
creationtransmissionduplicate
duplicate
R2
R3 R4
R2
R3 R4R3 R4
(a)
R3 R4
(b)
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
CPSC 441 Review 71