Upload
mni007
View
219
Download
0
Embed Size (px)
Citation preview
7/29/2019 Week 2 Lec 2-Bit
1/30
Chapter 1:IntroductionComputer Networking:A Top Down Approach ,
4th edition.Jim Kurose, Keith Ross
Computer Networks
7/29/2019 Week 2 Lec 2-Bit
2/30
Chapter 1: Introduction
Our goal: get feel and
terminology more depth, detail
laterin course approach:
use Internet asexample
Overview: whats the Internet?
whats a protocol?
network edge; hosts, accessnet, physical media
network core: packet/circuitswitching, Internet structure
performance: loss, delay,throughput
Protocol layers, service models
History of Internet
7/29/2019 Week 2 Lec 2-Bit
3/30
Throughput
The rate (bits/sec) at which bits are transferredbetween sender/receiver
Difference between Bandwidth and Throughput?
ISPs sell bandwidth In computer networks, the throughput is less
than the bandwidth for several reasons The channel may be shared by other users Packet loss due to congestion
Packet loss due to bit errors Noise in the channel Transmission rates of the link over which the
data flows.
7/29/2019 Week 2 Lec 2-Bit
4/30
Throughput
Rs< Rc What is average end-end throughput?
Rsbits/sec Rcbits/sec
Rs> Rc What is average end-end throughput?
Rsbits/sec Rcbits/sec
Throughput is min {Rs,Rc}Transmission Rate of thebottleneck link
7/29/2019 Week 2 Lec 2-Bit
5/30
How do loss and delay occur?
packets queuein router buffers
packets queue, wait for turn queue (aka buffer) has finite capacity
packet arriving to full queue dropped (aka lost)
lost packet may be retransmitted
A
B
packet being transmitted (delay)
packets queueing (delay)
free (available) buffers: arriving packets
dropped (loss) if no free buffers
7/29/2019 Week 2 Lec 2-Bit
6/30
Four sources of packet delay
1. Processing Delay: Time required to
examine packet headerand determine outputlink
check bit errors High Speed Routers
Microseconds or less
A
B
propagation
transmission
processing queueing
2. Queuing Delay:
Time waiting at outputlink for transmission
depends on congestionlevel of router
If queue empty no delay Microseconds to
milliseconds
7/29/2019 Week 2 Lec 2-Bit
7/30
Delay in packet-switched networks
3. Transmission Delay:
R=link bandwidth (bps)
L=packet length (bits)
time to push all of
packets bits into thelink = L/R
Microseconds tomilliseconds
4. Propagation Delay:
Time to propagate fromthe beginning of the linkto the other router(node)
propagation delay = d/s d = length of physical link
s = propagation speed inmedium (~3x108 m/sec)
A
B
propagation
transmission
nodal
processing queueing
7/29/2019 Week 2 Lec 2-Bit
8/30
Queuing Delay
R=Transmission Rate (bps) L=packet length(bits)
a=average packet arrivalrate(packets/sec)
Traffic Intensity = (Average rate at which bits arrive at the queue) =LaTransmission Rate R
La/R ~ 0: average queuing delay small
La/R -> 1: delays become large (queue begins to get larger)
La/R > 1: average rate at which bits arrive at the queue exceeds therate at which the bits can be transmitted from the queue.
more work arriving than can be serviced
Packet Loss will occur
When is Queuing Delay large andwhen it is insignificant?
Rate at which traffic arrives at thequeue
Transmission rate of the link
Nature of the arriving traffic
7/29/2019 Week 2 Lec 2-Bit
9/30
Queuing Delay
Consider the case La/R1Nature of arriving traffic impacts queuing delay in such acase
(Find about Queuing Theory?)
In reality the arrival process to a queue is random andarrivals do not follow any pattern.
7/29/2019 Week 2 Lec 2-Bit
10/30
Protocol Layers
Networks are complex! many pieces:
hosts
routers
links of variousmedia
applications
protocols
hardware,software
Question:Is there any way of
organizingnetworkarchitecture?
Answer:
Yes possible with alayered architecture
7/29/2019 Week 2 Lec 2-Bit
11/30
Why layering?
Dealing with complex systems:Discuss a well defined, specific part of a
large and complex system
Modularization eases maintenance,updating of system
Change of implementation of layersservice transparent to rest of system
e.g. change in gate procedure doesntaffect rest of system
7/29/2019 Week 2 Lec 2-Bit
12/30
InternetProtocolStack To provide structure to design of
network protocols, networkdesigners organize protocols inlayers
Service says what a layer doesProtocol says how the service is
implementedAdvantagesDrawbacksWhen taken together the
protocols of various layers are
called the Protocol Stack.Internet Protocol Stack consistsof Five layers
Physical, Link, Network,Transport and Application layers .
Organization of Book
7/29/2019 Week 2 Lec 2-Bit
13/30
Internet Protocol Stack
Application Layer:
Network applications and their application layer protocolsreside.
Provides user interfaces and support for services such as e-mail, file transfer etc.
Hyper Text Transfer Protocol (HTTP)
File Transfer Protocol (FTP)
Session Initiation Protocol (SIP)
An application layer protocol is distributed over multiple endsystems
The packets of information at the application layer is calledas a message.
7/29/2019 Week 2 Lec 2-Bit
14/30
Internet Protocol Stack Transport Layer:
Transports application-layer messages between applicationend points.
Transport layer packet is called as a segment
Breaks long messages into shorter segments
There are two Transport Layer Protocols Transmission Control Protocol (TCP)
Connection Oriented service
Guaranteed delivery of application layer messages
Flow control
Congestion Control
User Datagram Protocol (UDP)Connectionless service
No reliability, flow control and congestion control
7/29/2019 Week 2 Lec 2-Bit
15/30
Internet Protocol Stack Network Layer:
Responsible for moving network layer packetsknown as datagrams from one host to another.
Transport layer passes a transport layer
segment and a destination address to thenetwork layer.
Network layer includes IP Protocol
Defines the fields in the datagram as well as
how end systems and routers act on thesefields
Different routing protocols.
Determine the route that datagrams take
between sources and destinations
7/29/2019 Week 2 Lec 2-Bit
16/30
Internet Protocol Stack Link Layer:
Moves a packet from one node (host or router)to the next node in the route.
Divide the stream of bits received from the
network layer into manageable data units calledframes.
Error Detection and Correction
Transforms a raw transmission facility to a
reliable link.Mechanism to detect and retransmit damaged
or lost frames
Example of link layer protocols include WiFi,
Ethernet etc.
7/29/2019 Week 2 Lec 2-Bit
17/30
Internet Protocol Stack Physical Layer:
The job of this layer is to move the individual bits with in framesfrom one node to next.
Representation of bits
Physical Layer data consists of a stream of bits (0 or 1)
To be transmitted bits must be encoded into signals. Thephysical layer defines the type of encoding.
The protocol in this layer depend on the actual transmissionmedium of the link.
7/29/2019 Week 2 Lec 2-Bit
18/30
Internet Protocol Stack Application:Provides user interfaces and
support for services such as e-mail, filetransfer etc. FTP, HTTP
Transport:Transports application-layermessages between application end points.
Segmentation and reassembly TCP, UDP
Network:Routing of Datagrams fromsource to destination IP, routing protocols
Link:Move a packet from one node (host orrouter) to the next node in the route.
Ethernet, WiFi
Physical:Move the individual bits with in
frames from one node to next
Application
Transport
Network
Link
Physical
7/29/2019 Week 2 Lec 2-Bit
19/30
OSI Reference Model
In 1970 International Organization forStandardization proposed a seven layeredmodel called Open SystemsInterconnection (OSI) model.
Presentation Layer: Provide services such
as data encryption, compression. Session Layer: Synchronization points
(checkpointing) and recovery of dataexchange.
Internet stack missing these layers!
these services, if needed, must beimplemented in the application by theapplication developer.
7/29/2019 Week 2 Lec 2-Bit
20/30
source
applicationtransport
networklinkphysical
segment
datagram
destination
applicationtransportnetwork
linkphysical
router
switch
Encapsulationmessage
Ht
Hn
M
Ht
HtHnHl M
HtHn M
Ht MM
networklink
physical
linkphysical
Ht
Hn
Hl
M
HtHn M HtHn M
HtHnHl M
M
Ht M
Hn
frame
7/29/2019 Week 2 Lec 2-Bit
21/30
Chapter 2Application LayerComputer Networking: A
Top Down Approach,
4th edition.
Jim Kurose, Keith RossAddison-Wesley, July
2007.
7/29/2019 Week 2 Lec 2-Bit
22/30
Chapter 2: Application layer
2.1 Principles ofnetwork applications
2.2 Web and HTTP
2.3 FTP 2.4 Electronic Mail
SMTP, POP3, IMAP
2.5 DNS
2.6 P2P applications
2.7 Socket programming
7/29/2019 Week 2 Lec 2-Bit
23/30
Chapter 2: Application Layer
Our goals: conceptual,
implementationaspects of network
application protocols client-server
paradigm
peer-to-peer
paradigm
learn about protocolsby examining popularapplication-levelprotocols
HTTP FTP
SMTP / POP3 / IMAP
DNS
programming networkapplications
socketprogramming
7/29/2019 Week 2 Lec 2-Bit
24/30
Some Network Applications
Web
Instant messaging
Remote login P2P file sharing
Multi-user network games
Streaming stored video clips
Voice over IP Real-time video conferencing
Many more interesting applications
7/29/2019 Week 2 Lec 2-Bit
25/30
Creating a Network Application
write programs that run on (different) end systems
communicate over network
e.g., web server softwarecommunicates with browser
softwareNo need to write software fornetwork-core devices
Network-core devices do not runuser applications
Function at lower layers
Basic design is to confineapplication software to the endsystems
Facilitate rapid networkapplication development and
deployment
application
transport
network
data link
physical
application
transport
network
data linkphysical
application
transport
network
data link
physical
7/29/2019 Week 2 Lec 2-Bit
26/30
Application Architectures
Application Architecture isDesigned by the application developer
Dictates how the application isstructured over various end systems
Two architectures used in modern dayNetwork Applications:Client-Server Architecture
Peer-to-Peer (P2P) Architecture
7/29/2019 Week 2 Lec 2-Bit
27/30
Client-Server ArchitectureServer:
Always-on host
permanent well defined IPaddress
A single server is incapable ofkeeping up with all the requestsof the clients.
A cluster of hosts referred asserver farm is often used.
Clients:
Communicate with server
May have dynamic IP addresses
Do not communicate directly witheach other
Client/Server architecture isinfrastructure intensive
Require service providers toinstall and maintain servers.
Client/Server
7/29/2019 Week 2 Lec 2-Bit
28/30
P2P Architecture
Direct communication
between pairs ofintermittently connectedhosts called peers
Peers are not owned by anyservice provider
P2P Peers communicate without
passing through anydedicated server
e.g. Bit Torrent, eMule, Skype
Security issues Highly Distributive
Cost Effective
Detailed study later on in the
chapter
peer-peer
Wh t T t S i d
7/29/2019 Week 2 Lec 2-Bit
29/30
What Transport Service does anApplication need?
Data Loss
Loss Tolerant Applications Some apps (e.g., audio, VoIP)
can tolerate some loss 2% tolerable for VoIP
Other apps (e.g., file transfer,
email) require 100% reliabledata transfer
Timing Application may require
timing guarantee Tight timing constraints
multiplayer games, VoIP,teleconferencing.
In Non-real time lower delaysare preferred but no tightconstraint on end-to-enddelays.
Throughput
Bandwidth sensitiveapplications (e.g., multimedia)require minimum amount ofthroughput
Other apps (elastic apps)
make use of whateverthroughput they get e.g .Email, file transferSecurity Encryption and decryption
7/29/2019 Week 2 Lec 2-Bit
30/30
Transport Service Requirements of CommonApplications
Application
file transfer
Web documentsreal-time audio/video
stored audio/video
interactive games
Data loss
no loss
no loss
no lossloss-tolerant
loss-tolerant
loss-tolerant
Throughput
elastic
elastic
elasticaudio: 5kbps-1Mbps
video:10kbps-5Mbps
same as above
few kbps -10kbps
Time Sensitive
no
no
no
yes, 100s msec
yes, few secs
yes, 100s msec