0% found this document useful (0 votes)
14 views36 pages

Lecture - 04 - Chapter 1 - Chapter 2 - 29 Aug 2024

Uploaded by

Usman Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views36 pages

Lecture - 04 - Chapter 1 - Chapter 2 - 29 Aug 2024

Uploaded by

Usman Butt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

National University of

Computer & Emerging Sciences


CS 3001 – COMPUTER NETWORKS
Lecture 04
Chapter 1
Chapter 2

29th August, 2024

Nauman Moazzam Hayat


[email protected]
Office Hours: 02:00 pm till 4:30 pm (Every Tuesday & Thursday)
Throughput

‣ At what rate is the destination receiving data


from the source?
Throughput
▪ throughput: rate (bits/time unit) at which bits are being sent from
sender to receiver
• instantaneous: rate at given point in time
• average: rate over longer period of time

link capacity
pipe that can carry linkthat
pipe capacity
can carry
Rsfluid
bits/sec
at rate Rfluid
c bits/sec
at rate
serverserver,
sendswith
bits
(fluid) (Rs bits/sec) (Rc bits/sec)
fileinto
of Fpipe
bits
to send to client
Introduction: 1-3
Throughput
Rs < Rc What is average end-end throughput?

Rs bits/sec Rc bits/sec

Rs > Rc What is average end-end throughput?

Rs bits/sec Rc bits/sec

bottleneck link
link on end-end path that constrains end-end throughput
Introduction: 1-4
Throughput: network scenario
▪ per-connection end-
Rs end throughput:
Rs Rs min(Rc,Rs,R/10)
▪ in practice: Rc or Rs is
R often bottleneck
Rc Rc
Rc
* Check out the online interactive exercises for more
examples: http://gaia.cs.umass.edu/kurose_ross/

10 connections (fairly) share


backbone bottleneck link R bits/sec
Introduction: 1-5
Bandwidth Delay Product
- The bandwidth-delay product is the product of a link’s rate / capacity (in bits
per second) and its round-trip delay time (in seconds)

- The result, an amount of data measured in bits (or bytes), is equivalent to the
maximum amount of data on the network circuit at any given time

- i.e., data that has been transmitted but not yet acknowledged. (Maximum number
of bits that can be inserted into the pipe (link) in a given interval of time.)

- The bandwidth-delay product was originally proposed as a rule of thumb for


sizing router buffers in conjunction with congestion avoidance algorithm Random
Early Detection (RED).

Examples

• Moderate speed satellite network: 512 kbit/s, 900 ms round-trip time (RTT)
B x D = (512 x 103 bits/s) x (900 x 10-3 s) = 460,800 bits = 460.8 kbit = 57.6kB

• Residential DSL: 2 Mbit/s, 50 ms round-trip time (RTT)


B x D = (2 x 106bits/s) x (50 x 10-3 s) = 100 x 103 bits = 100 kbit = 12.5kB
Chapter 1: roadmap
▪ What is the Internet?
▪ What is a protocol?
▪ Network edge: hosts, access network,
physical media
▪ Network core: packet/circuit switching,
internet structure
▪ Performance: loss, delay, throughput
▪ Security
▪ Protocol layers, service models
▪ History

Introduction: 1-7
Protocol “layers” and reference models
Networks are complex, Question: is there any
with many “pieces”: hope of organizing
▪ hosts structure of network?
▪ routers ▪and/or our discussion
▪ links of various media of networks?
▪ applications
▪ protocols
▪ hardware, software

Introduction: 1-8
Example: organization of air travel
end-to-end transfer of person plus baggage
ticket (purchase) ticket (complain)
baggage (check) baggage (claim)
gates (load) gates (unload)
runway takeoff runway landing
airplane routing airplane routing
airplane routing

How would you define/discuss the system of airline travel?


▪ a series of steps, involving many services
Introduction: 1-9
Example: organization of air travel

ticket (purchase) ticketing service ticket (complain)


baggage (check) baggage service baggage (claim)
gates (load) gate service gates (unload)
runway takeoff runway service runway landing
airplane routing routing service
airplane routing airplane routing

layers: each layer implements a service


▪ via its own internal-layer actions
▪ relying on services provided by layer below
Introduction: 1-10
Why layering?
Approach to designing/discussing complex systems:
▪ explicit structure allows identification,
relationship of system’s pieces
• layered reference model for discussion
▪ modularization eases maintenance,
updating of system
• change in layer's service implementation:
transparent to rest of system
• e.g., change in gate procedure doesn’t
affect rest of system

