No. of Recommendations: 74
There have been various posts on various boards about the NGN, fat pipes and so on. Quite a lot of them discuss something called a switch. So since this is rather critical to the understanding of who competes with whom, perhaps it would be a good idea to define a switch. And perhaps also to explain what people mean when they say that XXXX is a layer Y switch.

The OSI Model
I'm going to start this discussion backwards by discussing the OSI model as it applies to networks. The OSI defined a model of 7 layers to describe networking communication. The layers are (from lowest to highest): Physical, Data-Link, Network, Transport, Session, Presentation and Application. The helpful mnemonic for this is "Please Do Not Trust Sales People's Assurances" which also has the benefit of being good advice.

( Humourists have added layers additonal layers such as User, User's Boss... )

So great you've defined these weird layers what the heck does this mean?

Physical defines the transport medium - things such as how you signal a 1 or a 0, how to define connectors and cabling types or the wavelength of light to be emitted by a laser. This is layer 1. An example of a layer 1 protocol is the definition of 1s and 0s in gigabit ethernet for single mode fiber.

Data link defines things such as how the 1s and 0s are put together to make information and how a receipient can tell when a packet of information starts and stops as well as useful details such as whether its destined for him and whether it is error-free. Data-link only defines information over a particular sort of technology - it is very much tied to the underlying physical medium - but can cope with changes between (say) copper wire and fiberoptics. This is layer 2. A good example of a layer 2 protocol is Ethernet.

The network layer defines information over any data-link layer. In others words network layer (layer 3) defines end-end destinations over a variety of layer 2 protocols. In other words while layer 2 protocols are aware of the underlying physical cablign layer 3 protocols aren't and don't really care. IP is the classic layer 3 protocol and it can run over SONET, Ethernet, Token-ring, T1 and so on.

The transport layer (layer 4) defines the mechanism by which end devices keep track of information exchange and (optionally) retransmit information lost by the network path. In internet terms UDP and TCP are layer 4 protocols - UDP is the conenctionless one which has no built in way to recover from packet loss whereas TCP forms a connection between two points and retransmits data lost or corrupted en route so that the higher layers are unaware of the state of the network.

In networking terms Session (Layer 5), Presentation (Layer 6) and Application (Layer 7) generally get lumped together as higehr layers - although sometimes it is interesting to break out session (defining such things as HTTP) from presentation (Windows API) and application (Netscape).

What is a switch?
A switch is something with multiple inputs and multiple outputs which has some way to take data arriving on any of the inputs and make a decision as to which of the outputs it should go to.

A layer 1 switch is something that blindly takes any signal that appears on l port and sends it out on another. There are very few layer 1 switches around because they are not usually very useful but they are used in DWDM to take various wavelengths from one fiber and switch them to others - these are the so called "lambda routers"

A layer 2 switch is something that takes packets that arrive on one port and looks at the layer 2 header to decide which port (or ports) where to send it. A layer 2 switch may switch between different speeds and physical types but generally no more than that - so a L2 ethernet switch may switch between say gigabit ethernet fiber and 10mbps ethernet over UTP. About the only exception ot this rule are the switcehs that translate LAN protocols to/from ATM. Once upon a time this was called a (multiport)bridge. A L2 switch - although aware of packets - generally makes no modification to the packets that pass through it, it just looks at the layer 2 header and passes it on. The "classic" layer 2 switches are the 10/100 LAN switches that are now the standard deployed in most enterprises - e.g. the 3com Superstack range, the Nortel Baystack 450 or the Cisco Catalyst 2900s.

A layer 3 switch is something that takes packets that arrive on one port, removes the layer 2 header and looks at the layer 3 header to decide which port (or ports) where to send it. L3 switches are very similar in function to routers - the difference is primarily that L3 switches probably only support a subset of the L3 protocols available (always IP, sometimes IPX also), but do the packet modification required to send it on the next hop in hardware rather than in software. Large modern routers (Cisco GSR, All Junipers, Avici etc) have hardware assistence too so there really is little difference between a router and a L3 switch in practical terms. The orignal layer 3 switch is Nortel's Passport (ex Accelar) 1200, the biggest one available today is probably Extreme's Black Diamond 6816 which can claim to be a 256 Gbps switch - higher capacity than practically anything other than Avici and the other terabit routers.

A Layer 4 switch is usually a layer 3 switch with added smarts - essentially a layer 4 device looks at the TCP or UDP header as well as the IP address to decide where to send a packet. It is used most often to provide a single virtual IP address for multiple physical servers. The defining switch in this category is the Alteon 700 series.

I know of no device that calls itself a layer 5 or 6 switch

A layer 7 switch is a layer 4 switch only more so. It performs the same function of server load balancing but rather than just looking at the IP addresss and TCP/UDP port number it in fact mimics a server until it can see the actual HTTP (pretty much exclusively layer 7 switches work on HTTP) request before redirecting it to a server. So what you may ask? well its like this - a layer 4 switch sends all requests to to the same range of servers so they all have to have the all the pages and images on the site (they all have to contain and and so on) whereas with a layer 7 switch it is possible to have rules so that requests for images (for example) are sent to one static content sever while dynamic content - such as this message - are sent to a different server. Again Alteon has the leading product in this category with the 180E (I think).

Hope this helps you understand when a switch is not a switch and so on...

Print the post  


What was Your Dumbest Investment?
Share it with us -- and learn from others' stories of flubs.
When Life Gives You Lemons
We all have had hardships and made poor decisions. The important thing is how we respond and grow. Read the story of a Fool who started from nothing, and looks to gain everything.
Community Home
Speak Your Mind, Start Your Blog, Rate Your Stocks

Community Team Fools - who are those TMF's?
Contact Us
Contact Customer Service and other Fool departments here.
Work for Fools?
Winner of the Washingtonian great places to work, and Glassdoor #1 Company to Work For 2015! Have access to all of TMF's online and email products for FREE, and be paid for your contributions to TMF! Click the link and start your Fool career.