62
Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Embed Size (px)

Citation preview

Page 1: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Network Protocols

Profs. Chuah and Kishore

EMC 165

Spring 2005

Lecture 6

Page 2: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Last Time/Today

We look at business trends in several related technologies.

Today, we begin our discussion on how networks are designed.

We begin by looking at how the design of such complex systems is first divided into a series of tasks that enables modular design.

This motivates protocol layering, the topic of today’s lecture.

Page 3: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Protocols and Protocol Layers

Two devices exchanging information need to follow some simple rules or protocols so that information can be interpreted correctly.

A network protocol gives a set of rules that are to be followed by entities (machines) situated on different parts of a network.

These protocols can be listed in order. The resulting order can be used to defined protocol layers.

Page 4: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Protocol Layers

To communicate from information from one machine to another, data has to be prepared in a special format.

Think of protocol layers as an assembly line.

At each layer, certain things happen to the data that prepare it for the next layer.

To understand this concept, let’s look at 4 layer communication between two philosophers.

Page 5: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Layering Example

Assume there are two philosophers, A and B. Philosopher A is in the U.S. and B is in France.

Philosopher A has thoughts (in English) and wishes to communicate them to philosopher B, who only understands French. The communication link between the two philosophers is a phone line, which they use via a fax machine.

Clearly (given the language issues) the data (the thought) has to be properly prepared at Philosopher A’s office before being sent over the fax line to Philosopher B’s office.

Page 6: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Layering Example

At philosopher B’s office, the information has to be processed and conveyed to philosopher B in the language he understands.

Assume no one in philosopher A’s office speaks French and no one in philosopher B’s office speaks English.

Assume that a translator and a secretary work at each philosopher’s office.

Somehow an agreement had to have been established between Philosopher A and B so that they can talk to each other.

Page 7: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Layering Example (Cont’d)

The contents of this agreement are the protocols of this communication link.

From these protocols, we will see that an assembly line is constructed at both Philosopher A’s office and Philosopher B’s office.

This assembly line will give us the protocol layers for this type of communication between philosophers.

Page 8: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Philosopher-Translator-Secretary Architecture

Location A Location B

Fax # --L: DutchDest: BIk houVankonijnen

L: DutchDest: BIk houVankonijnen

Fax # --L: DutchDest: BIk houVankonijnen

Fax Fax

L: DutchDest: BIk houVankonijnen

Dest: BI likerabbits

J’aimeleslapins

Secretary

Translator

PhilospherMessage

Information for the remotetranslator

Messagefor the remotesecretary

Page 9: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Examining Layering Example

This communication architecture has four layers, at each end of the communication link.

In the first layer, the philosopher generates a thought. He/she decides this thought should be conveyed to philosopher B (whose office may employ several philosophers).

He/she writes this thought on paper and indicates on it the “destination” of this message. He/she then sends it to a translator.

Page 10: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Examining Layering Example (Cont’d)

In the second layer, the translator looks at the destination of the message and realizes that the destination office does not speak English.

The translator then determines a common language between the two offices, Dutch.

He/she converts the philospher’s message to Dutch and adds a header to the message indicating that it has been converted to Dutch.

Page 11: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Examining Layer Example (Cont’d)

Note, the translator cares only about the conversion of the message, not its meaning.

In the third layer, the secretary takes the message (not caring about what language it is in or what it means) and determines the fax number of the destination office where philosopher B works.

He/she then faxes the message to the Philosopher B’s office fax number.

Page 12: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Examining Layer Example (Cont’d)

In the fourth layer, the fax machines communicate with each other.

They have their own “language” that carries data from source to destination.

The source and destination points are given to this lowest layer by the higher layers.

Page 13: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Example (Cont’d)

At the receiving end, reconstruction of philospher A’s thoughts begins with the receiving fax machine (the lowest layer).

The fax machine produces a document on which the destination fax number has been indicated.

This document is passed up to the third layer, where the secretary checks the correct fax number and then looks at the language indicator in the message.

Page 14: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Example (Cont’d)

Based on the language, the secretary passes the document to the correct translator (if there is more than one working at this office).

Once the document reaches the translator, it has passed up to the second layer at the destination.

Here, the translator looks at the message content and the destination philosopher’s name and determines that the message has to be translated into French.

Page 15: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Example (Cont’d)

The translator translates the message into French and then takes the document over to philosopher B’s desk.

Finally, the document reaches the top layer at the destination, i.e., the destination philosopher’s hands and can be read and understood.

Page 16: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Protocol Layers

This type of layered conversation also happens in computer/telecommunication networks.

Most of these networks operate on either a 4, 5 or 7 layer protocol stack.

Layer n on one host carries a “conversation” with layer n on another host.

Rules/conventions used in this conversation are collectively known as the layer n protocol.

