Switching at Different Layers


Switching at Different Layers

Now that we've seen examples of different information available within different layers of the OSI model, let's look at how this information can be used to make intelligent traffic forwarding decisions. Before the development of switching, Ethernet relied on broadcast or flooding of packets to all end stations within a network to forward traffic. Ethernet is effectively a shared medium with only one Ethernet end station able to transmit at any time. Combine this with early implementation techniques relying on every end station in an Ethernet network seeing every packet, even if it was not addressed to it, and issues of scalability quickly surface.

Layer 2 Switching

The first implementation of Ethernet or Layer 2 switching uses information in the Ethernet headers to make traffic forwarding decisions. Intelligent switches learn which ports have which end stations attached by recording the Ethernet MAC addresses of packets ingressing the switch. Using this information along with the ability to parse the Layer 2 headers of all packets means that a Layer 2 switch need only forward frames out of ports where it knows the end station to be. For end station addresses that have not yet been learned, frames with unknown destination MAC addresses are flooded out of every port in the switch to force the recipient to reply. This will allow the switch to learn the relevant MAC address, as it will be the source address on the reply frame.

Layer 2 switching is implemented along side Layer 3 routing for local area networks to facilitate communication between devices in a common IP subnet. As the information at this layer is relatively limited, the opportunity to configure Layer 2 switches to interpret address information and act upon it in any way other than described previously is generally not required. Many Layer 2 switches will offer the ability to configure intelligent services such as Quality of Service (QoS), bandwidth shaping, or VLAN membership based on the Layer 2 information. Figure 2-3 shows a simplified Layer 2 frame with examples of information that might be used to make switching decisions.

Figure 2-3. Example Layer 2 headers for switching.

graphics/02fig03.gif

Layer 3 Switching and Routing

Traditional protocol routers work by using information in the Layer 3 headers of Ethernet frames. While routing platforms exist for many different protocols (e.g., IPX, AppleTalk, and DECNet), in TCP/IP terms a router or routing device will typically use the destination IP address in the Layer 3 header to make a forwarding decision. The main advantage of Layer 3 routing in its earliest guises was that it gave the network designer the ability to segregate the network into distinct IP networks and carefully control the traffic and reachability between each.

Many of the early implementers and pioneers of Layer 3 routing devices used software-based devices as platforms that, while offering a flexible platform for development of the technology, often provided limitations in terms of performance. As Layer 2 switching became more commonplace and the price per port of Ethernet switching systems dropped, manufacturers looked to combine the performance of ASIC-based Layer 2 switching with the functionality and flexibility of Layer 3 routing. Step forward the Layer 3 switch. Layer 3 switches work by examining the destination IP address and making a forwarding decision based on the routing configuration implemented. The destination subnet might be learned via a connected interface, a static route, or a dynamic routing protocol such as RIP, OSPF, or BGP. In all instances, once the Layer 3 switch has examined the frame and compared the destination IP address against the information in its routing database, the destination MAC address is changed and the frame is forwarded through the relevant egress port. For IP frames traversing a Layer 3 device, such as a router or Layer 3 switch, the TTL field in the IP header is also decremented to indicate to end stations and intermediaries that a routing hop has occurred.

It is once we reach the Layer 3 switching environment that configuration for devices become inherently more complex. The administrator must configure the correct routing information to enable basic traffic flow along with the interface IP addresses in each of the subnets to which the Layer 3 switch is attached.

Figure 2-4 shows the typical information used by a Layer 3 switch in making a forwarding decision.

Figure 2-4. Example Layer 3 headers for switching and routing.

graphics/02fig04.gif



Optimizing Network Performance with Content Switching
Optimizing Network Performance with Content Switching: Server, Firewall and Cache Load Balancing
ISBN: 0131014684
EAN: 2147483647
Year: 2003
Pages: 85

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net