Overview - Basicincpaper.snu.ac.kr/images/c/ce/Overview_Basic_1.pdf · 2019-09-16 · 26...
Transcript of Overview - Basicincpaper.snu.ac.kr/images/c/ce/Overview_Basic_1.pdf · 2019-09-16 · 26...
Overview
- Basic
Chong-kwon Kim
Topics of Today’s Lecture
Networking
Architecture
Protocol
SNU SCONE lab. 2
SNU SCONE lab. 3
Communication & Network
Communication is exchange of information between
users (stations, nodes) at a distance
Network
– A system consists of devices (often referred to as nodes) and
links for transportation of entities
– Example: roads, railroads, water
Two types of communication network
– Voice
– Computer networks
SNU SCONE lab. 4
Connectivity Impossible to connect (large) number of users directly
Share resources (links)
– Network is a mechanism to make the connectivity
easy by sharing resources
Sharing mechanisms
– Multiplexing
– Access control
Requires
- O(N^2) links
- O(N) accesses/user
s1
sn
sis3
s2
Server
s2 sns1
SNU SCONE lab. 5
Simplex/Duplex
SNU SCONE lab. 6
Link Types
7
Architecture
Divide & Conquer
– To solve a large & complex problem, first partition the problem
into small pieces
– Solve each partial problem
– Combine sub-solutions into a whole solution
Architecture
– A set of sub-functions that comprise a larger function
Abstraction
– Shield internal implementation details and show only interfaces
Example
– Program modules
M2M1
M4M3
M5
computer architecture is a set of rules and methods
that describe the functionality, organization, and
implementation of computer systems
8
Layered Architecture
Layered architecture
– Keep the interaction simple
Layer 1
Layer N
Layer n+1
Layer n
Layer n-1
Raw
Abstract
Layer n uses service
provided by layer n-1, adds
its own functions and
provide more abstract
service to layer n+1
Q: What functions layer 1
provides? And Layer N?
Overview
- Protocol
Chong-kwon Kim
SNU SCONE lab. 10
Protocol
Communications involve with two or more devices
Suppose A and B communicate each other– Should A and B use the same program?
– If A and B use Windows and Linux OS, respectively, how they communicate?
Note that communication is exchanges of messages
Protocol– Rules that communicating entities should abide to understand
and properly process messages received
– Protocol specifies the meaning (semantics) and syntax of messages
– And timing of messages
A B
SNU SCONE lab. 11
Protocol – Example 1
Error detection
– Communication links are not 100 % reliable
– Errors may change, add, delete bits in the original message
– An Internet bank user C requests to transfer $100 from account
A1 to A2
– If the first bit is changed to 1, then you transfer $228
How do you detect errors?
– There are many solutions
• Parity bit
• One’s complement addition
• CRC
01100100 11100100
SNU SCONE lab. 12
Protocol – Example 2
We need to agree
– Use the same method (Algorithm)
– How to apply the method
– How to represent additional data
Assume we agreed to
1. Even parity bit
2. Apply parity to every bytes
3. Attach parity bits to the end of the original message as a
byte stream
01001100 11100111 10101100 00010010
0000100001001100 11100111 10101100 00010010
SNU SCONE lab. 13
Protocol – Example 3
Suppose layer n performs error detection
Layer n
Layer n+1
Layer n-1
Layer n
Layer n-1
Layer n+1
Sender Receiver
01001100 11100111
01001100 11100111 00000010
Protocol- Syntax
- Semantics
- Timing
SNU SCONE lab. 14
Protocol Principle - 1
Good protocols abide the protocol principle
Why is the protocol principle important in designing
protocols?
PROTOCOL PRINCIPLEMessage that layer n generates at the sender
Message that layer n receives at the receiver
SNU SCONE lab. 15
Protocol Principle - 2
Layer n
Layer n+1
Layer n-1
Layer n
Layer n-1
Layer n+1
Sender Receiver
01001100 11100111
01001100 11100111 00000010
01001100 11100111
01001100 11100111 00000010
SNU SCONE lab. 16
Virtual Communication
Two layer entities at the same level think they
communicate directly
In fact, a message goes down to lower layers at the
sender and then goes up from lower layers at the
receiver
Layer n
Layer n+1
Layer n-1
Layer n
Layer n-1
Layer n+1
Msg Msg
MsgCtl MsgCtl
Video
SNU SCONE lab. 17
Standard Protocols To communicate, should use the same protocol
Proprietary protocols– Created (usually) by one or more companies
– Closed protocol
• Protocol is hidden or the owner may claim IPR
Open protocol– Specifications are open to the public and everyone can use them
free
Standard protocol– Open protocol that many agree to use
Examples of standard protocols– ISO OSI
– IEEE LAN, WLAN, …
– TCP/IP
– …
SNU SCONE lab. 18
TCP/IP
Resource Sharing - Multiplexing
Recall network and resource sharing
The most important principle in building efficient
networks
SNU SCONE lab. 19
Typical Network Configuration
SNU SCONE lab. 20
21
Multiplexing Multiplexing
– Techniques allowing transmission of multiple signals over a single
(data) link
– Channel: portion of a link that carries signals (information) between
a given pair of sender & receiver
• A link with n channels supports n simultaneous communications
Demultiplexing
– Separation of combined signals
SNU SCONE lab. 22
Categories of MuxTechniques
SNU SCONE lab. 23
Frequency-Division Multiplexing (FDM)
Analog communication technique
Medium (link) bandwidth (or spectrum) is much larger than a
single station requires
– A co-axial cable supports a few Mhz while a voice BW is 20 KHz
Signals generated by each sender modulate different carrier
frequency
Guard Band
– Unused bandwidth separating channels
SNU SCONE lab. 24
FDM Multiplexing Example
SNU SCONE lab. 25
FDM Demultiplexing Example
26
Synchronous TDM (STDM) Digital transmission system
Slot & Frame structure
– Time is partitioned into small, same-length durations called (time)
slots each of which is dedicated to one sending device
– Frame: One complete cycle of time slots
Slot allocation
– Mux allocates time slots of the same position to a sender
– The slots are dedicated to the sender regardless of actual use/idle
Demultiplexing?
SNU SCONE lab. 27
STDM Example: T-1 Line for Telephony
How to detect the
start(or end) of a
frame?
SNU SCONE lab. 28
Synchronous TDM
Disadvantage of Synchronous TDM
– Waste transmission resources
Link Performance
Bandwidth (Data rate / bit rate)
Transmission time and propagation time
SNU SCONE lab. 30
Performance Performance of a transmission link
– How long does it take to transfer a message from one end to
the other end?
Depends on three factors
– Bandwidth (or data rate) of a link
– Message size
– Length of a linkSNU SCONE lab. 31
SNU SCONE lab. 32
Bandwidth & Transmit Time Bandwidth (Data Rate)
– Bit transmission (receiving) rate
• How fast a transmitter feeds bits into the medium
• bps (bits per second)
Transmit time
– Time to completely transmitting a message at the sender
– L/B where L is message size and B is bandwidth
1 Mbps
2 Mbps
1 μs
0.5 μs
Example:
How many seconds will it take to transmit a 12 Kbit message
over a network of 1 Mbps bandwidth?
SNU SCONE lab. 33
Propagation Delay (Time)
Propagation delay
– Time required for a signal travels from a transmitter to a
receiver
• The speed of EM signal is about 65~80% of the speed of light
– d/V where
• d: distance between the transmitter to the receiver
• V: Speed of EM signal
Example
– What is the propagation time if the distance between the
two points is 12,000 km? Assume the propagation speed to
be 2.4 × 10 m/s in cable8
Latency
Time gap between the transmission of the first bit from
a sender to the reception of the last bit at a receiver
SNU SCONE lab. 34
𝒕𝟏
𝒕𝟑
𝒕𝟐
𝒕𝟒
First bit
Last bit
Perceived Latency
SNU SCONE lab. 35
Large message Bandwidth is important
Small message Propagation is important
RTT & Throughput Usually, a message is sent after a request from a user
RTT (Round Trip Time)
– Two times of
propagation time
Transfer time
= RTT + Transmit time
Throughput
= Message size / Transfer time
SNU SCONE lab. 36
𝒕𝟏
𝒕𝟑
𝒕𝟐
𝒕𝟒
First bit
Last bit
𝒕𝟎
PLT: Page Loading TimeTime for a complete loading of a webpage after request
Delay-Bandwidth Product
Consider a link as a pipe
Delay is the length of the pipe and Bandwidth is the
width of the pipe
DBP: Delay-bandwidth product
– Maximum number of bits in the pipe
– Example: Delay = 50 ms, Bandwidth = 45 Mbps
SNU SCONE lab. 37
SNU SCONE lab. 38
High Speed Network
Network with large bandwidth
– Decrease transmission delay
– Not propagation speed
Multimedia communications & High Speed Network
Read Cisco VNI Data
SNU SCONE lab.
Queueing System & Theory Recall resource sharing
Queueing system
– Any systems that are shared by multiple users
– Example: Bus, bank, …
Server
Departure Arrival
Customer
(Job)
Queue
Queueing theory analyzes
the performance of
queueing systems
Performance =
Delay, Blocking prob.
Ref: Gallager’s book pp.149-170
SNU SCONE lab.
Queueing Theory
Parameters– Arrival Rate,
• The number of customers arrived at the system per time unit
• Inter-arrival time
– Service Rate,
• The number of service completions given that the server is busy at all times
• Service time
– Memoryless property
• The next (Arrival, departure) events is independent of the previous events
• Poisson process, Exponential distribution
– Utilization Factor,
• Measure of how busy is the system
/
Little’s Theorem (N = λT)
Queue
Server
A1 A2
D1
A3
D2 D3
Little’s Theorem
Suppose we observe the system for [0, τ >>0]
– 𝑇𝑖: System time of i-th customer
– n(τ ): Number of customers arrived during [0, τ]
– K(t): Number of customers in the system at time t
– σ𝑖=1𝑛(τ)
𝑇𝑖 ≅ 0τ𝐾 𝑡 𝑑𝑡
– 𝑛(τ)/τ ≅ 42
SNU SCONE lab.
Queueing Theory
M/M/1 Queueing System
– Exponential (Memoryless process) Inter-arrival and
Service time
– One server
– p : Steady-state prob. that n customers are in the
system
– Balance equations
• , n = 0,1,2,...
Pnn ( )1
Pii
0
1
P Pn n 1
n
SNU SCONE lab.
Queueing Theory
M/M/1 Queueing System
– N : Average number of customers in the system
– T : Average system time experienced by a customer
– Little’s Theorem
T 1/( )
N T
N n Pn /( )1
SNU SCONE lab.
Queueing Theory
Two different systems
– System 1 : Three slow servers each of which is dedicated to one source
– System 2 : A fast server that is three times faster than a slow server. Arrivals from three sources are aggregated and use one queue
Server 1
Server 2
Server 3
Source 1
Source 2
Source 3
System 1
System 2
SNU SCONE lab.
Queueing Theory
Comparison of FDM (TDM), ATDM
– System 1 : FDM that separates a link into three channels
– System 2 : ATDM that is shared dynamically by three users
2 1
2 1
1 2
3
3
3
T T
Exercises
1. Google “ietf rfc index” and retrieve the RFC index. Also, retrieve the
protocol specifications for TCP, IP, and UDP.
2. Calculate the total time required to transfer a 1000-KB file in the following
cases, assuming an RTT of 50 ms, a packet size of 1 KB data, and an initial
2×RTT of “handshaking” before data is sent:
(a) The bandwidth is 1.5 Mbps, and data packets can be sent continuously.
(b) The bandwidth is 1.5 Mbps, but after we finish sending each data packet
we must wait one RTT before sending the next.
(c) The bandwidth is “infinite,” meaning that we take transmit time to be
zero, and up to 20 packets can be sent per RTT.
(d) The bandwidth is infinite, and during the first RTT we can send one packet
(2^1−1), during the second RTT we can send two packets (2^2−1), during the
third we can send four (2^3−1), and so on. (A justification for such an
exponential increase will be given in Chapter 6.)
SNU SCONE lab. 47
Exercises5. Consider a point-to-point link 4 km in length. At what bandwidth would
propagation delay (at a speed of 2×10^8m/s) equal transmit delay for 100-byte
packets? What about 512-byte packets?
10. What differences in traffic patterns account for the fact that STDM is a cost-
effective form of multiplexing for a voice telephone network and FDM is a cost-
effective form of multiplexing for television and radio networks, yet we reject
both as not being cost effective for a general-purpose computer network?
11. How “wide” is a bit on a 10-Gbps link? How long is a bit in copper wire,
where the speed of propagation is 2.3×108 m/s?
15. For each of the following operations on a remote file server, discuss
whether they are more likely to be delay sensitive or bandwidth sensitive:
(a) Open a file.
(b) Read the contents of a file.
(c) List the contents of a directory.
(d) Display the attributes of a file. 48
Selected Problems (1, 2, 5, 10, 11, 15, 20)
SNU SCONE lab. 49