Summary

This document provides notes from a presentation about the data link layer and ethernet switching. It covers topics such as the purpose and function of the data link layer, network topologies, including WAN and LAN topologies, Ethernet frames, MAC addresses, MAC address tables, switch speeds and forwarding methods.

Full Transcript

CHAPTER 6: DATA LINK LAYER CHAPTER 7: ETHERNET SWITCHING TOPICS COVERED Topic Title Topic Objective 6.1 Purpose of the Describe the purpose and function of the data link layer in preparing Data Link Layer communication for transmission on specific m...

CHAPTER 6: DATA LINK LAYER CHAPTER 7: ETHERNET SWITCHING TOPICS COVERED Topic Title Topic Objective 6.1 Purpose of the Describe the purpose and function of the data link layer in preparing Data Link Layer communication for transmission on specific media. 6.2Topologies Compare the characteristics of media access control methods on WAN and LAN topologies. 7.1 Ethernet Frame Explain how the Ethernet sublayers are related to the frame fields. 7.2 Ethernet MAC Describe the Ethernet MAC address. Address 7.3 The MAC Explain how a switch builds its MAC address table and forwards Address Table frames. 7.4 Switch Speeds Describe switch forwarding methods and port settings available on and Forwarding Layer 2 switch ports. Methods 6.1 PURPOSE OF THE DATA LINK LAYER © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 3 P U R P O S E O F T H E DATA L I N K L AY E R T H E DATA L I N K L AY E R Enables upper layers to access the media. Accepts data, usually Layer 3 packets 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. P U R P O S E O F T H E DATA L I N K L AY E R DATA LINK SUBLAYERS LLC MAC Sublayer communicates It is responsible for data encapsulation and media access between the networking control. software at the upper layers and the The consists of twosublayers. device Ethernet Logical Link frame - This Control is the internal structure of hardware at the(LLC) lowerand Media Access Control (MAC). the Ethernet frame. layers.  Ethernet Addressing - The Ethernet frame includes both a source and destination MAC address. It places information in the frame that identifies  Ethernet Error detection - The Ethernet frame which network layer protocol is being used for includes a frame check sequence (FCS) trailer used the frame for error detection.  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. P U R P O S E O F T H E D ATA L I N K L AY E R P R OV I D I N G AC C E S S T O M E D I A 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. 6.2 TOPOLOGIES © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 8 TOPOLOGIES PHYSICAL 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. 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 point-to-point links. Mesh – provides high availability but requires every end system to be connected to every other end system. TOPOLOGIES WA N T O P O LO G I E S Topology name Properties Design Simple and common Point-to-point Connects two endpoints All communications go through central device Hub and Spoke provides high availability. Mesh Each system connected to every other end system variation or combination Hybrid of any topologies TOPOLOGIES L AN 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. 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. T O P O LO G I E S HALF AND FULL DUPLEX COMMUNICATION 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. T O P O LO G I E S ACCESS CONTROL METHODS 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. TOPOLOGIES ACCESS CONTROL METHODS Contention- CSMA/CD CSMA/CA based access Process Devices detect the collision. When transmitting, devices also include the time duration needed Devices wait a random for the transmission. period of time and retransmit data. Other devices on the shared medium receive the time duration information and know how long the medium will be unavailable. Uses Used by legacy Ethernet Used by IEEE 802.11 WLANs. LANs. Operates in half-duplex mode. Operates in half-duplex mode. Uses a collision avoidance process Uses a collision detection to govern when a device can send process to govern when a and what happens if multiple device can send and what devices send at the same time. happens if multiple devices send at the same time. 7.1 ETHERNET FRAMES © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 16 ETHERNET FRAME FIELDS Note: Any frame less than 64 bytes in length is considered a “collision fragment” or “runt frame” and is automatically discarded. Frames with more than 1500 bytes of data are considered “jumbo” or “baby giant frames”. ETHERNET FRAME FIELDS (CON.) Frame field Description Preamble & SFD ( Start Notify the receiving node of incoming Frame Delimiter) frame Destination MAC address The receiving node physical address Source MAC address The sender physical address Type ( EtherType) Contain information about upper layer protocols Data Encapsulated data from upper layers FCS( Frame check Error detection using CRC (Cyclic sequence) Redundancy check) 7.2 ETHERNET MAC ADDRESS © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 19 ETHERNET MAC ADDRESSES F RA M E P R O C E S S I N G When a device is forwarding a message to an Ethernet network, the Ethernet header include a Source MAC address and a Destination MAC address. 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. If there is a match, it passes the frame up the OSI layers, where the de-encapsulation process takes place. Note: Ethernet NICs will also accept frames if the destination MAC address is a broadcast or a multicast group of which the host is a member. Any device that is the source or destination of an Ethernet frame, will have an Ethernet NIC and therefore, a MAC address. This includes workstations, servers, printers, mobile devices, and routers. ETHERNET MAC ADDRESSES U N I C A S T M AC A D D R E S S In Ethernet, different MAC addresses are used for Layer 2 unicast, broadcast, and multicast communications.  A unicast MAC address is the unique address that is used when a frame is sent from a single transmitting device to a single destination device.  The process that a source host uses to determine the destination MAC address associated with an IPv4 address is known as Address Resolution Protocol (ARP). The process that a source host uses to determine the destination MAC address associated with an IPv6 address is known as Neighbor Discovery (ND). Note: The source MAC address must always be a unicast. ETHERNET MAC ADDRESSES B R OA DCA ST M AC A DDR E SS An Ethernet broadcast frame is received and processed by every device on the Ethernet LAN. The features of an Ethernet broadcast are as follows:  It has a destination MAC address of FF-FF-FF-FF- FF-FF in hexadecimal (48 ones in binary).  It is flooded out all Ethernet switch ports except the incoming port. It is not forwarded by a router.  If the encapsulated data is an IPv4 broadcast packet, this means the packet contains a destination IPv4 address that has all ones (1s) in the host portion. This numbering in the address means that all hosts on that local network (broadcast domain) will receive and process the packet. ETHERNET MAC ADDRESSES M U LT I C A S T M A C A D D R E S S An Ethernet multicast frame is received and processed by a group of devices that belong to the same multicast group.  There is a destination MAC address of 01-00-5E when the encapsulated data is an IPv4 multicast packet and a destination MAC address of 33-33 when the encapsulated data is an IPv6 multicast packet.  There are other reserved multicast destination MAC addresses for when the encapsulated data is not IP, such as Spanning Tree Protocol (STP).  It is flooded out all Ethernet switch ports except the incoming port, unless the switch is configured for multicast snooping. It is not forwarded by a router, unless the router is configured to route multicast packets.  Because multicast addresses represent a group of addresses (sometimes called a host group), they can only be used as the destination of a packet. The source will always be a unicast address.  As with the unicast and broadcast addresses, the multicast IP address requires a corresponding multicast MAC address. 7.3 THE MAC ADDRESS TABLE © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 24 T H E M AC A D D R E S S TA B L E SWITCH FUNDAMENTALS MAC address table properties: A Layer 2 Ethernet switch uses Layer 2 MAC  When a switch is turned on, the MAC addresses to make forwarding decisions. It is address table is empty completely unaware of the data (protocol)  Referred as content addressable memory (CAM) table. being carried in the data portion of the frame, such as an IPv4 packet, an ARP message, or an IPv6 ND packet. The switch makes its forwarding decisions based solely on the Layer 2 Ethernet MAC addresses. (7.3) An Ethernet switch examines its MAC address table to make a forwarding decision for each frame, unlike legacy Ethernet hubs that repeat bits out all ports except the incoming port. THE MAC ADDRESS TABLE SWITCH LEARNING AND FORWARDING Examine the Source MAC Address (Learn) Every frame that enters a switch is checked for new information to learn by examining the source MAC address of the frame and the port number where the frame entered the switch. If the source MAC address does not exist, it is added to the table along with the incoming port number. If the source MAC address does exist, the switch updates the refresh timer for that entry. By default, most Ethernet switches keep an entry in the table for 5 minutes. Note: If the source MAC address does exist in the table but on a different port, the switch treats this as a new entry. The entry is replaced using the same MAC address but with the more current port number. T H E M A C A D D R E S S TA B L E SWITCH LEARNING AND FORWARDING (CONTD.) Find the Destination MAC Address (Forward) If the destination MAC address is a unicast address, the switch will look for a match between the destination MAC address of the frame and an entry in its MAC address table. If the destination MAC address is in the table, it will forward the frame out the specified port. If the destination MAC address is not in the table, the switch will forward the frame out all ports except the incoming port. This is called an unknown unicast. Note: If the destination MAC address is a broadcast or a multicast, the frame is FLOWCHART ON HOW A SWITCH HANDLES FRAMES Note: Refer to the materials in NetAcad.com check activity in 7.3.6 to practice how switches handles frames T H E M A C A D D R E S S TA B L E FILTERING FRAMES As a switch receives frames from different devices, it is able to populate its MAC address table by examining the source MAC address of every frame. When the MAC address table of the switch contains the destination MAC address, it is able to filter the frame and forward out a single port. 7.4 SWITCH SPEEDS AND FORWARDING METHODS © 2016 Cisco and/or its affiliates. All rights reserved. Cisco Confidential 30 FRAME FORWARDING METHODS ON CISCO SWITCHES Store-and-forward Cut-through switching switching Wait to receive the entire frame forwards the frame before it is entirely and computes the CRC to check received. Read the destination address so properties for errors that it can determine to which port it should forward out the data - it determines if a frame has Reduced latency errors before propagating the frame. advantages - Discarding frames with errors reduces the amount used bandwidth disadvantage Increased latency No error checking before forwarding s Fast forwarding: typical cut-through method of switching, offers the lowest level of latency by immediately forwarding a packet after reading the destination address Types - Fragment free: the switch stores and S W I TC H S P E E D S A N D F O RWA R D I N G M E T H O D S MEMORY BUFFERING ON SWITCHES An Ethernet switch may use a buffering technique to store frames before forwarding them or when the destination port is busy because of congestion. Method Description Frames are stored in queues that are linked to specific incoming and outgoing ports. A frame is transmitted to the outgoing port only when all the frames ahead in Port-based the queue have been successfully transmitted. memory It is possible for a single frame to delay the transmission of all the frames in memory because of a busy destination port. This delay occurs even if the other frames could be transmitted to open destination ports. Deposits all frames into a common memory buffer shared by all switch ports and the amount of buffer memory required by a port is dynamically allocated. Shared memory The frames in the buffer are dynamically linked to the destination port enabling a packet to be received on one port and then transmitted on another port, without moving it to a different queue. Shared memory buffering also results in larger frames that can be transmitted with fewer dropped frames. This is important with asymmetric switching which allows for different data rates on different ports. Therefore, more bandwidth can be dedicated to certain ports (e.g., server port). S W I TC H S P E E D S A N D F O RWA R D I N G M E T H O D S DUPLEX AND SPEED SETTINGS  Two of the most basic settings on a switch are the bandwidth (“speed”) and duplex settings for each individual switch port. It is critical that the duplex and bandwidth settings match between the switch port and the connected devices.  There are two types of duplex settings used for communications on an Ethernet network:  Full-duplex - Both ends of the connection can send and receive simultaneously.  Half-duplex - Only one end of the connection can send at a time.  Autonegotiation is an optional function found on most Ethernet switches and NICs. It enables two devices to automatically negotiate the best speed and duplex capabilities. Note: Gigabit Ethernet ports only operate in full-duplex. SWITCH SPEEDS AND FORWARDING METHODS DUPLEX AND SPEED SETTINGS S W I TC H S P E E D S A N D F O RWA R D I N G M E T H O D S D U P L E X A N D S P E E D S E TT I N G S  Duplex mismatch is one of the most common causes of performance issues on 10/100 Mbps Ethernet links. It occurs when one port on the link operates at half- duplex while the other port operates at full-duplex.  This can occur when one or both ports on a link are reset, and the autonegotiation process does not result in both link partners having the same configuration.  It also can occur when users reconfigure one side of a link and forget to reconfigure the other. Both sides of a link should have autonegotiation on, or both sides should have it off. Best practice is to configure both Ethernet switch ports as full-duplex. S W I TC H S P E E D S A N D F O RWA R D I N G M E T H O D S AUTO -MDIX Connections between devices once required the use of either a crossover or straight- through cable. The type of cable required depended on the type of interconnecting devices. Note: A direct connection between a router and a host requires a cross-over connection. Most switch devices now support the automatic medium-dependent interface crossover (auto-MDIX) feature. When enabled, the switch automatically detects the type of cable attached to the port and configures the interfaces accordingly. Therefore, you can use either a crossover or a straight-through cable for connections to a copper 10/100/1000 port on the switch, regardless of the type of device on the other end of the connection. The auto-MDIX feature is enabled by default on switches running Cisco IOS Release 12.2(18)SE or later. However, the feature could be disabled. For this reason, you should always use the correct cable type and not rely on the auto-MDIX feature. Auto-MDIX can be re-enabled using the mdix auto interface configuration command. End

Use Quizgecko on...
Browser
Browser