1 of 49

Module 6: Data Link Layer

Introduction to Networks v7.0 (ITN)

Rizoan Toufiq,

Assistant Professor,

Department of Computer Science & Engineering

Rajshahi University of Engineering & Technology.

1

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

2 of 49

Module Objectives

Module Title:

Data Link Layer

Module Objective:

Explain how media access control in the data link layer supports communication across networks.

2

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

3 of 49

Module Objectives

Section

Topic Title

Topic Objective

6.1

Purpose of the Data Link Layer

Describe the purpose and function of the data link layer in preparing communication for transmission on specific media.

6.2

Topologies

Compare the characteristics of media access control methods on WAN and LAN topologies.

6.3

Data Link Frame

Describe the characteristics and functions of the data link frame.

3

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

4 of 49

6.1 �Purpose of the Data Link Layer

4

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

4

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

5 of 49

Purpose of the Data Link LayerThe Data Link Layer

  • Responsible for communications between end-device Network Interface Cards (NIC).
  • Allows upper layer protocols to access the physical layer media and encapsulates Layer 3 packets (IPv4 and IPv6) into Layer 2 Frames.
  • Performs error detection and rejects corrupts frames.

5

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

6 of 49

Purpose of the Data Link LayerIEEE 802 LAN/MAN Data Link Sublayers

IEEE 802 LAN/MAN standards are specific to the type of network (Ethernet, WLAN, WPAN, etc).

The Data Link Layer consists of two sublayers:

      • Logical Link Control (LLC)
            • Communicates between the networking software at the upper layers and the device hardware at the lower layers.
      • Media Access Control (MAC).
            • The MAC sublayer is responsible for data encapsulation and media access control.

6

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

7 of 49

Purpose of the Data Link LayerIEEE 802 LAN/MAN Data Link Sublayers

7

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

8 of 49

Purpose of the Data Link LayerProviding Access to Media

Packets exchanged between nodes may experience numerous data link layers and media transitions.

At each hop along the path, a router performs four basic Layer 2 functions:

    • Accepts a frame from the network medium.
    • De-encapsulates the frame to expose the encapsulated packet.
    • Re-encapsulates the packet into a new frame.
    • Forwards the new frame on the medium of the next network segment.

8

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

9 of 49

Purpose of the Data Link LayerData Link Layer Standards

Data link layer protocols are defined by engineering organizations:

    • Institute for Electrical and Electronic Engineers (IEEE).
    • International Telecommunications Union (ITU).
    • International Organizations for Standardization (ISO).
    • American National Standards Institute (ANSI).

9

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

10 of 49

Check Your Understanding

Answer: (b)

10

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

11 of 49

Check Your Understanding

Answer: LLC, MAC

11

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

12 of 49

Check Your Understanding

Answer: Provide the method to get the frame on and off the media

12

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

13 of 49

Check Your Understanding

Answer:

Accepts a frame from medium

De-encapsulates the frame

Re-encapsulates the packet into a new frame

13

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

14 of 49

Check Your Understanding

Answer:

Media Sharing, Topology

14

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

15 of 49

Check Your Understanding

Answer: IEEE

15

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16 of 49

6.2 �Topologies

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

16

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

17 of 49

TopologiesPhysical and Logical Topologies

The topology of a network is the arrangement and relationship of the network devices and the interconnections between them.

There are two types of topologies used when describing networks:

    • Physical topology – shows physical connections and how devices are interconnected.
    • Logical topology – identifies the virtual connections between devices using device interfaces and IP addressing schemes.

17

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

18 of 49

TopologiesPhysical and Logical Topologies

Physical topology

18

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

19 of 49

TopologiesPhysical and Logical Topologies

Logical topology

19

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

20 of 49

TopologiesWAN Topologies

There are three common physical WAN topologies:

                • Point-to-point
                • Hub and spoke
                • Mesh

20

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

21 of 49

TopologiesWAN Topologies

There are three common physical WAN topologies:

    • Point-to-point – the simplest and most common WAN topology. Consists of a permanent link between two endpoints.

21

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

22 of 49

TopologiesWAN Topologies

There are three common physical WAN topologies:

    • Hub and spoke – similar to a star topology where a central site interconnects branch sites through point-to-point links.

22

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

23 of 49

TopologiesWAN Topologies

There are three common physical WAN topologies:

    • Mesh – provides high availability but requires every end system to be connected to every other end system.

23

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

24 of 49

TopologiesPoint-to-Point WAN Topology

  • Physical point-to-point topologies directly connect two nodes.
  • The nodes may not share the media with other hosts.
  • Because all frames on the media can only travel to or from the two nodes, Point-to-Point WAN protocols can be very simple.

24

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

25 of 49

