72
7/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrum Room 5B18 Tel: 90 366364 voice mail on 6 th ring Email: [email protected] Web site: http://www.eej.ulst.ac.uk Lecture 6: Network Software and Bus Structures and the Data Link Areas

7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

Embed Size (px)

Citation preview

Page 1: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

7/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/1/72

COM342Networks and Data Communications

Ian McCrum Room 5B18

Tel: 90 366364 voice mail on 6th ring

Email: [email protected]

Web site: http://www.eej.ulst.ac.uk

Lecture 6: Network Software and Bus Structures and the Data Link Areas

Page 2: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/2/72

Network Software• An important component of any network is the software that

controls communication.

• Such software can be very complicated. Breaking the software into distinct modules helps simplify its design and enables reusability.– Consider that we want to write software to allow us to transfer a

file from one computer to another.

– One way is to write a single program that includes a windows interface, the file transfer protocols and the software for interacting with the network hardware

– This is a lot of code and chances are that it will take a long time to debug this program.

– A more sensible approach is to use an existing (and well tested) network access module.

Page 3: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/3/72

Services and Protocols• A service is a set of primitives that a layer provides to

the layer above it, the service defines what operations the layer will perform but not how. A service relates to the interface between the two layers.

• A protocol is a set of rules governing the format and meaning of the frames, packets or messages which are exchanged by peer entities. Entities use protocols to implement their service definitions, they can change them so long as the service seen by user remains unchanged.

Page 4: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/4/72

Principles of layers• a layer should be created where a different level of

abstraction is required.

• Each layer should perform a well defined function

• The function of each layer should be chosen with an international perspective.

• The layer boundaries chosen so that information flow across interfaces is minimised.

• pragmatic in the choice of number of layers.

Page 5: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/5/72

Network Software Modules

• The Network Access Module performs all the tricky network communications stuff, thus simplifying the implementation of the file transfer program.

• Furthermore, if the Network Access Module on a different network has the same interface, then your file transfer program will work on that network too.

File Transfer Program

Network Access Module

File Transfer Program

Network Access Module

Computer A Computer B

Communications Subnet

•The file transfer program can call upon the services of the Network Access Module.

Page 6: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/6/72

Network Software Modules

• Now the file transfer program calls upon the services of the Transport Module, which in turn calls upon the services of the Network Access Module.

Transport Module Transport Module

File Transfer Program

Network Access Module

File Transfer Program

Network Access Module

Computer A Computer B

Communications Subnet

•The Network Access Module will only provide a raw data transmission service. If some data is corrupted, it is still left to the file transfer program to send a request for the data to be retransmitted.•There is no reason why we couldn’t have a module that did this for us. Let us call this the Transport Module.

Page 7: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/7/72

Peers

• In a logical sense, each module effectively talks to its peer using the same type of protocol data units (PDUs).– The file transfer programs talk to each other by sending each other

Application Protocol Data Units.– Similarly, the Transport Modules talk to each other by sending each

other Transport Protocol Data Units that encapsulate the APDUs.

Transport Layer Transport Layer

Application

Network Access

Application

Network Access

Computer A Computer B

Communications Subnet

A_Send(dest.host,dest.SAP,APDU)

T_Send(dest.host,TPDU)

Data

APDU

SAP APDU

TPDU

HOST TPDU

NPDU

SEQ

CRC

CTL

•Each module has a counterpart in the other computer. These counterparts are sometimes called peers.

Page 8: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/8/72

The Open Systems Interconnection Model

• Each layer has a different level of abstraction.

• Each layer performs a well defined function.

• Layers require minimum data flow across the boundaries.

• Designed to encourage international protocol standards.

Physical Layer

PPDU

APDU

SPDU

TPDU

Packet

Frame

PDU used

Bit

Host B

Data Link Protocol

Network Protocol

Presentation Layer

Application Layer

Session Layer

Transport Layer

Network Layer

Data Link Layer

Physical Layer

