60
Computer Networks 364 Computer Networks 364 OSI Architecture OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: [email protected] URL: http:/www…..

Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: [email protected] URL:

Embed Size (px)

Citation preview

Page 1: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Computer Networks 364Computer Networks 364OSI ArchitectureOSI Architecture

John Morris

Computer Science/Electrical EngineeringUniversity of Auckland

Email: [email protected]: http:/www…..

Page 2: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

ContentsContents

► Open Systems► Open Systems Networking► OSI Architecture

The Physical layer The Data link layer The Network layer The Transport layer The Session Layer The Presentation Layer The Application layer Data transmission

Page 3: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Communications SoftwareCommunications Software

► Programming Writing a program that communicates with another machine Tasks

► Decide on communication style eg Message passing

► Decide on protocol Reliability needed?

► Messages acknowledged / repeated► Decide message format

Fixed/variable length? Checksums needed?

► Link to use Physical medium Physical message format

► Header / trailer Physical encoding?

► Form of electrical signal – NRZ, Manchester, etc Do this every time?

► No way!

Page 4: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Communications SoftwareCommunications Software

► Programming Do this every time?

► No way!► Create software and hardware layers

For example► Physical layer

Electrical encoding Formation of bits into packets

► Network layer Machine machine

► Destination addresses► Checksums, etc

► Application layer Your program

► Message format and content► Acknowledgements► Retries for corrupted messages

Page 5: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Communications SoftwareCommunications Software

► Software and hardware layers Many layering schemes possible One example

►Physical layer Electrical encoding Formation of bits into packets

► Network layer Machine machine

► Destination addresses► Checksums, etc

► Application layer Your program

► Message format and content► Acknowledgements► Retries for corrupted messages

Add * automatic acknowledgement,* retry corrupted messageshere

Page 6: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Communications SoftwareCommunications Software

► Software and hardware layers Many layering schemes possible eg

►Physical layer Electrical encoding Formation of bits into packets

►Network layer Destination addresses Checksums, etc

►Application layer Your program Message format and content Acknowledgements Retries for corrupted messages

Add automatic acknowledgement,retry corrupted messageshere

Page 7: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Communications SoftwareCommunications Software

► A standard would be useful!► Open Systems Interconnection (OSI) architecture

Defined by International Standards Organization (ISO)►Seven layers

Application Presentation Session Transport Network Data Link Physical

Page 8: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open SystemsOpen Systems

► Computer Industry matures Moves away from closed systems towards open systems

► Closed systems Proprietary Generally linked to a single vendor who

►Defines how systems communicate Packet and message format Programming interfaces

Difficult to communicate with other systems (closed or open!)►Additional software

Drivers

►Additional hardware Voltage level shifters Voltage current converters

Page 9: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Closed SystemsClosed Systems

► Software written for a closed environment Not portable

►Cannot run on a different system Without expensive conversion

►Substantial code re-working required► Examples

Classic mainframe OS’s► MVS (IBM) or ► VMS (Digital)► Many other examples from lesser manufacturers

Computer suppliers occasionally created nightmares for themselves!

► Multiple proprietary (non-standard) systems on their own machines!► Only good for ‘job maintenance’ for system admins!

But system admin is a thankless task !

Page 10: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Closed SystemsClosed Systems

► Manufacturer defines protocols and architectures for connecting machines.

► Connect computers from one manufacturer only Only their software could understand the protocols used Getting information about proprietary protocols

►Difficult►Expensive

Writing software drivers►Time consuming

Documentation usually inadequate

►Frustrating Manufacturer ‘owns’ the protocol Free to change it at any time Hitting moving targets is difficult!

Page 11: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Closed SystemsClosed Systems

► Manufacturer defines protocols and architectures for connecting machines.

► Connect computers from one manufacturer only Only their software could understand the protocols used

► Connecting multiple vendors’ systems Getting information about proprietary protocols

►Difficult►Expensive

Writing software drivers►Time consuming

Documentation usually inadequate

►Frustrating Manufacturer ‘owns’ the protocol Free to change it at any time Hitting moving targets is difficult!

