Bài giảng môn Mạng máy tính - Module7 - Data link layer

What statements are true regarding addresses found at each layer of the OSI model? –Layer 2 may identify devices by a physical address burned into the network card –Layer 3 represents a hierarchical addressing scheme

pdf96 trang | Chia sẻ: nguyenlam99 | Lượt xem: 896 | Lượt tải: 0download
Bạn đang xem trước 20 trang tài liệu Bài giảng môn Mạng máy tính - Module7 - Data link layer, để xem tài liệu hoàn chỉnh bạn click vào nút DOWNLOAD ở trên
1Module7- Data Link Layer 2Overview 3Overview Upon completion of this chapter, you will be able to: • Explain the role of Data Link layer protocols in data transmission. • Describe how the Data Link layer prepares data for transmission on network media. • Describe the different types of media access control methods. • Identify several common logical network topologies and describe how the logical topology determines the media access control method for that network. • Explain the purpose of encapsulating packets into frames to facilitate media access. • Describe the Layer 2 frame structure and identify generic fields. • Explain the role of key frame header and trailer fields, including addressing, QoS, type of protocol, and Frame Check Sequence. 4Data Link Layer – Accessing the Media 5Supporting & Connecting to Upper Layer Services • The Data Link layer performs 2 basic services: 1. Allows the upper layers to access the media using techniques such as framing. 2. Controls how data is placed onto the media and is received from the media using techniques such as media access control and error detection. The Data Link layer provides a means for exchanging data over a common local media. 6Terms 7.1.1.1 7Media • Media is the physical copper cable, optical fiber, or atmosphere through which the signals travel. • In this chapter media does not refer to content programming such as audio, animation, television, and video as used when referring to digital content and multimedia. 8Logical Networks • Logical networks are defined at the Network layer by the arrangement of the hierarchical addressing scheme. 9Physical Networks • Physical networks represent the interconnection of devices on a common media. Sometimes, a physical network is also referred to as a network segment. 10 Supporting & Connecting to Upper Layer Services • The Data Link layer effectively insulates the communication processes at the higher layers from the media transitions that may occur end-to-end. • A packet is received from and directed to an upper layer protocol, in this case IPv4 or IPv6, that does not need to be aware of which media the communication will use. 7.1.1.2 Supporting & Connecting to Upper Layer Services •Without the Data Link layer ? 11 12 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 called the media access control method. • The media access control methods described by the Data Link layer protocols define the processes by which network devices can access the network media and transmit frames in diverse network environments. 7.1.2 13 Creating a Frame Control information may tell: 1. Which nodes are in communication with each other 2. When communication between individual nodes begins and when it ends 3. Which errors occurred while the nodes communicated 4. Which nodes will communicate next • Data - The packet from the Network layer • Header - Contains control information, such addressing, and is located at the beginning of the PDU • Trailer - Contains control information added to the end of the PDU 7.1.3.1 14 Creating a Frame 7.1.3.2 • If a node is receiving long streams of bits, how does it determine where a frame starts and stops or which bits represent the address? • Framing breaks the stream into decipherable groupings, with control information inserted in the header and trailer as values in different fields. 15 Creating a Frame Typical field types include: 1. Start and stop indicator fields - The beginning and end limits of the frame 2. Naming or addressing fields 3. Type field - The type of PDU contained in the frame 4. Quality - control fields 5. A data field -The frame payload (Network layer packet) Not all protocols include all of these fields 16 Connecting Upper Layer Services to the Media • The Data Link layer exists as a connecting layer between the software processes of the layers above it and the Physical layer below it. 7.1.4.1 17 Connecting Upper Layer Services to the Media • The upper sublayer defines the software processes that provide services to the Network layer protocols. • The lower sublayer defines the media access processes performed by the hardware. 7.1.4.2 Q/A • Why does the Data Link layer separate into sublayers ? • Allows for one type of frame defined by the upper layer to access different types of media defined by the lower layer. 18 19 Connecting Upper Layer Services to the Media • Logical Link Control – Logical Link Control (LLC) places information in the frame that identifies which Network layer protocol is being used for the frame. • Media Access Control – Media Access Control (MAC) provides Data Link layer addressing and delimiting of data according to the physical signaling requirements of the medium and the type of Data Link layer protocol in use. Extra: LLC-MAC 20 21 Extra: LLC-MAC • The MAC sublayer is concerned with the physical components that will be used to communicate the information. • Media Access Control (MAC) (802.3): the MAC sublayer defines how to transmit frame on the physical wire. – It handles physical addressing associated with each device, network topology definition and line discipline. • The Logical Link Control (LLC) sublayer remains relatively independent of the physical equipment that will be used for the communication process. • Logical Link Control (LLC) (802.2): the LLC sublayer is responsible for logically identifying different protocol types and then encapsulating them. • Layer 2 communicates with the upper layers through LLC . 22 Extra: Layer1 Limitations Versus Layer 2 Solutions 23 Standards 7.1.5 Unlike the upper layer protocols, which are implemented mostly in software such as the host operating system or specific applications, Data Link layer processes occur both in software and hardware 24 Media Access Control Techniques Placing Data on the Media •Media Access Control ? •Regulating the placement of data frames onto the media is known as media access control. 25 7.2.1 26 Placing Data on the Media 7.2.1 27 Placing Data on the Media • The method of media access control used depends on: 1. Media sharing - If and how the nodes share the media 2. Topology - How the connection between the nodes appears to the Data Link layer 7.2.1 28 Media Access Control for Shared Media • There are 2 basic media access control methods for shared media: – Controlled - Each node has its own time to use the medium – Contention-based - All nodes compete for the use of the medium 7.2.2 29 Media Access Control for Shared Media •Deterministic • Inefficient 30 Media Access Control for Shared Media • Non-deterministic • Data Collision/ Collision • Carrier Sense Multiple Access (CSMA/CD) • CSMA/Collision Avoidance (CSMA/CA) 31 Media Access Control for Shared Media • CSMA/Collision Detection – In CSMA/CD, the device monitors the media for the presence of a data signal. If a data signal is absent, indicating that the media is free, the device transmits the data. If signals are then detected that show another device was transmitting at the same time, all devices stop sending and try again later. – Traditional forms of Ethernet use this method. • CSMA/Collision Avoidance – In CSMA/CA, the device examines the media for the presence of a data signal. If the media is free, the device sends a notification across the media of its intent to use it. The device then sends the data. – This method is used by 802.11 wireless networking technologies. 32 Extra: CSMA/CD listen-before-transmit Transmitting& listening 33 Extra: CSMA/CA RTS/CTS (Request to Send / Clear To Send) 34 Media Access Control for Non-Shared Media • Media access control protocols for non-shared media require little or no control before placing frames onto the media. • These protocols have simpler rules and procedures for media access control. Such is the case for point-to-point topologies. • In point-to-point connections, the Data Link layer has to consider whether the communication is half-duplex or full-duplex. 7.2.3 35 Media Access Control for Non-Shared Media • In full-duplex communication, both devices can transmit and receive on the media at the same time. • The Data Link layer assumes that the media is available for transmission for both nodes at any time. Therefore, there is no media arbitration necessary in the Data Link layer. 36 Media Access Control for Non-Shared Media • Half-duplex communication means that the devices can both transmit and receive on the media but cannot do so simultaneously. • Ethernet has established arbitration rules for resolving conflicts arising from instances when more than one station attempts to transmit at the same time. 37 Logical Topology vs Physical Topology • The topology of a network is the arrangement or relationship of the network devices and the interconnections between them. • Network topologies can be viewed at the physical level and the logical level. • Logical and physical topologies typically used in networks are: – Point-to-Point – Multi-Access – Ring 7.2.4 38 Logical Topology vs Physical Topology • The physical topology is an arrangement of the nodes and the physical connections between them. – The representation of how the media is used to interconnect the devices is the physical topology. 39 Logical Topology vs Physical Topology • A logical topology is the way a network transfers frames from one node to the next. – This arrangement consists of virtual connections between the nodes of a network independent of their physical layout. – These logical signal paths are defined by Data Link layer protocols. – The Data Link layer "sees" the logical topology of a network when controlling data access to the media. It is the logical topology that influences the type of network framing and media access control used. • The physical or cabled topology of a network will most likely not be the same as the logical topology. 40 Extra: Network Topology • Network topology defines the structure of the network. – Physical topology, which is the actual layout of the wire or media. – Logical topology, which defines how the media is accessed by the hosts for sending data. • The logical topology of a network is how the hosts communicate across the medium. • The 2 most common types of logical topologies are broadcast and token passing. 41 Point-to-Point Topology • A point-to-point topology connects 2 nodes directly together. • In data networks with point-to-point topologies, the media access control protocol can be very simple. • In point-to-point networks, if data can only flow in one direction at a time, it is operating as a half-duplex link. If data can successfully flow across the link from each node simultaneously, it is a full-duplex link. 42 Point-to-Point Topology • In some cases, the logical connection between nodes forms what is called a virtual circuit. • A virtual circuit is a logical connection created within a network between two network devices. The two nodes on either end of the virtual circuit exchange the frames with each other. • Virtual circuits are important logical communication constructs used by some Layer 2 technologies. 43 Multi-Access Topology • A logical multi-access topology enables a number of nodes to communicate by using the same shared media. • Data from only one node can be placed on the medium at 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. 44 Multi-Access Topology • The media access control methods used by logical multi-access topologies are typically CSMA/CD or CSMA/CA. – However, token passing methods can also be used. • The Data Link layer protocol specifies the media access control method that will provide the appropriate balance between frame control, frame protection, and network overhead. 45 Ring Topology • In a logical ring topology, each node in turn receives a frame. • If the frame is not addressed to the node, the node passes the frame to the next node. This allows a ring to use a controlled media access control technique called token passing. 46 Ring Topology 47 Extra: Topology 48 Extra: Topology • Ring Topology 49 Extra: Topology • Token Ring Operation using a Hub 50 Extra: Topology 51 Extra: Topology 52 Extra: Topology • Star Topology 53 Extra: Topology • Extended Star Topology 54 Extra: Topology 55 Media Access Control Addressing and Framing Data 56 Data Link Layer Protocols- The Frame • Remember that although there are many different Data Link layer protocols that describe Data Link layer frames, each frame type has 3 basic parts: – Header – Data – Trailer 57 Framing- Role of the Header 58 Addressing- Where the Frame Goes • The need for Data Link layer addressing at this layer depends on the logical topology. • 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, physical addresses do not indicate on what network the device is located. 59 Framing- Role of the Trailer • Data Link layer protocols add a trailer to the end of each frame. • The trailer is used to determine if the frame arrived without error. This process is called error detection. 60 Data Link Layer Protocols - The Frame 61 Data Link Layer Protocols - The Frame 62 Data Link Layer Protocols - The Frame 63 Data Link Layer Protocols - The Frame 64 Putting it All Together 65 Follow Data Through an Internetwork • In the WAN connection between the two routers, we are assuming that PPP has already established a physical circuit and has established a PPP session. 66 Follow Data Through an Internetwork 67 Follow Data Through an Internetwork 68 Follow Data Through an Internetwork 69 Follow Data Through an Internetwork 70 Follow Data Through an Internetwork 71 Follow Data Through an Internetwork 72 Follow Data Through an Internetwork 73 Follow Data Through an Internetwork 74 Follow Data Through an Internetwork 75 Follow Data Through an Internetwork 76 Follow Data Through an Internetwork 77 Follow Data Through an Internetwork 78 Follow Data Through an Internetwork 79 Follow Data Through an Internetwork 80 Follow Data Through an Internetwork 81 Follow Data Through an Internetwork 82 Follow Data Through an Internetwork 83 Follow Data Through an Internetwork 84 Follow Data Through an Internetwork 85 Follow Data Through an Internetwork 86 Follow Data Through an Internetwork 87 Follow Data Through an Internetwork 88 Lab- Frame Examination Q&A • Three factors should be considered when implementing a Layer 2 protocol in a network –the geographic scope of the network –the physical layer implementation –the number of hosts to be interconnected 89 Q&A • The properties of contention-based media access for a shared media: –non-deterministic –less overhead –collisions exist 90 Q&A •What is true concerning physical and logical topologies? –Logical topologies consist of virtual connections between nodes. 91 Q&A •What determines the method of media access control? –media sharing –logical topology 92 Q&A •Which statements describe the logical token-passing topology? –Computers are allowed to transmit data only when they possess a token. –Electronic tokens are passed sequentially to each other. 93 Q&A • What statements are true regarding addresses found at each layer of the OSI model? –Layer 2 may identify devices by a physical address burned into the network card –Layer 3 represents a hierarchical addressing scheme 94 Q&A • Refer to the exhibit. How many CRC calculations will take place as traffic routes from the PC to the laptop? 95 96 Summary

Các file đính kèm theo tài liệu này:

  • pdfca_ex_s1m07_data_link_layer_0684_3292.pdf
Tài liệu liên quan