chapter 2 the osi model by dr.sukchatri prasomsuk school of ict, university of phayao
TRANSCRIPT
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
2.1 Introduction & Defining Components of the Network
4/80
Main OfficeBranch Office
Home Office
Mobile Users
Internet
Defining Components of the NetworkDefining Components of the Network
5/80
Floor 2
Floor 1
Server Farm
Branch
Office
Telecommuter
ISDN
Remote
Campus
Network Structure Defined by Hierarchy
Network Structure Defined by Hierarchy
6/80
Distribution Layer
Core Layer
AccessLayer
7/80
Access Layer CharacteristicsAccess Layer Characteristics
End station entry point to the network
Access Layer
8/80
Distribution Layer Characteristics
Distribution Layer Characteristics
• Access Layer Aggregation Point
• Routes traffic • Broadcast/Multicast
Domains• Media Translation• Security• Possible point for remote access
Distribution Layer
Core Layer Characteristics Core Layer Characteristics
9/80
• Fast transport to enterprise services
• No packet manipulation
Core Layer
2.2 The OSI Model10/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
11/80
OSI Model OverviewOSI Model Overview
12/80
Application (Upper) Layers
Session
Presentation
Application
OSI Model OverviewOSI Model Overview
13/80
Data Flow Layers
Transport Layer
Data Link
Network Layer
Physical
Application (Upper) Layers
Session
Presentation
Application
Role of Application LayersRole of Application Layers
14/80
TelnetHTTP
User Interface
EXAMPLES
Application
Role of Application LayersRole of Application Layers
15/80
TelnetHTTP
ASCIIEBCDICJPEG
User Interface
• How data is presented
• Special processing such as encryption
EXAMPLES
Presentation
Application
Role of Application LayersRole of Application Layers
16/80
TelnetHTTP
ASCIIEBCDICJPEG
Keeping different applications’ data separate
User Interface
•How data is presented
•Special processing such as encryption
Operating System/Application Access Scheduling
EXAMPLES
Session
Presentation
Application
Role of Application LayersRole of Application Layers
17/80
Keeping different applications’ data separate
User Interface
•How data is presented
•Special processing such as encryption
TelnetHTTP
ASCIIEBCDICJPEG
Operating System/Application Access Scheduling
Transport
Data Link
Network
Physical
EXAMPLES
Session
Presentation
Application
Role of Data Flow LayersRole of Data Flow Layers
18/80
EIA/TIA-232V.35
EXAMPLES
Physical • Move bits between devices• Specifies voltage, wire
speed and pin-out cables
Role of Data Flow LayersRole of Data Flow Layers
19/80
802.3 / 802.2HDLC
EIA/TIA-232V.35
EXAMPLES
Data Link
Physical
• Combines bits into bytes and bytes into frames
• Access to media using MAC address
• Error detection not correction• Move bits between devices• Specifies voltage, wire
speed and pin-out cables
Role of Data Flow LayersRole of Data Flow Layers
20/80
802.3 / 802.2HDLC
EIA/TIA-232V.35
IPIPX
EXAMPLES
Network
Data Link
Physical
• Combines bits into bytes and bytes into frames
• Access to media using MAC address
• Error detection not correction• Move bits between devices• Specifies voltage, wire
speed and pin-out cables
Provide logical addressing which routers use for path determination
Role of Data Flow LayersRole of Data Flow Layers
21/80
TCPUDPSPX
802.3 / 802.2HDLC
EIA/TIA-232V.35
IPIPX
EXAMPLES
Transport
Data Link
Physical
• Reliable or unreliable delivery
• Error correction before retransmit
• Combines bits into bytes and bytes into frames
• Access to media using MAC address
• Error detection not correction• Move bits between devices• Specifies voltage, wire speed
and pin-out cables
Network Provide logical addressing which routers use for path determination
Role of Data Flow LayersRole of Data Flow Layers
22/80
TCPUDPSPX
802.3 / 802.2HDLC
EIA/TIA-232V.35
IPIPX
Presentation
Application
SessionEXAMPLES
• Reliable or unreliable delivery
• Error correction before retransmit
• Combines bits into bytes and bytes into frames
• Access to media using MAC address
• Error detection not correction• Move bits between devices• Specifies voltage, wire speed
and pin-out cables
Transport
Data Link
Physical
Network Provide logical addressing which routers use for path determination
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.
23/80
Layer 1 : Physical layer▫The physical layer is the rough equivalent of
the traditional data-terminal-equipment (DTE) to data-communications-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.
24/80
25/80
Physical Layer Functions
Physical Layer Functions
Defines
• Media type
• Connector type
• Signaling type
Eth
ern
et
802.3 V.3
5
Ph
ysic
al
EIA
/TIA
-232
Physical Layer: Ethernet/802.3Physical Layer: Ethernet/802.3
26/80
Hub
Hosts
Host
10Base2—Thick Ethernet10Base5—Thick Ethernet
10BaseT—Twisted Pair
27/80
Hubs Operate at Physical layer
Hubs Operate at Physical layer
A B C D
Physical
• All devices in the same collision domain• All devices in the same broadcast domain• Devices share the same bandwidth
Hubs: One Collision DomainHubs: One Collision Domain
28/80
• More end stations means more collisions
• CSMA/CD is used
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.
29/80
Layer 2 : Data link layer▫Data link control protocols include character-
oriented 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.
30/80
31/80
Data Link layer Functions
Data Link layer Functions
Defines• Physical source and destination addresses
• Higher layer protocol (Service Access Point)associated with frame
• Network topology • Frame sequencing• Flow control• Connection-oriented or connectionless
Data
Lin
kP
hysic
al
EIA/TIA-232v.35
Eth
ern
et
Fra
me R
ela
y
HD
LC802.2
802.3
32/80
DataSource add FCSLengthDest. add
Variable266 4
0000.0C xx.xxxx
Vendor assigned
IEEE assigned
MAC Layer - 802.3
Data Link Layer FunctionsData Link Layer Functions
Preamble
Ethernet II uses “Type” here and does not use 802.2.
MAC Address
8# Bytes
33/80
DataDest SAP
Source SAP
DataSource add FCSLengthDest add
Variable11
802.2 (SAP)
MAC Layer - 802.3
Data Link Layer FunctionsData Link Layer Functions
Ctrl
1 or 2
3 2
Preamble
DataDest SAPAA
Source SAPAA
Variable
11
802.2 (SNAP)
Ctrl
03
1or2
OR
OUI ID
Type
34/80
• Each segment has its own collision domain• All segments are in the same broadcast domain
Data Link
Switches and Bridges Operate at Data Link Layer
Switches and Bridges Operate at Data Link Layer
OR1 2 3 1 24
SwitchesSwitches
35/80
• Each segment has its own collision domain
• Broadcasts are forwarded to all segments
Memory
Switch
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.
36/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.
37/80
38/80
Network Layer Functions
Network Layer Functions
• Defines logical source and destination addresses associated with a specific protocol
• Defines paths through network
• Interconnects multiple data links
Netw
ork
IP, IPX
Data
Lin
kP
hysic
al
EIA/TIA-232v.35
Eth
ern
et
Fra
me R
ela
y
HD
LC802.2
802.3
39/80
DataSourceaddress
Destination address
IP
Network Layer FunctionsNetwork Layer Functions
Header
172.15.1.1
NodeNetwork
• Logical Address
Network Layer End Station Packet
Network Layer FunctionsNetwork Layer Functions
40/80
11111111 11111111 00000000 00000000
10101100 00010000 01111010 11001100
BinaryMask
BinaryAddress
172.16.122.204 255.255.0.0
172 16 122 204
255
Address Mask
255 0 0
Network Host
41/80
Routing TableNET INTMetric124
S0S0E0
100
1.0 4.0
1.3E0
4.3
S0
2.2
E0
2.1
S0
4.1
4.2
1.1
1.2
Routing TableNET INT Metric
124
E0S0S0
001
• Logical addressing allows for hierarchical network• Configuration required• Uses configured information to identify paths to networks
Network Layer FunctionsNetwork Layer Functions
Routers: Operate at the Network Layer
Routers: Operate at the Network Layer
• Broadcast control
• Multicast control
• Optimal path determination
• Traffic management
• Logical addressing
• Connects to WAN services
42/80
Using Routers to Provide Remote AccessUsing Routers to Provide Remote Access
43/80
Internet
Telecommuter
Branch Office
Modem or ISDN TA
Mobile User
Main Office
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.
44/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.
45/80
46/80
Transport Layer Functions
Transport Layer Functions
• Distinguishes between upper layer applications
• Establishes end-to-end connectivity between applications
• Defines flow control
• Provides reliable or unreliable services for data transfer
Netw
ork
IPXIP
Tran
sp
ort
SPXTCP UDP
47/80
Encapsulating DataEncapsulating Data
Transport
Data Link
Physical
Network
Upper Layer Data
Upper Layer DataTCP Header
DataIP Header
DataLLC Header
0101110101001000010
DataMAC Header
Presentation
Application
Session
Segment
Packet
Bits
Frame
PDU
FCS
FCS
48/80
Upper Layer Data
De-encapsulating DataDe-encapsulating Data
LLC Hdr + IP + TCP + Upper Layer Data
MAC Header
IP + TCP + Upper Layer Data
LLC Header
TCP+ Upper Layer Data
IP Header
Upper Layer Data
TCP Header
0101110101001000010
Transport
Data Link
Physical
Network
Presentation
Application
Session
49/80
Reliable Transport Layer FunctionsReliable Transport Layer Functions
Synchronize
Acknowledge, Synchronize
Acknowledge
Data Transfer
(Send Segments)
Sender Receiver
Connection EstablishedConnection Established
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.
50/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 information-
handling 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 message-handling systems in X.409 and for Telex in X.61.
51/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.
52/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-to-point and multi-point connections
53/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
54/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
55/80
TCP/IP Protocol StackTCP/IP Protocol Stack
56/80
7
6
5
4
3
2
5
4
3
2
Application
Presentation
Session
Transport
Network
Data Link
Physical
1
Application
Transport
Internet
Data Link
Physical
1
Application Layer OverviewApplication Layer Overview
57/80
* Used by the router
Application
Transport
Internet
Data Link
Physical
File Transfer- TFTP *- FTP *- NFS
E-Mail- SMTP
Remote Login- Telnet *- rlogin *
Network Management- SNMP *
Name Management- DNS*
File Transfer- TFTP *- FTP *- NFS
E-Mail- SMTP
Remote Login- Telnet *- rlogin *
Network Management- SNMP *
Name Management- DNS*
Transport Layer OverviewTransport Layer Overview
58/80
Transmission ControlProtocol (TCP)
User Datagram Protocol (UDP)
Transmission ControlProtocol (TCP)
User Datagram Protocol (UDP)
Application
Transport
Internet
Data Link
Physical
Connection- Oriented
Connectionless
TCP Segment FormatTCP Segment Format
59/80
Source port (16) Destination port (16)
Sequence number (32)
Headerlength (4)
Acknowledgement number (32)
Reserved (6)Code bits (6) Window (16)
Checksum (16) Urgent (16)
Options (0 or 32 if any)
Data (varies)
20Bytes
Bit 0 Bit 15Bit 16 Bit 31
60/80
Application
Presentation
Session
Transport
Network
Data Link
Physical
OSI Model
PDU Functional Responsibilities
Examples
Written Exercise: OSI Model Written Exercise: OSI Model
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
61/80
Basics of Subnetting
– Addressing without subnets
62/80
Basics of Subnetting
- Addressing with subnets
63/80
Basics of Subnetting
- The 32 bits binary IP Address
64/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
65/80
Basics of Subnetting
– The AND Function
66/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).
67/80
Address Class Size of Default Host Field Maximum Number of Subnet Bits
A 24 22
B 16 14
C 8 6
EX.
Basics of Subnetting
•Determining subnet mask size• Subnet Masking :
68/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 :
69/80
Basics of Subnetting
• Class C
70/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.
71/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)
72/80
Basics of Subnetting•This gives us 16 possible network numbers, 2 of which cannot be used:
73/80
Basics of Subnetting•Allowed Class A Subnet and Host IP addresses
74/80
Basics of Subnetting•Allowed Class B Subnet and Host IP addresses
75/80
Basics of Subnetting•Allowed Class C Subnet and Host IP addresses
76/80
SummarySummary
•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.
77/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
78/80