Presentation Layer

Application Layer

Session Layer

Transport Layer

Network Layer

Data Link Layer

Host A

Session Protocol

Presentation Protocol

Transport Protocol

Physical Protocol

Application Protocol

Sending Process Receiving ProcessData

•Further modularization brings helps to simplify the design of network software more. The OSI model has 7-layers.

Page 9: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/9/72

1. The Physical Layer

• The Physical Layer performs bit by bit transmission of the frames given to it by the Data Link Layer.

• The specifications of the Physical Layer include:

– Mechanical and electrical interfaces

– Sockets and wires used to connect the host to the network

– Voltage levels uses (e.g. -5V and +5V)

– Encoding techniques (e.g. Manchester encoding)

– Modulation techniques used (e.g. square wave)

– The bit rate and the baud rate.

Data Link Layer

Physical Layer

Link

Page 10: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/10/72

2. The Data Link Layer

• The Data Link Layer tries to make the potentially unreliable transmission of frames appear to be reliable.

• The Data Link Layer deals with:

– Inserting and extracting Network Packets into/from frames

– Adding error checking information to frames. checking received frames for errors

– Sending requests for frames to be retransmitted if they are found to contain errors. Also responding to such requests

– Ensuring the Network Layer receives data in the order in which it was sent over the link

– Frame synchronisation

– Flow Control over the link

Physical Layer

Data Link Layer

Network Layer

Page 11: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/11/72

3. The Network Layer

• The Network Layer controls the operation of the local part of the network.

• The Network Layer:– Examines packets given to it by the Data Link Layer to see if they are

destined for this host or should be forwarded to another host– Decides on the best way to route packets destined for other hosts– Performs accounting tasks (such as counting the number of packets to

determine congestion levels)– Performs protocol conversions when packets are routed over different

types of networks

Data Link Layer

Network Layer

Transport Layer

Page 12: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/12/72

4. The Transport Layer

• The Transport Layer controls the delivery of data between two hosts.

• The Transport Layer:

– Fragments data streams from multiple sessions into packet sized portions and passes them to the Network Layer

– Reassembles data streams from data in packets given to it by the Network Layer

– Ensures delivery of data streams to appropriate sessions

– Performs host-to-host flow control to ensure data does not arrive faster than the host can cope with

Network Layer

Transport Layer

Session Layer

Page 13: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/13/72

5. The Session Layer

• The Session Layer maintains a logical connection between two processes.

• The Session Layer:

– Performs dialogue control functions and token management to keep track of who is to transmit data next

– Synchronisation functions (e.g. inserting checkpoints into data stream so that communication can be resumed from the last checkpoint after a failure)

• There may be multiple sessions (i.e. one for each communicating process).

Transport Layer

Session Layer

Presentation Layer

Page 14: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/14/72

6. The Presentation Layer

• The Presentation Layer performs data representation and syntax conversions.

• The Presentation Layer:

– Enables cross-platform communication by converting data representations (strings, integers, floating-point numbers etc.) to and from network standard formats

• Example: the sending host uses the EBDIC character set and the receiving host uses ASCII. The Presentation Layer in the sending host takes the EBDIC code and coverts it to Unicode. The Presentation Layer in the receiving host gets the Unicode and coverts it to ASCII.

Session Layer

Presentation Layer

Application Layer

Page 15: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/15/72

7. The Application Layer

• The Application Layer provides an interface to a range of high-level network services used by the communicating process.

• Access to application services is through a set of calls to routines in a communications library.

– There are routines for identifying a host, determining if that host is available for communication and establishing a connection

– Data is typically sent and received in the same way as writing or reading to and from a file

– There may also be routines for handling e-mail and file transfers

Presentation Layer

Application Layer

Process

Page 16: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/16/72

The Communicating Process

• The process provides the user interface and makes use of the routines provided by the Application Layer to perform communication.

• The communicating process is not considered to be part of the OSI 7-layer model.

