Powerpoint: OSI Model

Download Report

Transcript Powerpoint: OSI Model

Open Systems
Interconnection
(OSI) Reference
Model
1
Big Picture
• Alice wants to send a greeting card to her
grandmother. How does this work?
• Alice wants to call Bob using the landline.
How does this work?
• Alice wants to browse Amazon.com to buy
a book. What needs to happen to make
this work?
2
Sending a Greeting Card
(1)
Goes to store, gets card
Content comes
from here
Alice
Writes card for Grandma
Calls Mom for address!
Fixes stamp, Drives
May have special
terms for
grandma
Grandma doesn’t
have e-mail or
facebook!
Standard Vs Nonstandard sizes
matter
Mails card
3
Sending a Greeting Card
(2)
• Truck picks up the mail from mail box
◦ Also get’s other mail from other folks
• Mail goes to “sorting facility”
◦ Mail to the same zip code go together
• Mail is flown to destination
◦ Perhaps trucked to destination post-office
• Mail is sorted by route and delivered by mailman
(delivery van)
• Grandma picks up mail, opens greeting card first
while discarding junk mail
See: http://en.wikipedia.org/wiki/United_States_Postal_Service for
details
4
Source: http://upload.wikimedia.org/wikipedia/commons/e/e7/USPS_mail_flow_through_national_infrastructure.svg
5
Things to note
• Acronyms! – It is a matter of language
• There are different transportation methods
◦ Cars, trucks, airplanes, delivery vans
◦ Differences: Drop-off and Delivery Versus Sorting and Routing
• There are different types of packages
◦ Large, medium, small boxes
• There are different types of services
◦ First-class, bulk, certified, express, priority
• Addressing and envelope are important
◦ Follows a standardized format
◦ Alice had to find the address!
6
Things to note (2)
• UPS’s delayed Christmas deliveries
• Bottleneck due to limited capacity (number of
flights)
◦ Read articles
◦ What if UPS had leased twice the number of
aircrafts? Would they all be utilized?
◦ Toys Vs perishable goods (QoS)
• Bottlenecks can occur in many places due to
many reasons
◦ Weather, trucks, flights, people, machines, sorting, …
7
Voice Call on Land-line (1)
“Address” here is
the phone
number
Looks up her contacts for
Mom’s phone number
Alice
Dial-tone
indicates phone
is working
Lifts the phone, gets
dial-tone
Dialing the number
tells the “network”
who should be
reached
Dials the phone number
for her mom
Hears the phone “ring”
Rrin
g
“Ring” tell’s Alice that
her Mom’s phone
may be ringing
8
Source: http://madebyjoel.com/wp-content/uploads/2010/04/Made-by-Joel-Tin-Can-Phones-2.jpg
9
Slide modified from those provided by the author of the textbook
Voice-Call on Land-line (2)
(simplified)
To
IE
C
To Inter-exchange Carrier
Office phones
End office
Alice
OR Central Office
Local loop
Home phone
Dedicated line to Alice
A dedicated
“circuit” is
set up from
the IXC to
Alice’s Mom
10
Voice Call on Landline (3)
• The “trunk” from the central office to the Interexchange Carrier “multiplexes” many voice calls
◦ Compare with many pieces of mail and packages to the
same state being flown over a plane
• “Resources” are dedicated to a voice call
◦ It appears as if there is an exclusive “wire” between
Alice’s phone and her grandmother’s phone
◦ The “wire” is created by “switches” in the phone network
using the phone number
◦ It takes time to set up the call
◦ Such a connection is called “Circuit Switched”
◦ We will revisit “switching” later
11
Circuit switched voice call
(simplified)
Alice
Circuit
IXC-A’s
Network
IXC – A’s
POP
IXC – A’s
POP
Central
Office
…
…
Central
Office
Tandem
Office
Tandem
Office
IXC – B’s
POP
Central
Office
IXC – B’s
POP
IXC-B’s
Network
POP = Point of Presence
12
Browsing Amazon.com (1)
Boots her computer and
Opens browser
Browser is called
the “client”
software
Alice
Types
http://www.amazon.com
Browser “loads” page
“www.amazon.com”
is the identity of
“server”(s)
Is this
magic??
13
Questions
• How does the browser know what and where
amazon.com is?
• How does it “communicate” with
amazon.com?
◦ How is it connected to the Internet?
• What if Alice is also browsing cnn.com at the
“same” time?
• How does the browser know if it has received
the elements of the html page correctly?
14
What is a Communications
Network?
• A system of interconnected devices and the
underlying infrastructure that enable the exchange
of electronic information (analog or digital)
• Components
◦ Electronic communication devices
◦ PCs, phones, tablets, sensors, laptops, servers, etc.
◦ Network Devices
◦ Hubs, routers, cross-connects, base stations, firewalls, databases, name servers,
etc.
◦ Communication links
◦ Coaxial cable, twisted pair cable, wireless, etc.
◦ Services
◦ Phone calls, video, web, software applications, etc.
15
Networks are part of IT
infrastructure
• Information Technology (IT) or Information and
Communications Technology (ICT) infrastructure
components
◦ Computational end/user devices
◦ Networks
◦ Telephone networks (wired and wireless)
◦ Internet and access networks (wired and wireless)
◦ Satellites
◦ Links
• Heterogeneous components/technology
• Variety of services provided
Compare with package sizes
◦ Web, voice, video, SCADA, email, SMS
and content with postal
service
16
Computational/User
Devices
Continuum
◦
◦
◦
◦
◦
◦
◦
◦
Sensors/embedded controller
Handhelds (tablets, cellphones)
PCs/Workstations
High data rate sensors (e.g., radar)
Video cameras
Servers
Databases
Etc.
Information
Network
Heterogeneous devices
◦ Features, Functions, OS platforms
different
◦ Security vulnerabilities and
capabilities differ
8
L
o
r
e
m
Ip
s
u
m
6
5
17
Internet of “everything”
The Philips “Hue”
The Nest “Protect”
18
Types of Networks – One
Classification
• Based on geographical size
◦ Access Networks
◦ LANs, Campus, Residential networks, etc.
Mail delivery
Local loop for landline call
◦ Metropolitan Networks (Metro Nets)
◦ Interconnection of central offices, POPs, corporate locations in a city,
campus backbone network
◦ Higher bandwidth, may include leased communication links
◦ Wide Area Networks (WANs) or Long Haul Networks
◦ Private and Public Backbone networks (Level3, AT&T)
◦ Content Delivery Networks (Akamai)
◦ Corporate virtual private network over common infrastructure
19
Yet another analogy:
Airline inter-hub
•
A traveler from Pittsburgh needs to visit Naples, Italy.
◦
◦
◦
◦
◦
•
An airport shuttle collects people going to the airport
A regional “commuter” jet brings him/her to JFK airport in New York City
At NYC, people from all over East Coast board a well-filled 747 non-stop flight to Rome, Italy
From Rome, a regional jet takes traveler to Naples
Airport shuttle drops travelers at their hotels in Naples
Pattern:
◦ Access - Transport - Access
•
An optical fiber wavelength is the “747” (long-haul)
•
Multiplexing in the access and metro transport stages (switches, routers) are
the regional airlines
•
Efficient solutions in airlines, shipping, and telecommunications industry all
have this basic repeated structure
20
Typical Wired Network Structure
Current Trends
Core
~ Mesh
Metro ~ Ring
Access ~ Tree
Metro Area 1
Metro Area 2
Access
Backbone
or Core
Feeder Network
Metro Area 3
Central Offices
Metro Area N
21
Networks have varying technology, components and protocols depending on size!
Network Types Again
WAN: Cross connects, routers,
etc, DWDM, MPLS, IP, etc,
SIP, BGP, OSPF etc,
METRO: SONET, ATM,
MPLS, Carrier Ethernet,
Frame Relay, WiMAX, point
to point microwave, free
space optical, etc
ACCESS: Twisted pair, T1,
DSL, Cable Modem,
WLAN, cellular, Fiber to
Curb , Ethernet, etc.
22
Wireless Networks have another set of technologies and protocols!
Wireless Networks
IP/SS 7
PSTN
CO
CO
CO
VLR
VLR
GGSN
Home
Location
Register
Equipment
Identity
Register
Auth.
Center
Mobile Switching
Center
SGSN
Radio Network
Controller
PSTN - Public Switched Telephone Network
CO - Central Office
IP - Internet Protocol
SS7 - Signaling System 7
VLR - Vistor Location Register
SGSN - Serving GPRS Support Node
GGSN - Gateway GPRS Support Node
UE - User Equipment
SGSN
MSC
Node-B
Radio Network
Controller
Radio Network
Controller
UE
23
Telecom and Networking
Industry is Regulated!
• Unlike other components of IT
• Regulatory bodies have a hierarchy
• International Telecommunications Union (ITU)
◦ ITU is part of the United Nations
◦ Worldwide coordination/ standardization (e.g., telephone numbers)
◦ Allocation (e.g., satellite slots)
• Federal Communications Commission (FCC) in the US
◦
◦
◦
◦
Regulates wireless spectrum (bands, licenses, power levels, etc,)
Long distance voice
Cable,
Satellite, etc.
24
Slide modified from Agrawal
Network 2
Network 1
Packet switching
Router
• Routing data using “addressed” packets so that a “channel” is
occupied only during the transmission of the packet
• Packet switches are called routers
◦ Routers are devices used to interconnect two or more
networks
• Network resources are allocated (or used) as needed
• Packet switched networks typically bill by the MB
• Performance metrics are delay, jitter, throughput, packet loss
rate
• First packet transmission occurred on Oct 29, 1969, in
California
25
Slide modified from Agrawal
Packetization overview
• Packetization is
◦ Breaking down user data into small segments
◦ Packaging these segments appropriately so
that they can be delivered and reassembled
across the network
◦ Circuit switching sends a continuous stream
of data
User Data
Seg
Seg
Seg
1
• Each segment or packet has two parts
2
◦ Data to be delivered
◦ “Overhead” required for successful delivery
and integration with other packets
3
1
Header
26
Slide modified from Agrawal
Why Packet Switching?
• Increase in interactive data traffic (as opposed to voice traffic)
◦ Increased “burstiness” of data (high ratio of peak usage to mean
usage)
◦ Example: Typical browsing behavior
• Packet switching enables efficient utilization of communication
links
◦ Averages the needs of a large numbers of users
◦ Aggregation and the law of large numbers
◦ 3-100 times more efficient than circuit switching
• Computing cost Vs communication cost
◦ Uses complete bandwidth
• Eliminates single points of failure in data communication
systems
27
Slide modified from Agrawal
In the end, these are all “bits”
Packets analogy
Packet
Source Address
To: John Doe
Destination Address
From: Jill
Wright
Other Info
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
PAYLOAD
Letter
Header
To: John Doe
From: Jill Wright
Sub: Soccer schedule
Dear Sir
Body
~~~~~~~~~
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~
~~~~~~~
Sincerely
Jill
Slide modified from Agrawal
Packetization in retail
• Ikea example
• Priority mail
example
◦ Postal mail is
similar to packet
switching in some
respects
Revisiting Greeting Card
Scenario
Alice writes greeting
card to grandmom
There is a structured “flow”
between layers at each end
Grandmom reads
greeting card
Alice puts it in
envelope
Grandmom removes
from envelope
Alice drops envelope
in mailbox
Grandmom retrieves
envelope from mail
Mailman picks up the
mail from box
Mail gets
sorted
Truck carries mail to post office
Transport
Mail gets
sorted
Mailman delivers
mail to mailbox
Truck carries mail from post office
There is a one-to-one correspondence
between layers in the two end points
30
Slide modified from Agrawal
Layering
• Arranging functionality in a hierarchical manner
• Lower layers provide functions and services that
support the functions and services of higher layers
◦ Later: How we create and process packets
• Example (corporate)
◦ VPs help CEOs reach their goals
◦ Managers help VPs reach their goals
◦ Workers work with tools and machines help managers
reach their goals
• We will see that there are so called “protocol
layers” in computer networks
31
Slide modified from Agrawal
Layering examples
Example (software)
◦ Computer applications
delegate many tasks to
operating systems
◦ Operating systems
delegate tasks to “drivers”
for execution
Analysts,
regulators,
shareholders
CEO
Browser
VP
Windows
Manager
Print driver
Worker
Revisit layering this week
Machines,
tools, work
32
Layering in packet switched
networks
•
•
Figure from
End user uses web
browser
Agrawal shows a
simplified view of Applications
layering
We will use this
Web browser uses network software
figure
occasionally to
Layered network software
put things in
Network
Protocol Stack
context
Signals sent over physical medium towards web server
Processes
•
•
•
Software programs run
as processes in an
operating system
In Unix like operating
systems (Mac OSX or
Linux) you can use the
ps command (process
status) to list the
processes
In Windows, you can
use the task manager to
look at the processes
host or
server
host or
server
process
controlled by
app developer
socket
socket
TCP with
buffers,
variables
process
Internet
TCP with
buffers,
variables
controlled
by OS (kernel)
Figure modified from Kurose and Ross
34
Client Process
Somewhere in this list of
processes will be an instance of
the browser that Alice is using
Say: firefox
It has a “process identifier”
35
Networked Applications
• Processes on computers can communicate
◦ Communicate = exchange some commands, responses, data
• If the processes are on the same end-host, they use
“inter-process communications”
◦ Rules for exchanging data are based on the operating system
• If the processes are on different hosts, they have to
communicate over a network
◦ Maybe different operating systems
◦ Use messages to communicate
◦ Sending process sends a message, receiving process picks up
the message
36
Client and server processes
• Alice’s browser is a client process running on
her computer
• It communicates with a server process that is
running somewhere on some machine in
Amazon.com’s network
• Client initiates the contact (through the URL)
• Server responds to the contact
◦ It has information about the client in the message
that the client sends to the server
37
So what is a protocol?
Sockets
• Programming interface used by a process to send and
receive messages
◦ Like the door to a house
• Sending process sends the message to the socket
◦ Assumption: There is something outside the door to transport
the message to the door of the receiving process
• At the door of the receiving process (socket), the
message is received and pushed to the process
• Application developer has little control over what is
outside the door, only controls the process
◦ Can select from a set of “transport” protocols and some
parameters
38
Protocols
• Mac OS X Dictionary
◦ “the accepted or established code of procedure or
behavior in any group, organization, or situation: what is
the protocol at a conference if one's neighbor dozes off
during the speeches?”
◦ “a set of rules governing the exchange or transmission of
data between devices”
• Recall
◦ Processes have to exchange data
◦ They send and receive messages
◦ The messages should follow some set of rules, so that the
processes can recognize what is happening
39
Example of Protocol
Bob
Alice
Bob
???
time
Alice
• There is a sending and receiving of messages towards accomplishing
something
• The rules are there to make sure the communicating parties
understand each other
40
Example of
Communication Protocol
• Process uses TCP –
transmission control
protocol
• TCP carries the request for
amazon.com’s web page
to the server
• Server responds, also
using TCP
• Port number identifies the
process at the TCP level
• Layering!
Application
(Process)
Socket
TCP
41
Network Protocols
• They are protocols needed for network
components to interact and enable information
flows
• Protocols define format, order of messages sent
and received among network entities, and actions
taken on message transmission, receipt
• Circuit Switching
◦ Signaling protocols to set up/tear down circuit (e.g., SS7)
• Packet Switching
◦ Protocols to control flow of information (e.g., TCP)
Layering in Network
Protocols
• Networks make extensive use of layering of technology
and protocols
◦ Protocols are most often placed in layers
• Layering is arranging functionality in a hierarchical
manner, such that
◦ Lower layers provide functions and services that support the
functions and services of higher layers
• Protocol layers are implemented in hardware or
software
◦ Some are implemented in the operating system kernel (e.g.,
TCP and IP)
◦ Physical and link layers are implemented in hardware or
firmware
43
Slide modified from Agrawal
Advantages of layering
• Well defined and specific
◦ Modularity reduces complexity of implementation
• Specializes technology development
• Separation of functionality
◦ Simplification in upgrades
◦ Example: Change from IPv4 to IPv6 does not require
change in email clients or browsers
• Simplification in adding new technology
◦ Adding wireless network capability does not require
change in web site addresses (URLs)
44
Revisiting Greeting Card
Scenario
Alice writes greeting
card to grandmom
There is a structured “flow”
between layers at each end
Grandmom reads
greeting card
Alice puts it in
envelope
Grandmom removes
from envelope
Alice drops envelope
in mailbox
Grandmom retrieves
envelope from mail
Mailman picks up the
mail from box
Mail gets
sorted
Truck carries mail to post office
Transport
Mail gets
sorted
Mailman delivers
mail to mailbox
Truck carries mail from post office
There is a one-to-one correspondence
between layers in the two end points
45
Layering in packet switched
networks
•
•
Alice wants to
browse
Amazon.com
What happens
next?
Applications
End user uses web
browser
Application
(Process)
Socket
TCP
Web browser uses network software
Protocol
Stack
Layered network software
Signals sent over physical medium towards web server
46
Simplified View of Web
Browsing (1)
TCP segment
•
•
•
•
Assume that Alice’s
computer knows the IP
address of amazon.com
say 205.251.242.54
A TCP “segment” is
created which is passed
on to the so-called
“network layer”
The TCP segment
becomes the payload of
an IP packet or datagram
All of this happens in the
OS of Alice’s computer
TCP
Header
TCP Payload
IP Datagram
IP Header
IP Payload
Note that the TCP segment and the IP
datagram are simply groups of bits
with some structure
Application
(Process)
Socket
TCP
IP
47
Simplified View of Web
Browsing (1)
•
•
•
•
•
•
•
The process continues
IP datagram becomes
the payload of the
link/MAC layer “frame”
Say Ethernet frame
PHY Layer
The Ethernet frame is
converted into a set of
electrical pulses (signal)
that is placed on the
Ethernet cable
The signal is picked up
by a receiver
Who is the receiver?
Application
(Process)
Socket
5. Application
Socket
TCP
4. Transport
IP
3. Network
Ethernet
2. Link/MAC
PHY
1. Physical
48
More Questions
• What is the structure of the TCP segment? How many
bits? Is it fixed? What does the TCP header contain?
Why?
• What does the IP header contain?
◦ One guess is it has Amazon.com’s IP address as the destination
address
• Who is the receiver of the Ethernet frame? And what
does this receiver do with the embedded IP datagram?
◦ Does the receiver look at the TCP segment within the IP
datagram?
◦ How about the commands, responses, and data from the
application?
49
Simplified Web Browsing
Message from Alice’s
Browser
There is a structured “flow”
between layers at each end
TCP Segments
Created
Web server process
gets message
TCP segment is
recovered, assembled
IP datagrams carry
TCP segments
Looks at IP DA
for routing
Edge router
receives IP
datagram
IP datagram is picked
up from frame
Ethernet in Alice’s PC
creates frame
Ethernet in router
gets frame ,
checked for errors
Puts it in
Ethernet frame
Ethernet in server gets
frame, checks for errors
Ethernet cable carries signal to edge
router
Transport
Cable carries the signal representing
Ethernet frame to server machine
There is a one-to-one correspondence
between layers in the two end points
50
Simplified Internet
Structure
Transport
mobile network
• Hierarchical
global ISP
◦ Revisit at the end of the
lecture
• Access network has a
router that connects
it to a regional ISP
• Regional ISPs connect
to global ISPs
• Remember: Router =
packet switch
home
network
regional ISP
institutional
network
Figure from Kurose-Ross
51
Slide modified from Kurose-Ross
source
message
segment
M
Ht
M
datagram Hn Ht
M
Hl Hn Ht
M
frame
Alice
application
transport
network
link
physical
Encapsulation
Signal
link
physical
Uses “link or MAC
address” at frame level
switch
Bob
destination
M
Ht
M
Hn Ht
Hl Hn Ht
M
M
application
transport
network
link
physical
Hn Ht
Hl Hn Ht
M
M
network
link
physical
Uses “IP address” at
datagram/network level
Hn Ht
M
router
52
Slide modified from Agrawal
Packet structure influenced
by communication needs
• Five important communications tasks
◦ User commands, responses
◦ Example: get web page, web page body
◦ Segmentation and reassembly
◦ Cannot send whole web page in a TCP segment (it is too big), we have
to send it in pieces
◦ Identifying and locating destination
◦ We guessed the IP destination address may be in the IP header
◦ Error control
◦ What happens if some bits are flipped?
◦ Signaling
◦ Converting data into a form suitable for transmission over wires
53
Slide modified from Agrawal
Header information
• The previous slide’s communication and other
related datacomm tasks are accomplished by
adding additional required information to
information packets
◦ Packet header
◦ Organized in a layered structure
◦ Routers and end stations use this header information
to handle packets appropriately
◦ The router that connects Alice’s network to the Internet is the
“receiver”
• Again: Routers perform packet switching
54
Slide modified from Agrawal
Typical packet structure
• A typical packet contains
◦ Information sent from the layers above
◦ and
User commands
Sequence
number
Destination
address
Error check
◦ Additional information (called headers) specific to the functions of
each layer
◦ At a high level, looks like this:
User data
55
Slide modified from Agrawal
Five layer stack built around Internet Protocol (IP) from IETF
Note multiple layer 1-2, and 5 protocols
Internet Protocol stack
Protocol layer and function
Popular technologies
technologies
Example
Application layer
(what user wants)
E-mail (SMTP, IMAP, POP), web
(HTTP)
Transport layer
(ensure reliable data stream)
TCP, UDP
Network layer
(routing)
IP
Data link layer
(error-free transmission over hop)
Ethernet, Wi-fi, ATM
Physical layer
(data sent as signals over media)
AM, FM, CDMA, Manchester
encoding, SONET
56
Slide modified from Agrawal
Layer names and tasks
Layer
Layer name Networking task
number
5
Application Specify user needs, creates “message”
4
Transport
3
Network
2
Data-link
1
Physical
Segmentation and reassembly of data
“segments”, sometimes reliable
transfer & speed matching
Identifying and locating destination,
best effort delivery of “datagrams”
Reliable delivery of “frames” over a
link, Error control
Signaling, moving individual bits based
on medium
Header information
User commands
Sequence numbers
Address
Error check
Usually none, but in
WiFi there is a header
57
Slide modified from Agrawal
OSI model
• OSI – Open Systems Interconnection
• Early packet switched networks involved multiple networking
technologies
◦ SNA, DECnet, Netware, Ethernet, Appletalk
◦ Created communication islands
◦ Strong need to ensure inter-operability
• OSI model is a logical structure for communications networks,
standardized by the International Organization for
Standardization (ISO)
◦ An effort by the ISO to standardize computer networks
◦ ISO 7498: 1984
◦ All network traffic can be processed in a cookie-cutter manner by
routers, irrespective of application
58
Slide modified from Agrawal
OSI
model
OSI model useful
frame of
reference
Current wired
networks built
around Internet
protocol stack
OSI model layer
Layer function
Application layer
Request-reply mechanism for
remote operations across a
network
Presentation layer
Syntax conversion from hostspecific syntax to syntax for
network transfer
Session layer
Create and terminate connection;
establish synchronization points
for recovery in case of failure
Transport layer
Segmentation, reassembly of
packets in one connection,
multiplexing connections on one
machine
Network layer
Routing and network addressing
Data link layer
Error-free data transmission over a
single link
Physical layer
Convert data to signals for
transmission over physical media
59
Slide modified from Agrawal, Kurose & Ross
OSI and
TCP/ IP
TCP/ IP stack layers
Presentation
•
◦
Allow applications to
interpret meaning of data,
e.g., encryption,
compression, machinespecific conventions
Session
•
◦
•
OSI model layers
Application layer
Application layer
Presentation layer
Session layer
Synchronization,
checkpointing, recovery of
data exchange
Transport layer
Internet stack “missing”
these layers!
Network layer
Network layer
Data link layer
Data link layer
Physical layer
Physical layer
◦ These services, if needed,
must be implemented in
application
Transport layer
60
References
◦ Business Data Communications
◦ Manish Agrawal, John Wiley and Sons, 2012
◦ Computer Networking, A Top-Down Approach
◦ Jim Kurose and Keith W. Ross, Addison-Wesley
◦ Andrew L. Russell, “The Internet That Wasn’t,”
IEEE Spectrum, August 2013
61