ddl and physical layer

93
The Data Link Layer Chapter 2 1/4/2017 Mr Satyendra Mohan, JIT Barabanki 1

Upload: satyendra-mohan

Post on 13-Apr-2017

100 views

Category:

Engineering


1 download

TRANSCRIPT

Page 1: DDL and Physical Layer

The Data Link Layer

Chapter 2

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 1

Page 2: DDL and Physical Layer

Data Link Layer Design Issues

• Services Provided to the Network Layer• Framing• Error Control• Flow Control

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 2

Page 3: DDL and Physical Layer

Functions of the Data Link Layer

• Provide service interface to the network layer• Dealing with transmission errors• Regulating data flow• Slow receivers not swamped by fast senders

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 3

Page 4: DDL and Physical Layer

Functions of the Data Link Layer

Relationship between packets and frames.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 4

Page 5: DDL and Physical Layer

Services Provided to Network Layer

(a) Virtual communication.(b) Actual communication.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 5

Page 6: DDL and Physical Layer

Services Provided to Network Layer

Placement of the data link protocol.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 6

Page 7: DDL and Physical Layer

Framing

A character stream. (a) Without errors. (b) With one error.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 7

Page 8: DDL and Physical Layer

Framing

(a) A frame delimited by flag bytes.(b) Four examples of byte sequences before and after stuffing.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 8

Page 9: DDL and Physical Layer

Framing

Bit stuffing(a) The original data.(b) The data as they appear on the line.(c) The data as they are stored in receiver’s memory after destuffing.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 9

Page 10: DDL and Physical Layer

Error Detection and Correction

• Error-Correcting Codes• Error-Detecting Codes

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 10

Page 11: DDL and Physical Layer

Error-Correcting Codes

Use of a Hamming code to correct burst errors.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 11

Page 12: DDL and Physical Layer

Error-Detecting Codes

Calculation of the polynomial code checksum.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 12

Page 13: DDL and Physical Layer

Elementary Data Link Protocols

• An Unrestricted Simplex Protocol• A Simplex Stop-and-Wait Protocol• A Simplex Protocol for a Noisy Channel

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 13

Page 14: DDL and Physical Layer

Sliding Window Protocols

• A One-Bit Sliding Window Protocol• A Protocol Using Go Back N• A Protocol Using Selective Repeat

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 14

Page 15: DDL and Physical Layer

Sliding Window Protocols

A sliding window of size 1, with a 3-bit sequence number.(a) Initially.(b) After the first frame has been sent.(c) After the first frame has been received.(d) After the first acknowledgement has been received.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 15

Page 16: DDL and Physical Layer

A One-Bit Sliding Window Protocol

Two scenarios for protocol 4. (a) Normal case. (b) Abnormal case. The notation is (seq, ack, packet number). An asterisk indicates where a network layer accepts a packet.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 16

Page 17: DDL and Physical Layer

A Protocol Using Go Back N

Pipelining and error recovery. Effect on an error when(a) Receiver’s window size is 1.(b) Receiver’s window size is large.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 17

Page 18: DDL and Physical Layer

A Sliding Window Protocol Using Selective Repeat

(a) Initial situation with a window size seven.(b) After seven frames sent and received, but not acknowledged.(c) Initial situation with a window size of four.(d) After four frames sent and received, but not acknowledged.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 18

Page 19: DDL and Physical Layer

Protocol Verification

• Finite State Machined Models• Petri Net Models

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 19

Page 20: DDL and Physical Layer

Finite State Machined Models

(a) State diagram for protocol 3. (b) Transmissions.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 20

Page 21: DDL and Physical Layer

Example Data Link Protocols

• HDLC – High-Level Data Link Control• The Data Link Layer in the Internet

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 21

Page 22: DDL and Physical Layer

High-Level Data Link Control

Frame format for bit-oriented protocols.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 22

Page 23: DDL and Physical Layer

High-Level Data Link Control

Control field of (a) An information frame.(b) A supervisory frame.(c) An unnumbered frame.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 23

Page 24: DDL and Physical Layer

The Data Link Layer in the Internet

A home personal computer acting as an internet host.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 24

Page 25: DDL and Physical Layer

PPP – Point to Point Protocol

The PPP full frame format for unnumbered mode operation.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 25

Page 26: DDL and Physical Layer

PPP – Point to Point Protocol

A simplified phase diagram for bring a line up and down.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 26

Page 27: DDL and Physical Layer

PPP – Point to Point Protocol

The LCP frame types.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 27

Page 28: DDL and Physical Layer

The Medium Access ControlSublayer

Chapter 3

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 28

Page 29: DDL and Physical Layer

The Channel Allocation Problem

• Static Channel Allocation in LANs and MANs• Dynamic Channel Allocation in LANs and MANs

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 29

Page 30: DDL and Physical Layer

Dynamic Channel Allocation in LANs and MANs

1. Station Model.

2. Single Channel Assumption.

3. Collision Assumption.