• The process can just use the services provided by the Application Layer or it can implement its own high-level protocols that it can send and receive using the routines provided by the Application Layer.

– Of course, if a process does implement its own high-level protocol then the process with which it is communicating must be able to understand that protocol too.

Page 17: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/17/72

Connection-Oriented v.s. Connectionless

• A network layer may offer one (or sometimes both) of two types of service to the layer above it:

• A connection-oriented service views PDUs as being part of an on-going conversation between hosts.– Successive PDUs arrive in the order they were sent.– Received PDUs are usually acknowledged.– Damaged or lost PDUs are usually retransmitted (to produce an

apparently reliable connection).• A connectionless service views each PDU as a separate entity.

– Successive PDUs may not arrive in order.– Received PDUs are not usually acknowledged.– Damaged or lost PDUs are not usually retransmitted.

Page 18: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/18/72

The Network Dependent Layers

• The lowest three layers of the OSI 7-layer model are network dependent meaning that they will be different for different typesof network.

• The layers above the network layer are network independent meaning that the software from the transport layer upwards can be moved from one network to another and still work.

– In the case of IEEE 802 networks, even the Network Layers can be the same since the Data Link Layers in these networks use a common interface called Logical Link Control (LLC).

Data Link Layer

Physical Layer

Link

Network Layer

Page 19: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/19/72

Page 20: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/20/72

Examples of Bus Structures

Repeater

Integrated tap / transceiver unit

Terminator

Page 21: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/21/72

Examples of Bus Structures• Segments of a bus (limited length due to

propagation) are linked by repeaters.• A repeater is an amplifier which regenerates the

signals coming into it and passes them on (bi-directional) thus has no concept of data contents.

• Thus the overall size of network can be extended.• Easy to implement, no security, no

acknowledgement, broadcasts possible• What imposes an upper limit on the distance to be

connected using repeaters?

Page 22: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/22/72

A more complex example

Terminator

Page 23: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/23/72

Example of bridges

Bridge

Page 24: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/24/72

Bridges

• Check incoming data for errors so that only error free frames are forwarded.

• Only allows data to be forwarded when their destination address is different from segment from which they were received.

• Thus only communications within a segment do not flood across the rest of the network.

Page 25: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/25/72

Bridges

• Advantages

• Total number of segments can increase. As can stations

• Can interconnect different LANs

• Possible to mix different protocols on different segments

• Easier to manage large networks and improve security.

• Partitioning can increase reliability, availability.

• Disadvantages

• As store and forward entire frames - introduces small delays

• can become overloaded with high traffic rates.

• Calculation of new check sequences.

Page 26: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/26/72

Ring Topology

“Talker”data

Destination

ACK

Interface

Page 27: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/27/72

Ring

• Data travels uni-directionally. (x counter rotating rings)

• The data passes through each station’s interface, each bit is read and retransmitted towards next station.

• Interface recognises data destined for its station by its address and only passes that data up.

• Size of ring is determined by the physical extent, propagation speed and number of stations.

• Can be large in extent but adjacent node separation must not exceed a maximum distance.

Page 28: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/28/72

Ring access methods

• Token Passing Rings– A token is a permission to transmit, must wait until it is

received before talking.

– Data circulates to destination and then to originator acting as an acknowledgement.

• Slotted Rings– mini-packets circulate, similar to carriages on a train,

whenever one marked empty is received data can be inserted, it is then stripped off by originator.

• A monitor is required.

Page 29: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/29/72

Star and hub

The medium now consists of the interconnecting cables andthe hub itself. Another device will require more cable. Considered to be more reliable when cable faults are contemplated.

Page 30: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/30/72

Structured wiring

• Busses seriously damaged whenever severed - two small segments and no termination– Multiple segments make them more robust.

• Rings die when severed, unless counter-rotating ring is employed to loop back.

• Star looses the petal that was severed, but hub failure is disastrous.

Page 31: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/31/72

Topological Ring with physical star appearance

Page 32: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/32/72