With only closed systems,today’s Internet wouldnot have been possible!

Page 12: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open SystemsOpen Systems

► Environment in which programs run Not linked to an individual computer manufacturer Fully documented

►Writing software for new systems is feasible

► Portable systems Software written for one system may run on another Avoids ‘locking in’ a user to one manufacturer Most manufacturers now accept

►Open systems Easy interconnectionMore applicationsMore flexibility to build systems with desired capabilities

Combining hardware from multiple sourcesMore salesLarger, rather than smaller, profits!

Page 13: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open SystemsOpen Systems

► Pioneer UNIX

►OS software available from the beginning►Porting Unix easy►Curiously …

Initially derided by computer salesmen as an academic ‘toy’► Source was given by AT&T to universities► So most used it

Now they all sell it!

Page 14: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open SystemsOpen Systems

► Currently demands for Information

► Internet Electronic transactions Linking computers into networks (LAN, WAN, etc)

mean that interconnection is essential ► Open systems permit easy connection of machines

different manufacturers different operating systems

to facilitate these transactions► As use of computer networks increased

Computer manufacturers themselves recognised that some standards were needed to rationalise the chaos of communications that was beginning to develop

Page 15: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open Systems Networking - Open Systems Networking - Historical notesHistorical notes

► Computer Manufacturers Initial step

►Define particular protocols as standard within a company for all communications of a certain type

► IBM’s BISYNC All communications with terminal concentrators and multi-

drop lines

Second step ►Devise an overall framework or architecture

within which specific protocols would fit►Examples

IBM’s Systems Network Architecture (SNA) andDEC’s Decnet

►These architectures intended to permit open communication between all products of one company

Page 16: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open Systems NetworkingOpen Systems Networking

► Public data networks Intended to link different organisations Introduced experimentally in the 70's and As an operational service in the early 80's

► X.25 packet switching Most of these networks use the X.25 protocol Interlinking of X.25 networks in different countries

►Proceeded rapidly during the 80's ►Formed a global network by the end of that decade

Defines three protocol layers concerned with subnet access whereas

► SNA and DECNET Seven layers of protocol Include standardised functions

► file transfer, etc

Page 17: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open Systems NetworkingOpen Systems Networking

► Limitations of X.25 Defined by the CCITT CCITT largely made up of telecomm-operators

eg British Telecom

►Only concerned with the protocols used in operating the subnets they planned to build

Any file transfer protocol will operate across an X.25 network CCITT did not feel a need to define protocols for higher level

services

► Efficient use of networks Need standard protocols for higher level services

►Applications file transfer web pages remote login electronic commerce

Page 18: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open Systems NetworkingOpen Systems Networking

► Full inter-operability►rather than inter-communication

requires All the communications functions in different systems to

operate with one another but also All applications using the communications functions must

►understand data arriving from remote systems and►generate data understandable by remote systems

Page 19: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open Systems NetworkingOpen Systems Networking

► Various parties have collaborated to devise a network architecture it is hoped it will eventually replace manufacturer-specific

architectures

► International Standards Organisation (ISO) has been responsible for co-ordinating the process of devising this model

► ISO works through a series of technical committees They devise standards for a wide variety of products and

services, not just networks

Page 20: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

Open Systems NetworkingOpen Systems Networking

► ISO’s architectural model Intended to allow communication between any systems Called the Open Systems Interconnection (OSI) model.

► Few system implement the OSI model directly Usual computer industry problems with standards adoption

►Legacy systems►Slowness to develop and specify standards►Standards often have problems with new technology

Forms an invaluable (standard) reference for description of any protocol

►Descriptive capabilities generally recognised

Page 21: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

Network

Link

Physical

Network

Link

Physical

Node Node

Sub-net

End to end peer protocols

Sub-net access protocols

Communications Subnet Boundary

Host AHost A Host BHost B

Application

Presentation

Session

Transport

Network

Link

Physical

Application

Presentation

Session

Transport

Network

Link

Physical

Page 22: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► OSI originally Defined as a connection-oriented architecture

