the osi model. topics what are protocols ? what are protocols ? why we need protocols and standards...

62
The OSI Model The OSI Model

Upload: kelly-lucy-lamb

Post on 23-Dec-2015

224 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The OSI ModelThe OSI Model

Page 2: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

TopicsTopics

What are Protocols ?What are Protocols ? Why we need Protocols and StandardsWhy we need Protocols and Standards The OSI Reference ModelThe OSI Reference Model The Seven Layers of the ModelThe Seven Layers of the Model Responsibilities of Each LayerResponsibilities of Each Layer The Application LayerThe Application Layer The Presentation LayerThe Presentation Layer The Session LayerThe Session Layer The Transport LayerThe Transport Layer The Network LayerThe Network Layer The Data Link LayerThe Data Link Layer

The Physical LayerThe Physical Layer

Page 3: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

What are Protocols ?What are Protocols ?

Let’s look at what happen:Let’s look at what happen:

Hi, What is

your name ?

Xin chào, bạn tên là gì

vậy ?

Oh my God, what did he say

?Không biết

thằng này đang nói cái gì

nữa ?They do not understand each other because they are using

different languages.

Page 4: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

What are Protocols ? (cont)What are Protocols ? (cont)

Now, Let’s look at what happens next:Now, Let’s look at what happens next:

Hi, What is

your name ?

They can understand each other because they are using the

same language.

Hi, my name is Gary, and what is

your name ?

My name is Harry, nice to

meet you.

Nice to meet you, too.

Page 5: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

What are Protocols ? (cont)What are Protocols ? (cont)

So in order for two people to speak to each So in order for two people to speak to each other, the first thing they should to agree on other, the first thing they should to agree on is the language, or protocols, to use.is the language, or protocols, to use.

Communication between hosts on the Communication between hosts on the network is the same. When hosts begin network is the same. When hosts begin communicating with each other, they first communicating with each other, they first must agree on what protocols to use.must agree on what protocols to use.

Page 6: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

What are Protocols ? (cont)What are Protocols ? (cont)

Windows PC running IP protocol

IP

Netware PC running IPX

protocol

IPX

Windows PC running

IPX protocol

IPX

Netware PC running IPX

protocol

IPX

Page 7: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

What are Protocols ? (cont)What are Protocols ? (cont)

A group of protocol is called a protocol suite A group of protocol is called a protocol suite or a protocol stack.or a protocol stack.

When combined with other protocols, the When combined with other protocols, the protocol group that result is called a protocol group that result is called a protocol protocol suitesuite. TCP/IP, for example, is a protocol suite.. TCP/IP, for example, is a protocol suite.

Page 8: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

Why We Need Protocols and Why We Need Protocols and StandardsStandards

Rules – or protocols and standards – are Rules – or protocols and standards – are important to ensure compatibility between important to ensure compatibility between different kinds of thingsdifferent kinds of things

However, before a protocol is accepted and However, before a protocol is accepted and widely implemented, it has to pass rigorous widely implemented, it has to pass rigorous testing. So a standard framework is used to help testing. So a standard framework is used to help design, compare, test, and evaluate protocols.design, compare, test, and evaluate protocols.

Page 9: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The OSI Reference ModelThe OSI Reference Model

For network communications to take place, For network communications to take place, hundreds of questions must be answered by a hundreds of questions must be answered by a set of protocol (how, when, what…).set of protocol (how, when, what…).

Evaluating and working with these hundreds of Evaluating and working with these hundreds of questions would be unmanageable.questions would be unmanageable.

Page 10: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The OSI Reference Model The OSI Reference Model (cont)(cont)

So, in 1977, the So, in 1977, the International Standards International Standards Organization (ISO)Organization (ISO) adopted the adopted the Open Open Standard Interconnection (OSI)Standard Interconnection (OSI) model. model.

The OSI model breaks down the many tasks The OSI model breaks down the many tasks involved in moving data from one host to another.involved in moving data from one host to another.

The hundreds of questions are divided into The hundreds of questions are divided into seven smaller. The seven groups are seven smaller. The seven groups are called called layers.layers.

Page 11: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The OSI Reference Model The OSI Reference Model (cont)(cont)

