CPSC 441: Review (W06)pages.cpsc.ucalgary.ca/~mahanti/teaching/W06/CPSC441/review.W06.pdf · 3 CPSC...
Transcript of CPSC 441: Review (W06)pages.cpsc.ucalgary.ca/~mahanti/teaching/W06/CPSC441/review.W06.pdf · 3 CPSC...
1
CPSC 441 Review 1
CPSC 441 Review (W06)Instructor Dr Anirban MahantiOffice ICT 745Email mahanticpscucalgarycaDate April 12 2006
Text BookldquoComputer Networking A Top Down Approach
Featuring the Internetrdquo 3rd edition Jim Kurose and Keith Ross Addison-Wesley 2005
CPSC 441 Review 2
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 3
Reference Models
OSI model 7-layer model application presentation session transport network data link and physical
TCPIP model 4-layers application transport Internet and Host-to-Network
Internet Protocol Stack ndash a hybrid of TCPIP and OSI reference models
2
CPSC 441 Review 4
Layers and Protocols
Layered network architecture hellip whyReduces design complexity
The purpose of a layerLayer-N peers converse with each other using protocols each layer provides functionality to the a higher layer
ProtocolsA set of rules governing the format and meaning of messages exchanges by peer entities within a layer
CPSC 441 Review 5
Protocols Layers and PDUrsquos
Protocol Layer PDUHTTP FTP Application layer messageTCP UDP Transport layer segmentICMP IP Network layer datagramPPP Ethernet Data link layer frameIEEE 80211
Assuming the Internet Protocol Stack
CPSC 441 Review 6
More on Layers and Protocols
Protocol Layer Imm Lower LayerHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 80211
Assuming the Internet Protocol Stack
3
CPSC 441 Review 7
Internetworks
A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big internetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 8
Network Core
Packet switching ndash a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquo
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 9
DelayLoss in Packet Switched Networks
Queuing delay and packet loss
Transmission delay
Propagation delay
4
CPSC 441 Review 10
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 11
Application Layer
Processes communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 12
HTTP Continued hellip
HTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
5
CPSC 441 Review 13
The World Wide Web
What is a Web ProxyWhat is a caching hierarchyCaching issues ndash
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 14
DNS Domain Name System
Internet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host name and IP address
distributed database implemented in hierarchy of many name serversDistributed for scalability amp reliability
CPSC 441 Review 15
DNS Services
Hostname to IP address translationHost aliasing
Canonical and alias namesMail server aliasingLoad distribution
Replicated Web servers set of IP addresses for one canonical name
6
CPSC 441 Review 16
requesting hostcispolyedu
gaiacsumassedu
root DNS server
local DNS serverdnspolyedu
1
23
4
5
6
authoritative DNS serverdnscsumassedu
78
TLD DNS server
DNS Infrastructure
Host at cispolyeduwants IP address for gaiacsumasseduInfrastructure
Client resolverLocal DNS serverAuthoritative DNS ServerRoot DNS ServerTop-Level Domain DNS Server
CPSC 441 Review 17
Electronic Mail
Three major componentsuser agents
eg Eudora Outlook Pine Netscape Messenger
mail servers Incoming outgoing messages
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
user mailbox
outgoing message queue
mailserver
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
CPSC 441 Review 18
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
2
CPSC 441 Review 4
Layers and Protocols
Layered network architecture hellip whyReduces design complexity
The purpose of a layerLayer-N peers converse with each other using protocols each layer provides functionality to the a higher layer
ProtocolsA set of rules governing the format and meaning of messages exchanges by peer entities within a layer
CPSC 441 Review 5
Protocols Layers and PDUrsquos
Protocol Layer PDUHTTP FTP Application layer messageTCP UDP Transport layer segmentICMP IP Network layer datagramPPP Ethernet Data link layer frameIEEE 80211
Assuming the Internet Protocol Stack
CPSC 441 Review 6
More on Layers and Protocols
Protocol Layer Imm Lower LayerHTTP FTP Application TransportTCP UDP Transport NetworkICMP IP Network Data LinkPPP Ethernet Data Link PhysicalIEEE 80211
Assuming the Internet Protocol Stack
3
CPSC 441 Review 7
Internetworks
A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big internetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 8
Network Core
Packet switching ndash a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquo
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 9
DelayLoss in Packet Switched Networks
Queuing delay and packet loss
Transmission delay
Propagation delay
4
CPSC 441 Review 10
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 11
Application Layer
Processes communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 12
HTTP Continued hellip
HTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
5
CPSC 441 Review 13
The World Wide Web
What is a Web ProxyWhat is a caching hierarchyCaching issues ndash
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 14
DNS Domain Name System
Internet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host name and IP address
distributed database implemented in hierarchy of many name serversDistributed for scalability amp reliability
CPSC 441 Review 15
DNS Services
Hostname to IP address translationHost aliasing
Canonical and alias namesMail server aliasingLoad distribution
Replicated Web servers set of IP addresses for one canonical name
6
CPSC 441 Review 16
requesting hostcispolyedu
gaiacsumassedu
root DNS server
local DNS serverdnspolyedu
1
23
4
5
6
authoritative DNS serverdnscsumassedu
78
TLD DNS server
DNS Infrastructure
Host at cispolyeduwants IP address for gaiacsumasseduInfrastructure
Client resolverLocal DNS serverAuthoritative DNS ServerRoot DNS ServerTop-Level Domain DNS Server
CPSC 441 Review 17
Electronic Mail
Three major componentsuser agents
eg Eudora Outlook Pine Netscape Messenger
mail servers Incoming outgoing messages
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
user mailbox
outgoing message queue
mailserver
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
CPSC 441 Review 18
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
3
CPSC 441 Review 7
Internetworks
A collection of interconnected networks is called an ldquointernetworkrdquo or an ldquointernetrdquo Internet is one example of a really big internetwork
Internet structure Tier-1 ISPs Tier-2 ISPs Tier-3 ISPs NAP POP etc
CPSC 441 Review 8
Network Core
Packet switching ndash a technique for transmission of packets that allows multiple end systems to share a ldquorouterdquo
Virtual circuit vs datagram networksCircuit switching ndash a technique that requires end-to-end resource reservation for a ldquocallrdquo
TDMA FDMACircuit vs Message vs Packet Switching
CPSC 441 Review 9
DelayLoss in Packet Switched Networks
Queuing delay and packet loss
Transmission delay
Propagation delay
4
CPSC 441 Review 10
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 11
Application Layer
Processes communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 12
HTTP Continued hellip
HTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
5
CPSC 441 Review 13
The World Wide Web
What is a Web ProxyWhat is a caching hierarchyCaching issues ndash
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 14
DNS Domain Name System
Internet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host name and IP address
distributed database implemented in hierarchy of many name serversDistributed for scalability amp reliability
CPSC 441 Review 15
DNS Services
Hostname to IP address translationHost aliasing
Canonical and alias namesMail server aliasingLoad distribution
Replicated Web servers set of IP addresses for one canonical name
6
CPSC 441 Review 16
requesting hostcispolyedu
gaiacsumassedu
root DNS server
local DNS serverdnspolyedu
1
23
4
5
6
authoritative DNS serverdnscsumassedu
78
TLD DNS server
DNS Infrastructure
Host at cispolyeduwants IP address for gaiacsumasseduInfrastructure
Client resolverLocal DNS serverAuthoritative DNS ServerRoot DNS ServerTop-Level Domain DNS Server
CPSC 441 Review 17
Electronic Mail
Three major componentsuser agents
eg Eudora Outlook Pine Netscape Messenger
mail servers Incoming outgoing messages
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
user mailbox
outgoing message queue
mailserver
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
CPSC 441 Review 18
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
4
CPSC 441 Review 10
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 11
Application Layer
Processes communicating across networksWhat is HTTP
Hypertext Transfer Protocol ndash the Webrsquos application layer protocolHTTP 10 HTTP 11Pipelined ndash requests sent as soon as it is encounteredPersistent ndash multiple objects can be sent over a single TCP connection between the server and the client
CPSC 441 Review 12
HTTP Continued hellip
HTTP headersHow is the end of an object determined in HTTP11
HTTP methodsGET HEAD POST PUT hellip
HTTP response codes1xx 2xx 3xx 4xx 5xx
5
CPSC 441 Review 13
The World Wide Web
What is a Web ProxyWhat is a caching hierarchyCaching issues ndash
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 14
DNS Domain Name System
Internet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host name and IP address
distributed database implemented in hierarchy of many name serversDistributed for scalability amp reliability
CPSC 441 Review 15
DNS Services
Hostname to IP address translationHost aliasing
Canonical and alias namesMail server aliasingLoad distribution
Replicated Web servers set of IP addresses for one canonical name
6
CPSC 441 Review 16
requesting hostcispolyedu
gaiacsumassedu
root DNS server
local DNS serverdnspolyedu
1
23
4
5
6
authoritative DNS serverdnscsumassedu
78
TLD DNS server
DNS Infrastructure
Host at cispolyeduwants IP address for gaiacsumasseduInfrastructure
Client resolverLocal DNS serverAuthoritative DNS ServerRoot DNS ServerTop-Level Domain DNS Server
CPSC 441 Review 17
Electronic Mail
Three major componentsuser agents
eg Eudora Outlook Pine Netscape Messenger
mail servers Incoming outgoing messages
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
user mailbox
outgoing message queue
mailserver
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
CPSC 441 Review 18
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
5
CPSC 441 Review 13
The World Wide Web
What is a Web ProxyWhat is a caching hierarchyCaching issues ndash
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 14
DNS Domain Name System
Internet hostsIP address (32 bit) - used for addressing datagramsldquonamerdquo eg wwyahoocom - used by humans
DNS provides translation between host name and IP address
distributed database implemented in hierarchy of many name serversDistributed for scalability amp reliability
CPSC 441 Review 15
DNS Services
Hostname to IP address translationHost aliasing
Canonical and alias namesMail server aliasingLoad distribution
Replicated Web servers set of IP addresses for one canonical name
6
CPSC 441 Review 16
requesting hostcispolyedu
gaiacsumassedu
root DNS server
local DNS serverdnspolyedu
1
23
4
5
6
authoritative DNS serverdnscsumassedu
78
TLD DNS server
DNS Infrastructure
Host at cispolyeduwants IP address for gaiacsumasseduInfrastructure
Client resolverLocal DNS serverAuthoritative DNS ServerRoot DNS ServerTop-Level Domain DNS Server
CPSC 441 Review 17
Electronic Mail
Three major componentsuser agents
eg Eudora Outlook Pine Netscape Messenger
mail servers Incoming outgoing messages
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
user mailbox
outgoing message queue
mailserver
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
CPSC 441 Review 18
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
6
CPSC 441 Review 16
requesting hostcispolyedu
gaiacsumassedu
root DNS server
local DNS serverdnspolyedu
1
23
4
5
6
authoritative DNS serverdnscsumassedu
78
TLD DNS server
DNS Infrastructure
Host at cispolyeduwants IP address for gaiacsumasseduInfrastructure
Client resolverLocal DNS serverAuthoritative DNS ServerRoot DNS ServerTop-Level Domain DNS Server
CPSC 441 Review 17
Electronic Mail
Three major componentsuser agents
eg Eudora Outlook Pine Netscape Messenger
mail servers Incoming outgoing messages
Push protocol ndashSMTP
Pull protocol ndash HTTP IMAP POP3
user mailbox
outgoing message queue
mailserver
useragent
useragent
useragent
mailserver
useragent
useragent
mailserver
useragent
SMTP
SMTP
SMTP
CPSC 441 Review 18
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
7
CPSC 441 Review 19
Transport Layer
Logical end-to-end communication between processes running on different end systemsMultiplexingde-multiplexingService models UDP vs TCP
UDP provides multiplexingde-multiplexingIn addition to the above TCP provides flow control congestion control and reliable data deliverySome applications use UDP while some use TCP Why
CPSC 441 Review 20
Reliable Delivery Concepts
GBN SR ndash also called ldquostop-and-waitrdquoprotocolsACK NAK SACKPerformance of ldquostop-and-waitrdquo
PipeliningSimilaritydifferences between TCP and the above protocols
CPSC 441 Review 21
TCP segment structure (12)
source port dest port
32 bits
applicationdata
(variable length)
sequence numberacknowledgement number
Receive windowUrg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG urgent data (generally not used)
ACK ACK valid
PSH push data now(generally not used)
RST SYN FINconnection estab(setup teardown
commands)
bytes rcvr willingto accept
countingby bytes of data(not segments)
Internetchecksum
(as in UDP)
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
8
CPSC 441 Review 22
TCP Segment Structure (22)
Sequence and acknowledgement numberingTTLChecksum ndash compulsory in TCP but not in UDPHandshaking procedures during TCP connection set-up and connection termination
SYN FIN RST fields
CPSC 441 Review 23
TCP Flow Control
receive side of TCP connection has a receive buffer
speed-matching service matching the send rate to the receiving apprsquos drain rate
app process may be slow at reading from buffer
sender wonrsquot overflowreceiverrsquos buffer by
transmitting too muchtoo fast
flow control
CPSC 441 Review 24
TCP Connection Establishment
client
SYN seq=x
server
SYN+ACK seq=y ack=x+1
ACK ack=y+1
CLOSED
LISTEN
SYN_SENTSYN_RCVD
Established
Passive open
SYNSYN+ACK
ACK
Active openSYN
SYN+ACKACK
Solid line for client
Dashed line for server
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
9
CPSC 441 Review 25
TCP Connection Termination
client
FIN
server
ACK
ACK
FIN
closing
tim
ed w
ait
FIN_WAIT1
FIN_WAIT2
CLOSE_WAIT
LAST_ACK
CLOSED
TIME_WAIT
CLOSED
CPSC 441 Review 26
Principles of Congestion ControlCongestion informally ldquotoo many sources sending too much data too fast for network to handlerdquoDifferent from flow controlManifestations
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 lost)RetransmissionsPoor resource allocation at high load
CPSC 441 Review 27
Congestion Control ApproachesGoal Throttle senders as needed to ensure load on the network is ldquoreasonablerdquoEnd-end congestion control
no explicit feedback from networkcongestion inferred from end-system observed loss delayapproach taken by TCP
Network-assisted congestion controlrouters provide feedback to end systemssingle bit indicating congestion (eg ECN)explicit rate sender should send at
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
10
CPSC 441 Review 28
TCP Congestion Control Overview
end-end control (no network assistance)Limit the number of packets in the network to window WRoughly
W is dynamic function of perceived network congestion
rate = WRTT Bytessec
CPSC 441 Review 29
TCP Congestion ControlsTahoe (Jacobson 1988)
Slow StartCongestion AvoidanceFast Retransmit
Reno (Jacobson 1990)Fast Recovery
CPSC 441 Review 30
TCP TahoeBasic ideas
Gently probe network for spare capacityDrastically reduce rate on congestionWindowing self-clockingOther functions round trip time estimation error recovery
for every ACK if (W lt ssthresh) then W++ (SS)else W += 1W (CA)
for every loss
ssthresh = W2W = 1
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
11
CPSC 441 Review 31
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 ACKs
ssthresh larr W2retransmit lost packetW larr ssthresh + ndup (window inflation)Wait till W is large enough transmit new packet(s)On non-dup ACK (1 RTT later)
W larr ssthresh (window deflation)enter CA mode
CPSC 441 Review 32
TCP Reno Summary
Fast Recovery along with Fast Retransmit used to avoid slow startOn 3 duplicate ACKs
Fast retransmit and fast recoveryOn timeout
Fast retransmit and slow start
CPSC 441 Review 33
TCP Reno ThroughputAverage throughout 75 WRTTThroughput in terms of loss rate
What happens if L-gt0Does link capacity matter if we experience random lossHigh-speed TCP
LRTTMSSsdot221
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
12
CPSC 441 Review 34
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 35
Network Layer
Transport segment from sending to receiving hostNetwork layer protocols in every host 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 36
IP datagram format
ver length
32 bits
data (variable lengthtypically a TCP
or UDP segment)
16-bit identifierInternetchecksum
time tolive
32 bit source IP address
IP protocol versionnumber
header length(bytes)
max numberremaining hops
(decremented at each router)
forfragmentationreassembly
total datagramlength (bytes)
upper layer protocolto deliver payload to
headlen
type ofservice
ldquotyperdquo of data flgs fragmentoffset
upperlayer
32 bit destination IP address
Options (if any) Eg timestamprecord routetaken specifylist of routers to visit
how much overhead with TCP20 bytes of TCP20 bytes of IP= 40 bytes + app layer overhead
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
13
CPSC 441 Review 37
IPv4 AddressingIP address 32-bit identifier for host router interfaceinterface connection between hostrouter and physical link
routerrsquos typically have multiple interfaceshost may have multiple interfacesIP addresses associated with each interface
223111
223112
223113
223114 223129
223122
223121
223132223131
2231327
223111 = 11011111 00000001 00000001 00000001
223 1 11
CPSC 441 Review 38
Classful AddressingAddresses consists of
Network partHost part
IP addresses divided into five classes A B C D and E Problems
0 Network (7 bits)
Host (24 bits)
1 Network(14 bits)
Host (16bits)0
1110 Multicast address
Class A
Class D
Class B
110 Network(21 bits)
Host (8bits)
Class C
1111 Future use addresses
Class E
CPSC 441 Review 39
Subnets Motivation
The ldquoclassfulrdquo addressing scheme proposes that the network portion of a IP address uniquely identifies one physical network
Any network with more than 255 hosts needs a class B address Class B addresses can get exhausted before we have 4 billion hosts
Take bits from the host number part to create a ldquosubnetrdquo number
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
14
CPSC 441 Review 40
Addressing in the InternetCIDR Classless InterDomain Routing
subnet portion of address of arbitrary lengthaddress format abcdx where x is bits in subnet portion of addressBefore CIDR Internet used a class-based addressing scheme where x could be 8 16 or 24 bits These corrsp to classes A B and C resp
11001000 00010111 00010000 00000000
subnetpart
hostpart
2002316023
CPSC 441 Review 41
NAT Network Address Translation
10001
10002
10003
10004
13876297
local network(eg home network)
100024
rest ofInternet
Datagrams with source or destination in this networkhave 100024 address for source destination (as usual)
All datagrams leaving localnetwork have same single source
NAT IP address 13876297different source port numbers
CPSC 441 Review 42
Routing Algorithm Classification1 Global decentralized Global
all routers have complete topology link cost infoldquolink staterdquo algorithms
Decentralizedrouter knows about physically-connected neighborsIterative distributed computationsldquodistance vectorrdquo algorithms
2 Static dynamicStatic
routes change slowly over time
Dynamicroutes change more quickly
periodic updatein response to link cost changes
3 Load sensitivityMany Internet routing algos are load insensitive
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
15
CPSC 441 Review 43
Why Hierarchical Routingscale with 200 million destinations
canrsquot store all destrsquos in routing tablesrouting table exchange would swamp links
administrative autonomyinternet = network of networkseach network admin may want to control routing in its own network
CPSC 441 Review 44
Hierarchical Routing
aggregate routers into regions ldquoautonomous systemsrdquo (AS)routers in same AS run same routing protocol
ldquointra-ASrdquo routingprotocolrouters in different AS can run different intra-AS routing protocol
Gateway routerDirect link to router in another ASEstablishes a ldquopeeringrdquorelationshipPeers run an ldquointer-AS routingrdquo protocol
CPSC 441 Review 45
3b
1d
3a
1c2aAS3
AS1AS2
1a
2c2b
1b
Intra-ASRouting algorithm
Inter-ASRouting algorithm
Forwardingtable
3c
Interconnected ASes
Forwarding table is configured by both intra- and inter-AS routing algorithm
Intra-AS sets entries for internal destsInter-AS amp Intra-As sets entries for external dests
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
16
CPSC 441 Review 46
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
CPSC 441 Review 47
Link Layer IntroductionSome terminology
hosts and routers are nodescommunication channels that connect adjacent nodes along communication path are links
wired linkswireless linksLANs
layer-2 packet is a frameencapsulates datagram
ldquolinkrdquo
data-link layer has responsibility of transferring datagram from one node to adjacent node over a link
CPSC 441 Review 48
ARP Address Resolution Protocol
Each IP node (Host Router) on LAN has ARP tableARP Table IPMAC address mappings for some LAN nodes
lt IP address MAC address TTLgtTTL (Time To Live) time after which address mapping will be forgotten (typically 20 min)
Question how to determineMAC address of Bknowing Brsquos IP address
1A-2F-BB-76-09-AD
58-23-D7-FA-20-B0
0C-C4-11-6F-E3-98
71-65-F7-2B-08-53
LAN
237196723
237196778
237196714
237196788
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
17
CPSC 441 Review 49
Multiple Access Links and ProtocolsTwo types of ldquolinksrdquo
point-to-pointPPP for dial-up accesspoint-to-point link between Ethernet switch and host
broadcast (shared wire or medium)traditional Ethernetupstream HFC80211 wireless LAN
CPSC 441 Review 50
Taxonomy of Multiple Access Control Protocols
Three broad classesChannel Partitioning
divide channel into smaller ldquopiecesrdquo (TDM FDM Code Division Multiple Access) allocate piece to node for exclusive use
Random Accesschannel not divided allow collisionsldquorecoverrdquo from collisions
ldquoTaking turnsrdquoNodes take turns but nodes with more to send can take longer turns
CPSC 441 Review 51
Random Access Protocols
When node has packet to sendtransmit at full channel data rate Rno a priori coordination among nodes
two or more transmitting nodes ldquocollisionrdquorandom access MAC protocol specifies
how to detect collisionshow to recover from collisions (eg via delayed retransmissions)
Examples of random access MAC protocolsslotted ALOHAALOHACSMA CSMACD CSMACA
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
18
CPSC 441 Review 52
CSMACD (Collision Detection)CSMACD carrier sensing deferral as in CSMA
collisions detected within short timecolliding transmissions aborted reducing channel wastage
collision detectioneasy in wired LANs measure signal strengths compare transmitted received signalsdifficult in wireless LANs receiver shut off while transmitting
CPSC 441 Review 53
Ethernet CSMACD algorithm1 Adaptor receives
datagram from net layer amp creates frame
2 If adapter senses channel idle it starts to transmit frame If it senses channel busy waits until channel idle and then transmits
3 If adapter transmits entire frame without detecting another transmission the adapter is done with frame
4 If adapter detects another transmission while transmitting aborts and sends jam signal
5 After aborting adapter enters exponential backoff after the mthcollision adapter chooses a K at random from 012hellip2m-1 Adapter waits K512 bit times and returns to Step 2
CPSC 441 Review 54
Ethernetrsquos CSMACD (more)Jam Signal make sure all
other transmitters are aware of collision 48 bits
Bit time 1 microsec for 10 Mbps Ethernet for K=1023 wait time is about 50 msec
Exponential BackoffGoal adapt retransmission attempts to estimated current load
heavy load random wait will be longer
first collision choose K from 01 delay is K 512 bit transmission timesafter second collision choose K from 0123hellipafter ten collisions choose K from 01234hellip1023
Seeinteract with Javaapplet on AWL Web sitehighly recommended
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
19
CPSC 441 Review 55
CSMACD efficiency
tprop = max prop between 2 nodes in LANttrans = time to transmit max-size frame
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
transprop tt 511efficiency
+=
CPSC 441 Review 56
Switches Routers and HubsHubs are physical layer repeaters
no CSMACD at hub
Switch is a link layer store-and-forward deviceCSMACD at switchMaintains switch tables implement filtering learning algos
Routers are network-layer store-and-forward devices
maintain routing tables implement routing algorithms
CPSC 441 Review 57
A network with switch router and hubs
hub hubhub
switch
to externalnetwork
router
IP subnet
mail server
web server
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
20
CPSC 441 Review 58
Wireless Networking Technologies
Mobile devices ndash laptop PDA cellular phone wearable computer hellip
Operating modesInfrastructure mode (Access Point)Ad hoc mode
Access technologyBluetooth (1 Mbps up to 3 meters)IEEE 80211 (up to 55 Mbps 20 ndash 100 meters)
CPSC 441 Review 59
Infrastructure Mode
network infrastructure
infrastructure modebase station connects mobiles into wired networkhandoff mobile changes base station providing connection into wired network
CPSC 441 Review 60
Ad hoc ModeAd hoc mode
no base stationsnodes can only transmit to other nodes within link coveragenodes organize themselves into a network route among themselves
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
21
CPSC 441 Review 61
Wireless Network CharacteristicsMultiple wireless senders and receivers create
additional problems (beyond multiple access)
AB
C
Hidden terminal problemB A hear each otherB C hear each otherA C can not hear each other
means A C unaware of their interference at B
A B C
Arsquos signalstrength
space
Crsquos signalstrength
Signal fadingB A hear each otherB C hear each otherA C can not hear each other interfering at B
CPSC 441 Review 62
IEEE 80211 MAC Protocol CSMACA
80211 sender1 if sense channel idle for DIFS then
transmit entire frame (no CD)2 if sense channel busy then
start random backoff timetimer counts down while channel idletransmit when timer expires
3 if no ACK increase random backoffinterval repeat 2
80211 receiver- if frame received OK
return ACK after SIFS (ACK needed due to hidden terminal problem)
sender receiver
DIFS
data
SIFS
ACK
CPSC 441 Review 63
Avoiding collisions (more)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 nodes
sender transmits data frameother stations defer transmissions
Avoid data frame collisions completely using small reservation packets
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
22
CPSC 441 Review 64
Collision Avoidance RTS-CTS exchange
APA B
time
RTS(A)RTS(B)
RTS(A)
CTS(A) CTS(A)
DATA (A)
ACK(A) ACK(A)
reservation collision
defer
CPSC 441 Review 65
Mobile IP Overview
Let routing handle it routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange
routing tables indicate where each mobile locatedno changes to end-systems
let end-systems handle it indirect routing communication from correspondent to mobile goes through home agent then forwarded to remotedirect routing correspondent gets foreign address of mobile sends directly to mobile
not scalable
to millions ofmobiles
CPSC 441 Review 66
OutlineIntroduction
Applications
Transport Layer
Network Layer
LANs and WLANs
Multimedia Networking
Questions
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
23
CPSC 441 Review 67
MM Networking Applications Fundamental
characteristicsTypically delaysensitive
end-to-end delaydelay jitter
But loss tolerant infrequent losses cause minor glitches Antithesis of data
Classes of MM applications
1) Streaming stored audio and video
2) Streaming live audio and video
3) Real-time interactive audio and videoJitter is the variability of packet delays within the same packet stream
CPSC 441 Review 68
Multimedia Over ldquoBest EffortrdquoInternet
TCPUDPIP no guarantees on delay loss
Todayrsquos multimedia applications implementfunctionality at the app layer to mitigate(as best possible) effects of delay loss
But you said multimedia apps requiresQoS and level of performance to be
effective
CPSC 441 Review 69
How to provide better support for Multimedia (14)
Integrated services philosophy architecture for providing QOS guarantees in IP networks for individual flows Fundamental changes in Internet so that apps can reserve end-to-end bandwidthComponents of this architecture are
Admission controlReservation protocolRouting protocolClassifier and route selectionPacket scheduler
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
24
CPSC 441 Review 70
Concerns with Intserv (24)Scalability signaling maintaining per-flow router state difficult with large number of flows Flexible Service Models Intserv has only two classes Desire ldquoqualitativerdquo service classes
Eg Courier xPress and normal mailEg First business and cattle class
Diffserv approachsimple functions in network core relatively complex functions at edge routers (or hosts)Donrsquot define define service classes provide functional components to build service classes
CPSC 441 Review 71
How to provide better support for Multimedia (34)
Challenging to stream large files (eg video) from single origin server in real timeSolution replicate content at hundreds of servers throughout Internet
content downloaded to CDN servers ahead of timeplacing content ldquocloserdquo to user avoids impairments (loss delay) of sending content over long pathsCDN server typically in edgeaccess network
origin server in North America
CDN distribution node
CDN serverin S America CDN server
in Europe
CDN serverin Asia
CPSC 441 Review 72
How to provide better support for Multimedia (44)
R1
R2
R3 R4
(a)
R1
R2
R3 R4
(b)
duplicatecreationtransmissionduplicate
duplicate
Source-duplication versus in-network duplication (a) source duplication (b) in-network duplication
MulticastBroadcast
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip
25
CPSC 441 Review 73
Finally hellip Examination Format
Technical Terms ndash provide technical terms that best fit a given definition
Eg A field in IPv4 that provides for error detection ndash Checksum
Some short answer questionsEg Compare and contrast datagram networks and virtual circuit networksYou need to only write main pointsAnswer should be as brief as possible
CPSC 441 Review 74
Good Luck and Questions hellip