Switches segment a LAN into separate parts, each part being a separate collision domain.
By creating a separate collision domain for each interface, switches multiply the amount of available bandwidth in the network.
The IEEE defines three general categories of Ethernet MAC addresses:
■ Unicast addresses: MAC addresses that identify a single LAN interface card.
■ Broadcast addresses: A frame sent with a destination address of the broadcast address
(FFFF.FFFF.FFFF) implies that all devices on the LAN should receive and process the frame.
■ Multicast addresses: Multicast MAC addresses are used to allow a dynamic subset of
devices on a LAN to communicate.
Primary job of a LAN switch is to receive Ethernet frames and then make a decision:
1. Deciding when to forward a frame or when to filter (not forward) a frame, based on the
destination MAC address
2. Learning MAC addresses by examining the source MAC address of each frame
received by the bridge
3. Creating a (Layer 2) loop-free environment with other bridges by using Spanning Tree
Protocol (STP)
The key to anticipating where a switch should forward a frame is to examine and
understand the address table. The table lists MAC addresses and the interface the switch
should use when forwarding packets sent to that MAC address.
How Switches Learn MAC Addresses
Switches build the address table by listening to incoming frames and examining the source
MAC address in the 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. The MAC address is
placed in the table, along with the interface from which the frame arrived.
Flooding Frames
The process of sending frames out all other interfaces, except the interface on which the
frame arrived, is called flooding. Switches flood unknown unicast frames as well as
broadcast frames. Switches also flood LAN multicast frames out all ports.
Switches keep a timer for each entry in the MAC address table, called an inactivity timer.
The switch sets the timer to 0 for new entries.
Each time the switch receives another frame with that same source MAC address, the timer is reset to 0.
If the switch ever runs out of space for entries in the MAC address table, the switch can then remove table entries with the oldest (largest) inactivity timers.
Avoiding Loops Using Spanning Tree Protocol
LAN switches is loop prevention, as implemented by Spanning Tree Protocol (STP). Without STP, frames would loop for an indefinite period of time in Ethernet networks with physically redundant links. To prevent looping frames, STP blocks some ports from forwarding frames so that only one active path exists between any pair of LAN segments (collision domains).
To avoid Layer 2 loops, all switches need to use 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.
Internal Processing on Cisco Switches
1. Store-and-forward processing:
The switch must receive the entire frame before forwarding the first
bit of the frame. This allows the switch to check the FCS before forwarding the frame.
2. Cut-through processing:
Switch starts sending the frame out the output port as soon as possible. This reduces latency, but it also propagates errors. Because the frame check sequence (FCS) is in the Ethernet trailer, the switch cannot determine if the frame had any errors before starting to forward the frame.
3. Fragment-free processing:
The switch forwards the frame after receiving the first 64 bytes of the frame, thereby avoiding forwarding frames that were errored due to a collision.
Switches Decision Making
Step 1 Switches forward frames based on the destination address:
a. If the destination address is a broadcast, multicast, or unknown destination
unicast (a unicast not listed in the MAC table), the switch floods the frame.
b. If the destination address is a known unicast address (a unicast address found
in the MAC table):
i. If the outgoing interface listed in the MAC address table is different from the
interface in which the frame was received, the switch forwards the frame out
the outgoing interface.
ii. 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.
Step 2 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 they are not already in the table, add the address and interface, setting the
inactivity timer to 0.
c. If it is already in the table, reset the inactivity timer for the entry to 0.
Step 3 Switches use STP to prevent loops by causing some interfaces to block,
meaning that they do not send or receive frames.
Collision Domains
A collision domain is a set of network interface cards (NIC) for which a frame sent by
one NIC could result in a collision with a frame sent by any other NIC in the same
collision domain.
For a single collision domain:
■ The devices share the available bandwidth.
■ The devices may inefficiently use that bandwidth due to the effects of collisions,
particularly under higher utilization.
Broadcast Domains
A broadcast domain is a set of NICs for which a broadcast frame sent by one NIC is
received by all other NICs in the same broadcast domain.
When a host receives a broadcast, the host must process the received frame. This means that the NIC must interrupt the computer’s CPU, and the CPU must spend time thinking about the received broadcast frame.
Virtual LAN
A LAN consists of all devices in the same broadcast domain.
Without VLANs, a switch considers all interfaces on the switch to be in the same broadcast
domain.
■ To create more flexible designs that group users by department, or by groups
■ To segment devices into smaller LANs (broadcast domains) to reduce overhead caused
■ To reduce the workload for STP by limiting a VLAN to a single access switch
■ To enforce better security by keeping hosts that work with sensitive data on a separate VLAN
■ To separate traffic sent by an IP phone from traffic sent by PCs connected to the phones
Roles of campus switches:
■ Access: Provides a connection point (access) for end-user devices. Does not forward
frames between two other access switches under normal circumstances.
■ Distribution: Provides an aggregation point for access switches, forwarding frames
between switches, but not connecting directly to end-user devices.
■ Core: Aggregates distribution switches in very large campus LANs, providing very
high forwarding rates.
Exness交易商开户流程
1 year ago
No comments:
Post a Comment