Introduction: 1-11
Layered Internet protocol stack
▪ application: supporting network applications
• HTTP, IMAP, SMTP, DNS
application
application
▪ transport: process-process data transfer
• TCP, UDP transport
transport
▪ network: routing of datagrams from source to
destination network
• IP, routing protocols
link
▪ link: data transfer between neighboring
network elements physical
• Ethernet, 802.11 (WiFi), PPP
▪ physical: bits “on the wire”
Introduction: 1-12
Services, Layering and Encapsulation
M
application Application exchanges messages to implement some application
application service using services of transport layer
Ht M
transport Transport-layer protocol transfers M (e.g., reliably) from transport
one process to another, using services of network layer
network ▪ transport-layer protocol encapsulates network
application-layer message, M, with
link transport layer-layer header Ht to create a link
transport-layer segment
• Ht used by transport layer protocol to
physical implement its service physical

source destination
Introduction: 1-13
Services, Layering and Encapsulation
M
application application
Ht M
transport Transport-layer protocol transfers M (e.g., reliably) from transport
one process to another, using services of network layer
network H n Ht M network
Network-layer protocol transfers transport-layer segment
[Ht | M] from one host to another, using link layer services
link link
▪ network-layer protocol encapsulates
transport-layer segment [Ht | M] with
physical network layer-layer header Hn to create a physical
network-layer datagram
source • Hn used by network layer protocol to destination
implement its service
Introduction: 1-14
Services, Layering and Encapsulation
M
application application
Ht M
transport transport