4. (a) Continuous Time.(b) Slotted Time.

5. (a) Carrier Sense.(b) No Carrier Sense.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 30

Page 31: DDL and Physical Layer

Multiple Access Protocols• ALOHA• Carrier Sense Multiple Access Protocols• Collision-Free Protocols• Limited-Contention Protocols• Wavelength Division Multiple Access Protocols• Wireless LAN Protocols

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 31

Page 32: DDL and Physical Layer

Pure ALOHA

In pure ALOHA, frames are transmitted at completely arbitrary times.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 32

Page 33: DDL and Physical Layer

Pure ALOHA

Vulnerable period for the shaded frame.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 33

Page 34: DDL and Physical Layer

Pure ALOHA

Throughput versus offered traffic for ALOHA systems.1/4/2017 Mr Satyendra Mohan, JIT Barabanki 34

Page 35: DDL and Physical Layer

Persistent and Nonpersistent CSMA

Comparison of the channel utilization versus load for various random access protocols.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 35

Page 36: DDL and Physical Layer

CSMA with Collision Detection

CSMA/CD can be in one of three states: contention, transmission, or idle.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 36

Page 37: DDL and Physical Layer

Collision-Free Protocols

The basic bit-map protocol.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 37

Page 38: DDL and Physical Layer

Collision-Free Protocols

The binary countdown protocol. A dash indicates silence.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 38

Page 39: DDL and Physical Layer

Limited-Contention Protocols

Acquisition probability for a symmetric contention channel.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 39

Page 40: DDL and Physical Layer

Adaptive Tree Walk Protocol

The tree for eight stations.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 40

Page 41: DDL and Physical Layer

Wavelength Division Multiple Access Protocols

Wavelength division multiple access.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 41

Page 42: DDL and Physical Layer

Wireless LAN Protocols

A wireless LAN. (a) A transmitting. (b) B transmitting.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 42

Page 43: DDL and Physical Layer

Wireless LAN Protocols

The MACA protocol. (a) A sending an RTS to B.(b) B responding with a CTS to A.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 43

Page 44: DDL and Physical Layer

Ethernet• Ethernet Cabling• Manchester Encoding• The Ethernet MAC Sublayer Protocol• The Binary Exponential Backoff Algorithm• Ethernet Performance• Switched Ethernet• Fast Ethernet• Gigabit Ethernet• IEEE 802.2: Logical Link Control• Retrospective on Ethernet1/4/2017 Mr Satyendra Mohan, JIT Barabanki 44

Page 45: DDL and Physical Layer

Ethernet Cabling

The most common kinds of Ethernet cabling.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 45

Page 46: DDL and Physical Layer

Ethernet Cabling

Three kinds of Ethernet cabling. (a) 10Base5, (b) 10Base2, (c) 10Base-T.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 46

Page 47: DDL and Physical Layer

Ethernet Cabling

Cable topologies. (a) Linear, (b) Spine, (c) Tree, (d) Segmented.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 47

Page 48: DDL and Physical Layer

Ethernet Cabling (4)

(a) Binary encoding, (b) Manchester encoding, (c) Differential Manchester encoding.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 48

Page 49: DDL and Physical Layer

Ethernet MAC Sublayer Protocol

Frame formats. (a) DIX Ethernet, (b) IEEE 802.3.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 49

Page 50: DDL and Physical Layer

Ethernet MAC Sublayer Protocol

Collision detection can take as long as 2 .

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 50

Page 51: DDL and Physical Layer

Ethernet Performance

Efficiency of Ethernet at 10 Mbps with 512-bit slot times.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 51

Page 52: DDL and Physical Layer

Switched Ethernet

A simple example of switched Ethernet.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 52

Page 53: DDL and Physical Layer

Fast Ethernet

The original fast Ethernet cabling.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 53

Page 54: DDL and Physical Layer

Gigabit Ethernet

(a) A two-station Ethernet. (b) A multistation Ethernet.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 54

Page 55: DDL and Physical Layer

Gigabit Ethernet

Gigabit Ethernet cabling.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 55

Page 56: DDL and Physical Layer

IEEE 802.2: Logical Link Control

(a) Position of LLC. (b) Protocol formats.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 56

Page 57: DDL and Physical Layer

Wireless LANs

• The 802.11 Protocol Stack• The 802.11 Physical Layer• The 802.11 MAC Sublayer Protocol• The 802.11 Frame Structure• Services

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 57

Page 58: DDL and Physical Layer

The 802.11 Protocol Stack

Part of the 802.11 protocol stack.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 58

Page 59: DDL and Physical Layer

The 802.11 MAC Sublayer Protocol

(a) The hidden station problem.(b) The exposed station problem.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 59

Page 60: DDL and Physical Layer

The 802.11 MAC Sublayer Protocol

The use of virtual channel sensing using CSMA/CA.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 60

Page 61: DDL and Physical Layer

The 802.11 MAC Sublayer Protocol

A fragment burst.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 61