Star shapes

• Petals with few stations organised as a star but still topologically a ring.– Under failure conditions a petal can be isolated and worked upon,

while remainder work usually.

• This structure is employed in LANs where each single station is connected to a Multi-station Access Unit and the network exists within the unit.

Page 33: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/33/72

Standards• Medium Access Control

– IEEE 802.3 CSMA/CD ISO 8802.3

– IEEE 802.4 Token Bus ISO 8802.4

– IEEE 802.5 Token Ring ISO 8802.5

• Bridges and Repeaters

• Where are each used to best advantage?

Page 34: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/34/72

IEEE 802 protocol set

802.2

802.3 802.4 802.5

Transmission medium

Network layer

Datalink

Physical

ISOReferenceModel

Logical Link Control

Medium AccessControl

Physical

Layers

Network

Page 35: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/35/72

IEEE 802.3 CSMA/CD• Carrier Sense Multiple Access / Collision Detect

– Ethernet• 10 Base 5 ( 10Mbps baseband signalling 0.5in diameter cable

maximum segment length of 500m)

– Cheapernet• 10 Base 2 ( 10Mbps baseband signalling 0.25in diameter cable

maximum segment length of 200m)

– Starlan• 10 Base T ( 10Mbps baseband signalling unshielded twisted

pair cable drop cables circa 100m)

Page 36: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/36/72

IEEE 802.5 Token Ring

• Token Ring– slower rings 1 or 4 Mbits/s– faster rings 16 Mbits/s

• Operates employing a Token made up of Start Delimiter, Access Control and End Delimiter

• A Station wishing to transmit claims the token by changing a bit in the access control field indicating busy and inserted data at the end of this field.

• The frame rotates through the destination, marking status and is removed by originator.

Page 37: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/37/72

IEEE 802.4 Token Bus• Token Bus

– 5/10 Mbits/s

– Broadband / Carrierband • logical 1 uses 1 cycle of bit frequency

• logical 0 uses 2 cycles of 2 * bit frequency– enables noise filtering unlike baseband

• This is a logical ring even though implemented upon a physical bus

• A station holding the token can send a number of frames of data, and listens immediately after for ack

• Priority is possible and utilises target hold timers and target token rotation time

Page 38: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/38/72

1500m Ethernet configurationRepeater

Integrated tap / transceiver unit

Terminator

Page 39: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/39/72

Rules• Between any two stations there should be a maximum of 3

segments with stations attached.

• Two point to point links of 500m or one of 1000m may fall within the path between two stations also.

• Thus the maximum distance possible between two stations is 2500m

• 100 taps max per 500m segment

• 1024 nodes maximum in total configuration

Page 40: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/40/72

2500m Ethernet configuration

Point to Point links

Page 41: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/41/72

Interface

Tap

Transceiver Unit

Drop cable

MAC Unit

Protocol control firmware

Page 42: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/42/72

Transceiver schematicData

Collision detector

Collision detector

Jabber control

Jabber control

Control

Data

Control

Tra

nsce

iver

cab

le

Power

Page 43: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/43/72

Jabber control

• A faulty device could continuously transmit random data on to the cable (jabber)

• this would corrupt all other transmissions

• the jabber control will isolate the transmit data path from the cable if certain predefined limits are exceeded. (maximum frame length violation)

Page 44: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/44/72

Time Budget total round trip propagation delay

2,500m at 0.66c = 2 * 2,500m / (3x108 m/s *0.66)= 25 x10-6selectronics and transceiver cables=20 x10-6sTotal = 45 x10-6sequivalent of 450bits at 10Mbpssafety margin brings it up to 512 bits for a minimum frame

size or 51.2x10-6sthis ensures that a remote station which has started to transmit, whose transmission is corrupted at the latest possible time will recognise the collision has happened before it stops transmitting.

Page 45: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/45/72

Multiple Segment Ethernet

Backbone Segment

Page 46: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/46/72

Bridge to extend overall LAN length

