Transcript Lecture2

Chapter 2
The OSI Model
By
Dr.Sukchatri PRASOMSUK
School of ICT,
University of Phayao
Objectives
• On completion of this chapter, you will be able
to perform the following tasks:
– Describe how data traffic is exchanged
between source and destination devices
– Identify the roles and functions of a hub,
switch, and router, and where they best fit
in the network
2/80
Contents
•
•
•
•
2.1 Introduction & Definition
2.2 The Model : Layered Architecture
2.3 Functions of the Layers
2.4 TCP/IP Protocol Suite
3/80
2.1 Introduction &
Defining Components of the Network
Mobile
Users
Home
Office
Internet
Branch Office
Main Office
4/80
Defining Components of the Network
Branch
Office
Floor 2
ISDN
Server Farm
Remote
Floor 1
Telecommuter
Campus
5/80
Network Structure
Defined by Hierarchy
Core Layer
Distribution
Layer
Access
Layer
6/80
Access Layer Characteristics
Access Layer
End station entry point to the network
7/80
Distribution Layer
Characteristics
• Access Layer
Aggregation Point
• Routes traffic
Distribution Layer
• Broadcast/Multicast
Domains
• Media Translation
• Security
• Possible point for remote access
8/80
Core Layer Characteristics
Core Layer
• Fast transport to enterprise services
• No packet manipulation
9/80
10/80
2.2 The OSI Model
11/80
2.3 Functions of the Layers
–
–
–
–
–
–
–
Layer 7 : Application Layer
Layer 6 : Presentation Layer
Layer 5 : Session Layer
Layer 4 : Transport Layer
Layer 3 : Network Layer
Layer 2 : Data Link Layer
Layer 1 : Physical Layer
12/80
OSI Model Overview
Application
(Upper)
Layers
Application
Presentation
Session
13/80
OSI Model Overview
Application
(Upper)
Layers
Application
Presentation
Session
Transport Layer
Network Layer
Data Link
Physical
Data Flow
Layers
14/80
Role of Application Layers
EXAMPLES
Application
User Interface
Telnet
HTTP
15/80
Role of Application Layers
EXAMPLES
Application
Presentation
User Interface
Telnet
HTTP
• How data is presented
• Special processing such
as encryption
ASCII
EBCDIC
JPEG
16/80
Role of Application Layers
EXAMPLES
Application
User Interface
• How data is presented
Presentation • Special processing
such as encryption
Session
Keeping different
applications’
data separate
Telnet
HTTP
ASCII
EBCDIC
JPEG
Operating System/
Application Access
Scheduling
17/80
Role of Application Layers
EXAMPLES
Application
Presentation
Session
Transport
Network
Data Link
Physical
User Interface
Telnet
HTTP
• How data is presented
• Special processing such
as encryption
ASCII
EBCDIC
JPEG
Keeping different
applications’
data separate
Operating System/
Application Access
Scheduling
18/80
Role of Data Flow Layers
EXAMPLES
Physical
• Move bits between devices
• Specifies voltage, wire speed
and pin-out cables
EIA/TIA-232
V.35
19/80
Role of Data Flow Layers
EXAMPLES
• Combines bits into bytes and
bytes into frames
Data Link
• Access to media using MAC address
• Error detection not correction
802.3 /
802.2
HDLC
Physical
EIA/TIA-232
V.35
• Move bits between devices
• Specifies voltage, wire speed
and pin-out cables
20/80
Role of Data Flow Layers
EXAMPLES
Network
Provide logical addressing which
routers use for path determination
• Combines bits into bytes and
bytes into frames
Data Link • Access to media using MAC address
• Error detection not correction
Physical
• Move bits between devices
• Specifies voltage, wire speed
and pin-out cables
IP
IPX
802.3 /
802.2
HDLC
EIA/TIA-232
V.35
21/80
Role of Data Flow Layers
EXAMPLES
• Reliable or unreliable delivery
Transport • Error correction before
retransmit
Network
Provide logical addressing which
routers use for path determination
• Combines bits into bytes and
bytes into frames
Data Link • Access to media using MAC address
• Error detection not correction
• Move bits between devices
Physical • Specifies voltage, wire speed and
pin-out cables
TCP
UDP
SPX
IP
IPX
802.3 /
802.2
HDLC
EIA/TIA-232
V.35
22/80
Role of Data Flow Layers
Application
Presentation
EXAMPLES
Session
• Reliable or unreliable delivery
• Error correction before
retransmit
TCP
UDP
SPX
Network
Provide logical addressing which
routers use for path determination
IP
IPX
Data Link
• Combines bits into bytes and
bytes into frames
• Access to media using MAC address
• Error detection not correction
802.3 /
802.2
HDLC
Physical
• Move bits between devices
• Specifies voltage, wire speed and
pin-out cables
EIA/TIA-232
V.35
Transport
23/80
Layer 1 : Physical layer
◦ Lowest layer of OSI architecture provides
services to the link layer, acquiring, maintaining
and disconnecting the physical circuits that
form the connecting communications path.
◦ Handles the electrical and mechanical interface
as well as the procedural requirements of the
interconnection medium.
◦ Responsible for bit synchronization and the
identification of a single element as a one or a
zero.
◦ This layer includes mechanical, electrical,
functional and procedural specifications.
24/80
Layer 1 : Physical layer
▫ The physical layer is the rough equivalent of the
traditional data-terminal-equipment (DTE) to datacommunications-equipment (DCE) interface.
▫ Typical protocols at the physical layer include the
RS-232, the RS-449 family, CCITT X.25 and X.21
facility interfaces, other CCITT (V) and (X) series
recommendations, and the physical aspects of the
IEEE 802.X media access protocols for Local Area
Networks.
25/80
Physical Layer Functions
• Connector type
• Signaling type
802.3
• Media type
Physical
Defines
26/80
Physical Layer: Ethernet/802.3
10Base2—Thick Ethernet
10Base5—Thick Ethernet
Host
Hub
Hosts
10BaseT—Twisted Pair
27/80
Hubs Operate at Physical layer
Physical
A
B
C
D
• All devices in the same collision domain
• All devices in the same broadcast domain
• Devices share the same bandwidth
28/80
Hubs: One Collision Domain
• More end stations
means more collisions
• CSMA/CD is used
29/80
Layer 2 : Data link layer
◦ Link layer services relate to the reliable
interchange of data across a point-to-point or
multipoint data link that has been established at
the physical layer.
◦ Link layer protocols manage establishment, control
and termination of logical link connection. They
control the flow of user data, supervise recovery
from errors and abnormal conditions, and acquire
and maintain character and block or frame
synchronization.
◦ It attempts to add reliability, flow and error
control, and communication management.
30/80
Layer 2 : Data link layer
▫ Data link control protocols include characteroriented Binary Synchronous Communication (BSC),
ANSI X3.28m,
▫ the more recent bit-oriented ADCCP (Advanced
Data Communications Control Procedure) and its
international counterpart HDLC, X.25, LAPB, ISDN,
LAPD and IEEE 802.X logical link control.
31/80
Data Link layer Functions
• Higher layer protocol
(Service Access Point)
associated with frame
• Network topology
• Frame sequencing
• Flow control
• Connection-oriented
or connectionless
Physical
• Physical source and
destination addresses
Data Link
Defines
802.2
802.3
EIA/TIA-232
v.35
32/80
Data Link Layer Functions
MAC Layer - 802.3
# Bytes
8
6
6
2
Preamble Dest. add Source add Length
0000.0C
IEEE
assigned
xx.xxxx
Vendor
assigned
MAC Address
Variable
Data
4
FCS
Ethernet II
uses “Type”
here and
does not use
802.2.
Data Link Layer Functions
802.2 (SNAP)
1
1
1or2 3
2
Variable
Dest SAP Source SAP Ctrl OUI Type
ID
03
AA
AA
OR
802.2 (SAP)
1
1
1 or 2
Dest
SAP
Source
SAP
Ctrl
Preamble Dest add Source add Length
Data
Variable
Data
Data
MAC Layer - 802.3
FCS
33/80
34/80
Switches and Bridges Operate at
Data Link Layer
Data Link
1 2 3 4
OR
1 2
• Each segment has its own collision domain
• All segments are in the same broadcast domain
35/80
Switches
Switch
• Each segment has its
own collision domain
• Broadcasts are
forwarded to all
segments
Memory
36/80
Layer 3 : Network layer
 Responsible for providing communication between