►No data could be exchanged until a logical link had been set up between source and destination

► OSI now Includes both

►connection-oriented and ►connectionless services

but still retains a connection-oriented bias

Page 23: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► Each layer is defined in terms of: A service interface to the layer above

►Each layer may only be used by the layer immediately above and directly use the layer immediately below

► It defines a set of primitive functions available for use by the upper layer

A peer protocol ► A protocol for communicating with the corresponding

layer in another machine

Page 24: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

For the upper layers the other machine may only be ►a host machine►end system►DTE

For the lower layers it may be either ►a node of the network or ►a host

The peer protocol carries out functions which are entirely transparent to the layer above

►principally the error recovery mechanism of the link layer

Page 25: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► Communications sub-net The collection of nodes and links in the network, possibly

packet switched exchanges, forms what the OSI model calls a communications sub-net

The attached hosts are not considered part of the communications sub-net

The lowest three layers of the OSI model are concerned with access to the communications sub-net

The protocols of these layers are termed sub-net access protocols

►The functions and their form are strongly influenced by those of X.25 and

►Conform closely to it in terms of the peer protocols

Page 26: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► End-to-end peer protocols Upper four layers

►Concerned with communication via the sub-net Protocols for these layers are termed end-to-end peer

protocols Protocol Data Units (PDU) in these layers are carried

transparently across the communications sub-net

Page 27: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

• Peer protocols and Service Interfaces in OSI

Transport Layer(Layer 4)

Lower Layers

Transport Layer(Layer 4)

Lower Layers

Transport Service Interface

Transport Protocol(an end-to-end peer protocol)

Local End system Remote End systemSub-net

Page 28: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► OSI model defines only the functions of each layer.► Separate standards define

► the protocols and ►service interfaces for each layer

For many layers there is more than one protocol defined►eg HTTP, FTP, ...

Page 29: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Physical LayerOSI - Physical Layer

► This layer defines Electrical signalling on the transmission channel How bits are converted into electrical current, light pulses or

any other physical form and Ability to detect signalling errors in the network media

► Examples serial line ethernet cable Low Voltage Digital Signalling (LVDS)

► Network device functioning at this layer only is called a repeater

Page 30: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Physical LayerOSI - Physical Layer

► Electrical signalling Typical questions are:

►How many volts or amps represent 1 and 0 ?►How many microseconds a bit lasts?►Transmission simultaneously in both directions?

Full or half duplex

►How many pins the network connector has … Signal lines Control signals Grounds

Design issues ►mechanical, electrical and procedural interfaces►physical transmission medium

V.24 / RS-232 is an example of a physical layer standard

Page 31: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Physical LayerOSI - Physical Layer

► Electrical signalling Examples

NRZ

Clock

Manchester

Bits 0 0 0 0 0 0 0 0 01 1 1 1 1 1 1

NRZI

Page 32: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Data Link LayerOSI - Data Link Layer

► Defines how the network layer packets are transmitted as bits

► Sender breaks the input data up into a data frame (a few hundred

bytes), transmits the frames sequentially and processes any acknowledgement frame sent back by the

receiver

► Data link layer creates and recognises frame boundaries

Page 33: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Data Link LayerOSI - Data Link Layer

► Frame formatting and the Cyclic Redundancy Check (CRC), which checks for errors in the whole frame, are incorporated at this layer

► Main task of the data link layer take a raw transmission facility (physical layer) and transform it into a line that appears free of undetected transmission

errors to the network layer

► Physical layer Accepts and transmits a stream of bits without regard to meaning or

structure

► Data link layer creates and recognises frame boundaries Accomplished by

►special bit patterns to the beginning and end of a frame►signals on separate lines

(less common in modern high bandwidth systems)

Page 34: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Data Link LayerOSI - Data Link Layer

► Noise Noise can corrupt or destroy a frame completely The data link layer software on the source machine should

retransmit the frame Multiple transmission of a frame

►possibility of duplicate frames Link layer required to solve problems caused by damaged, lost

and duplicate frames