The OSI reference model is exactly The OSI reference model is exactly that; it is only a model.that; it is only a model.

If we think of the model as a set of questions that If we think of the model as a set of questions that have to be answered, then the protocols are the have to be answered, then the protocols are the answers.answers.

Any one protocol may answer only a few of the Any one protocol may answer only a few of the questions, or in other words, address specific questions, or in other words, address specific layers in the model. By combining multiple layers in the model. By combining multiple protocols into a protocol suite, we can answer all protocols into a protocol suite, we can answer all the questions posed by the model.(the questions posed by the model.(Mô hình OSI ó thể trả lời Mô hình OSI ó thể trả lời những câu hỏi đặt ra)những câu hỏi đặt ra)

Page 12: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Seven Layers of the OSI The Seven Layers of the OSI ModelModel

The goal of the OSI model is to break down The goal of the OSI model is to break down the task of data communication into simple the task of data communication into simple steps. These steps are called layers.steps. These steps are called layers.

The OSI model is made up of seven distinct The OSI model is made up of seven distinct layers. Each layer has certain responsibilities. layers. Each layer has certain responsibilities.

Page 13: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Seven Layers of the OSI The Seven Layers of the OSI ModelModel

Application

Presentation

Session

Transport

Network

Data Link

Physical

Page 14: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

Responsibilities of Each Responsibilities of Each LayerLayer

The purpose of each layer in the OSI model is The purpose of each layer in the OSI model is to provide services to the layer above it.to provide services to the layer above it.

The higher layers do not need to what The higher layers do not need to what happened at the lower layers.happened at the lower layers.

Following is the process of moving data Following is the process of moving data from one host to another:from one host to another:

Page 15: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

Data StreamData Data Data

Data StreamData Stream

Data Stream Data Stream

Data Stream

Data Stream

Data

Data Stream This is called

segment

Data IP Header 1Data IP Header 1Data IP Header 1

Data IP Header 1Data IP Header 1Frame Header IData IP Header 1Frame Header I Data IP Header 1Frame Header IData IP Header 1

Data IP Header 1Data

Data Data Data Data Stream Data Stream

Data Stream Data Stream

Data StreamData Stream Data Stream

Application

Presentation

Session

Transport

Network

Data Link

Physical

This one is called

frame

Application

Presentation

Session

Transport

Network

Data Link

Physical

This one is called

packet

Page 16: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Application LayerThe Application Layer

Let’s look at what is happening:Let’s look at what is happening:

You are surfing on the Internet…You are surfing on the Internet…

You are giving a command

You type an address of a Website…You type an address of a Website…

The Website is delivered to you…The Website is delivered to you…The Application layer provide

a set of tools and services that the Web Browser used to

complete it jobHow the Web Browser

can do that ?

Web Browser

Web Server

Page 17: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Application LayerThe Application Layer

The Application layer is the top layer The Application layer is the top layer of the OSI model.of the OSI model.

The purpose of the Application layer The purpose of the Application layer is to manage communications is to manage communications between applications.between applications.

Web Browser

Web Server

Application

Presentation

Session

Transport

Network

Data Link

Physical

Page 18: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Application LayerThe Application Layer Example of the Application layer: Example of the Application layer:

File transferFile transfer Electronic mailElectronic mail Terminal accessTerminal access Word processingWord processing Web BrowserWeb Browser

Page 19: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Presentation LayerThe Presentation Layer

Let’s look at what is happening:Let’s look at what is happening:

MAC PC

Sun PC

Windows PC

I have a good file now.

I want that file but I only accept it in DES

encryption format

I want that file too but in 3DES encryption format

OK, I will send that file to MAC PC in DES format and in 3DES format to Sun PC

The Presentation provide set of tools for Window PC to encrypt the file in the suitable format before sending it to Mac PC and Sun PC

Page 20: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Presentation LayerThe Presentation Layer

The Presentation layer is the layer below the The Presentation layer is the layer below the Application layer and above the Session layer.Application layer and above the Session layer.

The Presentation ensures that the information that the application layer of one system sends out is readable by the application layer of another system.

MAC PC

Sun PC

Windows PC

Application

