Protocols and Layering

Download Report

Transcript Protocols and Layering

Lecture 2 Overview
Multiaccess vs. Point-to-point
• Multi-access means shared medium
– many end-systems share the same physical
communication resources (wire, frequency, ...)
– There must be some arbitration mechanism.
• Point-to-point
– only 2 systems involved
– no doubt about where data came from !
Internet
2
The Internet
PC
server
wireless
laptop
cellular
handheld
• millions of connected
computing devices:
hosts = end systems
– running network apps
• communication links
access
points
wired
links
router
– fiber, copper, radio,
satellite
Mobile network
Global ISP
Home network
Regional ISP
Institutional network
• routers:
– forward packets
(chunks of data)
Internet
3
A Network of Networks
• roughly hierarchical
– Tier-1 ISPs provide national,
international coverage
– Tier-2 ISPs provide
regional coverage
– Tier-3 and lower levels
provide local coverage
• any tier may sell to
business and residential
customers
• any ISP may have a
link to any other ISP
– not strictly hierarchical
Internet
4
Internet Design Goals
• primary goal: interoperability among existing networks
– a network of networks
– obey administrative boundaries
• secondary goals
–
–
–
–
–
fault tolerance
multiple transport protocols
support a variety of networks
distributed management
cost effective, low effort for host attachment, accountability
• first three were more important, so remaining four did not
receive as much attention
• no mention of security
Internet
5
Internet Design Principles
• minimal assumptions about services network
should support
– ability to send packets
– no reliability or security
• end-to-end principle
– keep the core of the network as simple as
possible,
– put complex functionality at the edges
– exception: significant performance improvement
Internet
6
Layering
• Divide a task into pieces and then solve each
piece independently (or nearly so)
• Establishing a well defined interface between
layers makes porting easier
• Major Advantages:
Code Reuse
Extensibility
Internet
7
The Internet Hourglass
Internet
8
The Internet at each Hop
Internet
9
Lecture 3
Protocols and Layering
Lecture 1
Internet
CPE 401 / 601
Computer Network Systems
slides are modified from Dave Hollinger
What’s a protocol?
human protocols:
• “what’s the time?”
• “I have a question”
• introductions
network protocols:
• machines rather than
humans
• all communication activity
in Internet governed by
protocols
… specific msgs sent
… specific actions taken when msgs received, or other events
Internet
11
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
Q: Other human protocols?
Internet
12
Protocol
• An agreed upon convention for communication.
– both endpoints need to understand the protocol.
• Protocols must be formally defined and unambiguous!
• Protocols define
– format,
– order of msgs sent and received among network entities,
– actions taken on msg transmission, receipt
• We will study lots of existing protocols and perhaps develop a
few of our own.
Internet
13
Programs & Processes
• A program is an executable file.
• A process or task is an instance of a program
that is being executed.
• A single program can generate multiple
processes.
Internet
14
Client - Server
• A server is a process - not a machine !
• A server waits for a request from a client.
• A client is a process that sends a request to an
existing server and (usually) waits for a reply.
Internet
15
Client - Server Examples
• Server returns the time-of-day.
• Server returns a document.
• Server prints a file for client.
• Server does a disk read or write.
• Server records a transaction.
Internet
16
Servers
• Servers are generally more complex (more
interesting).
• Basic types of servers:
Iterative - server handles one client at a time.
Concurrent - server handles many clients at a
time.
• We will study the differences later.
Internet
17
Layering
Internet
18
OSI Reference Model
The International Standards Organization (ISO) proposal
for the standardization of various protocols used in
computer networks is called the Open Systems
Interconnection Reference Model.
Although the OSI model is a just a model (not a
specification), it is generally regarded as the most
complete model.
Protocol Layers
19
OSI 7 Layer Model:
7
6
5
4
3
2
1
Application
Presentation
Session
Transport
Network
Data-Link
Physical
High level protocols
TCP/IP Model
Low level protocols
Protocol Layers
20
Simplified Network Model
Application
Application
Interface Protocols
Transport
Transport
Peer-to-peer Protocols
Network
Network
Data Link
Data Link
Protocol Layers
21
The Physical Layer
• Responsibility:
– transmission of raw bits over a communication
channel
• Issues:
– mechanical and electrical interfaces
– time per bit
– distances
Protocol Layers
22
The Data Link Layer
• Responsibility:
– provide an error-free communication link
• Issues:
– framing (dividing data into chunks)
• header & trailer bits
– addressing
10110110101
Protocol Layers
01100010011
10110000001
23
The Data Link Layer
• Data Link Control sublayer
• Medium Access Control sublayer
– needed by mutiaccess networks.
• MAC provides Data Link Control with “virtual
wires” on multiaccess networks.
Protocol Layers
24
The Network Layer
• Responsibilities:
– path selection between end-systems (routing).
– flow control.
– fragmentation & reassembly
– translation between different network types.
• Issues:
– packet headers
– virtual circuits
Protocol Layers
25
The Transport Layer
• Responsibilities:
– provides virtual end-to-end links between peer
processes.
– end-to-end flow control
• Issues:
– headers
– error detection
– reliable communication
Protocol Layers
26
The Session Layer
• Responsibilities:
– establishes, manages, and terminates sessions
between applications.
– service location lookup
• Many protocol suites do not include a session
layer.
– Not in TCP/IP model
Protocol Layers
27
The Presentation Layer
• Responsibilities:
– data encryption
– data compression
– data conversion
• Many protocol suites do not include a
Presentation Layer.
– Not in TCP/IP model
Protocol Layers
28
The Application Layer
• Responsibilities:
– anything not provided by any of the other layers
– TCP/IP model
• Session and Presentation Layer functions
• Issues:
– application level protocols
– appropriate selection of “type of service”
Protocol Layers
29
Layering & Headers
• Each layer needs to add some control information to
the data in order to do it’s job.
• This information is typically prepended to the data
before being given to the lower layer.
• Once the lower layers deliver the data and control
information - the peer layer uses the control
information.
Protocol Layers
30
Headers
DATA
Application
H
DATA
Transport
H H
DATA
Network
H H H
DATA
Data Link
Application
Transport
Network
Data Link
Protocol Layers
31
What are the headers?
Physical:
– no header - just a bunch of bits
Data Link:
– address of the receiving endpoints
– address of the sending endpoint
– length of the data
– checksum
Protocol Layers
32
What are the headers?
• Network:
–
–
–
–
–
–
–
–
–
–
Protocol
Protocol version
type of service
packet identifier
time to live
source network address
destination network address
length of the data
fragment number
header checksum
Protocol Layers
33
Layers Summary
• Data-Link: communication between machines
on the same network.
• Network: communication between machines
on possibly different networks.
• Transport: communication between processes
(running on machines on possibly different
networks).
Protocol Layers
34