Page 35: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Data Link LayerOSI - Data Link Layer

► Service classes Data link layer may offer several different service classes to

the network layer Each with a different quality and price.

► Examples of data link layer protocols are Point to Point Protocol (PPP) , High-Level Data Link Control (HDLC) and Ethernet

► Bridges and switches provide operations up to the data link layer

Page 36: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Network LayerOSI - Network Layer

► Network layer defines how information from the transport layer is sent over

networks and how different hosts are addressed

► Each host must have at least one unique address► A host’s network address allows other machines to

address their messages to that host► Using the network address, network layer controls the

forwarding of messages between stations. It determines how packets are routed from source to

destination

Page 37: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Network LayerOSI - Network Layer

► Routers and Gateways Packets of data are transmitted to other networks though

routers (sometimes called gateways in Internet technology)

► The network layer controls the operation of the subnet► Key design issue

Determine how packets are routed from source to destination

Page 38: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Network LayerOSI - Network Layer

► Routing Routes can be

►stored in static tables wired into the network and rarely changed.

►determined at the start of each conversation, for example a terminal session.

►highly dynamic - determined anew for each packet reflecting the current network load or state If too many packets are present in the subnet, they will interfere

with each other, forming a bottleneck Control of subnet congestion belongs to the network layer Network layer overcomes these problems and allows

connection of heterogeneous networks

► Packet layer of X.25 is a standard Network Layer protocol

Page 39: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport LayerOSI - Transport Layer

► Provides for end-to-end data transmission Network devices between sender and receiver do not

change the data

► It takes care of data transfer, ensuring integrity of data, if desired, by the upper layers

► guarantee correct sequencing delivery in the same order as it was sent

► transmission in a timely manner splitting data from the session layer into smaller units

►Frames to be handled by the network layer

Page 40: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport LayerOSI - Transport Layer

► Determines Types of services provided to the session layer Who will use the network

► Two typical connection modes in this layer Connection-oriented

►Establishes logical connection between applications on two hosts

►Point-to-point Each connection involves two hosts only

Connectionless►Broadcast and multi-cast transmissions

One-to-many transmissions

Most popular type of transport connection ►Error-free point-to-point model that delivers messages in order

Page 41: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - The Transport LayerOSI - The Transport Layer

► Basic function Accept data from the session layer, (if necessary) split it up into smaller units pass these to the network layer and ensure that the pieces all arrive correctly at the other end

► Additional requirements This must be all done efficiently and in a way that isolates the upper layers

from inevitable changes in the hardware technology

Page 42: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

► Too many functions performed to examine them all! ► Key functions are:

Splitting Re-sequencing Multiplexing

► Some functions always required all types of sub-net

► Others are optional Needed for certain types of sub-net

Page 43: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

► SPLITTING Always required Every type of sub-net has some restriction on data unit size

►Examples 128 bytes in X.25 packet switched networks 1500 bytes in Ethernet LANs 48 bytes in ATM networks

Higher layers should not need to be aware of these differences►Application programs should work - without change - on all

types of network

Page 44: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

► Splitting … Transport layer

►accepts data units of any size from the layer above and►breaks them up into smaller data units

size acceptable to the sub-net

At the destination ►reassembles these small data units into their original form

and ►delivers the assembled data unit across the transport

service interface to the higher layer The higher layer is unaware that the data unit was transmitted

across the sub-net in pieces

Page 45: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

Transport Layer Transport Layer

Transport Layer Splitting

Data Unit

Split data unit

(Reassembled) Data Unit

Page 46: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

► Re-Sequencing Connectionless (Datagram) type sub-nets cannot guarantee

that a sequence of packets transmitted across the sub-net will arrive in the same order as they were sent

Data units in a datagram network do not have their own sequence numbers that indicate the order in which data units were sent

► TL’s responsibility to put the received packets in order Transport Layer introduces its own sequence numbers to

permit re-sequencing to be carried out

Page 47: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

3 2 1

1

3

1

31

3

1

2

2

1

1 3 2

Effect of different routes on order of packet arrival

