Analyzing Ethernet LAN Switching Flashcards
Overview Of Switching Logic
- Deciding when to forward a frame or when to filter a frame, based on the destination MAC address
- Preparing to forward frames by learning MAC addresses by examining the source MAC address of each frame received by the switch
- Preparing to forward only one copy of the frame to the destination by creating a loop free environment with other switches by using Spanning Tree Protocol (STP)
Forwarding Known Unicast Frames
To decide where a frame should be forward, a switch builds a DYNAMIC TABLE that lists MAC addresses and outgoing interfaces
Compares the frame’s destination MAC address to the table, and decides whether to forward or filter
Switch’s MAC address table is also known as switching table, Content Addressable Memory (CAM) table
Forwarding choice of switch
Uses a forward versus filter decision schema, because the switch can also choose not to forward frames and not send frame out some ports
Unicast frame
Frames are called unicast frames when the destination address is known and is sent to only one host through one port.
Port is listed in the MAC table entry for that MAC address
Secondary Function Of Switch
Build an address table through learning the MAC address of data packets and the interfaces the data packet flows through
Switches build the address table by listening to incoming frames and examining the source MAC address in frame:
- If a frame enters the switch and the source MAC address is not in the MAC address table, the switch creates an entry in the table, MAC address to Interface
Unknown Unicast
For a switch, when there is no matching entry in the table, switches forward the frame out all interfaces (except the incoming interface) using a process called flooding ( These frames are called unknown unicast frames )
Flooding means that the switch forwards copies of the frame out all ports, except the port on which the frame was received
LAN broadcast frames
Ethernet broadcast address of FFFF.FFFF.FFFF ( Process helps deliver a copy of the frame to all devices in the LAN)
Avoiding the Loops (3rd Function)
The third primary feature of LAN switches is loop prevention, as implemented by Spanning Tree Protocol (STP)
W/o STP, any flooded frames would loop for an indefinite period of time, redundancy causes looping, flooding of frame would rotate around switches and each switch would flood the same frame
Process, STP blocks some ports from forwarding frames so that only one active path exists between any pair of LAN segments
Con of STP
Takes some work to balance traffic across the redundant alternate links
STP
STP causes each interface on a switch to settle into either a blocking state or a forwarding state.
Blocking means that the interface cannot forward or receive data frames
Forwarding means that the interface can send and receive data frames
If a correct subset of the interfaces is blocked, only a single currently active logical path exists between each pair of LANs
If a frame repeatedly floods the network the network would be congested as each switch stage would propagate n numbers of frames out of its ports
Switching Summary
- If the destination MAC address is a broadcast, multicast, or unknown destination unicast, the switch floods the frame
- If the destination MAC is a known unicast address;
a. If the outgoing interface listed in the MAC address table is different from which the frame was received, the switch forwards the frame out the outgoing interface
b. If the outgoing interface is the same as the interface in which the frame was received, the switch filters the frame, meaning that the switch simply ignores the frame and does not forward it - Switches use the following logic to learn MAC address table entries:
a. For each received frame, examine the source MAC address and note the interface from which the frame was received
b. If it is not already in the table, add the MAC address and interface it was learned on
4. Switches use STP to prevent loops by causing some interfaces to block, meaning that they do not send or receive frames
clearing Switch’s configuration
erase startup-config
delete vlan.dat
reload
hostname SW1
mac addresses command
show mac address-table dynamic
show mac address-table dynamic address 127.0.0.1
show mac address-table dynamic fa 0/1
show mac address-table dynamic valn1
show status
show interfaces status
show interface fa 0/1 status
show vlan status
Frame flooding in VLAN setup
If a frame enters via a port in VLAN 1, then the switch will forward or flood that frame out other ports in VLAN1 only, and not out any ports that happen to be assigned to another VLAN