two hosts across a communication network.
Services include routing, switching, sequencing of
data, flow control and error recovery.
 It provides the interface such that higher layers
need not know about the underlying topology.
 It provides connection management, routing, and
error and flow control.
 The CCITT X.25 packet layer is the best known
network layer protocol for packet- switched
networks. X.21 is used for circuit-switched
networks.
37/80
Layer 3 : Network layer
 DoD has developed the IP Internet control
protocol.
 Other examples of network protocols include the
CCITT Q.931 network layer and the ISO 8473
connectionless inter-network protocol.
• Interconnects multiple
data links
Data Link
• Defines paths through
network
IP, IPX
802.2
Physical
• Defines logical source
and destination
addresses associated
with a specific protocol
Network
Network Layer Functions
38/80
802.3
EIA/TIA-232
v.35
39/80
Network Layer Functions
Network Layer End Station Packet
IP Header
• Logical
Address
Source Destination
address
address
172.15.1.1
Network
Node
Data
40/80
Network Layer Functions
Address
Mask
172.16.122.204 255.255.0.0
Binary
Address
Binary
Mask
172
16
10101100
00010000
01111010
11001100
255
255
0
0
11111111
11111111
Network
122
204
00000000 00000000
Host
41/80
Network Layer Functions
1.1
1.2
1.0
4.0
1.3
E0
2.1
2.2
S0
S0
Routing Table
NET INT Metric
1
E0
0
2
S0
0
4
S0
1
4.3
E0
4.1
4.2
Routing Table
NET INT Metric
1
S0
1
2
S0
0
4
E0
0
• Logical addressing allows for hierarchical network
• Configuration required
• Uses configured information to identify paths to networks
42/80
Routers:
Operate at the Network Layer
• Broadcast control
• Multicast control
• Optimal path
determination
• Traffic management
• Logical addressing
• Connects to WAN
services
43/80
Using Routers to Provide Remote Access
Modem or ISDN TA
Telecommuter
Mobile User
Branch Office
Main Office
Internet
44/80
Layer 4 : Transport layer
 Highest layer directly associated with the movement