Page 48: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

► MULTIPLEXING Two possible types Upward multiplexing

►A number of calls may share a single network layer connection to a given destination and

► thus avoid the need and cost of establishing a number of network layer calls across the sub-net between the same source and destination pair

Transport Layer

Network Layer

Upward Mutiplexing

Page 49: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Transport Layer FunctionsOSI - Transport Layer Functions

Downward multiplexing►A single network layer connection cannot provide the

required data rate ►A single transport layer connection may be connected to

multiple network layer connections ►Each carries a proportion of the traffic in order to achieve

the desired data rate

Transport Layer

Network Layer

Downward Mutiplexing

Page 50: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Session LayerOSI - Session Layer

► Responsible for establishing and terminating network connections arranging sessions into logical parts name-to-station address translation

► A Session allows ordinary data transport (as does the transport layer)

but also provides some enhanced services

►useful in some applications.

Page 51: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Session LayerOSI - Session Layer

► Synchronisation Some operations do not allow both sides to undertake the

same operation at the same time►mutual exclusion required

A locking control in the session layer provides flags that can be exchanged

Only the host holding the lock may perform the critical operation

Prevent inconsistent data updates in the application

Page 52: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Session LayerOSI - Session Layer

► Another synchronisation example Transferring a large file Two hour file - aborted after, say, one hour of transmission Session layer adds check points into the data stream After a crash, only the data transferred after the last check

point have to be repeated

Page 53: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Presentation LayerOSI - Presentation Layer

► Responsible for data translation Formatting Encryption and Decryption

► Typical example of a presentation service Encoding data in a standard, agreed way

►e.g. ASCII, GB, BIG5, etcPossible for computers with different internal data formats to

communicate ►Data structures to be exchanged can be defined in an

abstract way►Presentation layer translates common format used for

transmission

Page 54: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Application LayerOSI - Application Layer

► Top layer Interface between the application and the user Used for those applications that are specifically written to run

over the network Specifies the protocols to be used between the application

programs

Page 55: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI - Application LayerOSI - Application Layer

► Examples File transfer

►Different file systems have different naming conventions, ways of representing text lines, ...

►Transferring a file between two different systems requires handling these incompatibilities

email remote job entry, directory lookup, web serving and various other general and special purpose facilities

Page 56: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI Architecture - Data TransmissionOSI Architecture - Data Transmission

Page 57: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI Architecture - Data TransmissionOSI Architecture - Data Transmission

► Sending process has some data it wants to send using the OSI model It gives the data to the application layer,

►which attaches the application header, AH (may be null), to the front of it and

gives the resulting item to the presentation layer Presentation layer may transform the data in various ways

►eg character set conversion►and possibly add a header to the front,

gives the result to the session layer …. Process is repeated until the data reaches the physical layer,

where it is actually transmitted to the receiving machine

Page 58: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI Architecture - Data TransmissionOSI Architecture - Data Transmission

► Receiving machine Headers are stripped off one by one as the message

propagates up the layers until it finally arrives at the receiving process.

Key idea Although actual data transmission is vertical in the figure, each layer is programmed as though it were horizontaleach layer communicates with its peerin the same layer on the receiving machine

Page 59: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► Nodes in the communications sub-net contain at least two, possibly identical, stacks of protocols.

► Data is copied between these stacks at the highest layer implemented in the node.

► There is no communication within the node between the lower layers of protocol.

► This process of copying between stacks within a node is termed relaying and employs an appropriate form of routing to select which stacks are connected together.

Page 60: Computer Networks 364 OSI Architecture John Morris Computer Science/Electrical Engineering University of Auckland Email: jmor159@cs.auckland.ac.nz URL:

OSI ArchitectureOSI Architecture

► The reason for the choice of the term 'relay' is the obvious analogy with relay races.

► The packet may be viewed as the 'baton' with the individual links and their associated protocol stacks and protocols correspond to the runners in the race who carry the baton from the start (source) to the finish (destination).

► User process only communicate with the OSI layer via the Service Interface provided by the highest layer - the application layer.