Page 17: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Example of Information Flow in 5 Layer Protocol Network

M

MH4

M1 M2H3 H4H3

M1H3 H4H2 T2 M2H3H2 T2

M

MH4

M1 M2H3 H4H3

M1H3 H4H2 T2 M2H3H2 T2

5

4

3

2

1

SourceHost

DestinationHost

Laye

rs

Page 18: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Why do this?

This is an example of modular design.

Think of each layer as a module in the design of a communication system.

Basically, communication tasks are assigned to logically distinct modules, i.e., layers.

Page 19: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Why do this? (Cont’d)

Each layer performs a specific data communication function. We will review these tasks in a bit.

Interfaces between each layer allow each layer to communicate with the layers directly above and below it.

Each layer may also communicate with its peer layer on a remote computer/network device.

Page 20: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Why do this? (Cont’d)

By breaking up communication/computer systems into a series of tasks, components can be designed for each task.

As long as the components are designed to perform their specific task and co-exist with the layer above and below, they can be designed in any way.

In other words, how the task is implemented in the component is entirely up to the component designer.

Page 21: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Why do this? (Cont’d)

This way multiple vendors can design different components of a system and these components will work together.

In other words, network components become standardized and multiple vendors can be used to develop and support a communication/computer system.

Another benefit of layering: advances in technology that impact one layer can be easily integrated without impacting the design of the whole system (other layers do not need to redesigned).

Page 22: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Why do this? (Cont’d)

To see this, consider how roles and responsibilities get separated in real life – at a restaurant, one person may cook your dinner, another one serves it, and yet another washes dishes after you are done.

In this way, any one element can be replaced or altered without having a huge impact on the others.

Overall, layering helps tackle the design of complex

communication/computer networks.

It also helps in learning about such systems.

Page 23: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

How are Real Networks Layered?

The most popular model used to teach people about network protocols is the Open Systems Interface (OSI) Reference Model developed by the ISO.

This is a 7-layer system designed in 1970’s when designers encountered problem of incompatible computing components, i.e., IBM components would not work with Digital component, etc.

Goal of ISO was to create a reference model that would clearly define network functions and responsibilities, ultimately allowing different components to interconnect and communicate.

Page 24: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

How are Real Networks Layered? (Cont’d)

Today OSI is primarily a reference model; no practical implementation exists.

In reality most network protocol stacks tend to map the model roughly.

Protocol stack refers to the cumulative set of protocols that make up some n-layer model.

Page 25: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

How are Real Networks Layered? (Cont’d)

The Department of Defense model, developed in the 1970s for DARPA, is a 4-layer protocol stack that maps closely to current common internet protocols. It is based on a more "pragmatic" approach to networking than OSI. This model is called the TCP/IP Model.

Although developed at the same time, the TCP/IP model had more traction than the OSI model in real implementation.

Reason: more reliable implementations of TCP/IP were realized, TCP/IP was closely associated with Unix making it popular in academia, etc.

Page 26: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

OSI Protocol Stack vs TCP/IP Protocol Stack

Application

Transport (TCP, UDP)

Internet Protocol (IP)

Host toNetwork

TCP/IP

Physical

Data Link

Network

Transport

Session

Presentation

Application

OSI

Layers in each stack are known by name and number:

Layer 1

Layer 2

Layer 3

Layer 4

Layer 5

Layer 6

Layer 7

Layer 1

Layer 2

Layer 3

Layer 4

Page 27: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

More on Network Layering

The higher the layer number is the closer that component is to the end user input, i.e., user interacts with the application layer.

To remember OSI protocol stack: “All People Seem To Need Data Processing.”

When two computers communicate on a network, software at each layer on one computer assumes it is communicating with the same layer on the other computer.

Page 28: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

More on Network Layering (Cont’d)

For example, the Transport layer of one computer communicates with the Transport layer on the other computer.

The Transport layer on the first computer has no regard for how the communication actually passes through the lower layers of the first computer, across the physical media, and then up through the lower layers of the second computer.

Page 29: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

7-Layer Example: James Bond

James Bond meets Number One on the 7th floor of the spy headquarters building. Number One gives Bond a secret message that must get through to the US Embassy across town. (Application Layer)

Bond proceeds to the 6th floor where the message is translated into an intermediary language, encrypted and miniaturized. (Presentation Layer)

Bond takes the elevator to the 5th floor where Security checks the message to be sure it is all there and puts some checkpoints in the message so his counterpart at the US end can be sure he’s got the whole message. (Session Layer)

Page 30: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

7-Layer Example (Cont’d)

On the 4th floor, the message is analyzed to see if it can be combined with some other small messages that need to go to the US end. Also if the message was very large it might be broken into several small packages so other spies can take it and have it reassembled on the other end. (Transport Layer)

