Week 1
Week 1
Chenxi Qiu
Assistant Professor in Computer Science and
Engineering
Office hours: 10 pm – 12 pm Friday (Discovery Park F228)
Policy on Grading
Grading Category Percentage of Final Grade Exam: remote, taken in Canvas
Assignments 27% Midterm exam: 120 minutes
2 Midterm exams 40%
Final exam: 120 minutes
Final exam 30%
Attendance 3%
A 90% - 100%
* There is a 10%-per-day-late B 80% - 89%
penalty for all assignments unless C 70% - 79%
you communicate with me D 60% - 69%
BEFORE the due dates. F 59% and below
Policies
Computer Networking
- A Top-Down Approach
Topics to be covered
1. Introduction.
2. Application layer.
3. Transport layer.
4. Network layer – data plane.
5. Network layer – control plane.
6. Link layer.
7. Mobile network.
8. Network Security.
Chapter 1: Roadmap
1.1 what is the Internet?
1.2 network edge
▪ end systems, access networks, links
1.3 network core
▪ packet switching, circuit switching, network structure
1.4 delay, loss, throughput in networks
1.5 protocol layers, service models
1.6 networks under attack: security
Introduction 1-5
What’s the Internet: “nuts and bolts” view
❖ millions of connected
PC mobile network
server computing devices:
wireless ▪ hosts = end systems global ISP
laptop
smartphone ▪ running network apps
home
❖ communication links network
regional ISP
wireless ▪ fiber, copper, radio,
links satellite
wired
links ▪ transmission rate:
bandwidth
❖ Packetswitches: forward
router packets (chunks of data) institutional
network
▪ routers and switches
Introduction 1-6
What’s the Internet: “nuts and bolts” view
mobile network
❖ Internet: “network of networks”
▪ Interconnected ISPs
global ISP
home
network
❖ protocols control sending, regional ISP
receiving of msgs
▪ e.g., TCP, IP, HTTP, Skype, 802.11
institutional
network
Introduction 1-7
What’s a protocol?
a human protocol and a computer network protocol:
Hi TCP connection
request
Hi TCP connection
response
Got the
time? Get http://www.awl.com/kurose-ross
2:00
<file>
time
Introduction 1-9
A closer look at network structure:
❖ network edge: mobile network
❖ network core:
▪ interconnected routers
▪ network of networks institutional
network
Introduction 1-10
Access net: digital subscriber line (DSL)
central office telephone
network
DSL splitter
modem DSLAM
ISP
voice, data transmitted
at different frequencies over DSL access
dedicated line to central office multiplexer
cable splitter
modem
C
O
V V V V V V N
I I I I I I D D T
D D D D D D A A R
E E E E E E T T O
O O O O O O A A L
1 2 3 4 5 6 7 8 9
Channels
Introduction 1-13
The network core
❖ mesh of interconnected
routers
❖ packet-switching: hosts
break application-layer
messages into packets
▪ forward packets from one
router to the next, across
links on path from source
to destination
▪ each packet transmitted at
full link capacity
Introduction 1-14
Host: sends packets of data
host sending function:
❖ takes application message
❖ breaks into smaller two packets,
chunks, known as packets, L bits each
of length L bits
❖ transmits packet into
access network at 2 1
transmission rate R R: link transmission rate
▪ link transmission rate, host
aka link capacity, aka
link bandwidth
L bits
per packet
3 2 1
source destination
R bps R bps
R = 100 Mb/s C
A
D
R = 1.5 Mb/s
B
queue of packets E
waiting for output link
Introduction 1-17
Queueing delay (revisited)
average queueing
❖ R: link bandwidth (bps)
delay
❖ L: packet length (bits)
❖ a: average packet arrival
rate
traffic intensity
= La/R
❖ La/R ~ 0: avg. queueing delay small La/R ~ 0
* Check out the Java applet for an interactive animation on queuing and loss La/R -> 1
Introduction 1-18
Four sources of packet delay
transmission
A propagation
B
nodal
processing queueing
B
nodal
processing queueing
Introduction 1-22
Throughput
❖ throughput: rate (bits/time unit) at which bits
transferred between sender/receiver
▪ instantaneous: rate at given point in time
▪ average: rate over longer period of time
server,
server withbits
sends linkpipe
capacity
that can carry linkpipe
capacity
that can carry
file of into
(fluid) F bitspipe Rs bits/sec
fluid at rate Rc bits/sec
fluid at rate
to send to client Rs bits/sec) Rc bits/sec)
Introduction 1-23
Throughput (more)
❖ Rs < Rc What is average end-end throughput?
Rs bits/sec Rc bits/sec
L/Rs
L/Rs+L/Rc
2L/Rs 2L/Rs+L/Rc
mL/Rs mL/Rs+L/Rc
Introduction 1-24
Throughput (more)
❖ Rs > Rc What is average end-end throughput?
Rs bits/sec Rc bits/sec
L/Rs
2L/Rs
L/Rs+L/Rc
mL/Rs L/Rs+2L/Rc
L/Rs+mL/Rc
Introduction 1-25
Throughput (more)
❖ Rs < Rc What is average end-end throughput?
Rs bits/sec Rc bits/sec
Rs bits/sec Rc bits/sec
bottleneck link
link on end-end path that constrains end-end throughput
Introduction 1-26
Throughput: Internet scenario
❖ per-connection end-
end throughput: Rs
min(Rc,Rs,R/10) Rs Rs
❖ in practice: Rc or Rs
is often bottleneck
R
Rc Rc
Rc
Introduction 1-28
Practice
How long does it take a packet of length 1,000 bytes to propagate over a
link of distance 2,500 km, propagation speed 2.5*108 m/s, and
transmission rate 2 Mbps?
Propagation delay
= distance/propagation speed
= 2,500km/ 2.5*108 m/s
= 0.01 second
Introduction 1-29
Practice
Introduction 1-30
Practice
R19. Suppose Host A wants to send a large file to Host B. The path from
Host A to Host B has three links, of rates R1=500 kbps, R2=2 Mbps, and
R3=1 Mbps.
Introduction 1-31
Practice
R19. Suppose Host A wants to send a large file to Host B. The path from
Host A to Host B has three links, of rates R1=500 kbps, R2=2 Mbps, and
R3=1 Mbps.
b. Suppose the file is 4 million bytes. Dividing the file size by the
throughput, roughly how long will it take to transfer the file to Host B?
Introduction 1-32
Alternative core: circuit switching
end-end resources allocated
to, reserved for “call”
between source & dest:
❖ In diagram, each link has four
circuits.
▪ call gets 2nd circuit in top
link and 1st circuit in right
link.
❖ dedicated resources: no sharing
▪ circuit-like (guaranteed)
performance
❖ circuit segment idle if not used
by call (no sharing)
❖ Commonly used in traditional
telephone networks
Introduction 1-33
Packet switching versus circuit switching
packet switching allows more users to use network!
example:
▪ 1 Mb/s link
▪ each user: N
users
• 100 kb/s when “active”
• active 10% of time 1 Mbps link
❖ circuit-switching:
▪ 10 users
❖ packet switching:
▪ with 35 users, probability >
10 active at same time is less
than .0004 *
* Check out the online interactive exercises for more examples Introduction 1-34
Packet switching versus circuit switching
packet switching allows more users to use network!
❖ circuit-switching:
▪ 10 users
❖ packet switching:
▪ with 35 users, probability >
10 active at same time is less
than .0004 *
* Check out the online interactive exercises for more examples Introduction 1-35
Practice 1
Suppose users share a 2 Mbps link. Also suppose each user transmits
continuously at 1 Mbps when transmitting, but each user transmits
only 20 percent of the time. (See the discussion of statistical
multiplexing in Section 1.3 .)
Introduction 1-36
Practice 1
Suppose users share a 2 Mbps link. Also suppose each user transmits
continuously at 1 Mbps when transmitting, but each user transmits
only 20 percent of the time. (See the discussion of statistical
multiplexing in Section 1.3 .)
Introduction 1-37
Practice 1
Suppose users share a 2 Mbps link. Also suppose each user transmits
continuously at 1 Mbps when transmitting, but each user transmits
only 20 percent of the time.
c. Suppose now there are three users. Find the probability that at any
given time, all three users are transmitting simultaneously. Find the
fraction of time during which the queue grows.
Introduction 1-38
Practice 1
Suppose users share a 2 Mbps link. Also suppose each user transmits
continuously at 1 Mbps when transmitting, but each user transmits
only 20 percent of the time.
d. Suppose now there are five users. Find the probability that at any
given time, more than two users are transmitting simultaneously. Find
the fraction of time during which the queue grows.
Introduction 1-39
Internet structure: network of networks
❖ End systems connect to Internet via access ISPs (Internet
Service Providers)
▪ Residential, company and university ISPs
❖ Access ISPs in turn must be interconnected.
❖ So that any two hosts can send packets to each other
❖ Resulting network of networks is very complex
❖ Evolution was driven by economics and national policies
❖ Let’s take a stepwise approach to describe current Internet
structure
Internet structure: network of networks
Question: given millions of access ISPs, how to connect them
together?
access access
net net
access
net
access
access net
net
access
access net
net
access access
net net
access
net
access
net
access
net
access
net
access access
net access net
net
Internet structure: network of networks
Option: connect each access ISP to every other access ISP?
access access
net net
access
net
access
access net
net
access
access net
net
access
net
access
net
access
net
access
net
access access
net access net
net
Internet structure: network of networks
Option: connect each access ISP to a global transit ISP? Customer
and provider ISPs have economic agreement.
access access
net net
access
net
access
access net
net
access
access net
net
global
access
net
ISP access
net
access
net
access
net
access
net
access
net
access access
net access net
net
Internet structure: network of networks
But if one global ISP is viable business, there will be competitors
….
access access
net net
access
net
access
access net
net
access
access net
net
ISP A
access access
net ISP B net
access
ISP C
net
access
net
access
net
access
net
access access
net access net
net
Internet structure: network of networks
But if one global ISP is viable business, there will be competitors
…. which must be interconnected
access access
Internet exchange point
net net
access
net
access
access net
net
access
IXP access
net
net
ISP A
access
ISP C
net
access
net
access
IXP access
net
net
ISP A
access
ISP C
net
access
net
access
net regional net
access
net
access access
net access net
net
Internet structure: network of networks
… and content provider networks (e.g., Google, Microsoft,
Akamai ) may run their own network, to bring services, content
close to end users
access access
net net
access
net
access
access net
net
access
IXP access
net
net
ISP A
Content provider network
access IXP access
net ISP B net
access
ISP B
net
access
net
access
net regional net
access
net
access access
net access net
net
Internet structure: network of networks
Introduction 1-49
The OSI model
The OSI model
Why layering?
dealing with complex systems:
❖ explicit structure allows identification,
relationship of complex system’s pieces
▪ layered reference model for discussion
❖ modularization eases maintenance, updating of
system
▪ change of implementation of layer’s service
transparent to rest of system
▪ e.g., change in gate procedure doesn’t affect rest of
system
Introduction 1-52
Physical layer
❖ physical: bits “on the wire”
❑ Fundamental layer underlying any application
network
❑ Primarily consists of hardware transport
(unless virtual)
❑ Provides the basic communication network
channel that two network devices
(e.g., computers) use to send and link
receive messages
❑ Provides transmission & reception physical
hardware
Introduction 1-53
Link layer
❖ link: data transfer between
neighboring network elements
application
❑ Primarily implement in software
❑ may be embedded in physical devices transport
such as switches and network adapters
(firmware) network
❑ Responsible for transferring data
between two devices on the same link
network segment
❑ Data are transmitted in units of frames physical
which are groups of bits.
Introduction 1-54
Link layer
❖ link: data transfer between
neighboring network elements
application
transport
network
link
physical
Introduction 1-55
Network layer
❖ network: routing of datagrams
from source to destination
▪ IP, routing protocols application
❑ Each node must have a logical address in
transport
order to communicate
❑ Network layer uses logical IP Address;
addresses are assigned statistically or network
dynamically via server
❑ Link layer uses MAC address (Hardware link
address)
❑ Routing
physical
❑ Fragmentation and Re-Assembly
❑ Error Handling
Introduction 1-56
Transport layer
❖ transport: process-process data
transfer
▪ TCP, UDP application
❑ Provides end-to-end communications for
individual applications transport
❑ Connection-Oriented Protocols
Establish and maintain communications channels network
Ensure messages arrive in order
• Provide mechanisms for detecting delivery failure
• May automatically recover from dropped or duplicated link
messages at the Network Layer
❑ Connectionless Protocols physical
• Function like network layer datagrams
• Single messages that may arrive in any order
Introduction 1-57
Application layer
❖ application: supporting network
applications
▪ FTP, SMTP, HTTP application
Introduction 1-58
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
10.0.1.1 10.0.2.1
Port 7268 Port 80
Application Application
Transport Transport
Network Network
Data Link Data Link
Physical Physical
Example
Client Server
10.0.1.1 10.0.2.1
Port 7268 Port 80
Application Application
Transport Transport
Network Network
Data Link Data Link
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Example
Client Server
Application Application
Transport Transport
Network Network
Physical Physical
Chapter 1: roadmap
1.1 what is the Internet?
1.2 network edge
▪ end systems, access networks, links
1.3 network core
▪ packet switching, circuit switching, network structure
1.4 delay, loss, throughput in networks
1.5 protocol layers, service models
1.6 networks under attack: security
1.7 history
Introduction 1-72