A bridge can be considered to be a “forward if not local” device

Page 47: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/47/72

Bridge operation

• receives all frames broadcast on the connected LAN

• are considered to be transparent as they only process data-link layer (MAC) addresses. Forward any variety of upper layer protocols.

• As each frame is received the source address is checked and entered in a table of known local nodes

• A bridge can force responses from local nodes to elicit their addresses so that they can be noted.

• Thus only frames whose destination addresses that are not in the table are forwarded.

Page 48: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/48/72

Bridge use

• Can separate overloaded segments to relieve congestion

• can be used to extend overall length since 2,500m no longer applies.

• Can translate between different networks ie Ethernet to token ring or media UTP to fibre.

• Limitations– should a non-local node be many LANs and bridges away all intervening

stations will RX frames

– non-existent addresses can be flooded onto all bridged LANs

– thus cannot support multiple paths

Page 49: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/49/72

Data Link Protocols

• Typically the Network Layer passes packets to the Data Link Layer. The Data Link Layer encapsulates the packets in frames and gives the frames to the Physical Layer for transmission.

Physical Layer

Data Link Layer

Physical Layer

Link

Network Layer

Data Link Layer

Network Layer

Device A Device B

•A data link protocol is the set of rules used to send data over an individual link from one host to the next.

–Data link protocols vary from simple asynchronous transmission to reliable sophisticated frame based communications.

Page 50: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/50/72

Data Link Protocols• The algorithm that controls the data link protocol resides

in the Data Link Layer.

• It makes use of various function calls in order to interact with the layers above and below it.

wait_for_event(event_type *event)

from_physical_layer(frame *f)

to_physical_layer(frame *f)

from_network_layer(packet *p)

to_network_layer(packet *p)

–Halt process until event occurs (event code passed back).–Pass up received frame.–Send frame.–Pass down data packet.–Send packet to Network Layer.

Page 51: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/51/72

General Functions

• There are a number of other useful functions:

start_timer(seq_num k)

start_ack_timer(void)

stop_timer(seq_num k)

disable_network_layer(void)

stop_ack_timer(void)

enable_network_layer(void)

inc(k)

–Start countdown to timeout event k (timeout period is a system parameter).–Stop timer k.–Start countdown to ack_timeout event.–Stop countdown to ack_timeout event.–Forbids network_layer_ready events.–Allow network_layer_ready events.–Add 1 to k unless MAX_SEQ, in which case reset k to 0

Page 52: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/52/72

The Frame Structure

– There can be three kinds of frame: data_frame, ack_frame and nak_frame. The last two types do not carry data.

– For data frames, the packet of data passed down from the Network Layer is put in the data field of the frame structure.

– In order to make sure that the packets are reassembled in the right order, a sequence number is placed in the seq field of each frame.

– For reliable communications, it is important that correctly received frames are acknowledged. The sequence numbers of correctly received frames go into the ack field of the frame structure.

frame_kind kind seq_num seq seq_num ack packet data

•The format of the frame structure typically looks something like this:

Page 53: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/53/72

An Unrestricted Simplex Protocol

– We start off by defining the datastructures we need to store thepacket and frame data.

– We get a packet from thenetwork layer and place it inthe data field of the frame structure.

– Lastly, we pass the frame tothe physical layer fortransmission.

– Then we do it all over again.

define:frame spacket p

from_network_layer(&p)

start

s.data = p

to_physical_layer(&s)

•Here is a simple algorithm for sending data over a noise free link. We are assuming that there is no transit delay and that the destination host has infinite buffer space.

Page 54: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/54/72

An Unrestricted Simplex Protocol

– Once again, we start by definingthe various data structures weneed to hold the data.

– Then we go into a loop inwhich we wait for a framearrival event.

– When it happens, we get theframe from the physical layer.

– We then pass it up to the network layer.

– Then we wait for the next frame.

define:frame r

event_type event

wait_for_event(&event)

start

from_physical_layer(&r)

