Ethernet Switching
Ethernet Switching
• Purpose of the Data Link Layer: Describe the purpose and function of
the data link layer in preparing communication for transmission on specific
media
• Data Link Frame: Describe the characteristics and functions of the data link
frame
• Binary Number System: Calculate numbers between decimal and binary
systems
• Ethernet Frames: Explain how the Ethernet sublayers are related to the
frame fields
• The MAC Address Table: Explain how a switch builds its MAC address
table and forwards frames
• Ethernet Frames
Ethernet Frames
• Ethernet Encapsulation
- Ethernet operates in the data link layer and the physical layer
- It is a family of networking technologies defined in the IEEE
802.2 and 802.3 standards
Ethernet Frames
• MAC Sublayer
- The MAC sublayer is responsible for data encapsulation and
accessing the media
- Data Encapsulation - IEEE 802.3 data encapsulation includes the
following:
1. Ethernet frame - This is the Internal structure of the Ethernet frame
2. Ethernet Addressing - The Ethernet frame includes both a source and
destination MAC address to deliver the Ethernet frame from Ethernet NIC to
Ethernet NIC on the same LAN
3. Ethernet Error detection - The Ethernet frame includes a frame check
sequence (FCS) trailer used for error detection
Ethernet Frames
This 6-byte field is the identifier for the intended recipient. As you will recall, this address is used by Layer 2 to assist
Destination MAC Address
devices in determining if a frame is addressed to them. The address in the frame is compared to the MAC address in the
Field device. If there is a match, the device accepts the frame. Can be a unicast, multicast or broadcast address.
Source MAC Address Field This 6-byte field identifies the originating NIC or interface of the frame.
This 2-byte field identifies the upper layer protocol encapsulated in the Ethernet frame. Common values are, in
Type / Length hexadecimal, 0x800 for IPv4, 0x86DD for IPv6 and 0x806 for ARP.
Note: You may also see this field referred to as EtherType, Type, or Length.
This field (46 - 1500 bytes) contains the encapsulated data from a higher layer, which is a generic Layer 3 PDU, or more
Data Field commonly, an IPv4 packet. All frames must be at least 64 bytes long. If a small packet is encapsulated, additional bits
called a pad are used to increase the size of the frame to this minimum size.
The Frame Check Sequence (FCS) field (4 bytes) is used to detect errors in a frame. It uses a cyclic redundancy check
(CRC). The sending device includes the results of a CRC in the FCS field of the frame. The receiving device receives the
Frame Check Sequence Field frame and generates a CRC to look for errors. If the calculations match, no error occurred. Calculations that do not
match are an indication that the data has changed; therefore, the frame is dropped. A change in the data could be the
result of a disruption of the electrical signals that represent the bits.
Ethernet MAC Address
• Frame Processing
- 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 Address
• Switch Fundamentals
- A Layer 2 Ethernet switch uses Layer 2 MAC addresses to make
forwarding decisions. It is completely unaware of the data
(protocol) 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.
- 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
- When a switch is turned on, the MAC address table is empty
Note: The MAC address table is sometimes referred to as a content addressable
memory (CAM) table
The MAC Address Table
• 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
The MAC Address Table
• Store-and-forward switching
- A big advantage of store-and-forward switching is that it
determines if a frame has errors before propagating the frame.
When an error is detected in a frame, the switch discards the
frame. Discarding frames with errors reduces the amount of
bandwidth consumed by corrupt data.
- Store-and-forward switching is required for quality of service
(QoS) analysis on converged networks where frame classification
for traffic prioritization is necessary. For example, voice over IP
(VoIP) data streams need to have priority over web-browsing
traffic.
Switch Speeds and Forwarding Methods
• Store-and-forward switching
Switch Speeds and Forwarding Methods
• Cut-Through Switching
- In cut-through switching, the switch acts upon the data as soon as it is
received, even if the transmission is not complete. The switch buffers just
enough of the frame to read the destination MAC address so that it can
determine to which port it should forward out the data. The switch does not
perform any error checking on the frame. There are two variants of cut-
through switching:
Fast-forward switching: Offers the lowest level of latency by immediately forwarding a packet
after reading the destination address. Because fast-forward switching starts forwarding before
the entire packet has been received, there may be times when packets are relayed with errors.
The destination NIC discards the faulty packet upon receipt. Fast-forward switching is the typical
cut-through method of switching.
Fragment-free switching: A compromise between the high latency and high integrity of store-
and-forward switching and the low latency and reduced integrity of fast-forward switching, the
switch stores and performs an error check on the first 64 bytes of the frame before forwarding.
Because most network errors and collisions occur during the first 64 bytes, this ensures that a
collision has not occurred before forwarding the frame.
Switch Speeds and Forwarding Methods
• Cut-Through Switching
Switch Speeds and Forwarding Methods
•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 the queue have
been successfully transmitted.
Port-based 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.
Switch Speeds and Forwarding Methods
• 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.
- 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, we 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
Do you have any
questions or
comments?
Thank you
for your attention !
In this presentation:
• Some icons were downloaded from flaticon.com and iconscout.com