network H n Ht M network
Network-layer protocol transfers transport-layer segment
[Ht | M] from one host to another, using link layer services
link Hl Hn Ht M link
Link-layer protocol transfers datagram [Hn| [Ht |M] from
host to neighboring host, using network-layer services
physical physical
▪ link-layer protocol encapsulates network
datagram [Hn| [Ht |M], with link-layer
source header Hl to create a link-layer frame destination
Introduction: 1-15
Encapsulation

Matryoshka dolls (stacking dolls / babushka dolls / Russian dolls)

message segment datagram frame

Credit: https://dribbble.com/shots/7182188-Babushka-Boi

Introduction: 1-16
Services, Layering and Encapsulation

application message M M application

transport segment Ht M Ht M transport

network datagram Hn Ht M Hn Ht M network

H l H n Ht
link frame Hl Hn Ht M M
link

physical physical

source destination
Introduction: 1-17
Logical Communication
❖ Layers interacts with peer’s corresponding layer

Application Application
Transport Transport
Network Network Network
Datalink Datalink Datalink
Physical Physical Physical

Host A Router Host B


Physical Communication

❖ Communication goes down to physical network


❖ Then up to relevant layer

Application Application
Transport Transport
Network Network Network
Datalink Datalink Datalink
Physical Physical Physical

Host A Router Host B


Protocols at different layers

L7 Application SMTP HTTP DNS NTP

L4 Transport TCP UDP

L3 Network IP

L2 Data link Ethernet FDDI PPP

L1 Physical optical copper radio PSTN/DSL

There is just one network-layer protocol!


message M
source
applicatio
Encapsulation: an
segment Ht M n
transport
end-end view
datagram Hn Ht M
frame Hl Hn Ht M network
link
physical
link
physical

switch

destination Hn Ht M network
M applicatio Hl Hn Ht M link Hn Ht M
Ht M n physical
Hn Ht M transport
Hl Hn Ht M network router
link
physical Introduction: 1-21
Chapter 1: summary
We’ve covered a “ton” of material!
▪ Internet overview
▪ what’s a protocol? You now have:
▪ network edge, access network, core ▪ context, overview,
• packet-switching versus circuit- vocabulary, “feel”
switching
• Internet structure of networking
▪ performance: loss, delay, throughput ▪ more depth,
▪ layering, service models detail, and fun to
▪ security follow!
▪ history

Introduction: 1-22
Additional Chapter 1 slides

Introduction: 1-23
ISO/OSI reference model
Two layers not found in Internet
application
protocol stack!
presentation
▪ presentation: allow applications to
interpret meaning of data, e.g., encryption, session
compression, machine-specific conventions transport
▪ session: synchronization, checkpointing, network
recovery of data exchange link
▪ Internet stack “missing” these layers! physical
• these services, if needed, must be
implemented in application The seven layer OSI/ISO
reference model
• needed?

Introduction: 1-24
Services, Layering and Encapsulation
M
application M application
message
Ht M
transport Ht M transport
segment
network H n Ht M Hn Ht M network
datagram
H l H n Ht
link Hl Hn Ht M M
link
frame

physical physical

source destination
Introduction: 1-25
Wireshark
application
(www browser,
packet
email client)
analyzer
application

OS
packet Transport (TCP/UDP)
capture copy of all Network (IP)
Ethernet Link (Ethernet)
(pcap) frames
sent/received Physical

Introduction: 1-26
Chapter 2
Application Layer
A note on the use of these PowerPoint slides:
We’re making these slides freely available to all (faculty, students,
readers). They’re in PowerPoint form so you see the animations; and
can add, modify, and delete slides (including this one) and slide
content to suit your needs. They obviously represent a lot of work on
our part. In return for use, we only ask the following:
▪ If you use these slides (e.g., in a class) that you mention their
source (after all, we’d like people to use our book!)
▪ If you post any slides on a www site, that you note that they are
adapted from (or perhaps identical to) our slides, and note our
copyright of this material.
Computer Networking: A
For a revision history, see the slide note for this page.
Top-Down Approach
Thanks and enjoy! JFK/KWR 8th edition n
All material copyright 1996-2023
Jim Kurose, Keith Ross
J.F Kurose and K.W. Ross, All Rights Reserved Pearson, 2020

Application Layer: 2-27


Application layer: overview
▪ P2P applications
▪ Principles of network ▪ video streaming and content
applications distribution networks
▪ Web and HTTP ▪ socket programming with
▪ E-mail, SMTP, IMAP UDP and TCP
▪ The Domain Name System
DNS

Application Layer: 2-28


Application layer: overview
Our goals: ▪ learn about protocols by
examining popular application-
▪ conceptual and layer protocols and
implementation aspects of infrastructure
application-layer protocols • HTTP
• transport-layer service • SMTP, IMAP
models • DNS
• client-server paradigm • video streaming systems, CDNs
• peer-to-peer paradigm ▪ programming network
applications
• socket API

Application Layer: 2-29


Some network apps
▪ social networking ▪ voice over IP (e.g., Skype)
▪ Web ▪ real-time video
▪ text messaging conferencing (e.g., Zoom)
▪ e-mail ▪ Internet search
▪ multi-user network games ▪ remote login
▪ streaming stored video ▪…
(YouTube, Hulu, Netflix)
▪ P2P file sharing Q: your favorites?

Application Layer: 2-30


Creating a network app
applicatio
n
write programs that: mobile transport
network
network
data link
▪ run on (different) end systems physical national or global ISP

▪ communicate over network


▪ e.g., web server software
communicates with browser software
local or
no need to write software for regional
ISP
network-core devices home network content
applicatio provider
▪ network-core devices do not run user n
transport network
applicatio
datacenter

applications network
data link
n
transport
network

physical network
▪ applications on end systems allows data link
physical
for rapid app development, enterprise
network
propagation
Application Layer: 2-31
Client-server paradigm
server: mobile network
▪ always-on host national or global ISP

▪ permanent IP address
▪ often in data centers, for scaling
clients: local or
regional
▪ contact, communicate with server ISP

▪ may be intermittently connected home network content


provider
▪ may have dynamic IP addresses network datacenter
network

▪ do not communicate directly with


each other
enterprise
▪ examples: HTTP, IMAP, FTP network

Application Layer: 2-32


Peer-peer architecture
▪ no always-on server mobile network
▪ arbitrary end systems directly national or global ISP

communicate
▪ peers request service from other
peers, provide service in return to
other peers local or
regional
• self scalability – new peers bring new ISP
service capacity, as well as new service home network content
demands provider
network datacenter

▪ peers are intermittently connected network

and change IP addresses


• complex management enterprise
▪ example: P2P file sharing [BitTorrent]
network

Application Layer: 2-33


Network Edge (Client, Server, Peer)
Network edge comprises of the millions and billions of end systems / hosts and applications
which reside in them

An end system (or host) can either request service (client) or provide service (server) or act
as both interchangeably (peer).

Server
• A server is a service provider providing access to network resources:
- A server can have multiple roles (e.g web servers, mail servers, print servers, Remote
Access Servers (RAS), Directory Servers (DNS) etc)
- Always on host
- Permanent IP address
- Most servers reside in large data centres

Client
• A client is a requestor of these services
- May be intermittently on
- may have dynamic IP address
- do not communicate directly with each other
Peer
• A Peer-to-Peer network doesn’t have dedicated servers. All hosts are equal and they both
provide and request service i.e. they have both client & server functionalities.
- Not always on server
- arbitrary end systems directly communicate
- peers are intermittently connected and change IP addresses
- complex management
- Examples are Skype, BitTorrent, Napster
Assignement # 1 (Chapter – 1)

(Already Announced)

- 1st Assignment will be uploaded on Google Classroom after the


lecture in the Stream Section, on Thursday 29th August, 2024

- Due Date: Tuesday, 3rd September, 2024 (During the lecture)

- Hard copy of the handwritten assignment to be submitted directly


to the Instructor during the lecture.

- Please read all the instructions carefully in the uploaded


Assignment document, follow & submit accordingly
Quiz # 1 (Chapter – 1)

(Already
Announced)

- Quiz # 1 for Chapter 1 to be taken in the class on Thursday, 5th September, 2024 during the lecture time
(or in the next class in case of a public holiday.)

No Retake
Be on time

You might also like