Full Transcript

LEC08: DATA LINK LAYER Classification of networks according to scale     Personal Area Network (PAN): The interconnection of devices within the range of an individual person, typically within a range of 10 meters. For example, a wireless network connecting a computer with its keyboard, mouse or...

LEC08: DATA LINK LAYER Classification of networks according to scale     Personal Area Network (PAN): The interconnection of devices within the range of an individual person, typically within a range of 10 meters. For example, a wireless network connecting a computer with its keyboard, mouse or printer is a PAN. Local Area Network (LAN): Privately-owned networks covering a small geographic area, like a home, office, building or group of buildings (e.g. campus). They are widely used to connect computers in company offices and factories to share resources (e.g., printers) and exchange information. Metropolitan Area Network (MAN): Covers a larger geographical area than is a LAN, ranging from several blocks of buildings to entire cities. MANs can also depend on communications channels of moderate-tohigh data rates. Wide Area Networks (WAN): Computer network that covers a large geographical area, often a country or continent. (any network whose communications links cross metropolitan, regional, or national boundaries). Purpose of the Data Link Layer: The Data Link Layer 1. The Data Link layer prepares network data for the physical network. 2. It is responsible for communications between enddevice network interface cards(NIC-to-NIC) or end to end delivery. 3. It allows upper layer protocols to access the physical layer media and encapsulates Layer 3 packets (IPv4 and IPv6) into Layer 2 Frames. 4.Controls how data is placed and received on the media. 5.Exchanges frames between endpoints over the network media. 6.Receives encapsulated data, usually Layer 3 packets, and directs the data to the proper upper-layer protocol. 7. It also performs error detection and rejects corrupts frames. This figure shows an example of how the data link layer adds Layer 2 Ethernet destination and source NIC information to a Layer 3 packet. It can then convert this information to a format supported by the physical layer (that is, Layer 1). Purpose of the Data Link Layer: IEEE 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) and Media Access Control (MAC). The LLC sublayer communicates between the networking software at the upper layers and the device hardware at the lower layers. It places information in the frame to identify which network layer protocol is being used for the frame. This information allows multiple Layer 3 protocols, such as IPv4 and IPv6, to use the same network interface and media. The MAC sublayer is responsible for data encapsulation and media access control. It provides data link layer addressing and is integrated with various physical layer technologies. IEEE 802 LAN/MAN Data Link Sublayers (con.) The LLC sublayer takes the network protocol data, which is typically an IPv4 or IPv6 packet, and adds Layer 2 control information to help deliver the packet to the destination node. The MAC sublayer controls the NIC and other hardware that is responsible for sending and receiving data on the wired or wireless LAN/MAN medium. The MAC sublayer provides data encapsulation: Frame delimiting: provides important delimiters to identify fields within a frame. These delimiting bits provide synchronization between the transmitting and receiving nodes Addressing: The MAC sublayer provides source and destination addressing for transporting the Layer 2 frame between devices on the same shared medium. Error detection: The MAC sublayer includes a trailer used to detect transmission errors The MAC sublayer also provides media access control, allowing multiple devices to communicate over a shared (half-duplex) medium. Full-duplex communications do not require access control. Half and Full Duplex Communication Understanding duplex communication is important when discussing LAN topologies because it refers to the direction of data transmission between two devices. There are two common modes of duplex: half-duplex and full-duplex. 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. Full-duplex communication Allows both devices to simultaneously transmit and receive on a shared medium. Ethernet switches operate in full-duplex mode. In summary, half-duplex restricts the exchange of data to one direction at a time. Full-duplex allows the sending and receiving of data to happen simultaneously. Two interconnected interfaces, such as a host NIC and an interface on an Ethernet switch, operate using the same duplex mode. Otherwise, there is a duplex mismatch, which creates inefficiency and latency on the link. Purpose of the Data Link Layer: Providing Access to Media Each network environment that packets encounter as they travel from a local host to a remote host can have different characteristics. For example, an Ethernet LAN usually consists of many hosts contending for access on the network medium. The MAC sublayer resolves this. A router interface encapsulates a packet into the appropriate frame. A suitable media access control method is used to access each link. 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: 1. Accepts a frame from the network medium. 2. De-encapsulates the frame to expose the encapsulated packet. 3. Re-encapsulates the packet into a new frame. 4. Forwards the new frame on the medium of the next network segment. Purpose of the Data Link Layer: Data Link Layer Standards Data link layer protocols are defined by engineering organizations. Engineering organizations define open standards and protocols that apply to the network access layer (that is, the OSI physical and data link layers) They include the following: Institute for Electrical and Electronic Engineers (IEEE). International Telecommunications Union (ITU). International Organizations for Standardization (ISO). American National Standards Institute (ANSI). Topologies: Physical and Logical Topologies The data link layer prepares network data for the physical network. It must know the logical topology of a network in order to be able to determine what is needed to transfer frames from one device to another 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 – Identifies the physical connections and how end devices and intermediary devices (that is, routers, switches, and wireless access points) are interconnected. The topology may also include specific device location information, such as room number and location on the equipment rack. Physical topologies are usually point-to-point or star Logical topology – Refers to the way a network transfers frames from one node to the next. This topology identifies virtual connections using device interfaces and Layer 3 IP addressing schemes. 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. Topologies: WAN 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. Hub and spoke – similar to a star topology where a central site interconnects branch sites through the use of point-to-point links. In this topology, branch sites cannot exchange data with other branch sites without going through the central site. Mesh – provides high availability but requires every end system to be connected to every other end system. Therefore, the administrative and physical costs can be significant. Each link is essentially a point-to-point link to the other node. Topologies: Point-to-Point WAN Topology Physical point-to-point topologies directly connect two nodes. The nodes may not share the media with other hosts. In addition, when using a serial communications protocol such as Point-to-Point Protocol (PPP), a node does not have to make any determination about whether an incoming frame is destined for it or another node. Because all frames on the media can only travel to or from the two nodes, Point-toPoint WAN protocols can be very simple. The node places the frames on the media at one end, and those frames are taken from the media by the node at the other end of the point-to-point circuit. Topologies: Access Control Methods Ethernet LANs and WLANs are examples of multiaccess networks. A multiaccess network is a network that can have two or more end devices attempting to access the network simultaneously. Some multiaccess networks require rules to govern how devices share the physical media. There are two basic access control methods for shared media:  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. These deterministic legacy networks are inefficient because a device must wait its turn to access the medium. Topologies: Contention-Based Access – CSMA/CD Examples of contention-based access networks include: Wireless LAN (uses CSMA/CA), Legacy bus topology Ethernet LAN (uses CSMA/CD), Legacy Ethernet LAN using a hub (uses CSMA/CD) These networks operate in half-duplex mode, meaning only one device can send or receive at a time. Therefore, a process is needed to govern when a device can send and what happens when multiple devices send at the same time. If two devices transmit at the same time, a collision occurs. 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. Devices wait a random period of time and retransmit data. Topologies: (con.) Contention-Based Access – CSMA/CD The NIC compares data transmitted with data received, or it recognizes that the signal amplitude is higher than normal on the media. In the event of a collision, the data sent by both devices is corrupted and needs to be re-sent. The Ethernet hub receives and sends the frame. An Ethernet hub is also known as a multiport repeater. Any bits received on an incoming port are regenerated and sent out all other ports Topologies: Contention-Based Access – CSMA/CA CSMA/CA Used by IEEE 802.11 WLANs. CMSA/CA does not detect collisions but attempts to avoid them by waiting before transmitting 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. Note: Ethernet LANs using switches do not use a contention-based system because the switch and the host NIC operate in full-duplex mode Data Link Frame: The Frame The data link layer needs to provide intelligible data between the Layer 3 of the sending host and the Layer 3 of the receiving host. To do this, the Layer 3 PDU is wrapped with a header and trailer to form the Layer 2 frame. Data is encapsulated by the data link layer with a header and a trailer to form a frame. The data link layer prepares the encapsulated data (usually an IPv4 or IPv6 packet) for transport across the local media by encapsulating it with a header and a trailer to create a frame. The data link protocol is responsible for NIC-to-NIC communications within the same network.  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. Data Link Frame: Frame 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 Data Link Frame: Layer 2 Addresses The data link layer provides the addressing used in transporting a frame across a shared local medium. Also referred to as a physical address. Contained in the frame header and specifies the frame destination node on the local network, the frame header may also contain the source address of the frame Used only for local delivery of a frame on the link. Updated by each device that forwards the frame.  a physical address is unique to a specific device. A device still functions with the same Layer 2 physical address even if the device moves to another network or subnet. Therefore, Layer 2 addresses are only used to connect devices within the same shared medium on the same IP network. Data Link Frame: LAN and WAN Frames Ethernet protocols are used by wired LANs. Wireless communications fall under the WLAN protocols (specified in IEEE 802.11), which were designed for multiaccess networks. Some of the common WAN protocols over the years have included the following: Point-to-Point Protocol (PPP), High-Level Data Link Control (HDLC), Frame Relay, Asynchronous Transfer Mode (ATM), and X.25 These Layer 2 protocols are now being replaced in the WAN by Ethernet. In a TCP/IP network, all OSI Layer 2 protocols work with IP at OSI Layer 3. The Layer 2 protocol used depends on the logical topology and the physical media. Each protocol performs media access control for specified Layer 2 logical topologies. This means that a number of different network devices can act as nodes that operate at the data link layer when implementing these protocols. These devices include the NICs on computers as well as the interfaces on routers and Layer 2 switches. Data Link Frame: LAN and WAN Frames The Layer 2 protocol that is used for a particular network topology is determined by the technology used to implement that topology. The technology used is determined by the size of the network, in terms of the number of hosts and the geographic scope, as well as the services to be provided over the network. A LAN typically uses a high-bandwidth technology, however, using a high-bandwidth technology is usually not cost-effective for WANs (which operate at lower bandwidth capacity). The difference in bandwidth normally results in the use of different protocols for LANs and WANs. 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. THANKS! Best Regards!

Use Quizgecko on...
Browser
Browser