Summary

This presentation covers the Data Link Layer in computer networks. It explains the function of the data link layer, including enabling upper layers to access the media and encapsulating data into frames. It also describes data link layer components like nodes, sublayers, and various types of topology. The presentation explains the functionality and processes involved in packet forwarding, addressing, and error detection within various scenarios.

Full Transcript

IDT6.4/3 DATA-LINK LAYER Data-link layer  Enables upper layers to access the media. The upper layer protocol is completely unaware of the type of media that is used to forward the data.  Accepts data, usually Layer 3 packets (i.e., IPv4 or IPv6), and encapsulates them into...

IDT6.4/3 DATA-LINK LAYER Data-link layer  Enables upper layers to access the media. The upper layer protocol is completely unaware of the type of media that is used to forward the data.  Accepts data, usually Layer 3 packets (i.e., IPv4 or IPv6), and encapsulates them into Layer 2 frames.  Controls how data is placed and received on the media.  Exchanges frames between endpoints over the network media.  Receives encapsulated data, usually Layer 3 packets, and directs them to the proper upper-layer protocol.  Performs error detection and rejects any corrupt frame. Data-link  The figure displays an example of how the data link layer adds Layer 2 Ethernet destination and source NIC information to a Layer 3 packet. It would then convert this information to a format supported by the physical layer (i.e., Layer 1).  The data link protocol is responsible for NIC-to-NIC communications within the same network. Node  In computer networks, a node is a device that can receive, create, store, or forward data along a communications path.  A node can be either an end device such as a laptop or mobile phone, or an intermediary device such as an Ethernet switch. Sublayers  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. Cisco Packet tracer exercise Network  As you learned in the previous topic, 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, or the relationship, of the network devices and the interconnections between them. Two types of topologies used when describing LAN and WAN networks Start Frame of Preamble  The Start of Frame fields are used for synchronization between the sending and receiving devices.  The first few bytes tell the receivers to get ready to receive a new frame. Addressing  Destination MAC Address Field: identifies where the frame needs to go.  Source MAC Address Field : identifies the originating NIC or interface of the frame. Ethernet frame  When a NIC receives an Ethernet frame, it examines the destination MAC address to see if it matches the physical MAC address that is stored in RAM.  If there is no match, the device discards the frame.  The MAC address matches for H4, so H4 passes the frame up the OSI layers, where the de-encapsulation process takes place. Transmission types at the Data Link Layer  Thereare three types of network transmissions at layer 2, the Data Link Layer.  unicast,  multicast,  andbroadcast: A broadcast is a one-to-all transmission UNICAST  the frame is sent to only one destination MAC address or device on the network, as follows: Multicast  a single stream of one or more frames is sent to multiple devices on the network. Mac-address Table  MAC stands for Media Access Control it is a physical address that uniquely identifies a device and hardware manufacturer on a network.  It is also known as the Ethernet address are 6 bytes or 28 bits in length typically written in hexadecimal format.  A MAC address is generally assigned to the Network Interface Card of each and every device that is connected to the internet.  MAC Address Table is used on Ethernet switches to determine where to forward traffic on a LAN.  The MAC address table is a way to map each port to a MAC address. This makes it efficient to forward traffic directly to a host. Without the MAC address table, traffic would be forwarded out each port. MAC-ADDRESS MAC-address Table SHOW MAC-address table on SWITCH. Video – MAC Address Tables on Connected Switches To connect multiple Hosts on the LAN to communicate with each other in the simplest way, a Layer 2 switch is usually used to connect the Hosts, as shown in the following figure. Unknown MAC-Address KNOW MAC-ADDRESS Packet Forwarding Based on the MAC Address Table  The device forwards packets based on the MAC address table in either of the following modes:  Unicast mode: If the destination MAC address of a packet can be found in the MAC address table, the device forwards the packet through the outbound interface specified in the matching entry.  Broadcast mode: If a packet is a broadcast or multicast packet or its destination MAC address cannot be found in the MAC address table, the device broadcasts the packet to all the interfaces in the VLAN except the inbound interface. Video – Sending the Frame to the Default Gateway The Data link layer provides three functions: Line discipline Flow Control Error Control Line Discipline  Line Discipline is a functionality of the Data link layer that provides the coordination among the link systems. It determines which device can send, and when it can send the data.  Line Discipline can be achieved in two ways:  ENQ/ACK  Poll/select (Not Working of END/ACK  The transmitter transmits the frame called an Enquiry (ENQ) asking whether the receiver is available to receive the data or not.  The receiver responses either with the positive acknowledgement(ACK) or with the negative acknowledgement(NACK) where positive acknowledgement means that the receiver is ready to receive the transmission and negative acknowledgement means that the receiver is unable to accept the transmission. Following are the responses of the receiver:  If the response to the ENQ is positive, the sender will transmit its data, and once all of its data has been transmitted, the device finishes its transmission with an EOT (END-of-Transmission) frame.  If the response to the ENQ is negative, then the sender disconnects and restarts the transmission at another time.  If the response is neither negative nor positive, the sender assumes that the ENQ frame was lost during the transmission and makes three attempts to establish a link before giving up. Flow Control  Flow control is a technique that allows two stations working at different speeds to communicate with each other.  It is a set of measures taken to regulate the amount of data that a sender sends so that a fast sender does not overwhelm a slow receiver.  In data link layer, flow control restricts the number of frames the sender can send before it waits for an acknowledgment from the receiver. Flow Control  Two methods have been developed to control the flow of data:  Stop-and-wait  Sliding window Flow Control  Stop-and-wait  In the Stop-and-wait method, the sender waits for an acknowledgement after every frame it sends.  When acknowledgement is received, then only next frame is sent. The process of alternately sending and waiting of a frame continues until the sender transmits the EOT (End of transmission) frame. Flow Control  It allows the sender to send multiple frames before needing the acknowledgements. Sender slides its window on receiving the acknowledgements for the sent frames. Error Detection  Error A condition when the receiver’s information does not match with the sender’s information.  During transmission, digital signals suffer from noise that can introduce errors in the binary bits travelling from sender to receiver.  That means a 0 bit may change to 1 or a 1 bit may change to 0. Error Detecting Codes  Whenever a message is transmitted, it may get scrambled by noise or data may get corrupted.  To avoid this, we use error-detecting codes which are additional data added to a given digital message to help us detect if any error has occurred during transmission of the message.  PARITY BIT  The Frame Check Sequence (FCS) field (4 bytes) is used to detect errors in a frame. It uses a cyclic redundancy check (CRC). Trailer ARP: Address Resolution Protocol ARP  To send a packet to another host on the same local IPv4 network, a host must know the IPv4 address and the MAC address of the destination device.  Device destination IPv4 addresses are either known or resolved by device name.  A device uses Address Resolution Protocol (ARP) to determine the destination MAC address of a local device when it knows its IPv4 address.  ARP provides two basic functions:  Resolving IPv4 addresses to MAC addresses  Maintaining a table of IPv4 to MAC address mappings ARP Request  An ARP request is sent when a device needs to determine the MAC address that is associated with an IPv4 address, and it does not have an entry for the IPv4 address in its ARP table.  ARP messages are encapsulated directly within an Ethernet frame. There is no IPv4 header. The ARP request is encapsulated in an Ethernet frame using the following header information:  Destination MAC address – This is a broadcast address FF-FF-FF-FF-FF-FF requiring all Ethernet NICs on the LAN to accept process the ARP request.  Source MAC address – This is MAC address of the sender of the ARP request. ARP Exercise ARP Table  The ARP table is used to maintain a connection between each MAC address and its corresponding IP address.

Use Quizgecko on...
Browser
Browser