of data through the network.
 It provides a universal transparent mechanism for
use by the higher layers that represent the users of
the communications service.
 The transport layer is expected to optimize the use
of available resources while meeting user
requirements.
 Responsible for the end-to-end integrity of the edit
exchange and must bridge the gap between services
provided by the underlying network and those
required by the higher layers.
45/80
Layer 4 : Transport layer
• Classes of transport protocols have been developed that
range from extremely simple to very complex.
• Simple transport layers can be used when the network
provides a high quality, reliable service.
• A complex transport protocol is used when the underlying
service does not, or is assumed to be unable to, provide the
required level of service.
• The ISO has promulgated International Standard 8073 as a
transport protocol. This standard defines five (5) classes of
protocols, ranging from a simple Class (0) to a complex Class
(4).
• Another transport protocol example is the Transmission
Control Protocol (TCP) developed by the DoD and now finding
wide application in commercial environments.
46/80
• Establishes end-to-end
connectivity between
applications
• Defines flow control
• Provides reliable or
unreliable services for
data transfer
Network
• Distinguishes between
upper layer applications
Transport
Transport Layer Functions
TCP
UDP
IP
SPX
IPX
47/80
Encapsulating Data
Application
Presentatio
n Session
Upper Layer Data
TCP Header
Transport
Upper Layer Data
IP Header
Data
LLC Header
Data
FCS
MAC Header
Data
FCS
0101110101001000010
PDU
Segment
Network
Packet
Data Link
Frame
Physical
Bits
De-encapsulating Data
48/80
Application
Presentation
Session
Upper Layer Data
Transport
Upper Layer Data
Network
Data Link
TCP+ Upper Layer Data
IP + TCP + Upper Layer Data
LLC Hdr + IP + TCP + Upper Layer Data
Physical
0101110101001000010
49/80
Reliable Transport Layer Functions
Sender
Synchronize
Receiver
Acknowledge, Synchronize
Acknowledge
Connection Established
Data Transfer
(Send Segments)
50/80
Layer 5 : Session layer
• A session binds two application processes into a
cooperative relationship for a certain time.
• The session layer provides an administrative service
that handles the establishment (binding) and release
(unbinding) of a connection between two presentation
entities.
• Sessions are established when an application process
requests access to another application process.
• Session protocols include ISO 8327, CCITT X.25,
ECMA 75 and CCITT T.62 which is intended for use
in teletex services.
51/80
Layer 6 : Presentation layer
• These services allow an application to properly interpret the
information being transferred.
• This includes translation, transformation, formatting and syntax
of the information.
• These functions may be required to adapt the informationhandling characteristics of one application process to another.
• Examples include code translation, structuring of data for
display on screen, format control and virtual terminal protocols.
• The syntactical representation of data has been defined in DIS
8824 and 8825.
• CCITT has described the presentation protocol for messagehandling systems in X.409 and for Telex in X.61.
52/80
Layer 7 : Application layer
 This layer provides management functions to support