TopologiesLAN Topologies

  • End devices on LANs are typically interconnected using a star or extended star topology.
  • Star and extended star topologies are
                • easy to install,
                • very scalable and
                • easy to troubleshoot.

25

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

26 of 49

TopologiesLAN Topologies

Early Ethernet and Legacy Token Ring technologies provide two additional topologies:

    • Bus – All end systems chained together and terminated on each end.
    • Ring – Each end system is connected to its respective neighbors to form a ring.

26

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

27 of 49

Half-duplex communication

    • Only allows one device to send or receive at a time on a shared medium.
    • Used on WLANs and legacy bus topologies with Ethernet hubs.

TopologiesHalf and Full Duplex Communication

27

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

28 of 49

Full-duplex communication

    • Allows both devices to simultaneously transmit and receive on a shared medium.
    • Ethernet switches operate in full-duplex mode.

TopologiesHalf and Full Duplex Communication

28

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

29 of 49

Contention-based access

All nodes operating in half-duplex, competing for use of the medium. Examples are:

      • Carrier sense multiple access with collision detection (CSMA/CD) as used on legacy bus-topology Ethernet.
      • Carrier sense multiple access with collision avoidance (CSMA/CA) as used on Wireless LANs.

Controlled access

    • Deterministic access where each node has its own time on the medium.
    • Used on legacy networks such as Token Ring and ARCNET.

TopologiesAccess Control Methods

29

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

30 of 49

Contention-based access

TopologiesAccess Control Methods

30

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

31 of 49

Controlled access

TopologiesAccess Control Methods

31

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

32 of 49

CSMA/CD

    • Used by legacy Ethernet LANs.
    • Operates in half-duplex mode where only one device sends or receives at a time.
    • Uses a collision detection process to govern when a device can send and what happens if multiple devices send at the same time.

CSMA/CD collision detection process:

      • Devices transmitting simultaneously will result in a signal collision on the shared media.
      • Devices detect the collision (the signal amplitude is higher than normal on the media).
      • Devices wait a random period of time and retransmit data.

TopologiesContention-Based Access – CSMA/CD

32

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

33 of 49

CSMA/CA

    • Used by IEEE 802.11 WLANs.
    • Operates in half-duplex mode where only one device sends or receives at a time.
    • Uses a collision avoidance process to govern when a device can send and what happens if multiple devices send at the same time.

CSMA/CA collision avoidance process:

    • When transmitting, devices also include the time duration needed for the transmission.
    • Other devices on the shared medium receive the time duration information and know how long the medium will be unavailable.

TopologiesContention-Based Access – CSMA/CA

33

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

34 of 49

Check Your Understanding

Answer: Logical topology

34

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

35 of 49

Check Your Understanding

Answer: WAN

35

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

36 of 49

Check Your Understanding

Answer: Extended star

36

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

37 of 49

Check Your Understanding

Answer: Half-duplex

37

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

38 of 49

Check Your Understanding

Answer: CSMA/CD

38

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

39 of 49

6.3 �Data Link Frame

39

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

39

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

40 of 49

Data Link FrameThe Frame

  • Data is encapsulated by the data link layer with a header and a trailer to form a frame.
  • A data link frame has three parts:
                  • Header
                  • Data
                  • Trailer
  • The fields of the header and trailer vary according to data link layer protocol.
  • The amount of control information carried with in the frame varies according to access control information and logical topology.

40

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

41 of 49

Data Link FrameFrame Fields

Field

Description

Frame Start and Stop

Identifies beginning and end of frame

Addressing

Indicates source and destination nodes

Type

Identifies encapsulated Layer 3 protocol

Control

Identifies flow control services

Data

Contains the frame payload

Error Detection

Used for determine transmission errors

41

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

42 of 49

Data Link FrameLayer 2 Addresses

  • Also referred to as a physical address.
  • Contained in the frame header.
  • Used only for local delivery of a frame on the link.
  • Updated by each device that forwards the frame.

42

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

43 of 49

Data Link FrameLayer 2 Addresses

43

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

44 of 49

Data Link FrameLAN and WAN Frames

The logical topology and physical media determine the data link protocol used:

    • Ethernet
    • 802.11 Wireless
    • Point-to-Point (PPP)
    • High-Level Data Link Control (HDLC)
    • Frame-Relay

Each protocol performs media access control for specified logical topologies.

44

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

45 of 49

Check Your Understanding

Answer: Header, trailer

45

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

46 of 49

Check Your Understanding

Answer: To determine whether the frame experienced transmission errors

46

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

47 of 49

Check Your Understanding

Answer: Des NIC add, Sou NIC Add, Sou IP Add, Des IP Add

47

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

48 of 49

Check Your Understanding

Answer: 802.11, Ethernet, PPP

48

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential

49 of 49

49

© 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential