EX 1 Chapter07 DataLink Layer TonyChen

download EX 1 Chapter07 DataLink Layer TonyChen

of 49

Transcript of EX 1 Chapter07 DataLink Layer TonyChen

  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    1/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE I Chapter 6 1

    Data Link Layer

    Network Fundamentals

    Chapter 7

    Modified by Tony Chen

    01/30/2009

    http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    2/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 2

    Notes:

    If you see any mistake on my PowerPoint slides or ifyou have any questions about the materials, pleasefeel free to email me at [email protected].

    Thanks!

    Tony Chen

    College of DuPage

    Cisco Networking Academy

    mailto:[email protected]:[email protected]:[email protected]://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    3/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 3

    Objectives

    Learning Objectives Upon completion of this chapter, you will be

    able to:

    Explain the role of Data Link layer protocolsin data transmission.

    Describe how the Data Link layer preparesdata for transmission on network media.

    Describe the different types of media accesscontrol methods.

    Identify several common logical networktopologies and describe how the logicaltopology determines the media accesscontrol method for that network.

    Explain the purpose of encapsulatingpackets into frames to facilitate media

    access. Describe the Layer 2 frame structure and

    identify generic fields.

    Explain the role of key frame header andtrailer fields, including addressing, QoS, typeof protocol, and Frame Check Sequence.

    http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    4/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 4

    Connecting to Upper Layer Services The Data Link layer provides a means for

    exchanging data over a common local media.

    The Data Link layer performs two basicservices:

    Allows the upper layers to access the mediausing techniques such as framing

    Controls how data is placed onto the media and

    is received from the media using techniques suchas media access control and error detection

    The Data Link layer is responsible for theexchange of frames between nodes over themedia of a physical network:

    Frame - The Data Link layer PDU

    Node - The Layer 2 notation for network devicesconnected to a common medium

    Media/medium (physical) - The physical meansfor the transfer of information between two nodes

    Network (physical) - Two or more nodesconnected to a common medium

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    5/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 5

    Connecting to Upper Layer Services The Data Link layer provides services to support the

    communication processes for each medium over which datais to be transmitted.

    At each hop along the path, an intermediary device - such asrouter - accepts frames from a medium, decapsulates the frame,and then forwards the packet in a new frame appropriate to themedium of that segment.

    Imagine a data conversation between two hosts, such as a

    PC in Paris with an Internet server in Japan.Although the two hosts may be communicating with their peerNetwork layer protocols (IP for example)

    In this example, as IP packet travels from PC to laptop,

    it will be encapsulated into Ethernet frame,

    decapsulated,and then encapsulated into a new data link frame tocross the satellite link.

    For the final link, the packet will use a wireless data link frame fromthe router to the laptop.

    As packet is received and directed to upper layer protocol,in this case IPv4, that does not need to be aware of whichmedia the communication will use.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    6/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 6

    Controlling Transfer across Local Media Layer 2 protocols specify the encapsulation of a packet into a

    frame and the techniques for getting the encapsulated packet on

    and off each medium.The technique used for getting the frame on and off media is calledthe media access control method.

    For the data to be transferred across a number of different media,different media access control methods may be required during thecourse of a single communication.

    For example, the device (such as PC or laptop) would use theappropriate NIC to connect to the LAN media.

    The NIC manages the framing and media access control.

    At intermediary devices such as a router,

    Different physical interfaces on the router are used to encapsulate thepacket into the appropriate frame.

    The router has an Ethernet interface to connect to the LAN and aserial interface to connect to the WAN.

    As the router processes frames, it uses Data Link layer to receive theframe from medium, decapsulate it to the Layer 3 PDU, re-encapsulatethe PDU into a new frame, and place the frame on the medium of thenext link of the network.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    7/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 7

    Creating a Frame Data Link layer protocols require control information

    to enable the protocols to function:Which nodes are in communication with each other

    When communication between individual nodes beginsand when it ends

    Which errors occurred while the nodes communicated

    Which nodes will communicate next

    The Data Link layer prepares a packet for transportacross the local media by encapsulating it with aheader and a trailer to create a frame.

    Header - Contains control information, such asaddressing, and is located at the beginning of the PDU

    Data - The packet from the Network layer

    Trailer - Contains control information added to the endof the PDU

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    8/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 8

    Creating a Frame When data travels on the media, it is converted into a

    stream of bits, or 1s and 0s. If a node is receivinglong streams of bits, how does it determine where aframe starts and stops or which bits represent theaddress? Typical field types include:

    Start and stop indicator fields - The beginning and endlimits of the frame

    Naming or addressing fieldsType field - The type of PDU contained in the frame

    Quality control fields

    A data field -The frame payload (Network layer packet)

    Fields at the end of the frame form the trailer. Thesefields are used for error detection and mark the end ofthe frame.

    Not all protocols include all of these fields. Thestandards for a specific Data Link protocol define theactual frame format.

    Examples of frame formats will be discussed at the end

    of this chapter.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    9/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 9

    Connecting Upper Layer Services to the Media

    The Data Link layer exists as a connecting layer

    between the software processes of the layersabove it and the Physical layer below it.

    In many cases, the Data Link layer is embodiedas a physical entity, such as an Ethernet NIC

    The NIC is not solely a physical entity.

    Software associated with the NIC enables the NICto perform its intermediary functions of preparingdata for transmission and encoding the data assignals to be sent on the associated media.

    It prepares the Network layer packets fortransmission across some form of media, be it

    copper, fiber, or the atmosphere.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    10/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 10

    Data Link Sublayers Separating the Data Link layer into sublayers

    allows for one type of frame defined by theupper layer to access different types of mediadefined by the lower layer.

    The Data Link layer is often divided into twosublayers.

    Logical Link Control (The upper sublayer)

    defines the software processes that provideservices to the Network layer protocols.

    Logical Link Control (LLC) places information in theframe that identifies which Network layer protocol isbeing used for the frame.

    This information allows multiple Layer 3 protocols,such as IP and IPX, to utilize the same networkinterface and media.

    Media Access Control (The lower sublayer)defines the media access processes performed bythe hardware.

    Media Access Control (MAC) provides Data Link layeraddressing and delimiting of data according to the physicalsignaling requirements of the medium and the type of DataLink layer protocol in use.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    11/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 11

    Standards The functional protocols and services at the Data Link layer

    are described by engineering organizations (such as IEEE,ANSI, and ITU) and communications companies.

    Unlike TCP/IP suite, Data Link layer protocols are generally notdefined by Request for Comments (RFCs).

    Engineering organizations set public and open standards andprotocols.

    Engineering organizations that define open standards and

    protocols that apply to the Data Link layer include:

    International Organization for Standardization (ISO)

    Institute of Electrical and Electronics Engineers (IEEE)

    American National Standards Institute (ANSI)

    International Telecommunication Union (ITU)

    Data Link layer processes occur both in software andhardware.

    The protocols at this layer are implemented within the electronicsof the NIC with which the device connects to the physical network.

    Unlike the upper layer protocols, which are implemented mostlyin software such as the host operating system or specificapplications,

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    12/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 12

    Placing Data on the Media Regulating the placement of data frames onto the media

    is known as media access control.

    These media access control techniques define if and howthe nodes share the media.

    For example: Traffic can enter the road by merging, bywaiting for its turn at a stop sign, or by obeying signallights. A driver follows a different set of rules for eachtype of entrance. .

    The method of media access control used depends:

    Media sharing

    If and how the nodes share the media

    Shared or non-shared

    Topology

    How the connection between the nodes appears to theData Link layer

    Point-to-point

    Multi-access

    Ring

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    13/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 13

    Media Access Control forShared Media There are 2 media access control methods for

    shared media:1. Controlled - Each node has its own time to usethe medium

    When using the controlled access method, networkdevices take turns, in sequence, to access themedium.

    This method is also known as scheduled access ordeterministic.

    Although controlled access is well-ordered,deterministic methods can be inefficient because adevice has to wait for its turn before it can use themedium.

    For example: Token Ring

    2. Contention-based -All nodes compete for theuse of the medium

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    14/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 14

    Media Access Control forShared Media There are 2 media access control methods for shared

    media:

    2. Contention-based -All nodes compete for the use of themedium

    Also referred to as non-deterministic methods

    It allow any device to try to access the medium whenever ithas data to send.

    Contention-based media access control methods do not have

    the overhead of controlled access methods.

    Carrier Sense Multiple Access/Collision Detection(CSMA/CD).

    The device monitors the media for the presence of a data signal. Ifa data signal is absent, indicating that the media is free, the devicetransmits the data.

    If signals are then detected that show another device was

    transmitting at the same time, all devices stop sending and try againlater.

    Traditional forms of Ethernet use this method.

    CSMA/Collision Avoidance (CSMA/CA),

    the device examines the media for the presence of a data signal. Ifthe media is free, the device sends a notification across the mediaof its intent to use it.

    This method is used by 802.11 wireless networking.Note: CSMA/CD will be coveredin more detail in Chapter 9.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    15/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 15

    Media Access Control forNon-Shared Media

    Media access control protocols for non-shared

    media require little before placing frames onto themedia.

    Such is the case for point-to-point topologies.

    In point-to-point topologies, the media interconnectsjust two nodes.

    Therefore, Data Link layer protocols have little to dofor controlling non-shared media access.

    Full Duplex and Half Duplex

    Half-duplex communication

    Means that the devices can both transmit and receive on

    the media but cannot do so simultaneously.

    In full-duplex communication,

    Both devices can transmit and receive on the media atthe same time.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    16/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 16

    Logical Topology vs Physical Topology The topology of a network is the arrangement or

    relationship of the network devices and theinterconnections between them.

    The physical topology is an arrangement of the nodes andthe physical connections between them.

    The representation of how the media is used to interconnectthe devices is the physical topology.

    A logical topology is the way a network transfers framesfrom one node to the next.

    This arrangement consists of virtual connections between thenodes of a network independent of their physical layout.

    These logical signal paths are defined by Data Link layerprotocols.

    It is the logical topology that influences the type of network

    framing and media access control used.

    Logical and physical topologies typically used innetworks are:

    Point-to-Point

    Multi-Access

    Ring

    Physical topologies

    Logical topologies

    http://en.wikipedia.org/wiki/Image:NetworkTopologies.pnghttp://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    17/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 17

    Logical Point-to-Point Topology

    A point-to-point topology connects two

    nodes directly together, as shown in thefigure.

    All frames on the media can only travel to orfrom the two nodes.

    The frames are placed on the media by thenode at one end and taken off the media by

    the node at the other end of the point-to-pointcircuit.

    In point-to-point networks,

    if data can only flow in one direction at atime, it is operating as a half-duplex link.

    If data can successfully flow across the linkfrom each node simultaneously, it is a full-duplex link.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    18/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 18

    Logical Point-to-Point Networks The end nodes communicating in a point-to-

    point network can be physically connected via anumber of intermediate devices.

    However the use of physical devices in thenetwork does not affect the logical topology.

    As shown in the figure, the source and destinationnode may be indirectly connected to each other over

    some geographical distance.

    In some cases, the logical connection betweennodes forms what is called a virtual circuit.

    A virtual circuit is a logical connection created withina network between two network devices.

    The two nodes on either end of the virtual circuitexchange the frames with each other.

    This occurs even if the frames are directed throughintermediary devices.

    Virtual circuits are important logical communicationconstructs used by some Layer 2 technologies.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    19/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 19

    Logical Multi-Access Topology A logical multi-access topology enables a number of

    nodes to communicate by using the same sharedmedia.

    Data from only one node can be placed on the mediumat any one time.

    Every node sees all the frames that are on the medium,but only the node to which the frame is addressed

    processes the contents of the frame. Having many nodes share access to the medium

    requires a Data Link media access control method toregulate the transmission of data and thereby reducecollisions between different signals.

    The media access control methods used by logical

    multi-access topologies are typically CSMA/CD orCSMA/CA.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    20/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 20

    Logical Ring Topology In a logical ring topology, each node in turn

    receives a frame. If the frame is not addressed tothe node, the node passes the frame to the nextnode.

    This allows a ring to use a controlled media accesscontrol technique called token passing.

    Nodes in a logical ring topology remove the framefrom the ring, examine the address, and send it on if

    it is not addressed for that node.

    In a ring, all nodes around the ring- between thesource and destination node examine the frame.

    If there is no data being transmitted, a signal

    (known as a token) may be placed on the mediaand a node can only place a data frame on themedia when it has the token.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    21/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 21

    The Frames Although there are many different Data Link layer

    protocols, each frame type has 3 basic parts:

    Header

    Data

    Trailer

    All Data Link layer protocols encapsulate theLayer 3 PDU within the data field of the frame.However, the structure of the frame and thefields contained in the header and trailer varyaccording to the protocol.

    There is no one frame structure that meets theneeds of all data transportation across all types ofmedia

    The Data Link layer protocol describes thefeatures required for the transport of packetsacross different media.

    Depending on the environment, the amount ofcontrol information needed in the frame varies tomatch the media access control requirements of the

    media and logical topology.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    22/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 22

    Framing Role of the Header Frame information is unique to each type of protocol.

    Typical frame header fields include:Start Frame field - Indicates the beginning of the frame

    Source and Destination address fields - Indicates the sourceand destination nodes on the media

    Priority/Quality of Service field - Indicates a particular type ofcommunication service for processing

    Type field - Indicates the upper layer service contained in theframe

    Logical connection control field - Used to establish a logicalconnection between nodes

    Physical link control field - Used to establish the media link

    Flow control field - Used to start and stop traffic over the media

    Congestion control field - Indicates congestion in the media

    Different Data Link layer protocols may use different fieldsfrom those mentioned.

    Because the purposes and functions of Data Link layerprotocols are related to the specific topologies and media, eachprotocol has to be examined to gain a detailed understanding ofits frame structure.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    23/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 23

    Addressing Where the frame goes Addressing Requirements

    The need for Data Link layer addressing at thislayer depends on the logical topology.

    Point-to-point topologies

    With just two interconnected nodes, do notrequire addressing.

    Once on the medium, the frame has only oneplace it can go.

    Ring and multi-access topologies

    They can connect many nodes on a commonmedium, addressing is required for these

    typologies.

    When a frame reaches each node in thetopology, the node examines the destinationaddress in the header to determine if it is thedestination of the frame.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    24/49 2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 24

    Addressing Where the frame goes The data Link layer provides addressing that is used in

    transporting the frame across the shared local media.

    Unlike Layer 3 logical addresses that are hierarchical, physicaladdresses do not indicate on what network the device is located.

    Device addresses at this layer are referred to as physicaladdresses.

    If the device is moved to another network or subnet, it will stillfunction with the same Layer 2 physical address.

    Because the frame is only used to transport data betweennodes across the local media, the Data Link layer address isonly used for local delivery.

    Addresses at this layer have no meaning beyond the localnetwork.

    [Tony: MAC address is only local significant]

    If the packet in the frame must pass onto another networksegment, the intermediate device - a router - will decapsulatethe original frame, create a new frame for the packet, and sendit onto the new segment.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    25/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 25

    Addressing Where the frame goes [Tony: MAC address is only local significant]

    If the packet in the frame must pass onto anothernetwork segment, the intermediate device - a router -will decapsulate the original frame, create a new framefor the packet, and send it onto the new segment.

    See the next 9

    slides

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    26/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 26

    Packet propagation and switching within a router

    1

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    27/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 27

    Packet propagation and switching within a router2

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    28/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 28

    Packet propagation and switching within a router

    3

    4

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    29/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 29

    Packet propagation and switching within a router

    4

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    30/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 30

    Packet propagation and switching within a router

    5

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    31/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 31

    Packet propagation and switching within a router

    6

    7

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    32/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 32

    Packet propagation and switching within a router

    7

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    33/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 33

    Packet propagation and switching within a router

    8

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    34/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 34

    Packet propagation and switching within a router

    9

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    35/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 35

    Framing Role of the Trailer Data Link layer protocols add trailer to the end of each

    frame.

    The trailer is used to determine if the frame arrivedwithout error.

    This process is called error detection.

    Error detection is accomplished by placing amathematical summary of the bits in the trailer.

    Frame Check Sequence

    This is the cyclic redundancy check (CRC) value.

    This value is placed in the FCS field of the frame torepresent the contents of the frame.

    When the frame arrives at the destination node, the

    receiving node calculates its own logical summary, orCRC, of the frame.

    The receiving node compares the two CRC values. If thetwo values are the same, the frame is considered to havearrived as transmitted.

    If the CRC value in the FCS differs from the CRC

    calculated at the receiving node, the frame is discarded.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    36/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 36

    The Frame The actual Layer 2 protocol used depends on the

    logical topology of the network and the of the Physicallayer.

    Protocols that will be covered in CCNA coursesinclude:

    Ethernet

    Point-to-Point Protocol (PPP)

    High-Level Data Link Control (HDLC)

    Frame Relay

    Each protocol performs media access control forspecified Layer 2 logical topologies.

    This means that a number of different network devices

    can act as nodes that operate at the Data Link layerwhen implementing these protocols.

    These devices include the network interface cards(NICs) on computers as well as the interfaces on routersand Layer 2 switches.

    The Layer 2 protocol used for aparticular network topology isdetermined by

    - the technology used to implementthat topology.- the size of the network-the number of hosts-the geographic scope- the services to be provided overthe network.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    37/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 37

    The Frame - Ethernet Protocol for LANs Ethernet is a family of networking technologies that are

    defined in the IEEE 802.2 and 802.3 standards.

    Ethernet standards define both the Layer 2 protocols and theLayer 1 technologies.

    Ethernet is the most widely used LAN technology andsupports data bandwidths of 10, 100, 1000, or 10,000 Mbps.

    The basic frame format and the IEEE sublayers of OSILayers 1 and 2 remain consistent across all forms of Ethernet.

    However, the methods for detecting and placing data on themedia vary with different implementations.

    Ethernet provides unacknowledged connectionlessservice over a shared media using CSMA/CD.

    Shared media requires that the Ethernet frame header toidentify the source and destination nodes.

    As with most LAN protocols, this address is referred to as theMAC address of the node.

    An Ethernet MAC address is 48 bits and is generallyrepresented in hexadecimal format.

    Ethernet II is the Ethernet frame format used in TCP/IPnetworks.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    38/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 38

    The Frame - Ethernet Protocol for LANs Ethernet II vs. IEEE 802.3

    Preamble ---The alternating pattern of ones and zeros tells

    receiving stations that a frame is coming (Ethernet or IEEE802.3). It is used for timing synchronization. The Ethernetframe includes an additional byte that is the equivalent of theStart-of-Frame field specified in the IEEE 802.3 frame.

    Start-of-Frame (SOF)---The IEEE 802.3 delimiter byte endswith two consecutive 1 bits, which serve to synchronize theframe-reception portions of all stations on the LAN.

    Destination and Source Addresses---

    Type (Ethernet)---The type specifies the upper-layer protocolto receive the data after Ethernet processing is completed.

    Length (IEEE 802.3)---The length indicates the number ofbytes of data that follows this field.

    Data (Ethernet)---After physical-layer and link-layerprocessing is complete, the data contained in the frame is sentto an upper-layer protocol, which is identified in the Type field.

    Although Ethernet Version 2 does not specify any padding (incontrast to IEEE 802.3), Ethernet expects at least 46 bytes ofdata.

    Data (IEEE 802.3)---After physical-layer and link-layerprocessing is complete, the data is sent to an upper-layerprotocol, which must be defined within the data portion of theframe, if at all. If data in the frame is insufficient to fill the frameto its minimum 64-byte size, padding bytes are inserted toensure at least a 64-byte frame.

    Frame Check Sequence (FCS)

    http:///www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/ethernet.htm

    If the Type/Length field has a value of

    1536 or higher then the frame is Ethernet

    V2

    http://en.wikipedia.org/wiki/Ethertype

    FYI

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    39/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 39

    PREAMBLE: Ethernet auto-negotiationEach Ethernet frame (orpacket) starts out with a sequence of bits thatalternate between 1 and 0 that looks like this: 1010101010101010.... Eachvalue (1 or 0) is represented by a specific state change, so when these bits

    are transmitted, the electrical signal on the Ethernet media transitions from"high" to "low" and back at the same speed the bits are being transmitted.

    To determine the speed, the interface needs to measure only the timebetween the transitions.

    If an interface is not capable of doing a higher speed, the bit pattern will look likesignal noise, just like human speech played at ten times the normal speedsounds like noise.

    If each interface starts at its highest speed and works down, it can sync to thefirst speed it understands from the other side.

    This passive system allows the interfaces to determine a common speedvery quickly with a great deal of reliability. It is also worth pointing out thatthe contents and format of the data that is sent is irrelevant, just the factthat the data is sent.

    The only way to detect, or attempt to guess, if the other side of a link cando full-duplex or not is to start transmitting something as soon as you startto receive a signal from the other end.The other side will start to receiveyour transmission before finishing up their own.

    If the other side is happy with this, it must be in full-duplex mode.

    If the other side thinks a collision has taken place, you know the other interface

    is in half-duplex mode.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    40/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 40

    The Frame - Point-to-Point Protocol for WANs Point-to-Point Protocol (PPP) is a protocol used to

    deliver frames between two nodes.

    Unlike many Data Link layer protocols that are definedby electrical engineering organizations, the PPP standardis defined by RFCs.

    PPP was developed as a WAN protocol and remains theprotocol of choice to implement many serial WANs.

    PPP can be used on various physical media, includingtwisted pair, fiber optic lines, and satellite transmission,as well as for virtual connections.

    PPP establishes logical connections, called sessions,between two nodes.

    The PPP session hides the underlying physical mediafrom the upper PPP protocol.

    These sessions also provide PPP with a method for

    encapsulating multiple protocols over a point-to-point link.

    Each protocol encapsulated over the link establishes itsown PPP session.

    This includes authentication, compression, and multilink(the use of multiple physical connections).

    CCNA 4

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    41/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 41

    The Frame - Wireless Protocol for LANs 802.11 is an extension of the IEEE 802. It uses the same

    802.2 LLC and 48-bit addressing as other 802 LANs,

    However there are many differences at the MAC sublayer andPhysical layer.

    The Standard IEEE 802.11, commonly referred to as Wi-Fi,is a contention-based system using a Carrier SenseMultiple Access/Collision Avoidance (CSMA/CA).

    CSMA/CA specifies a random backoff procedure for all nodes

    that are waiting to transmit.Making the nodes back off for a random period greatly reducesthe likelihood of a collision.

    802.11 networks also use Data Link acknowledgements toconfirm that a frame is received successfully.

    If the sending station does not detect the acknowledgement

    frame, either because the original data frame or theacknowledgment was not received intact, the frame isretransmitted.

    This explicit acknowledgement overcomes interference andother radio-related problems.

    Other services supported by 802.11 are authentication,association (connectivity to a wireless device), and privacy(encryption).

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    42/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 42

    The Frame - Wireless Protocol for LANs An 802.11 frame is shown in the figure. It contains these fields:

    Protocol Version field - Version of 802.11 frame in use

    Type and Subtype fields - Identifies one of three functions and sub functions of the frame:control, data, and management

    To DS field - Set to 1 in data frames destined for the distribution system (devices in the wirelessstructure)

    From DS field - Set to 1 in data frames exiting the distribution system

    More Fragments field - Set to 1 for frames that have another fragment

    Retry field - Set to 1 if the frame is a retransmission of an earlier frame

    Power Management field - Set to 1 to indicate that a node will be in power-save mode

    More Data field - Set to 1 to indicate to a node in power-save mode that more frames arebuffered for that node

    Wired Equivalent Privacy (WEP) field - Set to 1 if the frame contains WEP encrypted informationfor security

    Order field - Set to 1 in a data type frame that uses Strictly Ordered service class (does not needreordering)

    Duration/ID field - Depending on the type of frame, represents either the time, in microseconds,required to transmit the frame or an association identity (AID) for the station that transmitted theframe

    Destination Address (DA) field - MAC address of the final destination node in the network

    Source Address (SA) field - MAC address of the node the initiated the frame

    Receiver Address (RA) field - MAC address that identifies the wireless device that is theimmediate recipient of the frame

    Transmitter Address (TA) field - MAC address that identifies the wireless device that transmittedthe frame

    Sequence Number field - Indicates the sequence number assigned to the frame; retransmittedframes are identified by duplicate sequence numbers

    Fragment Number field - Indicates the number for each fragment of a frame

    Frame Body field - Contains the information being transported; for data frames, typically an IPpacket

    FCS field - Contains a 32-bit cyclic redundancy check (CRC) of the frame

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    43/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 43

    Follow Data Through an Internetwork The figure on the next page presents a simple data transfer between

    two hosts across an internetwork. We highlight the function of each

    layer during the communication. For this example we will depict anHTTP request between a client and a server.

    To focus on the data transfer process, we are omitting manyelements that may occur in a real transaction. In each step we areonly bringing attention to the major elements. Many parts of theheaders are ignored, for example.

    We are assuming that all routing tables are converged and ARP

    tables are complete. Additionally, we are assuming that a TCPsession is already established between the client and server. We willalso assume that the DNS lookup for the WWW server is alreadycached at the client.

    In the WAN connection between the two routers, we are assumingthat PPP has already established a physical circuit and hasestablished a PPP session.

    On the next page, you can step through this communication. Weencourage you to read each explanation carefully and study theoperation of the layers for each device.

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    44/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 44

    Follow Data Through an Internetwork

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    45/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 45

    Follow Data Through an Internetwork

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    46/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 46

    Follow Data Through an Internetwork

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    47/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 47

    Follow Data Through an Internetwork

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    48/49

    2006 Cisco Systems, Inc. All rights reserved. Cisco PublicITE 1 Chapter 6 48

    Follow Data Through an Internetwork

    http://www.cod.edu/http://www.cod.edu/
  • 7/29/2019 EX 1 Chapter07 DataLink Layer TonyChen

    49/49

    Summary

    http://www.cod.edu/