CISCO
Posted By Irfad

Difference between Layer 2 and Layer 3 switches


Layer 2 switches and Layer 3 switches – you may have heard the terms before.

So what exactly are they?

Both switch types have the capability of linking network devices together from one port to another. Unlike hubs, switches distribute data more intelligently as it interprets them and sends it out to the right destination.

Layer 2 and Layer 3 terms comes from the OSI seven Layer model (a theoretical way of dividing a network architecture up with functionality, service, dependence and application). Within the model, Layer 2 represents the “Data Link Layer” while Layer 3 represents the “Network Layer”.

Layer 2 switches have the capability of moving packets around a single network. As the reference to the OSI Layer holds true, this switch facilitates data only (and) within the physical layer (also known as Layer 1 e.g. cables and connectors). It is intelligent enough to learn the MAC addresses of each device, source/ destination of each packet and routes each packet within the single domain (at wire speed). While it breaks up a collision domain, it does not have the ability to transport the data packet from one network to another nor can it prioritize packets to guarantee bandwidth. Putting devices on a Layer 2 switch makes one entire large local segment (or what some people might call a “broadcast domain”).

Layer 3 switches act like a traditional router – it enables different network segments to be linked together. With this, data can be inter-networked from one network subnet to another. Prioritization of packets can be setup and the Layer 3 switch is intelligent enough to learn which routes are the best between the networks. While the Layer 2 switch routes packets based on MAC, Layer 3 switches route data packets based on IP. Going a step further, Layer 3 switches have the capability to logically separate networks into two or more VLANs (Virtual LANs), enhancing security and unauthorized access between networks. A Layer 3 switch typically sits above Layer 2 switches and governs the routes/ access between the different networks.

An example of this would be within a water treatment facility. Being a big treatment plant, each separate department (Clorination, Aeration, Distillation, Filtration, Waste Generation etc.) is split up into smaller/mini networks. Each mini network (consisting of PLC, I/O modules, monitors, sensors, HVAC, Historian stations and more) is controlled by its own Layer 2 switch. As all departments need the ability to synchronize, coordinate and share data with each other to perform the relevant operations, there needs to be a device that allows each data to move from one department’s network to another. That is where the Layer 3 switch comes in. All Layer 2 switches essentially converges to the Layer 3 switch facilitating inter-network data transport with the ability to prioritize packets, allow/ limit access to certain networks at any given time.

The Cisco IE-3000 switch and Transition Networks’ Milan SM801PST are examples of Layer 2 switches. The Cisco Catalyst 3750 would be a good example of a Layer 3 switch.

[box]Source: http://j.mp/oFnp7A[/box]


View Comments
View Comments
  • faisalbashir

    I’m a tech enthusiast, who like technology and always like to share what I learn


This site uses Akismet to reduce spam. Learn how your comment data is processed.