Presentation

Session

Transport

Network

Data Link

Physical

Page 21: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Presentation LayerThe Presentation Layer Actions of the Presentation layer:Actions of the Presentation layer:

Format of dataFormat of data Data structureData structure Data conversionData conversion Data compressionData compression Data encryptionData encryption

Examples of the Presentation layer:Examples of the Presentation layer: PICT – PICT – This is picture format used by MacintoshThis is picture format used by Macintosh MIDI – MIDI – The Musical Instrument Digital Interface is used for digitized The Musical Instrument Digital Interface is used for digitized

music.music. MPEG – MPEG – The Moving Picture Experts Group’s standard for the The Moving Picture Experts Group’s standard for the

compression and coding of motion video for CDscompression and coding of motion video for CDs.. RTF – RTF – Rich Text Format is a file format that lets you exchange text Rich Text Format is a file format that lets you exchange text

files between different word processors, even in different operating files between different word processors, even in different operating systems.systems.

Page 22: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Session LayerThe Session Layer

Let’s look at what is happening:Let’s look at what is happening:

Web ServerWeb Browser

Hey, Web Server, I want to access your web site using my Internet Explorer.Ok, I will meet you at port 80.And what about FTP ?Ok, We will meet at

port 21.

But how the Web Browser and Web Server

can negotiate the meeting port ?

The Session layer allows them to meet each other

and make agreement.

Page 23: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Session LayerThe Session Layer

The Session is below the Presentation layer.The Session is below the Presentation layer.

Web ServerWeb Browser

The Session layer establishes, manages, and terminates The Session layer establishes, manages, and terminates sessions between two communicating hosts.sessions between two communicating hosts. Application

Presentation

Session

Transport

Network

Data Link

Physical

Page 24: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The session layerThe session layer Actions of the Session layer: Actions of the Session layer:

SessionsSessions DialogDialog ConversationsConversations Data exchangeData exchange

Examples of the Session layer: Examples of the Session layer: Network File System (NFS)Network File System (NFS) – – Developed by Sun Developed by Sun

Microsystems and used with TCP/IP and Unix workstation Microsystems and used with TCP/IP and Unix workstation to allow transparent access to remote resources.to allow transparent access to remote resources.

AppleTalk Session Protocol (ASP)AppleTalk Session Protocol (ASP) – – client/server client/server mechanism, which both establishes and maintains sessions mechanism, which both establishes and maintains sessions between AppleTalk client and server machines.between AppleTalk client and server machines.

Page 25: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport Layer

The Transport layer is below the Session layer.The Transport layer is below the Session layer. The Transport layer can guarantee that packets The Transport layer can guarantee that packets are received.are received.

Hey, Session layer, give your data to me and I

guarantee that they will be given to the right

destination

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

Page 26: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport Layer The Transport layers segments and reassembles The Transport layers segments and reassembles

data into a data streamdata into a data stream

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

Data Stream

Data Stream

Data Stream

Data Data Data

Page 27: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport Layer

Connectionless transmissionConnectionless transmission Connection-oriented transmissionConnection-oriented transmission The three-way handshakeThe three-way handshake

Flow controlFlow control

AcknowledgementAcknowledgement WindowingWindowing

Page 28: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport Layer

The primary function of the Transport layer The primary function of the Transport layer is to ensure that the data packets it receives is to ensure that the data packets it receives from the Session layer arrive reliably.from the Session layer arrive reliably.

The Transport layer does this by using two The Transport layer does this by using two types of transmissions: types of transmissions: connectionlessconnectionless and and connection orientedconnection oriented..

The Transport layer also has the job of The Transport layer also has the job of managing the speed of communication between managing the speed of communication between devices. This is known as devices. This is known as flow controlflow control..

Page 29: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The letter then delivered from the local Post The letter then delivered from the local Post Office through the Post Office system arrive at the Office through the Post Office system arrive at the Destination Post Office then delivered to WilsonDestination Post Office then delivered to Wilson

That’s OK. The letter is not important, it is just That’s OK. The letter is not important, it is just a friendly letter.a friendly letter.

But the letter may be lost on the way and But the letter may be lost on the way and never come to the destination.never come to the destination.

