Title: Computer Networks: Introduction
1Computer NetworksIntroduction
- Ivan Marsic
- Rutgers University
Chapter 1 Introduction
2TopicIntroduction to Data Networking
- ? Goals
- ? Communication Media
- ? Protocols
- ? Reliable Transmission
3User Goals and Tunable Knobs
Visible network properties
Correctness
Fault tolerance
Timeliness
Cost
Delivery
Customer
Tunable network parameters
Network topology
Communication protocols
Network architecture
Components
Physical medium
Network Engineer
4Topology vs. Robustness
Paul Baran, 1964
5Internet Map Major ISPs
6Fully Interconnected Network
New York City, 1888
7Early Telephone Switching Offices
81924 First Mobile Telephone
The first version of a mobile radio telephone
being used in 1924.
9Exploiting Locality
Saul Steinberg, A View of the World from Ninth
Avenue, cover of The New Yorker March 29, 1976
10Distortion of Signals
threshold "0"/"1"
11Packet Error Rate Approximation
PER packet error rate BER bit error rate n
packet length in bits
12Packet Transmission (1)
Example Sender sends a 6-bit packet 101101
to the receiver
13Transmission Link Capacity
Effect of link speed ? Link 2 can transmit 10
times more bits per unit of time ? or, Link 2
can transmit the same message in a 10 times
shorter period
14Wireless Communication
Point source
Interfering sources
Interference pattern
15Radio Signal Propagation
Ray tracing simulation in a closed office
environment. Signal intensity map for a room
with a doorway and a metal desk
door
desk
16Transmission / Interference Range
17Protocols
18Statistical Multiplexing
193-Layer Protocol Stack
Protocol at layer i depends only on the protocols
at i?1 (not at i?1!)
20Layer 1 / 3-Layer Protocol Stack
Link Layer Protocol modules at layer 1 (bottom
layer) exchange packets over the link
21Layer 2 / 3-Layer Protocol Stack
Network Layer Protocol modules at layer 2
(middle layer) route packets from source to
destination (possibly over many links)
22Layer 3 / 3-Layer Protocol Stack
Applications ? Network games ? Internet
telephony ? Email
End-to-End Layer Protocol modules at layer 3
(top layer) create illusion of different link
types (tailored to application-specific needs)
23Protocol Layers at Hosts/Switches
24Bit Stuffing for Transparency
25ISO OSI Protocol Stack
- Application services (SIP, FTP, HTTP,
Telnet, )
- Data translation (MIME)
- Encryption (SSL)
- Compression
- Dialog control
- Synchronization
- Reliable (TCP)
- Real-time (RTP)
- Source-to-destination (IP)
- Routing
- Address resolution
- Wireless link (WiFi)
- Wired link (Ethernet)
- Radio spectrum
- Infrared
- Fiber
- Copper
26Packet Nesting Across Layers
27How Headers Guide Packets
28Error Detection and Correction
29Interleaving
30Packet Transmission (2)
31Transmission and Propagation Delays
Transmission delay
Propagation delay
32Fluid Flow Analogy
33What Contributes to RTT
34TopicReliable Transmission via Retransmission
- ? Stop-and-Wait
- ? Go-Back-N
- ? Selective Repeat
35Automatic Repeat reQuest (ARQ)
- Stop-and-wait ARQ
- Transmit a frame and wait for acknowledgement
(ACK) - If positive ACK from receiver, send next frame
- If ACK does not arrive after a certain period of
time (Timeout), retransmits the frame - Simple, low efficiency
- Go-back-N ARQ
- Transmit frames continuously, no waiting
- The receiver only ACKs the highest-numbered
frames received in sequence - ACK comes back after a round-trip delay
- If timeout, the sender retransmits the frames
that are not ACKed and N1 succeeding frames that
were transmitted during the round-trip delay (N
frames transmitted during a round-trip delay) - Need buffer at sender, does not have to buffer
the frames at the receiver, - Moderate efficiency and complexity. Less
efficient when the round-trip delay is large and
data transmission rate is high - Selective-repeat ARQ
- Transmit continuously, no waiting
- The receiver ACKs all successfully received
frames - The sender only retransmits (repeats) the unACKed
frames when their timers expire - Most efficient, but most complex, buffer needed
at both sender receiver, needs per-frame timer
36Stop-and-Wait with Errors
37Stop Wait Sender Utilization
Stop Wait sender utilization, under error-free
transmission
Probability of successful transmission, with
error rate pe
Expected sender utilization for Stop Wait,
under errors
38Sliding Window Keeping the Pipe Full
- Goal Sender should be busy sending packets (as
long as it has packets ready to send) - Sender utilization as a metric of protocol
performance - Keeping the pipe full
39Sliding Window ARQ
40Go-back-N ARQ
41Selective Repeat ARQ
42Acknowledgements GBN vs. SR
43TopicBroadcast and Wireless Links
- ? ALOHA
- ? Hidden and Exposed Stations
- ? Carrier Sensing Multiple Access
- ? CSMA/CD, CSMA/CD
44Transmission Cone
45Transmission Cone, Collision Vulnerable Period
(b)
Collision occurs if two (or more) transmission
cones overlap.
(a)
46Parameter ?
Ratio of propagation delay vs. packet
transmission time
47Parameter ?
Ratio of propagation delay vs. packet
transmission time
48ALOHA and Slotted ALOHASenders State Diagram
49ALOHA Packet Transmission
50When transmission cones of ALOHA stations overlap?
51ALOHA Scenario
52Backlogged Stations
- Fresh stations transmit new packets
- Backlogged stations re-transmit collided packets
53Analysis of Slotted ALOHA (1)
- ASSUMPTIONS FOR ANALYSIS
- All packets require 1 slot for x-mit
- Poisson arrivals, arrival rate ?
- Collision or perfect reception (no errors)
- Immediate feedback (0, 1, e)
- Retransmission of collisions (backlogged
stations) - No buffering or infinite set of stations(m ?)
Time Slots
i ? 1
i
i ? 1
i ? 2
54ALOHA Model
55Analysis of Slotted ALOHA (2)
- 0 lt ? lt 1, since at most 1 packet / slot
- Equilibrium departure rate arrival rate
- Backlogged stations transmit randomly
- Retransmissions new transmissionsPoisson
process with parameter G gt ?
56Analysis of Slotted ALOHA (2)
- Throughput arrival rate ?
probability of no collision - Slotted ALOHA throughput
- Pure ALOHA throughput
57Efficiency of ALOHAs
S-ALOHA In equilibrium, arrival rate departure
rate ? Ge?G Max departure rate
(throughput) 1/e ? 0.368 _at_ G 1
58Unslotted (Pure) ALOHA
- Assume all packets same size, but no fixed slots
- The packet suffers no collision if no other
packet is sent within 2 packets long SGP0Ge?2G - Max throughput 1/2e ? 0.184 _at_ G 0.5
- Less efficient than S-ALOHA, but simpler, no
global time synchronization
i
59Hidden Stations
? A is transmitting to B. ? C wants to transmit
and listens before talk but cannot hear A
because A is too far away (As radio signal
is too weak for C to hear, so A and C are
hidden stations to each other). ? C concludes
that the medium is idle and transmits, thus
interfering with Bs reception.
60Exposed Stations
? B is transmitting to A. ? C wants to transmit
to D, it listens before talk and hears B so
it refrains from transmitting although its
transmission would not interfere with As
reception. ? Therefore, C is an exposed station
to B. Note that for C to be allowed to transmit,
C must know that A is not located in its
transmission range and that D is not in Bs
transmission range. ?? Hidden station problem is
much simpler to solve!
61Exponential Backoff
Key idea increasing number of choices reduces
the probability of repeated collisions
62Wired Broadcast Media CSMA
63CSMA / CD Senders State Diagm
64Analysis of CSMA/CD
Probability of a successful transmission
Channel efficiency for CSMA/CD
65CSMA/CD Collision Detection
66CSMA/CD Backoff Example
67CSMA / CA Senders State Diagm
68Efficiency of CSMA protocols
69Delay vs. Arrival Rate
TDMA
Maximum channel transmission rate
CSMA/CA
Average packet delay
ALOHA
CSMA/CD
Arrival rate ? per station
70TopicInternetworking
- ? Routing Forwarding
- ? Internet Protocol (IPv4) Datagram
Fragmentation - ? Link State Routing Distance Vector Routing
- ? Addressing CIDR
71Packet Switching / Routing
72Example Internetwork
73Protocol Stack atEnd-points vs. Routers
End-point protocol stack
Router protocol stack
74Routing Problem
75Network-layer ProtocolInternet Protocol (IP)
76IPv4 Header
77Dotted Decimal Notation for IPv4
78Domain Name System (DNS)
79IP Datagram Fragmentation (1)
(a)
80IP Datagram Fragmentation (2)
NO FRAGMENTATION
FRAGMENTATION OCCURS HERE
81Datagram Reassembly at Host D
82Network Routing Link State
83Network Example for Routing Protocols
84Example of Link State Routing
Step Confirmed set N ? Tentative set Comments
0 (A, 0, ?) ? Initially, A is the only member of Confirmed(A), so examine As LSA.
1 (A, 0, ?) (B, 10, B),(C, 1, C) As LSA says that B and C are reachable at costs 10 and 1, respectively. Since these are currently the lowest known costs, put on Tentative(A) list.
2 (A, 0, ?), (C, 1, C) (B, 10, B) Move lowest-cost member (C) of Tentative(A) into Confirmed set. Next, examine LSA of newly confirmed member C.
3 (A, 0, ?), (C, 1, C) (B, 2, C),(D, 8, C) Cost to reach B through C is 1?12, so replace (B, 10, B). Cs LSA also says that D is reachable at cost 7?18.
4 (A, 0, ?), (C, 1, C), (B, 2, C) (D, 8, C) Move lowest-cost member (B) of Tentative(A) into Confirmed, then look at Bs LSA.
5 (A, 0, ?), (C, 1, C), (B, 2, C) (D, 3, C) Because D is reachable via B at cost 1?1?13, replace the Tentative(A) entry for D.
6 (A, 0, ?), (C, 1, C), (B, 2, C), (D, 3, C) ? Move lowest-cost member (D) of Tentative(A) into Confirmed. END.
85Example Link State (1)
86Example Link State (2)
87Network Routing Distance Vector
shortest path (src?? dest) Min 7 ? 19, 4 ?
29, 25 ? 8 7 ? 19 26
88Distance Vector Calculation
89Example - Distance Vector
90Example - Distance Vector
91(No Transcript)
92Example DV Routing Loops
93TopicIP Addressing and CIDR
- ? Hierarchical Structure of IP Addresses
- ? CIDR (Classless Interdomain Routing)
94Example Road Map
95Forwarding Table Scalability
96OLD IPv4 Address Structure
97Address Class Sizes
98Special IPv4 Addresses
99CIDR Example (1)
(a)
100CIDR Example (2)
101CIDR Example (3)
Subnet Network prefix Binary representation Interface addresses
1 204.6.94.160/30 11001100 00000110 01011110 101000-- R2-1 204.6.94.160
1 204.6.94.160/30 11001100 00000110 01011110 101000-- R1-2 204.6.94.161
1 204.6.94.160/30 11001100 00000110 01011110 101000-- (unused)
1 204.6.94.160/30 11001100 00000110 01011110 101000-- b-cast 204.6.94.163
2 204.6.94.164/30 11001100 00000110 01011110 101001-- C 204.6.94.164
2 204.6.94.164/30 11001100 00000110 01011110 101001-- R1-3 204.6.94.165
2 204.6.94.164/30 11001100 00000110 01011110 101001-- D 204.6.94.166
2 204.6.94.164/30 11001100 00000110 01011110 101001-- b-cast 204.6.94.167
3 204.6.94.168/30 11001100 00000110 01011110 101010-- A 204.6.94.168
3 204.6.94.168/30 11001100 00000110 01011110 101010-- R1-1 204.6.94.169
3 204.6.94.168/30 11001100 00000110 01011110 101010-- B-1 204.6.94.170
3 204.6.94.168/30 11001100 00000110 01011110 101010-- b-cast 204.6.94.171
4 204.6.94.172/30 11001100 00000110 01011110 101011-- R2-2 204.6.94.172
4 204.6.94.172/30 11001100 00000110 01011110 101011-- B-2 204.6.94.173
4 204.6.94.172/30 11001100 00000110 01011110 101011-- (unused)
4 204.6.94.172/30 11001100 00000110 01011110 101011-- b-cast 204.6.94.175
5 204.6.94.176/30 11001100 00000110 01011110 101100-- R2-3 204.6.94.176
5 204.6.94.176/30 11001100 00000110 01011110 101100-- E 204.6.94.177
5 204.6.94.176/30 11001100 00000110 01011110 101100-- F 204.6.94.178
5 204.6.94.176/30 11001100 00000110 01011110 101100-- b-cast 204.6.94.179
102CIDR-based Forwarding Tables
103TopicAutonomous Systems
- ? Commercial Internet
- ? Peering and Transit Relationships
- ? Path Vector Routing
104Autonomous Systems (ASs)
105ISP Business Relationships
Figure (a) shows the pay-for-transit
relationship. In principle, a customer pays for
incoming and outgoing traffic, and expects to be
able to reach all other customers or content
providers on the global Internet. Permissible
amounts of traffic in both directions are
regulated by the service level agreement (SLA)
between the provider and the customer. ISP ? has
the same relationship with ISPs ? and ? as they
have to their customers. In other words, ? and ?
are ?s paying customers. In (b), ISP ? (not
shown) could peer with another same-tier ISP ?
(not shown) and their peering relationship would
work on the same principle as for ISPs ? and ?.
106ISP Business Relationship Example
107Providing Selective Transit (1)
108Providing Selective Transit (1)
109Providing Selective Transit (2)
AS? and its customers are customers of AS?and
AS? and its customers are customers of AS?
equivalent
customers of AS?
customers of AS?
110Routing in Global Internet (1)
router in AS? sends an update message advertising
the destination prefix 128.34.10.0/24
111Routing in Global Internet (2)
AS? advertises only its customers to its peers,
so AS? never learns that AS? has links to AS? and
AS?
112Example - Path Vector
113Example - Path Vector
114Integrating IGP EGP Tables
115Example - Path Vector
116TopicLink-Layer Technologies
- ? Point-to-Point Protocol (PPP)
- ? IEEE 802.3 a.k.a. Ethernet
117Link Layer Services
- Data-link layer transfer datagram from one node
to adjacent node over a communication link - Framing encapsulate datagram into a frame,
adding header, trailer. - Identify what set of bits constitute a frame,
that is, determining the beginning and the end of
a frame - Channel access if shared medium
- MAC addresses used in frame headers to identify
source destination - different from IP addresses!
- Reliable delivery between adjacent nodes
- Error detection
- Error recovery forward error correction code,
retransmission (ARQ) - Flow control pacing between adjacent sending and
receiving nodes - Half-duplex and full-duplex
- with half duplex, either transmit or receive on a
link,but not both nodes at same time
118Link Layer Sublayering
LLC Packet Data Unit
119Point-to-Point Protocol (PPP)
120PPP Functions
- Framing encapsulation of network-layer datagram
in data-link frame - Identify what set of bits constitute a frame,
i.e., determine the start end of a frame - Carry data of any network layer protocol (not
just IP) at same time - ability to demultiplex upwards
- Bit transparency must carry any bit pattern in
the data field - Error detection (no correction)
- Connection liveness detect, signal link failure
to network layer - Network-layer address negotiation endpoints can
learn/configure each others network addresses - Other characteristics of PPP
- no error correction/recovery
- no flow control
- out-of-order delivery acceptable
- no need to support multipoint links (e.g.,
polling)
121Point-to-point (PPP) Frame Format
LCP or NCP Control Packets
122Point-to-point (PPP)State Diagram
123TopicIEEE 802.3 a.k.a. Ethernet
- ? Ethernet Medium Access Control (MAC) Protocol
- ? Ethernet Evolution
- ? Switched Ethernet
124802.3 Link-Layer Frame Format
125Ethernet Version Notation
Data rate(e.g., 10 Mbps, 10 Gbps) Baseband/Broadband transmission Wiring type (e.g., coaxial, twisted pair or fiber optic)
MAC address Network port Time last frame received
00-01-03-1D-CC-F7 1 1039
01-23-45-67-89-AB 1 1052
A3-B0-21-A1-60-35 2 1017
126Thin-Cable Ethernet
127Switched/Bridged Ethernet
128Legacy Ethernet vs. Eth. Hub
Thin-Cable Ethernet
Ethernet Hub
129Hub vs. Switch
OSI Layer-1 switching
Ethernet Hub
OSI Layer-2 switching
Ethernet Switch
130Ethernet MAC Link Duplexity
131Ethernet Switch
132Learning Switches
See the switching table in the next slide
133Switching Tablefor the Previous Example
MAC address Network port Time last frame received
00-01-03-1D-CC-F7 1 1039
01-23-45-67-89-AB 1 1052
A3-B0-21-A1-60-35 2 1017
134Loops in Switched LANs (1)
135Loops in Switched LANs (2)
136802.1D Configuration BPDU parameters and format
137TopicIEEE 802.11 a.k.a. Wi-Fi
- ? 802.11 Architecture
- ? 802.11 Medium Access Control
- ? RTS/CTS Protocol for Hidden Stations
138Components of 802.11 LANs
Ad hoc network does not have distribution system
nor access point
139IBSS and Infrastructure BSS
140Extended Service Set (ESS)
141802.11 Link Layer ProtocolArchitecture
142802.11 Link or MAC-LayerFrame Format
143802.11 PHY Frame(Long PPDU format)
PPDU PLCP protocol data unit PLCP physical
(PHY) layer convergence procedure SFD start
frame delimiter
144802.11 Address Fields
Address-1 RA Immediate recipient of the
current frame (C) Address-2
TA Transmitter which transmitted the current
frame (B) Address-3 SA Original source
(A) Address-4 DA
Original destination (D)
145802.11 Protocol Architecture
146802.11 Interframe Spaces (1)
CSMA / CA
Collision Avoidance
147802.11 Interframe Spaces (2)
EIFS definition A station ready to transmit
enters EIFS after detecting a corrupted frame
148IEEE 802.11b System Parameters
Parameter Value for 1 Mbps channel bit rate
Slot time 20 ?sec
SIFS 10 ?sec
DIFS 50 ?sec (DIFS SIFS 2 Slot time)
EIFS SIFS PHY-preamble PHY-header ACK DIFS 364 ?sec
CWmin 32 (minimum contention window size)
CWmax 1024 (maximum contention window size)
PHY-preamble 144 bits (144 ?sec)
PHY-header 48 bits (48 ?sec)
MAC data header 28 bytes 224 bits
ACK 14 bytes PHY-preamble PHY-header 304 bits (304 ?sec)
RTS 20 bytes PHY-preamble PHY-header 352 bits (352 ?sec)
CTS 14 bytes PHY-preamble PHY-header 304 bits (304 ?sec)
MTU Adjustable, up to 2304 bytes for frame body before encryption
149802.11 Basic Transmission Mode
150802.11 Protocol State Diagram Sender
151802.11 Protocol State Diagram Receiver
(b)
152Examples of Timing Diagrams for IEEE 802.11
- A single station has two frames ready for
transmission on an idle channel. - A single station has one frame ready for
transmission on a busy channel. The
acknowledgement for the frame is corrupted during
the first transmission. - A single station has one frame ready for
transmission on a busy channel. The data frame is
corrupted during the first transmission.
153802.11 Timing Diagrams
(a) Timing of successful frame transmissions
under the DCF
(b) Frame retransmission due to ACK failure
(c) Frame retransmission due to an erroneous data
frame reception
154RTS/CTS for Hidden Stations
155RTS/CTS Transmission Mode
156TopicQuality of Service (QoS)
- ? Introduction Prospects
- ? Network Neutrality Debate
157Network Conceptual Model
158Players and Parameters
159Network Conceptual Model (2)
We dont know when sources will start/end their
sessions also for some types of data (video),
datarate is variable