Sei sulla pagina 1di 4

Layer 2 Switching Layer 2 switches are similar to multiport bridges in that they learn and forward frames on each

port. The major difference is the involvement of hardware that ensures that multiple switching paths inside the switch can be active at the same time. For example, consider Figure 1, which details a four-port switch with stations A on port 1, B on port 2, C on port 3 and D on port 4. Assume that A desires to communicate with B, and C desires to communicate with D. In a single CPU bridge, this forwarding would typically be done in software, where the CPU would pick up frames from each of the ports sequentially and forward them to appropriate output ports. This process is highly inefficient in a scenario like the one indicated previously, where the traffic between A and B has no relation to the traffic between C and D. Figure : Layer 2 switch with External Router for Inter-VLAN traffic and connecting to the

Internet

Enter hardware-based Layer 2 switching. Layer 2 switches with their hardware support are able to forward such frames in parallel so that A and B and C and D can have simultaneous conversations. The parallel-ism has many advantages. Assume that A and B are NetBIOS stations, while C and D are Internet Protocol (IP) stations. There may be no rea-son for the communication between A and C and A and D. Layer 2 switching allows this coexistence without sacrificing efficiency.

Layer 2 switching is hardware based; it uses the host's Media Access Control (MAC) address. Switches use Application Specific Integrated Circuits (ASIC) to build and maintain filter tables. Switches tend to be faster than Routers, because they don't look at the logical address (Network layer headers), they instead use the hardware address defined at the Data Link (MAC) layer to decide whether to forward or discard the frame. Layer 2 switching is so efficient because it doesn't modify the data packet only the frame encapsulating the packet; this also causes it to be less error prone.

Uses Layer 2 switching for network connectivity and network segmentation (each port is a separate collision domain). During planning, the planner needs to be careful how a network is segmented and ensure that their users spend 80% of their time on their local segment, and all the segments of a switch are still in the same broadcast domain. Use routers to split up broadcast domains. Benefits of Layer 2 Services A layer 2 service might offer some or all of the following benefits: Bandwidth---L2 service provides excellent performance for individual users by allocating dedicated bandwidth to each switch port (for example, each network segment). This technique is known as microsegmenting. VLANs---LAN switches can group individual ports into logical switched workgroups called VLANs, thereby restricting the broadcast domain to designated VLAN member ports. VLANs are also known as switched domains and autonomous switching domains. Communication between VLANs requires a router. Automated packet recognition and translation---Cisco's unique Automatic Packet Recognition and Translation (APaRT) technology recognizes and converts a variety of Ethernet protocol formats into industry-standard CDDI/FDDI formats. With no changes needed in either client or server end stations the Catalyst solution can provide an easy migration to 100-Mbps server access while preserving the user's investment in existing shared 10Base-T LANs. The 3 Functions of Layer 2 Services

1. Address learning - Layer 2 switches retain, in their filter tables, the source hardware address and port interface it was received on.

2.

Forward/Filter decisions - When a frame is received, the switch looks at the destination hardware address and finds the interface it is on in the filter table. If the address is unknown, the frame is broadcast on all interfaces except the one it was received on. 3. Loop Avoidance - If multiple connections between switches exist for redundancy, network loops can occur. Spanning Tree Protocol is used to stop loops while still allowing redundancy.

Spanning Tree Protocol


STP is a Layer 2 link management protocol that provides path redundancy while preventing undesirable loops in the networks.The Spanning Tree Protocol (STP) is a network protocol that ensures a loop-free topology for any bridged Ethernet local area network. The basic function of STP is to prevent bridge loops and the broadcast radiation that results from them. Spanning tree also allows a network design to include spare (redundant) links to provide automatic backup paths if an active link fails, without the danger of bridge loops, or the need for manual enabling/disabling of these backup links. Spanning Tree Protocol (STP) is standardized as IEEE 802.1D. As the name suggests, it creates a spanning tree within a network of connected layer-2 bridges (typically Ethernet switches), and disables those links that are not part of the spanning tree, leaving a single active path between any two network nodes. Spanning Tree Protocol (STP) is a Layer 2 protocol that runs on bridges and switches. The specification for STP is IEEE 802.1D. The main purpose of STP is to ensure that you do not create loops when you have redundant paths in your network. Loops are deadly to a network. STP is based on an algorithm that was invented by Radia Perlman while she was working for Digital Equipment Corporation. The Catalyst series switches use STP (IEEE 802.1D bridge protocol) on all Ethernet virtual LANS (VLANs). When you create fault-tolerant internetworks, you must have a loop-free path between all nodes in a network. In STP, an algorithm calculates the best loop-free path throughout a Catalyst-switched network. The switches send and receive spanning-tree packets at regular intervals (2 seconds). The switches do not forward the packets, but use the packets to identify a loop-free path. The default configuration has STP enabled for all VLANs. Multiple active paths between stations cause loops in the network. If a loop exists in the network, you might receive duplicate messages. When loops occur, some switches see stations on both sides of the switch. This condition confuses the forwarding algorithm and allows duplicate frames to be forwarded. To provide path redundancy, STP defines a tree that spans all switches in an extended network. STP forces certain redundant data paths into a standby (blocked) state. If one network segment in the STP becomes unreachable, or if STP costs change, the spanning-tree algorithm reconfigures the spanning-tree topology and reestablishes the link by activating the standby path.

Spanning Tree Protocol Port States

Blocking - doesn't forward any frames, but still listens to BPDUs. Ports default to blocking when the switch powers on. Used to prevent network loops. If a blocked port is to become the designated port, it will first enter listening state to ensure that it won't create a loop once it goes into forwarding state. Listening - listens to BPDUs to ensure no loops occur on the network before passing data frames. Learning - learns MAC addresses and builds filter table, doesn't forward frames. Forwarding - sends and receives all data on the bridge ports. A forwarding port has been determined to have the lowest cost to the root bridge.

Potrebbero piacerti anche