to_network_layer(&r.data)

•Here is a simple algorithm for sending data over a noise free link. We are assuming that there is no transit delay and that the destination host has infinite buffer space.

•Data is only sent in one direction using this protocol. The data is received by the destination host which uses the following algorithm:

Page 55: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/55/72

A Simple Stop-and-Wait Protocol

– We need to be able to tell the sending host to pause until the receiving host is ready. This is called flow control.

– The destination host still worksthe same way except it nowsends an empty frame backto the sending host.

– This empty frame is used totell the sending host that thereceiving host is ready to acceptanother frame.

define:frame r,s

event_type e

wait_for_event(&e)

start

from_physical_layer(&r)

to_network_layer(&r.data)

to_physical_layer(&s)

•The network layer in the receiving host may not always have enough buffer space to cope with all the frames .

Page 56: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/56/72

A Simple Stop-and-Wait Protocol

– The algorithm works in exactlythe same way as the firstsimplex algorithm except it nowwaits for an empty frame sentback from the receiving host.

– Only when the empty framearrives will the sending hostsend another frame.

define:frame spacket p

event_type e

from_network_layer(&p)

start

s.data = p

to_physical_layer(&s)

wait_for_event(&e)

The sending host now only sends one frame at a time. It will not send another frame until it gets an empty frame back from the receiving host.

Page 57: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/57/72

A Simple Protocol for a Noisy Channel

• Things become tricky when we take noise into account. Noise can damage the data in frames. This is usually discovered when the frame checksum (FCS) is tested.

– For simplicity, we will assume that the frame checksums will automatically be checked on arrive and if an error is discovered then it will generate a chksum_err event.

• Each frame is given a sequence number (either 0 or 1). The sequence number alternatives for successive frames.

– When a frame is correctly received, its sequence number is acknowledged by sending it back in the ack field of an empty frame.

– When a frame is incorrectly received, no acknowledgement is sent back and the sender times out.

Page 58: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/58/72

A Simple Protocol for a Noisy Channel

– The sequence number of the first frame is setto 0.

– It is transmitted and then a timer is started.– Sometimes a frame may be completely lost so

there may be nothing to acknowledge.– If no acknowledgement is received by the

timea timeout event occurs, the sender assumesthat its frame was lost completely and resendsit.

– If an acknowledge is received but has thewrong sequence number, the sender assumesthat its frame was not received and resends it.

– If an acknowledge is received and the sequencenumber is correct, the sender sends the nextframe (with a new sequence number).

start_timer(n)

e==frame_arrival

yes

no

frame s,rpacket p

event_type eseq_num n

from_physical_layer(&r)

start

s.data = p

to_physical_layer(&s)

wait_for_event(&e)

MAX_SEQ=1n=0

from_network_layer(&p)

r.ack==n

yes

no

s.seq = n

from_network_layer(&p)

inc(n)

Page 59: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/59/72

A Simple Protocol for a Noisy Channel

• The algorithm for the receiving host lookslike this:– The receiving host waits for a frame

arrival.– If the frame was damaged, it waits for

the sending host to timeout and sendthe frame again.

– If the frame is correct then it gets theframe and checks its sequence number.

– If the sequence number is correct thenthe packet is passed to the network layerand an acknowledgement is sent back tothe sender.

– If the sequence number is wrong, thewrong sequence number is sent back.

e==frame_arrival

yes

no

frame s,revent_type eseq_num n

from_physical_layer(&r)

start

MAX_SEQ=1n=0

wait_for_event(&e)

r.seq==n

yes

no

to_network_layer(&r.data)

inc(n)

s.ack=1-n

to_physical_layer(&s)

Page 60: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/60/72

Timeout• Sometimes frames can be damaged by noise so much

that they are lost completely.– We cannot assume that any frame (that includes

acknowledgement frames) will arrive.

– If an acknowledgement for a particular frame does not arrive back in a reasonable time, the sender should assume the worst case scenario - that it’s data never made it to the receiving host.

