Last Time: The Big Picture
Last Time: The Big Picture
1 2
3 4
What is a Protocol Interfaces
Friendly greeting
! An agreement between ! Each protocol offers an interface to its users,
parties on how
communication should take Muttered reply and expects one from the layers on which it
place. builds
! Protocols may have to » Syntax and semantics strike again
define many aspects of the
communication. – Data formats
! Syntax: – Interface characteristics, e.g. IP service model
Destination?
» Data encoding, language, etc. ! Protocols build upon each other
! Semantics:
» Add value
» Error handling, termination, Pittsburgh
ordering of requests, etc. – E.g., a reliable protocol running on top of IP
! Protocols at hardware, » Reuse
software, all levels!
– E.g., OS provides TCP, so apps don’t have to rewrite
! Example: Buying airline Thank you
ticket by typing.
! Syntax: English, ascii,
lines delimited by “\n”
5 6
Protocol and
Service Levels A Layered Network Model
The Open Systems Interconnection (OSI) Model.
7 Application Application
Application
6 Presentation Presentation
5 Session Session
End-to-end 4 Transport Transport
7 8
OSI Motivation OSI Functions
Heterogenous Sources of
Looking at protocols Components
11 12
Motivation: Many many
Network Components Protocols for Interoperability
Application
Application ! Many implementations of many technologies:
Router Software ! Hosts running FreeBSD, Linux, Windows, MacOS, …
Operating System (many protocols) Operating System
! People using Mozilla, Explorer, Opera, …
Links ! Routers made by cisco, juniper, …
! Hardware made by IBM, Dell, Apple, …
! And it changes all the time.
! Phew!
Computer ! But they can all talk together because they use the
Network Interface same protocol(s)
Protocol Software Router Hardware » Application level protocols: HTTP, SMTP, POP, IMAP, etc.
Computer » Hardware protocols (ethernet, etc)
Bridge HW/SW
13 14
! Multiple choices of protocol at many layers ! There may be multiple TCP TCP
» Physical: copper, fiber, air, carrier pigeon implementations of each
layer.
» Link: ethernet, token ring, SONET, FDDI » How does the receiver IP IP
» Transport: TCP, UDP, SCTP know what version of a
layer to use?
! But we don’t want to have to write “a web ! Each header includes a
(HTTP) browser for TCP networks running IP demultiplexing field that
over Ethernet on Copper” and another for the is used to identify the
V/HL TOS Length
fiber version… next layer.
» Reuse! Abstraction! » Filled in by the sender ID Flags/Offset
» Protocols provide a standard interface to write to » Used by the receiver
TTL Prot. H. Checksum
» Layers hide the details of the protocols below ! Multiplexing ooccurs at
multiple layers. E.g., IP, Source IP address
TCP, … Destination IP address
Options..
15 16
Limitations of the
Example: Sending a Web Page Layered Model
17 18
19 20
A TCP / IP / 802.3 Packet Internetworking Options
7 7 7 7
Application Ethernet preamble 6 6 6 6
5 5 5 5
Presentation MAC header 4 4 4 4
3 3 3 data link 3
Session LLC / SNAP header 2 physical 2 2 2 2
1 1 1 1 1 1 1
Transport IP header repeater bridge
Network (e.g. 802 MAC)
router gateway
applications
21 22
Some History:
The Internet Protocol Suite The Early Days
25 26
29 30
Applications and
Application-Layer Protocols Client-Server Paradigm
Typical network app has two pieces: client and server
! Application:communicating, application
transport
distributed processes network Client:
data link application
» Running in network hosts in physical ! Initiates contact with server transport
“user space” (“speaks first”) network
data link
» Exchange messages to ! Typically requests service from physical
! Application-layer
Server:
protocols
! Provides requested service to
» One “piece” of an app client
» Define messages exchanged
by apps and actions taken application
! e.g., Web server sends requested reply
application transport Web page, mail server delivers e-
» Use services provided by lower transport
network
network mail
data link application
layer protocols data link physical transport
physical network
! SocketsAPI refresher next ! (We’ll cover p2p at semester end) data link
physical
week (remember from 213)
31 32
What Transport Service User Datagram Protocol(UDP):
Does an Application Need? An Analogy
UDP Postal Mail
Data loss Timing ! Single socket to receive ! Single mailbox to receive letters
! Some applications (e.g., ! Some applications (e.g., messages ! Unreliable !
audio) can tolerate some Internet telephony, ! No guarantee of delivery
loss interactive games) ! Not necessarily in-order delivery
require low delay to be ! Not necessarily in-order delivery ! Letters sent independently
! Other applications (e.g., file “effective”
transfer, telnet) require 100%
! Datagram – independent packets ! Must address each reply
reliable data transfer ! Must address each packet
Bandwidth
! Some applications (e.g., multimedia) require a minimum amount of
bandwidth to be “effective”
! Other applications (“elastic apps”) will make use of whatever
bandwidth they get
Example UDP applications
Multimedia, voice over IP
33 34
TCP/UDP TCP/UDP
Socket API kernel ! In-class discussion:
space
» Briefly next Thursday
IP IP » Revisit the topic in the second half of the semester
37 38