The Transport LayerThe Transport LayerConnectionless transmissionsConnectionless transmissions

Let’s look at what happens:Let’s look at what happens: Harry want to send mail to WilsonHarry want to send mail to Wilson So he goes to the local Post Office and left the So he goes to the local Post Office and left the letter thereletter there

WilsonHarryLocal

Post OfficeDestinationPost Office

Post Office system

Page 30: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerConnectionless transmissionsConnectionless transmissions

(cont)(cont) The first reason is that’s the data is not importantThe first reason is that’s the data is not important

WilsonHarryLocal

Post OfficeDestinationPost Office

Post Office system

Host A Host B

Internet

Local Router

Destination Router

The advantage of connectionless transmission The advantage of connectionless transmission using connectionless protocol is that it is very using connectionless protocol is that it is very fast.fast.

The second reason is that it’s OK if there is a The second reason is that it’s OK if there is a good and reliable connection between the good and reliable connection between the source and the destination (lease line)source and the destination (lease line)

Working in the same way, with connectionless transmission using connectionless protocol, when Host A Working in the same way, with connectionless transmission using connectionless protocol, when Host A want to send data to Host B, it only put the packet onto the network and hope that it will be arrive at the want to send data to Host B, it only put the packet onto the network and hope that it will be arrive at the destination.destination. The packets may be lost on the way (internet). But that’s OK.The packets may be lost on the way (internet). But that’s OK.

Page 31: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerConnectionless transmissionsConnectionless transmissions

(cont)(cont) User Datagram Protocol (UDP) is an example of connectionless User Datagram Protocol (UDP) is an example of connectionless

protocolprotocol

Applications that use UDP to send their Applications that use UDP to send their data information is DNS, TFTP….data information is DNS, TFTP….

Page 32: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerConnection-oriented Connection-oriented

transmissionstransmissions Let’s look at what happens:Let’s look at what happens: Harry want to send mail to Wilson again. Harry want to send mail to Wilson again. But this time, it is an important business But this time, it is an important business

letter. So he want Wilson phone him to letter. So he want Wilson phone him to acknowledge when Wilson receive the letter.acknowledge when Wilson receive the letter.

WilsonHarryLocal

Post OfficeDestinationPost Office

Post Office system

He then goes to the Local Post Office and send the He then goes to the Local Post Office and send the letter in a certified form. It means that the Post Office letter in a certified form. It means that the Post Office guarantee the letter will arrive at the right destination. guarantee the letter will arrive at the right destination.

When Harry receive an acknowledge phone from When Harry receive an acknowledge phone from Wilson, he is now stop worrying about the letter.Wilson, he is now stop worrying about the letter.

The letter then sent and when Wilson receives the letter and The letter then sent and when Wilson receives the letter and see that it is an important business letter, so he then phone see that it is an important business letter, so he then phone Harry to acknowledge (Harry to acknowledge (báo cho biếtbáo cho biết) that he had received the letter.) that he had received the letter.

Page 33: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerConnection-oriented transmissionsConnection-oriented transmissions

(cont)(cont) When Host A receive an acknowledgement packet, it then stop When Host A receive an acknowledgement packet, it then stop

worrying about the packet.worrying about the packet.

WilsonHarryLocal

Post OfficeDestinationPost Office

Post Office system

Host A Host B

Internet

Local Router

Destination Router

The advantage of connection-oriented The advantage of connection-oriented transmission using connection-oriented transmission using connection-oriented protocol is that it is reliable although it has protocol is that it is reliable although it has higher latency than connectionless protocol.higher latency than connectionless protocol.

But after waiting for a predefined time, Host A But after waiting for a predefined time, Host A does not receive an acknowledgement packet does not receive an acknowledgement packet from Host B, Host A will resend the packet and from Host B, Host A will resend the packet and wait. The process happens until Host A receive wait. The process happens until Host A receive an acknowledgement packet from Host B.an acknowledgement packet from Host B.

Working in the same way, with connection-Working in the same way, with connection-oriented transmission using connection-oriented oriented transmission using connection-oriented protocol, when Host A want to send data to Host B, protocol, when Host A want to send data to Host B, it put the packet onto the network and wait for the it put the packet onto the network and wait for the destination to acknowledge of receiving packet.destination to acknowledge of receiving packet.