– By a reasonable time, we usually mean the time it would normally take to send a frame and receive an acknowledgement (twice the transit delay plus a small margin of safety to allow for the time it takes for a whole frame to be received and processing time).

– After this time, the sender should retransmit the frame.

Page 61: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/61/72

Timeout

tim

e

HostA

HostB

Send Frame

ACK

2TransitDelay + a safety margin

HostA

HostB

FrameLost

Re-sendFrame

•The timeout mechanism can be shown using a time sequence diagram:

–Left: sender successfully sends frame and receives an acknowledgement.–Right: frame is lost in transit. No acknowledgement arrives back in a reasonable time so frame is retransmitted.

Page 62: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/62/72

Duplex Communication

– f frames are travelling in both directions anyway, it makes sense to piggyback acknowledgements on these frames.

– This saves the overhead involved in sending separate frames just to carry an acknowledgement.

– Of course, if no frames are due to be sent back, we will have no choice but to send back a separate acknowledgement frame.

Host A Host B

DataHeader ACK

Data Header

•The protocols we have seen so far just send data in one direction. Of course, data will usually flow in both directions.

Page 63: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/63/72

Sliding Windows Protocol

• To keep track of the frames we use a technique called sliding windows.– Both sending and receiving hosts maintain a range of

sequence numbers called a window.– The sender sends only the frames with sequence

numbers in its window. The window can only move on when the first sequence number in the window has been acknowledged.

– The receiver only receives frames with sequence numbers in its window (any other frames are ignored). Its window can only move on when it receives the frame with the first sequence number in its window.

• The sliding window technique restricts the number of frames that can be outstanding, which is good for flow control.

Page 64: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/64/72

Sliding Windows Protocol

• Here is what happens if we have a 3-bit sequence number and a window size of 1 on both sender and receiver:

0

1

2

34

5

6

7 0

1

2

34

5

6

7 0

1

2

34

5

6

7 0

1

2

34

5

6

7

0

1

2

34

5

6

7 0

1

2

34

5

6

7 0

1

2

34

5

6

7 0

1

2

34

5

6

7

Sending Frame

Sending ACK

Waiting for Frame 0

GettingFrame 0

Got Frame 0,Waiting for

Frame 1

Waiting for Frame 1

No Frame to send

Got Frame 0 to send

Waiting for Frame 0 ACK

Got ACK for Frame 0

Page 65: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/65/72

Sequence Numbers• Sequence numbers usually occupy a field with a limited

number of bits in the frame format.– We do not want to have sequence numbers that are too

large because we will waste valuable bandwidth.– The number of sequence numbers needs to be at least one

greater than the size of the largest window intended to be used (a sliding window protocol can only work reliably if there is at least one sequence number outside the window!).

– Because sequence numbers occupy a whole number of bits, the range of sequence numbers is usually 0 to 2m-1 where m is the number of bits used.

– For example, we could have a 1-bit sequence number. This will be enough for a sliding window protocol with window size 1.

Page 66: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/66/72

One-bit Sliding Window Protocol

• This algorithm works as both sender andreceiver.

– Sequence numbers are either 0 or 1.

– Packets are put in the frame structure alongwith its sequence number and the sequencenumber of the last frame to be acknowledged.

– The frame is sent and the timer started.

– If a new frame arrives, check to see if itssequence number is in the window.

– If not, then ignore its contents.

– Check the acknowledgement field and ifit acknowledges the last frame we sentthen advance our window.

– If any problems, re-send our last frameotherwise send the next frame.

e==frame_arrivalno

start

frame s,revent_type eseq_num n,m

packet p

MAX_SEQ=1m=n=0

from_network_layer(&p)

s.data=ps.seq=n

s.ack=1-m

to_physical_layer(&s)

start_timer(s.seq)

yes

from_physical_layer(&r)

r.seq==mno

yes

to_network_layer(&r.data)inc(m)

r.ack==n

