Lecture 19

21
Data Communications & Networking Lecture-19 Course Instructor : Sehrish Rafiq Department Of Computer Science University Of Peshawar

Transcript of Lecture 19

Page 1: Lecture 19

Data Communications & Networking Lecture-19

Course Instructor : Sehrish Rafiq

Department Of Computer Science

University Of Peshawar

Page 2: Lecture 19

DATA LINK LAYER

Page 3: Lecture 19

Data Link Layer

Page 4: Lecture 19

Data Link LayerThe data link layer lies between the network layer and the

physical layer in the internet model.

The data link layer is responsible for carrying a packet from one hop(computer or router) to the next hop.

The data link layer has local responsibilty but the network layer has global responsibility.

The journey through LAN or a WAN(between two nodes) must preserve the integrity of the packet.

Page 5: Lecture 19

Data Link LayerIf the packet is corrupted during the transmission it must either

corrected or retransmitted.Access to LAN or a WAN for the sending of data is also an issue.If several computers or routers are connected to a common

medium(link) and more than one want to send data at the same time,which has the righrt to send?

What is the access method?

Page 6: Lecture 19

Duties of Data Link Layer

Page 7: Lecture 19

Packetizing/ FramingThe data link layer is responsible for moving data from one hop to

the next hop.The data must pass through a LAN or a WAN,each of which has

its own protocols.The packet coming from the upperlayer must therefore be

encapsulated by the appropriate packet defined by the data link layer of the underlying LAN or WAN.

Different protocols have different names for the packet at the data link layer.

Most LANs refer to packet as a frame.The ATM WAN refers to a packet as a cell.

Page 8: Lecture 19

AddressingWe need one addressing mechanism at the data link layer.

The data link layer addresses are called physical addresses or MAC addresses.

MAC addresses are used to find the address of the next hop in hop-to-hop delivery.

The physical addresses used by a LAN is totally different from that used by WAN.

Page 9: Lecture 19

Error controlIn data communications errors are inevitable.Using better equipment and more reliable transmission media

may reduce the severity or the frequency of occurrence but it can never eliminate errors.

Networks must be able to transfer data from one device to another with complete accuracy.

In hop to hop delivery error detection and correction is the responsibilty of data link layer.

Page 10: Lecture 19

Flow control

Another responsibility of the data link layer is flow control.In most protocols flow control is a set of procedures that tells the

sender how much data can it transmit before it must wait for an acknowledgement from the receiver.

The flow of data must not be allowed to overwhelm the receiver.The receiving device must be able to inform the sending device

before som limit is reached and request that the transmitting device send fewer frames or stop temporarily.

Page 11: Lecture 19

Media Access controlWhen computers use a shared medium there must be a method to

control access to the medium at any moment.

To prevent this conflict or collision on a network there is a need for medium access control method.

This method defines the procedure a computer follows when it needs to send a frame or frames.

Page 12: Lecture 19

Error detection and correction

Page 13: Lecture 19

Error detection and correction

Networks must be able to transfer data from one device to another with complete accuracy.

A system that cannot guarantee that data received by one device are identical to the data transmitted by another device is essentially useless.

Because any time data are transmitted from one node to next, they can become corrupted in the passage.

Reliable systems must have a mechanism for detecting and correcting such errors.

Page 14: Lecture 19

Types of errorsWhenever bits flow from one point to another they are

subjected to unpredictable changes because of interference.This interference can change the shape of a signal.Single-Bit Error: Only one bit of a data unit is changed.Burst Error: Multiple bits are changed.

Page 15: Lecture 19

Single bit error

Page 16: Lecture 19

Burst error

Page 17: Lecture 19

Single Bit Error in serial transmission

Single-bit errors are the least likely type of error in serial data transmission.

Suppose: A sender sends data at 1 Mbps. This means that the bit duration is 1 micro sec. For a single bit error to occur the noise must have a duration of 1

micro sec which is very rare.

Page 18: Lecture 19

Single bit error in parallel transmission

A single bit error can occur if we are sending data using parallel transmission.

Suppose: 8 wires are used to send all 8 bits of 1 byte at the same time one of the wires is noisy, one bit can be corrupted in each

byte.

Page 19: Lecture 19

Burst ErrorThe term burst error means that two or more bits in the data

unit have changed.The burst error does not necessarily mean that errors occur

in consecutive bits.The length of a burst is measured from the first corrupted bit

to the last corrupted bit. Some bits in between may not have been corrupted.

Page 20: Lecture 19

Burst error in serial transmission

Burst error is most likely to occur in serial transmission.The duration of noise is normally longer than the duration of

one bit.Which means that when noise affects data, it affects a set of

bits.The number of bits affected depends on the data rate and

duration of noise.

Page 21: Lecture 19

Have Nice time at home!!!