cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
53202
Views
14
Helpful
4
Replies

How to differentiate the layer 2 and layer 3 network devices?

ssweehin
Level 1
Level 1

How to differentiate the layer 2 and layer 3 devices (switch and router) and their functionality on each of the layer.

4 Replies 4

foxbatreco
Level 3
Level 3

In plain terms..L2 device will only workover with frames and nowhere related to IP logic.

Normally they do have more port density.

L3 devices will invoke L3 IP logic to parse the packet for details.They wud have low density of ports.

Anything which needs to moved/routed over to another hop/network involves L3 device while L2 device will purely switch frames based on the physical schema.

Best way to logically differentiate between these two is : U login to the device and issue "no switchport" interface mode command.

If this is accepted..den it should be an L3 device.

Hope this clears the cloud from u.

Pls rate/mark if this helps!!!

gpulos
Level 8
Level 8

Thats a good question given todays L2 and L3 devices can be the same physical device.

(ie: an L3 switch; which is basically an L2 switch with an L3 route processor, logic and software)

To determine which device is which, there are a few ways:

1) you can login to the device and run a 'show version' command.

The output of this command will show you many things including the software type & version as well as the hardware and its capabilities.

2) check the model number of the device. the model number will help you decide whether a device is a router or switch.

ie: routers - 17xx, 18xx, 26xx, 28xx, 36xx, 38xx,72xx, 76xx (to name just a few)

ie: switches: 19xx, 35xx, 36xx, 40xx, 45xx, 65xx (to name just a few)

(some of these devices can perform routing functions as well)

As far as functionality of the layers:

1) a switch operates at L2; L2 is the 'Data Link Layer' and this layer uses MAC addresses for communicating with hosts.

2) a router operates at L3; L3 is the 'Network Layer' and this layer uses Network addresses for communicating with hosts. (ie: ip addresses and ipx addresses)

Please see the following links for more info on routers and switches:

switches - http://www.cisco.com/en/US/products/hw/switches/index.html

routers - http://www.cisco.com/en/US/products/hw/routers/index.html

OSI model - http://www.cisco.com/en/US/docs/internetworking/technology/handbook/OSI-Protocols.html

qpulos has provided a very good explanation.

- The fundamental difference between a router and a Layer 3 switch is that Layer 3 switches have optimized hardware to pass data as fast as Layer 2 switches, yet they make decisions on how to transmit traffic at Layer 3, just like a router. Within the LAN environment, a Layer 3 switch is usually faster than a router because it is built on switching hardware. In fact, many of Cisco's Layer 3 switches are actually routers that operate faster because they are built on "switching" hardware with customized chips inside the box.

- Layer 3 Switching / Routing

Layer 3 switches are essentially Layer 2 switches with a routing engine

Designed to specifically route traffic between VLANs in a LAN environment

Routing over WAN networks can still be supported, simply by plugging a traditional router that connects to the WAN networks into the LAN

- Using Layer 3 switches for inter-VLAN routing as opposed to traditional routers is popular for the following reasons

Performance versus Cost-Layer 3 switches are much more cost effective than routers for delivering high-speed inter-VLAN routing. Routers have many more features and can support a wide variety of WAN media options; however, many of these extra features are not required for inter-VLAN routing.

Port density-Layer 3 switches have the same high port densities that Layer 2 switches have.

Flexibility-Layer 3 switches allow you to mix and match Layer 2 and Layer 3 switching

Check the below link for diffrence between l2 and l3 swith.

http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_1-2/switch_evolution.html

Regrads,

Pravin

scottmac
Level 10
Level 10

The briefest explanation is:

If it goes in one network interface using IP address block "A" and comes out on one or more interfaces with addresses on IP address block "B" {"C", "D", ...), then that traffic has passed through a Layer Three device.

Routers / Layer 3 devices can't pass traffic from one address block to the same address block ... only a bridge function (Layer 2) or repeater/hub can do that.

What about VLANs? They are a broadcast domain, and are logically the same as any other network segment, regardless of how many devices, Layer 2 or Layer three, that they pass through (pass through such that the broadcast domain remains intact, i.e., a GRE tunnel through a router).

Good Luck

Scott

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card