The 3rd floor personnel check the address on the message and determine who the addressee is and advising Bond of the fastest route to the Embassy. (Network Layer)

Page 31: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

7-Layer Example (Cont’d)

On the 2nd floor the message is put into a special courier pouch. It contains the message, the sender and destination ID. It also warns the recipient if other pieces are still coming. (Data Link Layer)

Bond proceeds to the 1st floor where Q has prepared the Aston Martin for the trip to the Embassy. (Physical Layer)

Page 32: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

7-Layer Example (Cont’d)

Bond departs for the US Embassy with the secret packet in hand. On the other end the process is reversed. Bond proceeds from floor to floor where the message is decoded.

The US Ambassador is very grateful the message got through safely.

"Bond, please tell Number One I’ll be glad to meet him for dinner tonight."

Page 33: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

7-Layer Example (Cont’d)

This example was provided by Lewis Technology (http://www.lewistech.com/rlewis/Resources/JamesBondOSI2.aspx).

It actually gives a fair description of the tasks assigned to each layer of the OSI protocol stack.

Page 34: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

OSI Protocol Stack “Humor”

The 7 layer model has often been extended in a humorous manner, to refer to non-technical issues or problems. A common joke is the 9 layer model, with layers 8 and 9 being the "financial" and "political" layers.

Network technicians will sometimes refer euphemistically to "layer-eight problems," meaning problems with an end user and not with the network.

Page 35: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

“Humor” (Cont’d)

Carl Malamud, in his book "Stacks," defines layers 8, 9, and 10 as "Money", "Politics", and "Religion".

The "Religion layer" is used to describe non-rational behavior and/or decision-making that cannot be accounted for within the lower nine levels. (For example, a manager who insists on migrating all systems to a Microsoft platform "because everyone else is doing it" is said to be operating in Layer 10.)

The OSI model has also sometimes been jokingly called the "Taco Bell model", since the restaurant chain has sometimes sold a 7 layer burrito.

Page 36: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Summary Thus Far

The tasks performed by computers/devices in a communication network are separated into “layers.”

This layering is an example of modular design which helps tackle the design of complex communication/computer networks.

It leads to standardization of network components, eases technology migration, and allows for multivendor development and support.

Page 37: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Recall

Recall data passed between systems in a communication network is referred to as a packet (collection of bits).

Packets contain the actual data (user data) being passed between devices as well as additional information (header/trailer) which contains things like source/destination address, error correction information, etc.

As data flows down the layers of the OSI stack, the various layers encapsulate it, usually adding header (or possibly trailer) information to it.

Page 38: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Data Moving Down Protocol Stack

M

MH4

M1 M2H3 H4H3

M1H3 H4H2 T2 M2H3H2 T2

Layer n

Layer n -1

Layer n - 2

Layer n - 3

Message(User Data)

And so on

Page 39: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

OSI Layering

So what exactly happens in each layer?

What tasks are each layer of the OSI stack responsible for?

We look at this next.

Page 40: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

But first,…

We stress that although we list the tasks of each OSI layer here, the way in which these tasks are implemented can vary.

In fact, several protocols have been developed over the years for each layer of the protocol stack. Many of these protocols have been standardized, i.e., made into consistent rules for how these tasks are conducted.

Vendors typically develop their products to be compatible with these standards.

Page 41: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Application Layer

Page 42: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Application Layer

The Application layer is the top layer of the OSI model, and is considered to be the place where users interact with the network.

This interaction usually occurs by running a program, such as a web browser or a spreadsheet application.

This layer doesn’t really worry about the network. Instead, it simply knows how to make a request for something (this is the user data), and then what to do with the reply (the user data that was requested).

Page 43: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Application Layer (Cont’d)

In the case of a user browsing a website, the client application (the web browser) makes a request that will be understood by the receiving application at the other end (the web server). This is sometimes referred to as program-to-program communication.

Other typical applications: email, ftp, www, etc.

This layer also converts data into a standard format that the other layers can understand. Other layers will be concerned with correctly encapsulating this standard data.

Page 44: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Application Layer Summary

Applications and users interact with the network at this layer.

Common examples of application layer programs and protocols include:

Email clients (SMTP,POP3,IMAP) Web browsers and servers (HTTP) File transfers (FTP)

For example, companies like google or yahoo develop their products to be consistent with these types of application protocols.

Page 45: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Presentation Layer

The Presentation layer is primarily responsible for data representation and formatting, ensuring that data can be viewed correctly.

These formats are sometimes referred to as the “data syntax” of the applications in use.

For example, different systems may use different schemes to represent data. While one system might use ASCII or EBCIDC, another might use UNICODE.

Page 46: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Presentation Layer (Cont’d)

Since these schemes contain different character possibilities, it is the responsibility of the Presentation layer to make sure they are displayed in the correct or common format between the client and the server.

The Presentation layer is also where data compression and encryption are generally considered to take place.

For example, encoding video in MPEG or QuickTime, graphics into JPEG or TIFF, sound into MIDI, etc.

Page 47: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Aside: What is Encoding?

We have already talked about one encoding method: using quantization to convert an analog signal to digital.

Quantization may not always be the most efficient way to convert analog signals (like voice, video, pictures, etc.) to digital.

Schemes like MPEG, JPEG, TIFF, WAV, etc. convert analogs information into compressed digital files.

The more compressed the digital file is the quicker it can be transported over a network.

Page 48: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Aside: What is Encryption?

When a digital will be transmitted over a network, it may be desirable to encrypt it to prevent any non-authorized party from reading or changing data.

The level of protection provided by encryption is determined by an encryption algorithm.

Later in the semester we will discuss encryption in greater detail.

Page 49: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Presentation Layer Summary

Layer responsible for data representation, formatting, compression, and encryption.

Common presentation layer protocols include: ASCII, EBCIDC, UNICODE, RTF. MPEG, AVI JPG, PNG, TIFF

Page 50: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Session Layer

The Session layer is responsible for the creation, management, and termination of sessions between systems.

A session is best described as a type of managed connection between systems for the purpose of a specific type of communication. For example, a session might be created for the purpose of user authentication, or to initiate a file transfer.

Page 51: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Session Layer (Cont’d)

The Session layer is also responsible for coordinating how the communication between systems takes place, which is known as dialog control.

In some sessions, only a single system is allowed to communicate at any point in time, referred to as half-duplex.

The Session layer would be responsible for determining whose turn it is in these situations, and for how long each system is allowed to communicate.

Page 52: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Session Layer (Cont’d)

In other cases, both systems can communicate at once, which is also known as full duplex.

If the communication stream were somehow interrupted, the Session layer would be responsible for recognizing this and re-establishing the session.

Page 53: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Session Layer Summary

Layer responsible for creation, management, and termination of sessions between systems.

Common Session Layer protocols include:

X Windows: Remote desktop sessions Structured Query Language (SQL): Local or

remote database queries. Remote Procedure Call (RPC): Client-Server

communication mechanism.

Page 54: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Transport Layer

Transport layer has three main responsibilities:

Data segmentation; Establishment of end-to-end connection between

hosts; and Flow control.

We describe each of these functions in greater detail.

Page 55: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Transport Layer: Data Segmentation

Transport layer divides data passed down into segments prior to passing them down the Network Layer.

Segmentation involves cutting up a big message into a numbered sequence of chunks, called segments, in which each chunk represents the maximum data payload that the network layer can handle between the sender and the receiver.

The network layer will use these segment to construct packets.

Page 56: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Data Segmentation (Cont’d)

With segmentation comes the responsibility of reassembly. At the receiving end, transport protocols also deal with reordering and reassembling segments so that it can pass the correct data format to the session layer above.

Page 57: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Transport Layer: Establishing End-to-End Reliable Connection

Transport layer’s job is to ensure reliable end-to-end transmission of data from sender to receiver.

The Transport layer often includes end-to-end error-detection and error-recovery data.

If data is received in error, the transport layer is also responsible for asking for retransmission.

Page 58: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Transport Layer: Flow Control

Flow control helps ensure that sending system does not transmit data at rates beyond what the receiving system can handle.

Most computers/communication devices reserve some amount of memory space as buffer to hold data that has been received more quickly than it can be processed.

Once buffer space fills, system runs risk of dropping additional data that it may receive.

Page 59: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Flow Control (Cont’d)

To account for this, Transport layer on receiving machine may send status information to sender, asking it to stop sending segments if buffer is full.

Once buffer is available, another message may be send to reinstate the transmission.

Once again, how this flow control is achieved depends on the specific transport protocol. Examples of transport protocols are TCP and UDP.

Page 60: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Transport Layer (Cont’d)

TCP: Transmission Control Protocol is the transport layer protocol used “on the internet.”

Actually, it is the transport protocol used to maintain a session between two different networks. Recall: the internet is a collection of networks.

It is possible for a session within a network, say a computer sending files to another computer on a local network, may use some other transport protocol even though the network is connected to the Internet.

Page 61: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

Transport Layer Summary

Layer responsible for data segmentation, establishment of end-to-end connection, and flow control.

Common Transport Layer Protocols:

TCP UDP (User Datagram Protocol)

Page 62: Network Protocols Profs. Chuah and Kishore EMC 165 Spring 2005 Lecture 6

References for Today’s Lecture

http://www.velsoft.com/advanced/ccna/module1.pdf

http://www.lewistech.com/rlewis/Resources/james.aspx

http://www.velsoft.com/advanced/ccna/module1.pdf

Bertsekas and Gallagher, Data Networks.