006 Switching Concepts
006 Switching Concepts
com
Switching Concepts
The primary purpose of a switch is to make forwarding decisions based on
destination MAC address. The MAC address table is created with a list of
destination MAC address for each connected device. In addition the switch port
assigned and VLAN membership. The Gigabit Ethernet ports are full-duplex that
define a single collision domain per switch port.
The Gigabit Ethernet (or faster) switch port supports full-duplex traffic between the
host and network switch. That eliminates collisions and creates a collision domain
per port. The fact that there are no collisions increases data rate and decreases
network latency for host connections.
Microsegmentation
Gigabit Ethernet switch port interfaces enable both full-duplex operation and
microsegmentation. That eliminates collisions on the switch port and dedicates all
port bandwidth to the connected host. CSMA/CD is a method for detecting Ethernet
collisions on older hubs and bridges. It is no longer required with full-duplex switch
ports.
VLAN creates a broadcast domain that is defined by assigning switch port/s to the
same VLAN. All hosts connected to assigned switch ports are part of the same
broadcast domain. Creating multiple VLANs will then define multiple broadcast
domains. Switches do not forward broadcast or multicast traffic between VLANs
minimizing bandwidth utilization.
24 bits 24 bits
The switch builds a MAC address table comprised of MAC address, switch port and
VLAN membership for each connected host. The switch creates a separate MAC
address table for each configured VLAN. Any unicast flooding of a frame to learn a
MAC address is for the assigned VLAN only. The following IOS show command will
list the contents of the MAC address table for a switch. Where there are multiple
VLANs configured, the switch will list all MAC address tables for all VLANs in a
single table listing.
Layer 2 network switches does not rewrite the frame header MAC addressing. It
examines the source MAC address and destination MAC address. The source MAC
address and associated port is added to the MAC address table if it isn’t listed. The
switch then does a lookup of the destination MAC address.in the MAC address
table to makes a forwarding decision. The frame is forwarded out the switch port
associated with the destination MAC address.
Broadcast Frame
The host first sends an ARP request packet to learn MAC address of a destination
server. That occurs whether host and server are assigned to the same VLAN or
different VLANs (subnets). Layer 2 broadcast frames are created by switches for
the purpose of sending an ARP request and not learned from inbound switch ports.
The switch creates a broadcast frame using FFFF.FFFF.FFFF as the destination
MAC address. The broadcast frame is forwarded out of all switch ports and ends up
at the default gateway. ARP request is then sent from the default gateway (router or
Layer 3 switch) to learn the MAC address of server.
www.cisconetsolutions.com
MAC address learning occurs when the destination MAC address is not in the MAC
address table. MAC learning is triggered as well when the aging time expires for an
address. The switch removes MAC address table entries every 300 seconds as a
default. Configuring the MAC aging timer to zero disables aging of MAC addresses.
The switch will unicast flood a frame to update the MAC address table.
MAC Flooding
The host sends packets with an IP header encapsulated in a frame. The source and
destination IP address are required for end-to-end connectivity. Layer 2 switch does
not examine or understand IP addressing. They can only examine Layer 2 frame
within a data message for source and destination MAC address.
The following summarizes what happens when a host sends data to a server.
1. The switch adds the source MAC address of the incoming frame if it is not listed
in the MAC address table. That is a destination MAC address for any frames
destined for that host.
2. The switch does a MAC address table lookup for the server destination MAC
address.
3. The switch floods the frame out of all switch ports except the port where the
source MAC address was learned. This only occurs when the destination MAC
address is not in the MAC address table.
4. The server with the matching destination MAC address responds to the switch
with a frame.
5. The switch then updates MAC address table with MAC address of server. .
Broadcast Domain
The VLAN creates a broadcast domain that is defined by assigning switch port/s to
the same VLAN. All hosts connected to switch ports of the same VLAN are part of
the same broadcast domain. Creating multiple VLANs defines multiple broadcast
domains. Switches do not forward broadcast or multicast traffic between VLANs
minimizing bandwidth utilization compared with hubs and bridges. The switch only
forwards unicasts, broadcasts and multicasts on the same segment (VLAN).
www.cisconetsolutions.com
Cut-Through Switching
This switching technique optimizes performance by examining only the first six
bytes (destination MAC address) of an Ethernet frame before making a forwarding
decision. The switch does a MAC address table lookup for the destination MAC
address and forwards the frame. The advantage is forwarding decision is made
before all of the frame arrives and thereby minimizes latency.
Store-and-Forward Switching
The store-and-forward method is traditional switching where the frame is not
forwarded until all of the frame has arrived. The switch copies the frame to memory
before examining the destination MAC address.
Frame Switching
Layer 2 switches only read the frame header within a data message to make a
forwarding decision.
The switch examines the frame header for the destination MAC address and does a
MAC address table lookup to make a forwarding decision. The frame is then
forwarded out the switch port associated with the destination MAC address where
the host is connected.
Switches and access points make forwarding decisions based on the destination
MAC address in a frame. They do not rewrite MAC addressing in the frame header.
It is only routers, Layer 3 switches and WLC that do frame rewrite. Wireless
access points are essentially bridges that examine source and destination MAC
address. The source MAC address of incoming frame is added to the MAC address
table if it is not listed.
www.cisconetsolutions.com
Example 1
Refer to the network drawing where host-1 is sending data to server-1. The
destination MAC address is not in the MAC address table (unknown). The switch
will unicast flood (learning) the frame out all ports except the port where the frame
was learned from (Gi1/1).
Server-1 with the matching destination MAC address receives the frame and sends
a frame to switch-1. The switch then updates MAC address table with the MAC
address of server-1 and associated port (Gi1/3).
Example 2
Refer to the network drawing where host-2 is sending data to server-1. The switch
will examine the source and destination MAC address of the frame arriving on port
Gi1/2 from host-2. The MAC address table has no entry for either source or
destination MAC address.
The switch will then add the source MAC address (host-2) to the MAC table. In
addition the switch will unicast flood (MAC learning) a frame out all ports except the
port where the frame was learned (Gi1/2). That broadcast frame contains only a
destination MAC address.
www.cisconetsolutions.com
Server-1 with the matching destination MAC address receives the frame and sends
a reply frame to the switch. The switch updates the MAC address table with the
MAC address of server-1.
Example 3
Refer to the network drawing where host-2 is sending to data to server-1. In this
example, switch-1 will examine the incoming frame from host-2 arriving on port
Gi1/2. The switch will do a MAC table lookup based on the destination MAC
address (0000.1234.5678).
The destination MAC address is assigned to server-1 and frame is forwarded out
switch port Gi1/3 associated with server-1.
Switch will examine the frame and do a MAC address table lookup.
Frame is forwarded out switch port Gi1/3.
www.cisconetsolutions.com