You are on page 1of 61

0

CSE/EE 362: Communication Networks


Professor Thomas La Porta, CSE
Office: 360B IST
Email: tlp@cse.psu.edu
Office Hours: Wed, 1:00-3:00

TA: Guiseppe Petracca
Email: gxp18@cse.psu.edu
Office Hours: Th, 1:00-3:00 in 338A IST
1
Syllabus
Date Topic, Book Chapter Assignment Due
January
M7
Overview
Chapter 1

W9
F11
M14 HW 1
W16 Physical Layer
2.1-2.2, 2.5, 2.6

F18
W23* HW 1
F25 HW2
M28 Link Layer
3,
4.1-4.2

W30
February
F1
HW 2
M4* HW3
W6 Network Layer
5.1-5.4

F8
M11* HW3
W13
F15
M18 HW4
W20 Transport Layer 6.1 6.2
F22
M25* Internetworking 5.5 HW5 HW4
W27 Exam
March
F1
No Class
M11* Internetworking 5.5 HW5
W13 Exam
F15 Internetworking 5.5
M18 Ethernet 4.3, 4.8
W20 HW 6
F22 Internet Protocols: IP
5.6

M25* HW 6
W27 HW 7
F29 Internet Protocols: TCP
6.4-6.6

April
M1*
HW 7
W3 HW 8
F5 Internet Applications
7.1 7.4

M8* HW 8
W10 Security
8

HW 9
F12
M15* HW9
W17 HW10
F19 Wireless Networking
M22* HW10
W24 Mobile Data
F26

* Indicates that there will be a quiz
one day that week. This will be
updated online if anything changes.
It is your responsibility to check
2
Grading
Midterms: 15% each
Quizzes: 30%
Scheduled for week with an asterisk (can be any day that week)
Syllabus will be updated online if dates change it is your responsibility to check
NO MAKEUPS, NO DROPPING GRADES
Final Exam: 40%
Cheating on any assignment (exam or quiz) results in a 0 on that assignment
Class Participation: +/- 5 points on average
If you habitually miss class you will not get higher than a C
There are no possibilities of raising a grade after the semester: you have 10 quizzes, 2
midterms and 1 final to earn your grade
3
Overview of Networks: Chapter 1
Types of networks
Communication tasks
Protocol reference models
Protocol design principles
Review of state machines
Review of basic probability
4
Networking
Point to point communication not usually practical
Devices are too far apart
Large set of devices would need impractical
number of connections
Solution is a communications network
5
Client-Server
A network with two clients and one server
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, Pearson Education-Prentice Hall, 2011
6
Client-Server
The client-server model involves requests and replies
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, Pearson Education-Prentice Hall, 2011
7
Network Classifications
By Geography
Local Area Networks
Metropolitan Area Networks
Wide Area Networks
By transmission media
Wireless Networks
Wired Networks
By switching technology
Circuit-switched
Packet-switched
Relay
Frame relay, ATM, MPLS,
8
Local Area Networks
Small scope
Building or small campus
Usually owned by same organization as attached devices
High data rates
Usually broadcast systems
switched systems becoming more popular
Examples:
Ethernet
802.11 Wireless LANs
Token Ring
9
Local Area Networks
Wireless and wired LANs. (a) 802.11. (b) Switched Ethernet.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, Pearson Education-Prentice Hall, 2011
10
Local Area Networks
Two broadcast networks
(a) Bus
(b) Ring
11
Metropolitan Area Networks
Covers a city, or portion of a city
Example
A metropolitan area network based on cable TV
12
Wide Area Networks
Large geographical area
Crossing public rights of way
Rely in part on common carrier circuits
Alternative technologies
Circuit switching
Packet switching
Asynchronous Transfer Mode (ATM)
13
Wireless vs. Wireline Networks
Wireline networks
Typically refers to wired access to the backbone network (e.g.,
dial-up, cable, Ethernet)
Backbone may include wireless links (e.g., satellite)
Wireless networks
Wide area: cellular networks
GSM, CDMA, UMTS
Wireless access to a wired backbone network
Local Area: wireless LANs
802.11
Wireless access to a wired data network
Infrastructure-less
Ad hoc networks multi-hop wireless networks
14
Wireless Networks
Categories of wireless networks:
System interconnection
Wireless LANs
Wireless WANs
15
Wireless Networks (2)
(a) Bluetooth configuration
(b) Wireless LAN
16
Wireless Networks (3)
(a) Individual mobile computers
(b) A flying LAN
17
Circuit Switching
Dedicated communications path established for the duration of the conversation
e.g. telephone network
Requires out-of-band control to establish a connection before communication
Provisioned or on-demand
Service characteristics
Connections may be refused
Ordered data delivery
Synchronous delivery (no queuing)
Typically used for voice
Sending Terminal Receiving Terminal
Dedicated resources reserved on path
Path stays constant during life of session
18
Packet Switching
Small chunks (packets) of data at a time
Packets passed from node to node between source and destination
Path may change during a session
No requests required for a particular session
Service characteristics
Best-effort means all sessions allowed
May lose or re-order data
Asynchronous (queuing)
Typically used for data communications