yes

from_network_layer(&p)inc(n)

no

wait_for_event(&e)

Page 67: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/67/72

Long Transit Delays• The one-bit sliding window protocol will work fine over short half-

duplex links.

• It is not so good over links with long transit delays. Imagine a link that uses a geo-stationary satellite:

– The data rate is 50-kbps.

– The round-trip delay is 500msec(that’s half a second).

– If we used the 1-bit slidingwindow protocol to send1000-bit frames, thereceiver will receive the whole frame 270msec later.

– The acknowledgement will take a further 250msec to get back. Out of 520msec, data is only being sent for 20msec.

– Only 20/520 = 4% of the link’s capacity is being utilised.

Satellite

AntennaUp link

Down Link

Ground Station

Page 68: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/68/72

Long Transit Delays

• Rather than wasting so much channel capacity, a protocol can be designed to send enough frames to keep the link working at full capacity.

– Rather than just allowing one outstanding frame (like the one-bit sliding window protocol does) we can allow up to 26 outstanding frames (enough to fill the 520msec round-trip delay period).

– The sliding window of the sender need only be enlarged to 26. To accommodate this, a 5-bit (0-31) sequence number would be most suitable.

– With a sliding window size of 26, up to 26 frames and acknowledgements can be in transit at any time.

– The real question is: “What happens when a frame is damaged during transit?”

Page 69: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/69/72

Go Back n

0 1

0

2

1

Ack 0

3

E

Ack 1

4

D

5

D

2

D

Timeout interval

2

Ack 2

5

3

Ack 3

6

4

Ack 4

73 4

time

•One approach is to discard the damaged frame and all the frames that follow it.–Eventually the sender will realise it has not received an acknowledgement for the damaged frame within the timeout period. The sender will then retransmit the damaged frame and all the frames that follow it.

–The above time sequence diagram shows what happens when an erroneous frame (E) is received. All following frames are discarded (D) until the new copy of the erroneous frame is received.

Page 70: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/70/72

Go Back n• The main advantage of go back n is that the receiver only needs to

maintain enough buffer space for one frame at a time.

– Packets must be passed up to the Network Layer in the order in which they were sent by the Network Layer in the source host. Only one packet needs to be stored at a time since the frames will always arrive in the correct order.

• To implement the go back n, the sliding window of the receiver is set to 1 (i.e. different from the sliding window of the sender).

– With a sliding window size of 1, the receiver will only accept the frame with the next expected frame sequence number. When a frame is damaged, the next expected frame sequence number remains the same.

Page 71: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/71/72

Selective Repeat• Go back n can waste a lot of link capacity by re-sending frames

that arrived perfectly the first time.

– If a link is particularly noisy, this waste can significantly reduce the link’s throughput.

• With selective repeat, only those frames that are damaged are re-sent. Undamaged frames are stored until they can be passed (in the correct order) to the Network Layer.

– The receiver must have enough buffer space available to potentially store all the outstanding frames from the receiver.

– Much less of the link’s capacity is wasted since only the damaged frames are retransmitted and the rest of the time the link can carry useful data.

Page 72: 7/11/12 ian/modules/COM342/COM342_L6.ppt L6/1/72 COM342 Networks and Data Communications Ian McCrumRoom 5B18 Tel: 90 366364 voice

07/11/12 www.eej.ulster.ac.uk/~ian/modules/COM342/COM342_L6.ppt L6/72/72

Selective Repeat

– The selective repeat protocol can be implemented by setting the receiver sliding window size to more than 1 (usually it is set to the same size as the sender’s sliding window).

0 1

0

2

1

Ack 0

6

E

Ack 1

75 2

Timeout interval

2

Ack 5

8

6

Ack 6

9

7

Ack 7

103 4

time

3

Ack 1

4

Ack 1

5

Ack 1

–Frames may arrive at the destination out of order. This means that the Data Link Layer is responsible for ordering them before sending the packets they contain to the Network Layer.