Page 62: DDL and Physical Layer

The 802.11 MAC Sublayer Protocol

Interframe spacing in 802.11.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 62

Page 63: DDL and Physical Layer

The 802.11 Frame Structure

The 802.11 data frame.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 63

Page 64: DDL and Physical Layer

802.11 Services

• Association• Disassociation• Reassociation• Distribution• Integration

Distribution Services

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 64

Page 65: DDL and Physical Layer

802.11 Services

• Authentication• Deauthentication• Privacy• Data Delivery

Intracell Services

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 65

Page 66: DDL and Physical Layer

Broadband Wireless• Comparison of 802.11 and 802.16• The 802.16 Protocol Stack• The 802.16 Physical Layer• The 802.16 MAC Sublayer Protocol• The 802.16 Frame Structure

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 66

Page 67: DDL and Physical Layer

The 802.16 Protocol Stack

The 802.16 Protocol Stack.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 67

Page 68: DDL and Physical Layer

The 802.16 Physical Layer

The 802.16 transmission environment.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 68

Page 69: DDL and Physical Layer

The 802.16 Physical Layer

Frames and time slots for time division duplexing.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 69

Page 70: DDL and Physical Layer

The 802.16 MAC Sublayer Protocol

Service Classes• Constant bit rate service• Real-time variable bit rate service• Non-real-time variable bit rate service• Best efforts service

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 70

Page 71: DDL and Physical Layer

The 802.16 Frame Structure

(a) A generic frame. (b) A bandwidth request frame.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 71

Page 72: DDL and Physical Layer

Bluetooth

• Bluetooth Architecture• Bluetooth Applications• The Bluetooth Protocol Stack• The Bluetooth Radio Layer• The Bluetooth Baseband Layer• The Bluetooth L2CAP Layer• The Bluetooth Frame Structure

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 72

Page 73: DDL and Physical Layer

Bluetooth Architecture

Two piconets can be connected to form a scatternet.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 73

Page 74: DDL and Physical Layer

Bluetooth Applications

The Bluetooth profiles.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 74

Page 75: DDL and Physical Layer

The Bluetooth Protocol Stack

The 802.15 version of the Bluetooth protocol architecture.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 75

Page 76: DDL and Physical Layer

The Bluetooth Frame Structure

A typical Bluetooth data frame.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 76

Page 77: DDL and Physical Layer

Data Link Layer Switching• Bridges from 802.x to 802.y• Local Internetworking• Spanning Tree Bridges• Remote Bridges• Repeaters, Hubs, Bridges, Switches, Routers, Gateways• Virtual LANs

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 77

Page 78: DDL and Physical Layer

Data Link Layer Switching

Multiple LANs connected by a backbone to handle a total load higher than the capacity of a single LAN.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 78

Page 79: DDL and Physical Layer

Bridges from 802.x to 802.y

Operation of a LAN bridge from 802.11 to 802.3.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 79

Page 80: DDL and Physical Layer

Bridges from 802.x to 802.y

The IEEE 802 frame formats. The drawing is not to scale.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 80

Page 81: DDL and Physical Layer

Local Internetworking

A configuration with four LANs and two bridges.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 81

Page 82: DDL and Physical Layer

Spanning Tree Bridges

Two parallel transparent bridges.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 82

Page 83: DDL and Physical Layer

Spanning Tree Bridges

(a) Interconnected LANs. (b) A spanning tree covering the LANs. The dotted lines are not part of the spanning tree.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 83

Page 84: DDL and Physical Layer

Remote Bridges

Remote bridges can be used to interconnect distant LANs.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 84

Page 85: DDL and Physical Layer

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) Which device is in which layer.(b) Frames, packets, and headers.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 85

Page 86: DDL and Physical Layer

Repeaters, Hubs, Bridges, Switches, Routers and Gateways

(a) A hub. (b) A bridge. (c) a switch.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 86

Page 87: DDL and Physical Layer

Virtual LANs

A building with centralized wiring using hubs and a switch.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 87

Page 88: DDL and Physical Layer

Virtual LANs

(a) Four physical LANs organized into two VLANs, gray and white, by two bridges. (b) The same 15 machines organized into two VLANs by switches.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 88

Page 89: DDL and Physical Layer

The IEEE 802.1Q Standard

Transition from legacy Ethernet to VLAN-aware Ethernet. The shaded symbols are VLAN aware. The empty ones are not.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 89

Page 90: DDL and Physical Layer

The IEEE 802.1Q Standard

The 802.3 (legacy) and 802.1Q Ethernet frame formats.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 90

Page 91: DDL and Physical Layer

Summary

Channel allocation methods and systems for a common channel.

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 91

Page 92: DDL and Physical Layer

References

[1] A. S. Tanenbaum, “Computer Network”, Pearson Education

[2] Forouzen, “Data Communication and Networking”, TMH

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 92

Page 93: DDL and Physical Layer

1/4/2017 Mr Satyendra Mohan, JIT Barabanki 93