19
Circuit Switching/Packet Switching (1)
(a) Circuit switching. (b) Packet switching.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, Pearson Education-Prentice Hall, 2011
20
Circuit Switching/Packet Switching (2)
Timing of events in (a) circuit switching,
(b) packet switching
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, Pearson Education-Prentice Hall, 2011
21
Circuit Switching/Packet Switching (3)
A comparison of circuit-switched and packet-switched networks.
Computer Networks, Fifth Edition by Andrew Tanenbaum and David Wetherall, Pearson Education-Prentice Hall, 2011
22
Asynchronous Transfer Mode (ATM)
Fixed packet (called cell) length
Evolution of frame relay
Little overhead for error control
High speed
Anything from 10Mbps to Gbps
Service characteristics
May emulate circuit or packet modes
23
Network Protocols
Rules for communication
Arranged in hierarchies
Key elements
Syntax
Data formats
Signal levels
Semantics
Control information
Error handling
Timing
Speed matching
Sequencing


24
Functions
Encapsulation
Segmentation and reassembly
Connection control
Ordered delivery
Flow control
Error control
Addressing
Multiplexing
Transmission services
25
Encapsulation
Addition of control information to data
Address information
Error-detecting code
Protocol control

26
Segmentation (Fragmentation)
Data blocks are of bounded size
Application layer messages may be large
Network packets may be smaller
Splitting larger blocks into smaller ones is segmentation
Checkpoints and restart/recovery
27
Why Fragment?
Advantages
More efficient error control
More equitable access to network facilities
Shorter delays
Smaller buffers needed

Disadvantages
Overheads
Increased interrupts at receiver
More processing time
28
Connection Control
Connection Establishment
Data transfer
Connection termination
May be connection interruption and recovery
Sequence numbers used for
Ordered delivery
Flow control
Error control
29
Connection Oriented Data Transfer
30
Ordered Delivery
PDUs may traverse different paths through network
PDUs may arrive out of order
Sequentially number PDUs to allow for ordering

31
Flow Control
Done by receiving entity
Limit amount or rate of data
Stop and wait
Credit systems
Sliding window
Needed at application as well as network layers
32
Error Control
Guard against loss or damage
Error detection
Sender inserts error detecting bits
Receiver checks these bits
If OK, acknowledge
If error, discard packet
Retransmission
If no acknowledge in given time, re-transmit
Performed at various levels

33
Addressing
Identities
Applications
Hosts
Connections
Points in the network
Typically hierarchical
34
Multiplexing
Supporting multiple connections on one machine
Mapping of multiple connections at one level to a single connection at another
E.g., Carrying a number of connections on one fiber optic cable
35
Transmission Services
Priority
e.g. control messages
Quality of service
Minimum acceptable throughput
Maximum acceptable delay
Security
Access restrictions
36
Protocol Hierarchies
Layers, protocols, and interfaces.
37
Protocol Hierarchies: Encapsulation
Example information flow supporting virtual communication in layer 5.
38
Reference Models
The OSI Reference Model
The TCP/IP Reference Model
39
OSI Reference Model
The OSI
reference
model.
40
TCP/IP Reference Model
41
7 Layer Functions
Physical Layer
electrical/optical transmission of bits or symbols
physical control signals
Data link layer
manages data transfer between nodes
media access
framing
error control (detection and maybe correction)
flow control (hop-by-hop)
Network Layer
routing (hop-by-hop)
error control (maybe correction)
addressing
multiplexing
congestion control
42
7 Layer Functions
Transport Layer
first end-to-end protocol, resides in hosts
end-to-end connection
transparent services to higher layers
connection management
flow control
error correction
data sequencing
multiplexing
Session Layer
end-to-end synchronization
responsible for dialogue
Presentation Layer
syntax
43
7 Layer Functions
Layer 1-3
part of the network
provide varying degrees of service
Layer 4
compensates for network
together with Layer 1-3, provides transport services to the applications
Layer 5-7
typically part of the application
44
Internet (TCP/IP) Protocol Family
45
Network Architecture
Application
Higher Layers
Transport
Network
Link
Physical

