Difference between layer 2 and layer 3 cisco switch


Published on

Leading Cisco networking products distributor-3network.com
Difference between layer 2 and layer 3 cisco switch

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Difference between layer 2 and layer 3 cisco switch

  1. 1. Difference between layer 2 and layer 3 Cisco switch Layer 2 switch operates by utilizing Mac addresses in it's caching table to quickly pass information from port to port. A layer 3 switch on the other hand, utilizes IP addresses to pass information from port to port. Generally, LAN switching is a form of packet switching used in local area networks. Basically a layer 2 switch operates utilizing Mac addresses in it's caching table to quickly pass information from port to port. A layer 3 switch utilizes IP addresses to do the same. While the previous explanation is the "What", for folks in networking the following "How" is far more interesting. Essentially, A layer 2 switch is essentially a multiport transparent bridge. A layer 2 switch will learn about MAC addresses connected to each port and passes frames marked for those ports. It also knows that if a frame is sent out a port but is looking for the MAC address of the port it is connected to and drop that frame. Whereas a single CPU Bridge runs in serial, todays hardware based switches run in hybrid, as one can imagine, of a router and a switch. There are different types of layer 3 switching, route caching andtopology-based. In route caching the switch required both a Route Processor (RP) and a Switch Engine (SE). The RP must listen to the first packet to determine the destination. At that point the Switch Engine makes a shortcut entry in the caching table for the rest of the Switch Engine makes a shortcut entry in the caching table for the rest of the packets to follow. Due to advancement in processing power and drastic reductions in the cost of memory, today's higher end layer 3 switches implement a topology-based switching which builds a lookup table and and poputlates it with the entire network's topology. The database is held in hardware and is referenced there to maintain high throughput. It utilizes the longest address match as the layer 3 destination. Now when and why would one use a l2 vs l3 vs a router? Simply put, a router will generally sit at the gateway between a private and a public network. A router can perform NAT whereas an l3 switch cannot (imagine a switch that had the topology entries for the ENTIRE Internet!!). In a small very flat network (meaning only one private network range for the whole site) a L2 switch to connect all the servers and clients to the internet is probably going to suffice. Larger networks, or those with the need to contain broadcast traffic or those utilizing VOIP, a multi network approach utilizing VLANs is appropriate, and when one is utilizing VLANs, L3 switches are a natural fit. While a router on a stick scenario can work, it can quickly overtax a router if there is any significant intervlan traffic since the router must make complicated routing decisions for every packet that it recieves. The Characteristics between the layer 2 and layer 3 Layer 2 switches themselves act as IP end nodes for Simple Network Management Protocol (SNMP) management, Telnet, and Web based management. Such management functionality involves the presence of an IP stack on the router along with User Datagram Protocol (UDP), Transmission Control Protocol (TCP), Telnet, and SNMP functions. The switches themselves have a MAC address so that they can be addressed as a Layer 2 1
  2. 2. end node while also providing transparent switch functions. Layer 2 switching does not, in general, involve changing the MAC frame. However, there are situations when switches change the MAC frame. The IEEE 802.1Q Committee is working on a VLAN standard that involves ?tagging? a MAC frame with the VLAN it belongs to; this tagging process involves changing the MAC frame. Bridging technology also involves the Spanning-Tree Protocol. This is required in a multibridge network to avoid loops. The same principles also apply towards Layer 2 switches, and most commercial Layer 2 switches support the Spanning-Tree Protocol. The previous discussion provides an outline of Layer 2 switching func-tions. Layer 2 switching is MAC frame based, does not involve altering the MAC frame, in general, and provides transparent switching in par-allel with MAC frames. Since these switches operate at Layer 2, they are protocol independent. However, Layer 2 switching does not scale well because of broadcasts. Although VLANs alleviate this problem to some extent, there is definitely a need for machines on different VLANs to communicate. One example is the situation where an orga-nization has multiple intranet servers on separate subnets (and hence VLANs), causing a lot of intersubnet traffic. In such cases, use of a router is unavoidable; Layer 3 switches enter at this point. Layer 3 Switches Layer 3 switching is a relatively new term, which has been ?extended? by a numerous vendors to describe their products. For example, one school uses this term to describe fast IP routing via hardware, while another school uses it to describe Multi Protocol Over ATM (MPOA). For the purpose of this discussion, Layer 3 switches are superfast rout-ers that do Layer 3 forwarding in hardware. In this article, we will mainly discuss Layer 3 switching in the context of fast IP routing, with a brief discussion of the other areas of application. More related: How To Recover Cisco Router Password The Difference of The Cisco Catalyst 2900 and Cisco Catalyst 1900 More Cisco products and Reviews you can visit: http://www.3anetwork.com/blog 3Anetwork.com is a world leading Cisco networking products wholesaler, we wholesale original new Cisco networking equipments, including Cisco Catalyst switches, Cisco routers, Cisco firewalls, Cisco wireless products, Cisco modules and interface cards products at competitive price and ship to worldwide. Our website: http://www.3anetwork.com 2
  3. 3. Telephone: +852-3069-7733 Email: info@3Anetwork.com Address: 23/F Lucky Plaza, 315-321 Lockhart Road, Wanchai, Hongkong 3