26
ISO Layer Model Lecture 9 October 16, 2000

ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Embed Size (px)

Citation preview

Page 1: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

ISO Layer Model

Lecture 9

October 16, 2000

Page 2: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

The Need for Protocols

Multiple hardware platforms need to have the ability to communicate.

Writing communications code in this instance is non-portable (platform-dependent).

Protocols provide a high-level interface method to the communications medium.

The protocol itself is a set of rules by which the software and hardware must follow in order to communicate properly.

Page 3: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Need for Protocols (cont.)

Multiple types of protocols exist. RS-232 is form of a protocol in the sense that strict

rules must be followed for communication to occur between devices.

Network protocols cover almost all communications between two or more computers.

– Transferring an ASCII file– Point-to-point encryption

Page 4: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Protocol Suites

A single, all-encompassing protocol is not only inefficient, but also wasteful on CPU, memory resources.

Programmers have created smaller suites which provide the rule sets for communication within that protocol.

The suites are also divided into smaller pieces, called layers.

Page 5: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

The ISO Layer Model

Page 6: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Why the Layer Model?

It is simple to visualize how software interacts with hardware.

Topmost layer is closest to the user. Bottom layer is the furthest away from the user.

Page 7: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Layer Breakdown

Layer 1: Physical– The physical network hardware, medium.

Layer 2: Data Link– How data is organized into frames, and how to

transmit those frames. Byte/bit stuffing, checksums. Layer 3: Network

– How addresses are assigned, and how packets are transmitted from one end of the network to the other.

Page 8: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Layer Breakdown (cont.)

Layer 4: Transport– How to reliably transfer data.

Layer 5: Session– How to start sessions (connections) with remote devices,

machines. (Sockets) Layer 6: Presentation

– How to represent data. Does int, char replacements. Layer 7: Application

– How one user-level program requests a connection to another machine, and how the machine responds.

Page 9: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Protocol Stacks

The protocol is divided into modules. Each module corresponds to a different level in

the layer model. All of the modules put together is the “stack.” Theoretically, a given module can only

communicate with the module above and below it.

Page 10: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Stack Examples

Page 11: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Communication With Stacks

Page 12: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Stack Interaction

Because the stack dictates how computers communicate, machines utilizing one type of stack cannot communicate with a machine running another type of stack.

Netware v. TCP/IP But machines can concurrently run more than

one stack!

Page 13: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Layering

At each level where the packet is processes, additional information beyond the actual data is added or removed.

At the Layer 2, a checksum is added before being sent to Layer 1.

When the Layer 2 of the receiving machine receives the packet, it strips off the header and the checksum footer.

Page 14: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

A Layered Frame

Page 15: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Protocol Dependent Information

The previous picture is a general idea. Some protocols specify that all additional

information must be appended instead of prepended, etc.

Page 16: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Layering Overhead

Because the sending computer adds information to the frame, the receiving machine must undo the changes before the frame is passed to the next layer.

Because layers must undo changes that the counterpart creates, code for the other layers can be independently created and updated without affecting the other layers!

Page 17: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Data At Each Layer

Page 18: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Protocol Optimization Techniques

Protocols utilize different methods depending on the focus and goal of the protocol.

Sequencing– To avoid out-of-order delivery– To avoid duplicate packets

Packet Retransmission– When a packet is received, an ACK is sent back. If

the ACK isn’t received by the transmitter, packet is resent. (Bound by time.)

Page 19: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Optimization Techniques (cont.)

Avoiding Excessive Delay– Each transmission is assigned an ID. Packets must

contain a valid ID to be accepted for a given “conversation.” p. 213

Flow Control to Avoid Overrun– Machines do no communicate at the same rate.– Sliding Window method.

Page 20: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

The Sliding Window

The sliding window concept greatly increases protocol throughput.

All packets in a given “window” are sent sequentially, without waiting for an immediate ACK.

Once all packets in a window have been sent, transmitter waits for all ACKs to be received before continuing on to next window.

Page 21: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications
Page 22: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications
Page 23: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Network Congestion

If a single computer sends, no congestion on network link.

If more than one computer sends, packet queuing must occur, so some congestion exists.

Page 24: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Network Congestion (cont.)

If congestion persists over time, packets fill the switch’s memory, and will begin to be discarded.

Retransmission can fix this problem, but if the congestion still exists when the retransmission occurs, those packets will also be discarded.

This scenario is called congestion collapse.

Page 25: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Avoiding Congestion

If a switch is having congestion, send a message back to the sender informing them of the congestion.

Packet loss as an estimate of congestion. Rate control

– Temporary rate reduction– Sliding window size reduction

Page 26: ISO Layer Model Lecture 9 October 16, 2000. The Need for Protocols Multiple hardware platforms need to have the ability to communicate. Writing communications

Protocol Design

Flow control vs. congestion control– Flow control sends more packets to improve

throughput– Congestion control reduces the number of packets

Sequence number– Too small, miscommunication, confusion– Too big, wasted bandwidth, overhead