Host Router Gateway Host Router
Application
Higher Layers
Transport
Network
Link
Physical

Network
Link
Physical

Link
Network
Physical: transmission media
Link
- media access control
- device addressing
Network: routing through the network
Transport: manages end-to-end connection
46
Example: Architecture of the Internet
Overview of the Internet.
47
Protocol Background
Protocol: A set of mutually agreed upon rules and procedures stating how tow or more
parties are to interact to exchange information
Interface language
Internal procedures
Communication Syntax

Concerns
services (see next chart)
interface - specified way to communicate with the protocol
proper operation
performance
48
Protocol Design
Know the service required by the next highest layer
e.g., reliable, ordered data delivery
Know the service provided by the next lower layer
e.g., unreliable, unordered data delivery; error detection
Design protocol to overcome the service mismatch
e.g., use error detection of lower layer to trigger retransmissions; buffer data to deliver it in
order
Define interface to the user
Define peer-to-peer procedures
Define internal procedures
49
Services to Protocols Relationship
Peer-to-peer Protocol
50
Connection-Oriented and Connectionless Services
51
Service Primitives: used for requesting services between layers
Primitive types
Request asks for a service
Indication informs that a request has been made
Response replies to a request
Confirm request has been filled

Client
Application Protocol
Server
Protocol Application
Connect.request
Connect.indication
Connect.response
Connect.confirm
52
Peer-to-peer
Procedures defined between peer protocol layers
Syntax defined for messages
53
Protocol Interfaces
54
Protocol Specification
Natural Language
ambiguous
Transition models
finite state machines
Asynchronous, synchronous, extended
Petri-nets
Abstract programs
pseudo-code
Hybrids
55
Finite State Machines
Defined by 5-tuple (S, I, O, S
o
, T)
S finite set of states
I finite set of inputs
O finite set of outputs
S
o
initial state
T- transition function
Execution
initially in state S
o


event occurs, e.g., input arrives
react to input
Generate output
Transition to another state
Output and transition are functions of current state and input
1
3
2
a/x
c/z
c/z
c/x
b/y
b/z
0
Self loops not shown
Deterministic
56
Extended Finite State Machines
Finite state machines plus:
variables
logical operators (AND, OR, )
Do not give additional power
all ESFM can be mapped into a FSM by enumerating states
57
Communicating Finite State Machines
Typically used to model and specify protocols
inputs/outputs can be external messages (peer-to-peer) or primitives
inputs can be generated by internal event (time-outs)
Two models of communication
synchronous: state machines block for each other
asynchronous: queues between the state machines
EFSMs
used to model sequence numbers, etc.
58
Synchronous Coupling
Wait_app
Wait_ack
Wait_data
Wait_app
App?msg.request/receiver!msg Sender?msg/App!msg.indication
App?msg.response/sender!ack
Receiver?ack/App!msg.confirm
Sender Receiver
Wait_app
Wait_ack
App?msg.request/receiver!msg(seqno)
(Receiver?ack(seqno))&&(seqno ==
expected)/App!msg.confirm; expected++
(Receiver?ack(seqno))&&(seqno !=
expected)/App!error
Wait_data
Wait_app
(Sender?msg(seqno))&&(seqno ==
expected)/App!msg.indication; expected++
App?msg.response/sender!ack(seqno)
59
Asynchronous Coupling
Implemented by modeling queues in between communication FSMs
in practice, chaining FSMs
FSM A
FSM B
Model as a FSM
60
Mathematical background
Basic probability
if A and B are independent processes, P(A) and P(B) occurring is P(A)P(B)
for ordered sequence of independent events, simply multiply probabilities
e.g., P of A occurring three times, followed by B is P(A)P(A)P(A)P(B)
expected value


for unordered occurrence of a set of event with two outcomes, results come from Bernoulli trials
E.g., k occurrences in n trials


Applied to networks
e.g., p = probability a packet is received in error, 1-p = probability packet is correctly received
(1-p)p
k
= probability the packet is received correctly after k tries

P(n bit block has k random errors), P = probability of a random bit error



Expected number of tries to successfully transmit a packet if p(packet loss) = p

=
=
1
) ( ) (
i
i i
x p x X E

k n k
p p
k
n
k X P

|
|
.
|

\
|
= = ) 1 ( ) (
k n k
p p
k
n
k X P

|
|
.
|

\
|
= = ) 1 ( ) (

=
=
1
) 1 ( ) (
i
i
ip p tries E

You might also like