distributed applications utilizing the OSI environment.
 It is the window through which the applications gain
access to the services provided by the communications
architecture.
 These include identification of the cooperating processes,
authentication of the communicant, authority verification,
agreement on encryption mechanisms, determination of
resource availability and agreement on syntax, e.g.
character set, data structure.
53/80
Layered protocol
• Functions: communication, sharing of media,
leased line and public-switched
connections,orderly interleaving of control
and data packets, error-free communication,
data integrity, connection-control, point-topoint and multi-point connections
54/80
Layered protocol
• layered protocol configuration:
▫ point-to-point (Non-switched)
▫ Point-to-point (switched)
▫ multipoint (non-switched)
▫ multipoint (switched)
▫ loop system
• Features of layered protocols:
decomposition,service access point, modularity,
flexibility, survivability and security
55/80
2.4 TCP/IP Protocol Suite
 Transmission Control Protocol/
Internetworking Protocol (TCP/IP)
 Used in the Internet, was developed prior
to the OSI model.
 Consists of 5 layers :
- Application Layer
- Transport Layer
- Network Layer (Internet Layer)
- Data Link Layer
- Physical Layer
56/80
TCP/IP Protocol Stack
7
Application
6
Presentation
5
4
3
2
1
Session
Application
Transport
Transport
Network
Internet
Data Link
Data Link
Physical
Physical
5
4
3
2
1
57/80
Application Layer Overview
Application
Transport
Internet
Data Link
Physical
File Transfer
- TFTP *
- FTP *
- NFS
E-Mail
- SMTP
Remote Login
- Telnet *
- rlogin *
Network Management
- SNMP *
Name Management
- DNS*
* Used by the router
58/80
Transport Layer Overview
Application
Transport
Internet
Data Link
Physical
Transmission Control ConnectionProtocol (TCP)
Oriented
User Datagram
Protocol (UDP)
Connectionless
59/80
TCP Segment Format
Bit 0
Bit 15 Bit 16
Bit 31
Destination port (16)
Source port (16)
Sequence number (32)
20
Bytes
Acknowledgement number (32)
Header
Reserved (6)
length (4)
Code bits (6)
Checksum (16)
Window
(16)
Urgent (16)
Options (0 or 32 if any)
Data (varies)
60/80
Written Exercise: OSI Model
OSI Model
Application
Presentation
Session
Transport
Network
Data Link
Physical
PDU
Functional Responsibilities
Examples
61/80
Basics of Subnetting
– Subnetworks or subnets
– Why Subnets :
–
A primary reason for using subnets is to reduce the size of a
broadcast domain.
–
Broadcasts are sent to all hosts on a network or subnetwork.
–
When broadcast traffic begins to consume too much of the available
bandwidth, network administrators may choose to reduce the size of
the broadcast domain
62/80
Basics of Subnetting
– Addressing without subnets
63/80
Basics of Subnetting
- Addressing with subnets
64/80
Basics of Subnetting
- The 32 bits binary IP Address
65/80
Basics of Subnetting
- Subnet Mask :To determine the subnet mask for a particular
subnetwork IP address follow these steps.
(1) Express the subnetwork IP address in binary form.
(2) Replace the network and subnet portion of the address with all 1s.
(3) Replace the host portion of the address with all 0s.
(4) As the last step convert the binary expression back to dotted-decimal notation
66/80
Basics of Subnetting
– The AND Function
67/80
Basics of Subnetting
• Creating a Subnet :
To create subnets, you must extend the
routing portion of the address. The Internet knows your network as a whole,
identified by the Class A, B, or C address, which defines 8, 16, or 24 routing bits
(the network number).
Address Class
Size of Default Host Field
A
24
22
B
16
14
C
8
6
EX.
Maximum Number of Subnet Bits
68/80
Basics of Subnetting
•Determining subnet mask size
• Subnet Masking :
69/80
Basics of Subnetting
•Class B Subnet Planning Example :
• Ex 1 :10001100.10110011.11011100.11001000
140.179.220.200 IP Address
11111111.11111111.11100000.00000000
255.255.224.000 Subnet Mask
--------------------------------------------------------------------------------------10001100.10110011.11000000.00000000 140.179.192.000 Subnet Address
10001100.10110011.11011111.11111111
140.179.223.255 Broadcast addr
•Ex 2 :
70/80
Basics of Subnetting
• Class C
71/80
Basics of Subnetting
•Private Address Space : There are certain addresses in
each class of IP address that are not assigned. These addresses are called
private addresses. Private addresses might be used by hosts that use
network address translation (NAT), or a proxy server, to connect to a
public network; or by hosts that do not connect to the Internet at all.
•Private Subnets :
There are three IP network addresses
reserved for private networks. The addresses are 10.0.0.0/8, 172.16.0.0/12,
and 192.168.0.0/16.
72/80
Basics of Subnetting
Example : Class C network number of 200.133.175.0 You want
to utilize this network across multiple small groups within an
organization. You can do this by subnetting that network with
a subnet address.
•We will break this network into 14 subnets of 14 nodes each. This
will limit us to 196 nodes on the network instead of the 254 we
would have without subnetting, but gives us the advantages of
traffic isolation and security. To accomplish this, we need to use a
subnet mask 4 bits long.
Recall that the default Class C subnet mask is
•255.255.255.0 (11111111.11111111.11111111.00000000 binary)
•Extending this by 4 bits yields a mask of
•255.255.255.240 (11111111.11111111.11111111.11110000 binary)
73/80
Basics of Subnetting
•This gives us 16 possible network numbers, 2 of which cannot be
used:
74/80
Basics of Subnetting
•Allowed Class A Subnet and Host IP addresses
75/80
Basics of Subnetting
•Allowed Class B Subnet and Host IP addresses
76/80
Basics of Subnetting
•Allowed Class C Subnet and Host IP addresses
77/80
Summary
•After completing this chapter, you should be able
to perform the following tasks:
– Describe how data moves through a network
– Identify the roles and functions of routers,
switches and hubs, and specify where each
device best fits in the network
– How to calculate and organize Subnet for each
class.
78/80
Assignments/ Q&A
1. Written exercise : OSI Model.
2.What are some of the advantages of using the OSI
model in a networking environment?
3. Describe the encapsulation process.
4. How many broadcast and collision domains are on a hub?
5. Practice Lab Activity : 10.4.1, 10.6.6, 10.7.5, 10.7.7