For Geeks @nd the not so Geeky

What is an Ethernet Switch and Layer 2 Bridging Explained

Ethernet Switch – Layer 2 Switching and Bridging

  • Comparison of destination MAC address and bridge table addresses
  • If unknown source address, new entry in MAC address table with source port gets created
  • If destination MAC address from same segment as source, no forwarding (Filtering)
  • If destination MAC address from different segment as source, forwarding
  • If destination MAC address unknown, broadcast to all devices except receiving port (Flooding)

A LAN ethernet switch is essentially a multiport bridge that use microsegmentation to reduce the number of collisions in a LAN and increases the available bandwidth.
In addition to faster microprocessors and memory, two other technological advances made ethernet switches possible. ethernet switch vs router

Content Addressable Memory (CAM) allows an ethernet switch to directly find a port associated with a MAC address without using search algorithms.

An Application-Specific Integrated Circuit (ASIC) is a device consisting of undedicated logic gates that can be programmed to perform functions at logic speeds. Operations that might have been done in software now can be done in hardware using ASIC.

Another function of a LAN ethernet switch that dramatically improves bandwidth is full-duplex transmission.

  • Doubles the amount of bandwidth between nodes
  • Provides a collision-free transmission environment

Microsegmentation facilitates the creation of a dedicated segment and provides dedicated bandwidth to each user on the network. It reduces collisions in a network and efficiently increases the capacity for each station connected to the network.

Ethernet Switch Latency (Propagation Delay)

Caused by

  • Media delays
  • Circuit delays
  • Software delays

Delays caused by the content of the frame and where in the frame switching decisions can be made. For example, a device cannot route a frame to a destination until the destination MAC address has been read.

Latency is the time delay between when a frame first starts to leave the source device and when the first part of the frame reaches its destination.

Ethernet Switch Modes

  • Store-and-forward – switch reads entire frame, checks for errors and sends. If errors are detected, frame is discarded. Must be used for asymmetric switching
  • Cut-through – switch reads frame up to the destination MAC address, then sends, no error-checking
  • Fragment-free – Reads initial 64 bytes where most errors and all collisions occur, before forwarding

Spanning-Tree Protocol

An ethernet switch sends special messages called bridge protocol data units (BPDU) out all its ports to let other switches know of its existence. The switches use a spanning tree algorithm (STA) to resolve an shut down the redundant paths in order to avoid loops and cause Broadcast storms.
Consequently switches have five operating modes

  • Blocking – Port sends and listens to BPDUs but does not forward frames. Default state of all ports when switch is powered on
  • Listening – Port listens to BPDUs to make sure there are no loops on the network, no frames are forwarded
  • Learning – Port learns MAC addresses and builds an address table, no frames are forwarded
  • Forwarding – Port forwards frames, BPDUs are sent and listened to
  • Disabled – Port does not participate in the operation of STP. No listening to BPDUs or forwarding. Port is in “shutdown” state

Collision Domains and Broadcasts

Layer 1 media topologies

  • Shared-media environment – Multiple hosts attached to the same medium. Traditional bus-based (coax) Ethernet and hub-based Ethernet (UTP)
  • Extended shared-media environment – By using repeaters or multiple hubs, creates an extended collision domain
  • Point-to-point network environment – Widely used in dialup networking, one device connected to only one other device. No collisions

Layer 1 devices do not break up collision domains. Layer 2 and 3 devices do brake up collision domains, also known as segmentation. Segmentation increases the amount of bandwidth in the collision domain. This works well as long as the traffic between segments is not too heavy. Otherwise the Layer 2 device could become a bottleneck itself.
Layer 2 Broadcasts

Layer 2 devices such as an ethernet switch must flood all broadcast (0xFFFFFFFFFFFF) and multicast traffic because they cannot learn the broadcast or multicast MAC address. The accumulation of broadcast and multicast traffic is referred to as broadcast radiation. Because the NIC must interrupt the CPU to process each broadcast or multicast group that it belongs to, broadcast radiation affects the performance of hosts in the network.

Workstations broadcast an Address Resolution Protocol (ARP) request every time they need to locate a MAC address that is not in the ARP. The three sources of broadcasts and multicasts in IP networks are workstations, routers, and multicast applications. layer 3 switching

Broadcast storms can be caused by a device requesting information from a network that has grown too large.

So many responses are sent to the original request that the device cannot process them, or the first request triggers similar requests from other devices that effectively block normal traffic flow on the network.

A flat-switched network is a network of interconnected switches that does not utilize Layer 3 routing or something similar.

A particular video application can generate a 7-megabyte stream of multicast data that, in a switched network, would be sent to every segment, resulting in severe congestion.
Broadcast Domains

A broadcast domain is a grouping of collision domains that are connected by Layer 2 devices. Broadcast domains are controlled at Layer 3 because routers do not forward broadcasts. For a packet to be forwarded by a router, it must contain an IP address that is outside the range of addresses assigned to the LAN segment.

Data Flow

  • Layer 1 device (NIC) – Always forwards frame
  • Layer 2 device (Ethernet Switch) – Forwards unless something prevents it
  • Layer 3 device (Router) – Does not forward unless it has to

Layer 2 and Layer 3 Switching Combined – Multi Protocol Label Switching (MPLS)

Multi protocol label switching MPLS  is a very flexible and scaleable architecture that basically integrates Layer 2 switching with Layer 3 routing capabilities. It allows for network engineering through the use of labels which are attached to the header of a packet only once.

This greatly reduces the time routers need to perform complex lookups in their routing tables as they forward packets based on the label without further examination of the packet. Mpls is sometimes said to  be operating at the 2.5 layer and is protocol agnostic which means it can transport any kind of data packets including IP, ATM and SONET.

MPLS Ethernet switch labeling allows most packets to be forwarded on the backbone at a layer 2 (switching) rather than a layer 3 (routing) level which explains its faster transfer speed.

Leave a Response