chapter_09_1 - Homework Market
Download
Report
Transcript chapter_09_1 - Homework Market
Chapter Nine
The Session Layer
Objectives
• We’ll see how a new session is created,
maintained, and dismantled.
• The process of logon authentication will be
revisited.
• Dialogue control will be examined.
Why we need session layer?
• Before the network starts to transfer data, it needs to make
sure that the user has all the necessary rights and privileges.
– User credentials are verified.
• The processes or applications at the source and destination
need to figure out how to talk to one another, such as service,
protocol, speed, duration, etc.
–
–
–
–
Establish a connection ID number
Agree upon which services are required and for what duration
Determine which device begins the conversation
Coordinate the Acknowledgement numbering and retransmission
rules.
Session Layer Responsibilities
• The responsibilities of session layer are:
– Establish a connection
– Provide dialogue management and
synchronization
– Release the connection
Establishing a Connection
• In order for two devices to communicate, they must
first establish a session.
– A session can also defined as a virtual connection between
two devices for the purpose of transferring data.
– Many times, data is transferred over a series of session in
order to keep network congestion at a minimum.
– Any time multiple sessions are used by devices, it is
considered to be a dialogue.
Initiating a Link
• When a client application or process decides that it requires a
service that exists on a remote device, it is up to Session layer to
establish a link with that remote device.
• The Session layer will rely heavily upon the service provided by
the lower lays in the OSI model
– To create a new session, the Session layer entity issues a T-connect
request to the Transport Layer.
– Transport layer will identify the services for the particular session and
the protocol that will be used. The Transport layer issue a N-connect
request to the Network Layer and wait for confirmation.
– The confirmation will be handed back to the Session layer and used for
all subsequent processes.
Initiating a Link
Logon Authentication
• In any connection-oriented protocol, logon
authentication is required before any session can be
built
– At a minimum, the logon authentication requires User ID
and password.
• The credentials are sent to the target device and
compared against the security database.
– If the user is authenticated, the session is created.
– If not, the session is immediately aborted.
Logon Authentication
• Once users log on to the network, their credentials
stay in cache.
• The system makes use of this credential every time
they attempt to access any network resource
– Once the client host has located the resource, if the
resource has password restriction, the device housing that
resource will forward the logon authentication to the
server.
– The security database will be checked, and if all
information is correct, the user will be allowed to access
the resource.
Logon Authentication Example
The Connection ID
• Everything has to have a name.
• On any given host, it is high likely that there are multiple
session open simultaneously
– The connection ID keeps multiple sessions from getting confused.
• For each session, the network will create a source connection
ID and destination connection ID. This number will be given to
the lower layer in order to make sure this information is
added to the appropriate fields.
• TCP/IP makes very little use of connection IDs. TCP/IP uses
sequence number to keep packets from different session.
Duration of the Connection
• An estimated duration is negotiated between entities.
• In the event that one of the device drops the connection for
any reason, the other device will not just leave the virtual link
hanging open.
• When the time to live expires, the still-connected device can
either reestablish the connection or close it.
Service Required
• The device also negotiates what services are being
requested and those that will be required.
• The services provided by the Session Layer include:
The Final Steps of Initializing a
Session
• The last two steps of initializing a session are:
– Determine which entity begins the conversation
– Coordinate the acknowledgement numbering and
retransmission procedure.
• Deciding who talks first is simply a matter of what
type of service is being provided.
– The client may be requesting access to the resource on the
server
– The server may be synchronizing data on the client.
The Final Steps of Initializing a
Session
• Connection-oriented protocol require that
acknowledgements be sent for each packet received.
It is the Session layer to negotiate the method of
acknowledgement
– Sliding window
– Stop and wait
– etc
Dialogue Management
• Duplex or half-duplex operation is selected.
– If the full duplex is selected, either device can send data
any time it is required
– If half-duplex (Simplex) is selected, the process of
communication is controlled by a token.
• Data Token – permit the transmission of data
• Synchronize minor token – A fine-tuning of the session’s flow is
required, or a checkpoint is being issued.
• Major activity token – The entire is out of synch and needs to be
realigned and reset
• Release token – All finished. Let’s go home
• Disconnect token – The data transfer is complete and the session
can be broken down.
• Abort token – Some catastrophic failure has occurred and the
session is to be ended immediately.
Dialogue Management
• During the transmission, the Session layer periodically places
Checkpoints in the data steam.
• In the event of a session failure, certain protocols can
reestablish a connection and pick up where they left off.
• A synchronization minor token is used so that the receiving
device will not confuse the checkpoint with actual data
Dialogue Synchronization
• Broken down into four types
– Initial synchronization
• Starts the conversation
– Major synchronization
• Starts the conversation over again, if need be
– Minor synchronization
• Fine-tunes data exchange as needed
– Resynchronization
• Either restarts or completely aborts the session. It can take
advantage of checkpoint to resume the transmission. A set
command can be used to return to a specific checkpoint.
Releasing the Connection
• The final responsibility of the Session layer is to
disconnect a communication link and remove the
temporary files that have been created during the
session.
• Disconnection fall under two categories, the expected
and the unexpected
– Expected disconnections occur because either the
duration of the session has expired or the transfer of data
is complete.
– Unexpected disconnection occurs because of an
unrecoverable error
Releasing the Connection
– An expected disconnect results in a finish Protocol Data
Unit being issued.
• The session is broken down and all TEMP files cleaned up.
– An unexpected disconnection results in a not-finished
PDU.
• TEMP files remain intact. Once the reconnection has been made,
the checkpoint procedure will be used to resume the transfer
where it left off.
Summary
• The Session layer (Layer 5) of the OSI model
performs the following tasks:
– Starts and ends sessions on the Presentation
layer’s request and passes connection information
to the Transport layer
– Maintain the dialogue.
– Performs authentication, verifies permissions, and
session recovery and checkpoint