Because Host A and Host B both use connection-oriented protocol to Because Host A and Host B both use connection-oriented protocol to send and receive packets. So when Host B receive packet from A, it send and receive packets. So when Host B receive packet from A, it will send an acknowledge packet to specify that it has received.will send an acknowledge packet to specify that it has received.

Page 34: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerConnectionless transmissions Connectionless transmissions

(cont)(cont) Transmission Control Protocol (TCP) is an example of connection-Transmission Control Protocol (TCP) is an example of connection-

oriented protocoloriented protocol

Applications that use TCP to send their data Applications that use TCP to send their data information is DNS, FTP, HTTP, SMTP,…information is DNS, FTP, HTTP, SMTP,…

Page 35: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport Layerthe three-way handshakethe three-way handshake

In connection-oriented transmission, both In connection-oriented transmission, both the sender and receiver have to join to the the sender and receiver have to join to the session. The receiver must know that the session. The receiver must know that the sender is sending packets in order to sender is sending packets in order to answer (acknowledgment)answer (acknowledgment)

So, the sender must first establish a So, the sender must first establish a connection-oriented session with the connection-oriented session with the receiver, which is called a call setup, or receiver, which is called a call setup, or three-way handshakethree-way handshake

Page 36: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport Layerthe three-way handshake the three-way handshake

(cont)(cont) Let’s look at what happens:Let’s look at what happens: In the In the three-way handshakethree-way handshake process, when process, when

Host A (sender) want to establish a session Host A (sender) want to establish a session with Host B (receiver), it first send to the with Host B (receiver), it first send to the receiver a receiver a synchronizesynchronize segment. segment.

SenderHost A

TCP

ReceiverHost B

TCP

Host B (receiver) after examine the Host B (receiver) after examine the synchronize packet from Host A, if agree, it synchronize packet from Host A, if agree, it will send acknowledgement synchronize will send acknowledgement synchronize segment to Host A.segment to Host A.

Synchronize (Can I talk to you ?)

Ack (Yes), Synchronize ( Can I talk to you ?)

Host A after receives the synchronize segment Host A after receives the synchronize segment from Host B, it will send an acknowledgement from Host B, it will send an acknowledgement segment to Host B to acknowledge to connection.segment to Host B to acknowledge to connection.

Ack (Yes)

Connection Established

Data Transfer(send segments)

Page 37: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow ControlFlow Control

Once data transfer is in progress, Once data transfer is in progress, congestion can occur for two reasons.congestion can occur for two reasons.

Page 38: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

First, the sending device might be able to generate First, the sending device might be able to generate traffic faster than the network can transfer it.traffic faster than the network can transfer it.

data

data

datadata

data

data

data

data data

data data

data data

data

data

Page 39: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

The second reason is that multiple devices The second reason is that multiple devices need to send data to the same destination.need to send data to the same destination.

data

data

data

datadata

datadata

data

data

data

data

data

data

Page 40: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

When datagram arrive too quickly for a device to When datagram arrive too quickly for a device to process, it temporarily stores them in memory.process, it temporarily stores them in memory.

data

data

data

data

data

data

data

data

data

data

data

data

Page 41: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

If the datagrams are part of a small burst, this If the datagrams are part of a small burst, this buffering solves the problem.buffering solves the problem.

data

data

data

data

data

data

data

data

data

data

data

data

Page 42: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

However, if the traffic continues at this rate, the device eventually However, if the traffic continues at this rate, the device eventually exhausts its memory and must discard additional datagrams that exhausts its memory and must discard additional datagrams that arrive.arrive.

data

data

data

data

data

data

data

data

data

data

data

data

data

datadata

data

datadata

data

data

data

data

data

So, the data will be lost ?

Page 43: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

Instead of losing the data, the transport function Instead of losing the data, the transport function can issue a “not ready” indicator to the sender.can issue a “not ready” indicator to the sender.

data

data

data

data

data

data

data

data

data

data

data

data

data

datadata

data

datadata

data

data

data

data

stop

Transport

Page 44: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

This acts like a stop sign and signal the sender to This acts like a stop sign and signal the sender to discontinue sending segment traffic to the receiver.discontinue sending segment traffic to the receiver.

data

data

data

data

data

data

stop

Transport

Stop

Page 45: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

After the receiving device has processed sufficient segments to free After the receiving device has processed sufficient segments to free space in its buffer, the receiver sends a “ready transport “ indicator space in its buffer, the receiver sends a “ready transport “ indicator – which is like a go signal.– which is like a go signal.

data

data

data

data

data

data

go

Transport

Go

Page 46: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport layerThe Transport layerFlow Control (cont)Flow Control (cont)

When they receives this indicator, the senders When they receives this indicator, the senders can resume segment transmission.can resume segment transmission.

go

Transport

data

data

data data

data

data

data

data

Page 47: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerAcknowledgementAcknowledgement

The transport layer provide a reliable service The transport layer provide a reliable service regardless of the quality of the underlying networkregardless of the quality of the underlying network

Transport

Page 48: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerAcknowledgement (cont)Acknowledgement (cont)

One technique that is used to guarantee reliable delivery is One technique that is used to guarantee reliable delivery is called called positive acknowledgement (positive acknowledgement (Thông báo xác thựcThông báo xác thực) with ) with retransmissionretransmission..

data

This requires the receiver to issue an acknowledgement This requires the receiver to issue an acknowledgement message to the sender when it receivers data.message to the sender when it receivers data.

data

Page 49: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerAcknowledgement (cont)Acknowledgement (cont)

The sender also start a timer when it sent The sender also start a timer when it sent a packet.a packet.

If the timer expires before an acknowledgement If the timer expires before an acknowledgement is received, it retransmits the packet.is received, it retransmits the packet.

data

Page 50: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerWindowingWindowing

Acknowledging every data segment, however, Acknowledging every data segment, however, has its drawback (điều trở ngại).has its drawback (điều trở ngại).

data

If the sender has to wait for an acknowledgement of If the sender has to wait for an acknowledgement of each data segment, the throughput will be very low.each data segment, the throughput will be very low.

dataA technique called

Windowing is used to increase the throughput.

Page 51: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Transport LayerThe Transport LayerWindowing (cont)Windowing (cont)

The quantity of data segments (measured in bytes) that the transmitting machine is allowed to send without receiving an acknowledgment for them is called a window.

the size of the window controls how much information is transferred from one end to the other

Sender

TCP

Receiver

TCP

You and I will use window size of 1 ?I agree

Send 1 Receive 1Ack 2

Send 2 Receive 2Ack 3

Page 52: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

I agree

The Transport LayerThe Transport LayerWindowing (cont)Windowing (cont)

Now let’s examine an example with windows size of 3.

Sender

TCP

Receiver

TCP

You and I will use window size of 3 ?

Send 1 Receive 1

Send 2 Receive 2

Send 3 Receive 3

Ack 4

Send 4 Receive 4

Send 6 Receive 6Send 5 Connection lost !!!

Ack 5

Receive 5Send 5

Ack 7

Page 53: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

192.168.1.1

172.16.1.1

10.0.0.1

E0 E1

E2

The Network LayerThe Network Layer

Let’s look at what is happening:Let’s look at what is happening:Packet with Destination IP address of 172.16.1.1

172.16.1.1 is in network

attached to E2. So……

But how router know that the 172.16.1.1 host is in the network

attached to E2 interface. And how it can route the packet to the

destination.

It is because router is a Network layer device and the Network layer provide a set of tools for router to

collect informations about 172.16.1.1 host.

The Network layer also provides a mechanism for router to route packet to

172.16.1.1 host.

Page 54: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Network LayerThe Network Layer

The Network layer, which is below The Network layer, which is below the Transport layer.the Transport layer.

It is responsible for routing the It is responsible for routing the packet based on its logical address.packet based on its logical address.Application

Presentation

Session

Transport

Network

Data Link

Physical

192.168.1.1

172.16.1.1

10.0.0.1

E0 E1

E2

A packet with destination IP address of 172.16.1.1

Page 55: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Network LayerThe Network Layer Actions that the Network layer have to Actions that the Network layer have to

deal : (deal : (xử lýxử lý) with: ) with: PacketsPackets Route, routing table, routing protocolRoute, routing table, routing protocol Logical addressLogical address FragmentationFragmentation

Examples of the Network layer protocols: Examples of the Network layer protocols: Internet Protocol (IP)Internet Protocol (IP) Internetwork Packet Exchange (IPX)Internetwork Packet Exchange (IPX)

Page 56: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

192.168.1.1

172.16.1.1

10.0.0.1

ISDN

ISDN router

Br0

E0

The Data Link LayerThe Data Link Layer

Let’s look at what is happening:Let’s look at what is happening:

This is a packet with a destination IP address of

10.0.0.1

S0E0

Br0

Yeah, host 10.0.0.1 is located in network

attached to S0.

But the network attached to S0 is a

Frame Relay network

So I have to re-encapsulate this packet into Frame Relay frame.

So

Frame Relay

S0

E0

This packet is destined for

10.0.0.1 that is in network attached

to my E0 interface.

And my E0 is an Ethernet interface.

So

Page 57: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Data Link LayerThe Data Link Layer

The Data Link layer is below the Network The Data Link layer is below the Network layer.layer.

Application

Presentation

Session

Transport

Network

Data Link

Physical

The Data Link layer is concerned with The Data Link layer is concerned with physical addressing.physical addressing.

MAC address00-06-7B-02-EF-05

The Data Link layer provides the physical The Data Link layer provides the physical transmission of the data.transmission of the data.

Page 58: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Data Link LayerThe Data Link Layer

The Data Link layer is made up of 2 sublayers:The Data Link layer is made up of 2 sublayers: The Logical Link Control (LLC) sublayer.The Logical Link Control (LLC) sublayer. The Media Access Control (MAC) sublayerThe Media Access Control (MAC) sublayer

Application

Presentation

Session

Transport

Network

Data Link

Physical

Logical Link Control (LLC)

Media Access Control (MAC)

Page 59: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Data Link LayerThe Data Link LayerLogical Link Control (LLC) sublayerLogical Link Control (LLC) sublayer

Logical Link Control (LLC) sublayer is Logical Link Control (LLC) sublayer is responsible for identifying Network layer responsible for identifying Network layer protocols and then encapsulating into frameprotocols and then encapsulating into frame

Application

Presentation

Session

Transport

Network

Data Link

Physical

Logical Link Control (LLC)

Media Access Control (MAC)

If the Network layer give me an IP packet, I will encapsulate

it into a frame like this

But if the Network layer give me an IPX packet, I will

encapsulate it into frame like

Page 60: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The Data Link LayerThe Data Link LayerMedia Access Control (MAC) sublayerMedia Access Control (MAC) sublayer

Media Access Control (MAC) sublayer Media Access Control (MAC) sublayer defines how packets are placed on the defines how packets are placed on the media.media.

Application

Presentation

Session

Transport

Network

Data Link

Physical

Logical Link Control (LLC)

Media Access Control (MAC)

If the network interface card (NIC) has RJ45 port and connected to crossover

cable. I will transfer frame on pin 2 and receive frame on

pin 3

But if the network interface card (NIC) has BNC port, I will transfer frame in another way.

Page 61: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The physical layerThe physical layer Transmission of an unstructured bit Transmission of an unstructured bit

stream over a physical link between end stream over a physical link between end systems.systems. Electrical, mechanical, procedural and Electrical, mechanical, procedural and

functional specificationsfunctional specifications Physical data ratePhysical data rate DistancesDistances Physical connectorPhysical connector

Page 62: The OSI Model. Topics What are Protocols ? What are Protocols ? Why we need Protocols and Standards Why we need Protocols and Standards The OSI Reference

The physical layerThe physical layer

For Example:For Example: UTP, STP, coaxial, Fiber cableUTP, STP, coaxial, Fiber cable RJ45, RJ11 connectorRJ45, RJ11 connector DB9, DB25 connectorDB9, DB25 connector 10base2, 10base5, 100baseT, 1000baseTx10base2, 10base5, 100baseT, 1000baseTx